-
Notifications
You must be signed in to change notification settings - Fork 1
Capturing separator (like /something % (.+?)/ ) spews out backtracking #4279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From @AlexDanielThis command: Outputs this: I can't see any reason why these partial matches should appear in the match 「rule1 foo rule2 bar」 |
From @AlexDanielI works this way though: 「rule1 foo rule2 bar」 Change [] to () and it will break the same way. On Sat, May 30, 2015 at 3:05 AM, perl6 via RT <perl6-bugs-followup@perl.org>
|
From @labster[7:31pm] AlexDaniel: m: grammar MyGrammar { regex TOP { ^ [ <foo> <bar> ]+ $ }; regex foo { 'ZZZ' }; regex bar { .*? }; }; my $data = 'ZZZ 123 ZZZ 456'; say MyGrammar.parse($data); So if you define <bar> inline, you get a single result, but if it's a regex you get multiple, backtracking(?) results. On Sat Jun 06 14:54:18 2015, alex.jakimenko@gmail.com wrote:
|
From @jnthnOn Fri May 29 17:05:32 2015, alex.jakimenko@gmail.com wrote:
This one took some figuring out... Anyway, fixed now: $ perl6 -e "say 'rule1 foo rule2 bar' ~~ /^ ( 'rule1' || 'rule2' )* %% (.+?) $/" Tests in S05-match/capturing-contexts.t. /jnthn |
The RT System itself - Status changed from 'new' to 'open' |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#125285 (status was 'resolved')
Searchable as RT125285$
The text was updated successfully, but these errors were encountered: