Skip to content

Commit 77c0c7d

Browse files
committed
Update P5Regex to have user-chosen stopper hook.
Also means that a workaround can be eliminated.
1 parent 4a1f1e2 commit 77c0c7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/QRegex/P5Regex/Grammar.nqp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ grammar QRegex::P5Regex::Grammar is HLL::Grammar {
5454
<alternation>
5555
}
5656

57+
token rxstopper { $ }
58+
5759
token alternation {
5860
<sequence>+ % '|'
5961
}
@@ -64,7 +66,8 @@ grammar QRegex::P5Regex::Grammar is HLL::Grammar {
6466
}
6567

6668
token quantified_atom {
67-
<![|)}/]>
69+
<![|)]>
70+
<!rxstopper>
6871
<atom>
6972
[ <.ws> <quantifier=p5quantifier> ]?
7073
<.ws>

0 commit comments

Comments
 (0)