Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Will Coleda
Recommended to use ".fc" instead of ".uc" when trying to do manual case-insenstive matches. (helps out with unicode edge cases) On Thu, Mar 9, 2017 at 1:48 PM, Theo van den Heuvel wrote: > however in such a simple case we could just write > > token idf { $=[ \w+ ] .uc eq 'WHERE' }> } > > > cheer

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Theo van den Heuvel
however in such a simple case we could just write token idf { $=[ \w+ ] .uc eq 'WHERE' }> } cheers, Theo van den Heuvel schreef op 2017-03-09 19:42: I use something like token idf { $=[ \w+ ] ~~ :i/^ where $/}> } but there are likely to be simpler solutions. yary schreef op 2017-03-09 1

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Theo van den Heuvel
I use something like token idf { $=[ \w+ ] ~~ :i/^ where $/}> } but there are likely to be simpler solutions. yary schreef op 2017-03-09 16:12: The method for defining reserved words in general is to have a rule that matches them (typically "match anything in this array" or a long alternatio

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread yary
The method for defining reserved words in general is to have a rule that matches them (typically "match anything in this array" or a long alternation), and then modifying the rules where those reserved words are not allowed to reject them. So for that grammar, you want to change "identifier" to re

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Timo Paulssen
Hi, Wouldn't it be enough to use something that backtracks? As you might know, "token" is "regex + ratcheting" and "rule" is "token + sigspace". HTH - Timo

How to defined reversed word in a perl6 grammar ?

2017-03-08 Thread jeanpierre . carayol
Hi, I'd like to know how can I define reserved word in a Perl6 grammar. If you have a look at https://gist.github.com/anonymous/2c04533cb3a61a00b8822ea20237ba7e , you will find a small perl grammar for parsing from clause of sql statement. The issue is when I execute this testcase that the