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
Regex bug on custom <ws> #1222
Comments
|
Same issue as Raku/nqp#367 when naming a match after an internal cursor method (that also affects the cursors state). |
|
@ugexe Raku/nqp#367 is closed, but the issue still exists. How about it? |
|
I’ve closed all my perl6 related PRs and issues. |
|
So it remains? I wonder if I can close this issue. |
The bug still exists. Don't close. |
|
@ugexe may I ask why? |
|
@moritz you can read more here. And here is the thing: I did not make any demands. I did say I would come back when I witnessed a change in attitude, but some have construed this as some type of ultimatum or demand. Unfortunately I think the fact that I did not give a concrete way to resolve this has brought me further animosity, yet i cannot give such an answer. And the answer may require time and self reflection, which is not a satisfactory to someone looking for that concrete right-now resolution path. I did not like what I was experiencing. I cut ties and backed out until the problem resolved itself, if ever. And now I’m experiencing additional problems for bringing this up period in my own way instead of what someone else thinks they might have done. I can use all this energy towards something productive, and maybe that includes perl 6 again sooner than later... but right now it’s a net negative for me (and strangely only getting worse). |
|
Thank for the explanation @ugexe, I totally missed that other thread. |
|
Ping? |
|
No idea what's going on. Feel free to open another issue if it still exists |
|
It's still there. |
|
As #1222 (comment), close this one. Please file another to continue the discussion if any. |
|
Reopening because this issue., although related, still exists while the problem of Raku/nqp#367 was fixed. |
|
Turns out this is not a shadowing issue at all, but an LTM issue: The custom Changing the order of the alternatives does make it match. According to jnthn, this is because if there are multiple alternatives with the same length declarative prefix, it will try them in order. Removing https://github.com/Raku/nqp/blob/main/src/QRegex/NFA.nqp#L376-L383 would allow a custom |
grammar { token ws { \s+ }; token zs { \s+ }; token TOP {['if' | 'if' <.zs> 'else'] $} }.parse("if else").say # OUTPUT: «「if else」»grammar { token ws { \s+ }; token zs { \s+ }; token TOP {['if' | 'if' <.ws> 'else'] $} }.parse("if else").say # OUTPUT: «Nil»zswas used to confirmwswas treated as non-declarative, even after you've redefined it in a declarative way.The text was updated successfully, but these errors were encountered: