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

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