Hi,

Am 19.07.2010 04:20, schrieb Stéphane Payrard:
Note that I sent a patch to that effect to p6c Jun 2  in a mail titled
"support of parsing from a non TOP rule"

Either somebody applied it, or it was superfluous - :rule<rulename> works in Rakudo (though I don't know if it works in nqp-rx).
Anyway, thanks for your patch.

use Test;  grammar A { token hi { hi } };  ok   A.parse( 'hi',
:rule<hi>) eq 'hi',  "Grammar.parse: :rule<somerule>"

Test passes.

BTW it's preferrable to use is($got, $expected, $message) instead of is($got eq $expected, $message), because the former gives better diagnostics if the test fails.

Cheers,
Moritz

Reply via email to