[functional-tests/regex] fix bug in the star combinator

This commit is contained in:
Joe Thornber 2017-08-18 18:01:31 +01:00
parent df09bf2cc6
commit 9202e31725

View File

@ -72,12 +72,14 @@
(define (star rx) (define (star rx)
(let ((head (gensym)) (let ((head (gensym))
(body (gensym))
(tail (gensym))) (tail (gensym)))
(cons (split-instr head tail) (label-code head
(label-code head (cons (split-instr body tail)
(append-instr rx (label-code body
(jmp-instr head) (append-instr rx
(label-instr tail)))))) (jmp-instr head)
(label-instr tail)))))))
(define (plus rx) (define (plus rx)
(let ((head (gensym)) (let ((head (gensym))