Re: [perl #133541] Grammer bug vs

2018-10-01 Thread Brent Laabs via RT
Actually, if you change it to .*| -- this will work as you expect. It's a bug that your version doesn't work, of course. It does seem to involve tangentially, but it is unrelated to underscore. On Mon, Oct 1, 2018 at 6:17 PM Vijayvithal via RT < perl6-bugs-follo...@perl.org> wrote: > This issu

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread Brent Laabs
Actually, if you change it to .*| -- this will work as you expect. It's a bug that your version doesn't work, of course. It does seem to involve tangentially, but it is unrelated to underscore. On Mon, Oct 1, 2018 at 6:17 PM Vijayvithal via RT < perl6-bugs-follo...@perl.org> wrote: > This issu

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread Vijayvithal via RT
This issue surfaces because of the token TOP line. If instead of | only ruport was used the testcase works for both cases. So it is quite possible that the bug is elsewhere but shows up as a difference between alpha and alnum. Regards Vijay On Fri, Sep 28, 2018 at 07:18:49AM -0700, Patrick R. M

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread Vijayvithal via RT
This is in conflict with the documentation at https://docs.perl6.org/language/regexes which states Alphabetic characters including _ And \w. plus In my example. '_' matches the alpha regex. As per specifications, Everything that matches alpha should match alnum. Which in the given example

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread vijayvithal jahagirdar
This is in conflict with the documentation at https://docs.perl6.org/language/regexes which states Alphabetic characters including _ And \w. plus In my example. '_' matches the alpha regex. As per specifications, Everything that matches alpha should match alnum. Which in the given example

Re: [perl #133541] Grammer bug vs

2018-10-01 Thread Vijayvithal
This issue surfaces because of the token TOP line. If instead of | only ruport was used the testcase works for both cases. So it is quite possible that the bug is elsewhere but shows up as a difference between alpha and alnum. Regards Vijay On Fri, Sep 28, 2018 at 07:18:49AM -0700, Patrick R. M

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Brent Laabs via RT
Golfs to just the top grammar, which is the only one that returns Nil. grammar Alnum1 { token TOP {|.*} } grammar AlnumReversed { token TOP {.*|} } grammar Alpha1 { token TOP {|.*} } my $rx = rx/^ [|.*] $/; my $str="n~"; .say for "=== ==", Alnum1.parse($str), "

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Brent Laabs
Golfs to just the top grammar, which is the only one that returns Nil. grammar Alnum1 { token TOP {|.*} } grammar AlnumReversed { token TOP {.*|} } grammar Alpha1 { token TOP {|.*} } my $rx = rx/^ [|.*] $/; my $str="n~"; .say for "=== ==", Alnum1.parse($str), "

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Patrick R. Michaud via RT
The 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 G0 { token TOP {|.*} regex rport { } rule ruport { } #token type {+} token type {+} } grammar G1 {

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Patrick R. Michaud
The 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 G0 { token TOP {|.*} regex rport { } rule ruport { } #token type {+} token type {+} } grammar G1 {

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Brent Laabs via RT
Are you sure about that? Underscore has been part of the specs (synopses) for for at least 10 years, probably longer. > "_" ~~ // 「_」 alpha => 「_」 On Thu, Sep 27, 2018 at 7:52 PM Brandon Allbery wrote: > "_" is not an alphabetic character. It's allowed in "alnum" because that > is by inten

Re: [perl #133541] Grammer bug vs

2018-09-28 Thread Brent Laabs
Are you sure about that? Underscore has been part of the specs (synopses) for for at least 10 years, probably longer. > "_" ~~ // 「_」 alpha => 「_」 On Thu, Sep 27, 2018 at 7:52 PM Brandon Allbery wrote: > "_" is not an alphabetic character. It's allowed in "alnum" because that > is by inten

Re: [perl #133541] Grammer bug vs

2018-09-27 Thread Brandon Allbery
"_" is not an alphabetic character. It's allowed in "alnum" because that is by intent what is \w in other regex implementations, which includes "_". On Thu, Sep 27, 2018 at 10:47 PM Vijayvithal wrote: > # New Ticket Created by Vijayvithal > # Please include the string: [perl #133541] > # in th

Re: [perl #133541] Grammer bug vs

2018-09-27 Thread Brandon Allbery via RT
"_" is not an alphabetic character. It's allowed in "alnum" because that is by intent what is \w in other regex implementations, which includes "_". On Thu, Sep 27, 2018 at 10:47 PM Vijayvithal wrote: > # New Ticket Created by Vijayvithal > # Please include the string: [perl #133541] > # in th

[perl #133541] Grammer bug vs

2018-09-27 Thread via RT
# New Ticket Created by Vijayvithal # Please include the string: [perl #133541] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=133541 > In the attached code, the only difference between the Grammars G0 and G1 is the defination