Skip Menu |
Report information
Id: 126252
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: ronaldxs <ronaldxs [at] software-path.com>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Lexical character classes cannot be used for complement or combined
Download (untitled) / with headers
text/plain 551b
The last two cases below fail and they should not. The problem was discussed on IRC here: http://irclog.perlgeek.de/perl6/2015-10-02#i_11309820 . The error in both cases on my system reads: Method 'hexlet' not found for invocant of class 'Cursor' in block <unit> at unreserved.pl6:11 my token hexlet { <[A..F]> } grammar G { token TOP { <- hexlet> } token hexlet { <[A..F]> } } say so G.parse('.'); say so G.parse('A'); say so '.' ~~ /<- alpha>/; try { say so '.' ~~ /<- hexlet>/ } say $!; try { say so '.' ~~ /<[Q..Z] + hexlet>/ } say $!;
Download (untitled) / with headers
text/plain 332b
This bug is still present in Rakudo version 2016.09-21-g3ed51de built on MoarVM version 2016.09 implementing Perl 6.c. Shorter test-case: my token hexlet { <[A..F]> }; say "A" ~~ /<hexlet>/; # 「A」␤ hexlet => 「A」 say "A" ~~ /<- hexlet>/; # Method 'hexlet' not found for invocant of class 'Cursor'
Download (untitled) / with headers
text/plain 355b
Possibly more complete test case: my token hexlet { <[A..F]> }; say "A" ~~ /<hexlet>/; # 「A」␤ hexlet => 「A」 try { # Method 'hexlet' not found for invocant of class 'Cursor' say "A" ~~ /<+ hexlet>/ } // say "error: $!"; try { # also Method 'hexlet' not found for invocant of class 'Cursor' say "A" ~~ /<- hexlet>/ } // say "error: $!";


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org