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
Grammar bug <alnum> vs <alpha> #6688
Comments
From jvs@dyumnin.comIn the attached code, the only difference between the Grammars G0 and G1 Since the string being matched is 'sc_in' both the alpha and alnum =========== <alnum> Example============== Perl Version is This is Rakudo Star version 2018.06 built on MoarVM version 2018.06 -- |
From jvs@dyumnin.comgrammar G0 { grammar G1 { |
From @geekosaur"_" is not an alphabetic character. It's allowed in "alnum" because that is On Thu, Sep 27, 2018 at 10:47 PM Vijayvithal <perl6-bugs-followup@perl.org>
-- |
The RT System itself - Status changed from 'new' to 'open' |
From @labsterAre you sure about that? Underscore has been part of the specs (synopses)
On Thu, Sep 27, 2018 at 7:52 PM Brandon Allbery <allbery.b@gmail.com> wrote:
|
From @pmichaudThe issue doesn't seem to be the underscore, because I get the same result even when converting the underscore into a letter ('b'): $ cat gentb.p6 grammar G1 { $ perl6 gentb.p6 On Fri, Sep 28, 2018 at 02:26:41AM -0700, Brent Laabs wrote:
|
From @labsterGolfs to just the top grammar, which is the only one that returns Nil. grammar Alnum1 { my $str="n~"; .say for "=========== <alnum> ==============", On Fri, Sep 28, 2018 at 7:19 AM Patrick R. Michaud via RT <
|
From jvs@dyumnin.comThis is in conflict with the documentation at https://docs.perl6.org/language/regexes which states <alpha>Alphabetic characters including _ And <alnum>\w. <alpha> plus <digit> In my example. '_' matches the alpha regex. As per specifications, Everything that matches alpha should match alnum.
|
From jvs@dyumnin.comThis issue surfaces because of the token TOP line. If instead of Regards On Fri, Sep 28, 2018 at 07:18:49AM -0700, Patrick R. Michaud via RT wrote:
-- |
From @labsterActually, if you change it to <ruport>.*|<rport> -- this will work as you On Mon, Oct 1, 2018 at 6:17 PM Vijayvithal via RT <
|
Guess this has not been fixed yet. Although it's not really clear what the issue is. |
Looking at the definition of the rules: The only difference seems to be the class of characters it accepts. In the second case it's |
This might be a version of #6570 or related to that in some way, since it involves ratcheting and alternation. As a matter of fact, it does not seem to happen for alpha, so it might go a bit deeper than that. |
Migrated from rt.perl.org#133541 (status was 'open')
Searchable as RT133541$
The text was updated successfully, but these errors were encountered: