Permalink
Browse files

Update P5Regex to have user-chosen stopper hook.

Also means that a workaround can be eliminated.
  • Loading branch information...
1 parent 4a1f1e2 commit 77c0c7dad3b287501b425b3575ad9a15528a2d31 @jnthn jnthn committed Nov 1, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/QRegex/P5Regex/Grammar.nqp
@@ -54,6 +54,8 @@ grammar QRegex::P5Regex::Grammar is HLL::Grammar {
<alternation>
}
+ token rxstopper { $ }
+
token alternation {
<sequence>+ % '|'
}
@@ -64,7 +66,8 @@ grammar QRegex::P5Regex::Grammar is HLL::Grammar {
}
token quantified_atom {
- <![|)}/]>
+ <![|)]>
+ <!rxstopper>
<atom>
[ <.ws> <quantifier=p5quantifier> ]?
<.ws>

0 comments on commit 77c0c7d

Please sign in to comment.