Welcome to the CHICKEN Scheme pasting service

parser with comparse added by anonymous on Sun Aug 25 17:29:38 2019

(define parse-command
  (bind (sequence (any-of parse-assign parse-loop) (is #\;))
        (lambda (s) (result (car s)))))

(define parse-commands
  (zero-or-more parse-command))

(define parse-loop-body
  (enclosed-by (char-seq "DO") parse-commands (char-seq "DONE")))

(define parse-loop
  (sequence* ((_    (char-seq "LOOP"))
              (cond parse-value)
              (body parse-loop-body))
    (result (list 'loop cond body))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which egg implements a Scheme to JavaScript compiler?
Visually impaired? Let me spell it for you (wav file) download WAV