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),
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),
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 {
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 {
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
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