Vasily Chekalkin wrote:
> Илья wrote:
>> Hi,
>> 
>> PM> if the rule is called correctly it appears to work fine:
>> <snip>
>> PM> if 'foo' ~~ /<Bar::bar>/
>> 
>> So, I try to use that way:
>> 
>> grammar G {
>>     token TOP { ^ <foo>+ $ };
>>     token foo { ':' <bar>? };
>>     token bar { \w };
>> };
>> 
>> ":a:b:c" ~~ /<G::TOP>/;
>> 
>> say $/;
>> say $/<foo>; #Use of uninitialized value
>> say $_<bar> for $/<foo>; # Use of uninitialized value
> 
> Try $/<TOP><foo>

Or even $/<G::TOP><foo> (haven't tried it, though)

Moritz

Reply via email to