Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Add minimal form of quantifier by separator. Update STATUS.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Oct 9, 2009
1 parent 0b0e14d commit b7e9863
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion STATUS
Expand Up @@ -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 *, +, ?, *:, +:, ?:, *?, +?, ??, *!, +!, ?!
Expand All @@ -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
12 changes: 11 additions & 1 deletion src/PAST/Compiler-Regex.pir
Expand Up @@ -697,15 +697,25 @@ 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)
self.'!cursorop'(ops, '!mark_push', 0, 0, pos, '$I10')
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:
Expand Down

0 comments on commit b7e9863

Please sign in to comment.