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))))