On Thu Nov 20 19:59:03 2008, [EMAIL PROTECTED] wrote: > This code works in Rakudo rev 32970: > > grammar GrammarOne { token foo { 'foo' }; } > grammar GrammarTwo { token foobar { <GrammarOne::foo> 'bar' }; } > 'foobar' ~~ GrammarTwo::foobar or die 'failed one-level namespace > grammar'; > > But this code does dies: > > grammar Grammar::A { token foo { 'foo' }; } > grammar Grammar::B { token foobar { <Grammar::A::foo> 'bar' }; } > 'foobar' ~~ Grammar::B::foobar or die 'failed two-level namespace > grammar'; > > The attached patch fixes the latter problem.
Patch rejected, as neither 'foobar' ~~ GrammarTwo::foobar nor 'foobar' ~~ Grammar::B::foobar are correct syntax for invoking a regex inside of a grammar. We don't know what the correct syntax is yet, but we know that this isn't it. Rakudo implements the first syntax from an earlier synopsis spec that has since been changed. We should probably adjust Rakudo so that it doesn't accept that form either. So, I'm converting this ticket to indicate a "todo" of remove the incorrect regex invocation syntax. Thanks! Pm