From 9202e31725c0bd6b66a7064a77560f60611b9919 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Fri, 18 Aug 2017 18:01:31 +0100 Subject: [PATCH] [functional-tests/regex] fix bug in the star combinator --- functional-tests/regex.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/functional-tests/regex.scm b/functional-tests/regex.scm index 9ad239f..be07229 100644 --- a/functional-tests/regex.scm +++ b/functional-tests/regex.scm @@ -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))