Here's a basic tool I hacked up back in the day to help in debugging parsers, and I've found it indispensable.
@pchiusano added a wrapper to show backtracking too.
I don't have a strong opinion on where it lands in the parsec package, but it seems that a few people have now found it useful and it only really exists as folklore. It would be nice to add it to the parsec package proper in an appropriate location:
The text was updated successfully, but these errors were encountered:
`parserTrace label` is an impure function, implemented with "Debug.Trace" that prints to the console the remaining parser state at the time it is invoked. It is intended to be used for debugging parsers by inspecting their intermediate states. These are simple yet helpful helpers for debugging Parsec parsers. Closes #63