Created
May 16, 2012 14:31
-
-
Save perlpilot/2710781 to your computer and use it in GitHub Desktop.
Patch to remove **<sep>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/QRegex/P6Regex/Actions.nqp b/src/QRegex/P6Regex/Actions.nqp | |
index a310ec7..42d9d60 100755 | |
--- a/src/QRegex/P6Regex/Actions.nqp | |
+++ b/src/QRegex/P6Regex/Actions.nqp | |
@@ -116,15 +116,9 @@ class QRegex::P6Regex::Actions is HLL::Actions { | |
method quantifier:sym<**>($/) { | |
my $qast; | |
- if $<quantified_atom> { | |
- my $ast := $<quantified_atom>.ast; | |
- $qast := QAST::Regex.new( :rxtype<quant>, :min(1), $ast); | |
- } | |
- else { | |
- $qast := QAST::Regex.new( :rxtype<quant>, :min(+$<min>), :node($/) ); | |
- if ! $<max> { $qast.max(+$<min>) } | |
- elsif $<max>[0] ne '*' { $qast.max(+$<max>[0]); } | |
- } | |
+ $qast := QAST::Regex.new( :rxtype<quant>, :min(+$<min>), :node($/) ); | |
+ if ! $<max> { $qast.max(+$<min>) } | |
+ elsif $<max>[0] ne '*' { $qast.max(+$<max>[0]); } | |
make backmod($qast, $<backmod>); | |
} | |
diff --git a/src/QRegex/P6Regex/Grammar.nqp b/src/QRegex/P6Regex/Grammar.nqp | |
index e08b845..2344058 100755 | |
--- a/src/QRegex/P6Regex/Grammar.nqp | |
+++ b/src/QRegex/P6Regex/Grammar.nqp | |
@@ -98,7 +98,6 @@ grammar QRegex::P6Regex::Grammar is HLL::Grammar { | |
|| <.panic: "Only integers or '*' allowed as range quantifier endpoint"> | |
] | |
]? | |
- || <quantified_atom> | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment