4 ms·
I'm particularly impressed with the visual PEG debugger tool, here: https://ohmjs.org/editor https://ohmjs.org/editor PEGs are extremely difficult to debug whe
by Cadwhisker 2y ago
I'm particularly impressed with the visual PEG debugger tool, here: https://ohmjs.org/editor https://ohmjs.org/editor
PEGs are extremely difficult to debug when things go wrong because you get a MASSIVE trace (if you're lucky) to sift through. This tool has rewind/playback controls to dig into what the PEG rules are doing.
Previously, the best I'd seen was cpp-peglib's online parser, here: https://yhirose.github.io/cpp-peglib/ https://yhirose.github.io/cpp-peglib/
Edit: and now having read through comments here, Chevrotain's PEG tool looks really impressive, although it doesn't use a simple PEG syntax for the input: https://chevrotain.io/playground/ https://chevrotain.io/playground/
- pdubroy 2y agoThanks for the kind words :) I also wrote a blog post about some of the decisions that went into the visualizer: https://dubroy.com/blog/visualizing-packrat-parsing/ https://dubroy.com/blog/visualizing-packrat-parsing/
- Cadwhisker 2y agoI spent some time looking at debugging with Chevrotain and your solution is so much easier to use. That's a great blog post; thanks again.