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
Sequential alternation ||
does not respect :ratchet
#5804
Comments
From @AlexDaniel*Code:* *Result:* :r (:ratchet) should prevent backtracking (trying different ways to match a To make the example above as clear as possible: || does not do LTM (longest There are several ways to make it clear that backtracking actually happens *Code:* *Result:* *Code:* *Result:* According to committable, this behavior has been there since the beginning |
From @smlsRelevant: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=123934#txn-1401917 In short, `||` alternations don't respect `:` in Rakudo, whereas `|` alternations (and other atoms such as quantifiers) do respect it. Simpler test-case: � say "ab" ~~ / [ "ab" | "a" ]: "b" /; � say "ab" ~~ / [ "ab" || "a" ]: "b" /; (Remember that `:ratchet` simply adds `:` to every atom.) |
The RT System itself - Status changed from 'new' to 'open' |
From @smlsI sent a pull request which fixes this bug: Please review. |
From @smlsOn Mon, 28 Aug 2017 11:50:51 -0700, smls75@gmail.com wrote:
The PR was merged (and Rakudo's nqp version bumped). Marking the ticket TESTNEEDED. (Note that some possible tests are listed in the PR description!) |
@smls - Status changed from 'open' to 'resolved' |
From @smlsTests were added here: Raku/roast@65a762217 |
Migrated from rt.perl.org#130117 (status was 'resolved')
Searchable as RT130117$
The text was updated successfully, but these errors were encountered: