grammar-debugger
grammar-debugger copied to clipboard
Added the ability to toggle tracer output at runtime.
This exports a new function from the Grammar::Trace class, "GrammarTraceMode($mode)", to allow toggling trace output at runtime. Supported options are Always (default, matching existing behavior), Never, or Error. In the latter case, the trace will be output only if the Grammar failed to find a match.
This commit builds upon changes made by nkh to cleanup rendering, though that discrete commit has been squashed due to merge conflicts.