On Mon, Jul 12, 2010 at 09:26:15PM -0400, Todd Olson wrote: > Question: Can Rakudo show its steps in applying the Perl6 grammer > to a Perl6 program similar to "use re 'debug'" in Perl5?
You can add a <?DEBUG> subrule somewhere in the grammar. When the grammar engine hits that subrule, it enables a debugging trace for the rule and all called subrules. The trace shows which subrules are being attempted, the position of the input, and whether the subrule ultimately succeeds or fails. For example, add <?DEBUG> to the top of the comp_unit rule to see a trace of all subrules called during a parse. Pm