diff --git a/STATUS b/STATUS index e287386..bb2fe8c 100644 --- a/STATUS +++ b/STATUS @@ -41,7 +41,7 @@ The key files for the p6regex compiler are: src/Regex/P6Regex/Actions.pm # actions to create PAST from parse -Things that work (2009-10-09, 08h07 UTC): +Things that work (2009-10-09, 16h23 UTC): * bare literal strings * quantifiers *, +, ?, *:, +:, ?:, *?, +?, ??, *!, +!, ?! @@ -55,3 +55,5 @@ Things that work (2009-10-09, 08h07 UTC): * obsolete backslash sequences \A \Z \z \Q * \b, \B, \e, \E, \f, \F, \h, \H, \r, \R, \t, \T, \v, \V * enumerated character lists <[ab0..9]> +* quantified by numeric range +* quantified by separator diff --git a/src/PAST/Compiler-Regex.pir b/src/PAST/Compiler-Regex.pir index 06de29a..4be576d 100644 --- a/src/PAST/Compiler-Regex.pir +++ b/src/PAST/Compiler-Regex.pir @@ -697,8 +697,14 @@ second child of this node. .local pmc ireg ireg = self.'uniquereg'('I') if min == 0 goto frugal_1 - unless needrep goto frugal_2 + unless needrep goto frugal_0 ops.'push_pirop'('set', rep, 0) + frugal_0: + if null seppost goto frugal_2 + .local pmc seplabel + $S0 = concat qname, '_sep' + seplabel = self.'post_new'('Label', 'result'=>$S0) + ops.'push_pirop'('goto', seplabel) goto frugal_2 frugal_1: ops.'push_pirop'('set_addr', '$I10', q1label) @@ -706,6 +712,10 @@ second child of this node. ops.'push_pirop'('goto', q2label) frugal_2: ops.'push'(q1label) + if null seppost goto frugal_2a + ops.'push'(seppost) + ops.'push'(seplabel) + frugal_2a: unless needrep goto frugal_3 ops.'push_pirop'('set', ireg, rep) frugal_3: