I'm using the PGE/PCT tools for working with grammars on Parrot, and I have to say that while there's a lot of power, there's very little debugging support. What's more, the debugging that is possible seems to be "parrot debugging" --i.e., single-stepping through routines, etc. -- instead of "grammar debugging."

Given that P6 grammars are at least partially supported in P5, it seems like it would pay dividends to insert some sort of debugging mechanism at the grammar spec level.

Right now, I'm talking about things like understanding the paths and alternations considered by the parser. "Why is that rule being executed twice? Shouldn't this be a short-name instead of an identifier?" Maybe this is purely output-oriented, at least for early days, but the ability to set some kind of $grammar.trace(1) flag would be a real win.

It may be that there are other useful things to get from the engine than rule sequencing. But that's the level I'm operating at right now, and I can't think of the other stuff (possibly because all these trees are in the way...).


Reply via email to