Is there a way to validate .pest grammars? #617
Replies: 2 comments
-
I think this is definitely one of the shortcomings right now. We basically develop our grammars on https://pest.rs/#editor which has led to some big frustrations when we accidentally navigate away from the page and all our hard work has vanished. |
Beta Was this translation helpful? Give feedback.
-
I'm using pest-mode in emacs and it works beautifully. Having a test repl with the ast next to it is brilliant. I can't imagine trying to iterate on grammar without it. |
Beta Was this translation helpful? Give feedback.
-
I've worked a bit with other parser generators (parsers that operate from a PEG-style grammar), and typically there's a CLI tool that can catch / point out errors in the grammar. Is the only way to test a grammar to just try it and see if Rust compilation breaks? I notice that even the editor at pest.rs will throw unhelpful "unreachable" errors if something is wrong.
Beta Was this translation helpful? Give feedback.
All reactions