On Mon Sep 08 09:08:50 2008, [EMAIL PROTECTED] wrote:
> Rakudo, r30888. When defining a grammar and regex, defining a regex
> after a grammar places the regex in the grammar namespace, but vice
> versa works fine. Below is some demo code (switch the definition
> placements and comment out the check against Foo::Bar to see it
> magically work):
>
> grammar Foo {
> rule TOP {\d+}
> };
>
> regex Bar {\d+};
>
> # smart match against Foo may change based on RT 58676
> '123' ~~ Foo;
> say $/;
>
> '1234' ~~ Foo::Bar; # works?!?
> say $/;
>
> '12345' ~~ Bar; # fails
> say $/;
>
Ah yes, forgot to clear the thingy holding the current namespace. Fixed
it in r31006; if you have time to contribute a test for this somewhere,
that'd be wonderful.
Thanks for reporting,
Jonathan