Re: match an empty string?

2014-07-13 Thread Marc Chantreux
hello David, A Perl 6 equivalent is:     token gecos { - [':']* } thanks for those explainations. jnthn gave those yesterday on the friendly #perl6 freenode channel and i have to admit i'm not confortable with the backtracking part. Anyway: i got the syntax thing and finished the program.

Re: match an empty string?

2014-07-13 Thread Moritz Lenz
Hi all, On 13.07.2014 00:15, David Warring wrote: Hi Marc, This looks like a Perl 5 complementary character match: [^:]* But it means something quite different in Perl6. From S05 http://perlcabal.org/syn/S05.html Bracket rationalization

match an empty string?

2014-07-12 Thread Marc Chantreux
hello, using perl6 version 2014.04 built on MoarVM version 2014.04 i'm trying to write a grammar to parse the result of a `getent passwd` but when i test the gecos (which could be empty), i fall into a loop. the pb appears whenever i try to match something that can be empty using the *

Re: match an empty string?

2014-07-12 Thread David Warring
Hi Marc, This looks like a Perl 5 complementary character match: [^:]* But it means something quite different in Perl6. From S05 http://perlcabal.org/syn/S05.html Bracket rationalization http://perlcabal.org/syn/S05.html#Bracket_rationalization [ ... ] is no longer a character class. It now