Carl (>), Ovid (>>):
>> As a follow-up to this, I have my code posted at
>> http://blogs.perl.org/users/ovid/2009/12/configini-in-perl-6.html
>>
>> While my admittedly clumsy grammar matches, transforming it into an AST has
>> failed miserably.
>>
>> Aside from the advent calendar or the online d
Ovid (>):
> As a follow-up to this, I have my code posted at
> http://blogs.perl.org/users/ovid/2009/12/configini-in-perl-6.html
>
> While my admittedly clumsy grammar matches, transforming it into an AST has
> failed miserably.
>
> Aside from the advent calendar or the online docs at
> http://p
Wiki - http://www.perlfoundation.org/perl6
- Original Message
> From: Patrick R. Michaud
> To: Ovid
> Cc: perl6-langu...@perl..org
> Sent: Sun, 27 December, 2009 16:57:44
> Subject: Re: Debugging Grammars
>
> On Sun, Dec 27, 2009 at 01:30:18AM -0800, Ovid wrote:
&g
- Original Message
> From: Patrick R. Michaud
> Any \s* will end up matching the final \n, and since quantifiers
> in tokens default to "non backtracking", \s* \n in a token will
> always fail. (In P5, it'd be like "(?>\s*)\n".) Perhaps
> \h* \n would do what you want here?
Works l
On Sun, Dec 27, 2009 at 01:30:18AM -0800, Ovid wrote:
>
> my $config = Config::Tiny::Grammar.parse($text);
> #say $config ?? 'yes' || 'no';
> say $config.perl;
>
> Currently this matches, but if I add a \s* before the final \n
> in the section token, it fails to match. I don't know
To understand grammars better, I figured I would convert Config::Tiny to Perl
6. I've started with the following:
grammar Config::Tiny::Grammar {
token TOP {
?
+
}
token root_section {
+
}
token section {