[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)
(let ((head (gensym))
(body (gensym))
(tail (gensym)))
(cons (split-instr head tail)
(label-code head
(append-instr rx
(jmp-instr head)
(label-instr tail))))))
(label-code head
(cons (split-instr body tail)
(label-code body
(append-instr rx
(jmp-instr head)
(label-instr tail)))))))
(define (plus rx)
(let ((head (gensym))