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
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
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
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
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
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
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 inten
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
"_" 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
"_" 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
# 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
15 matches
Mail list logo