4 ms·
How does one debug a grammar? This has always eluded me. Where is the special tooling to help spot errors?
by djoldman 1y ago
How does one debug a grammar? This has always eluded me.
Where is the special tooling to help spot errors?
- tiu 1y agoI am probably misunderstanding your requirements but if you are looking for something like regex101 then https://omrelli.ug/nearley-playground/ https://omrelli.ug/nearley-playground/ and https://bnfparser.firebaseapp.com/ https://bnfparser.firebaseapp.com/ although not sure how much 'practical' are they. Googling gives [2], [3], [4]. [2] https://mingodad.github.io/parsertl-playground/playground/ https://mingodad.github.io/parsertl-playground/playground/ not sure. [3] https://chrishixon.github.io/chpeg/playground/ https://chrishixon.github.io/chpeg/playground/ [4] https://mdkrajnak.github.io/ebnftest/ https://mdkrajnak.github.io/ebnftest/
- djoldman 1y agoThanks!
- dugmartin 1y agoIf you use something like Antlr (https://www.antlr.org/ https://www.antlr.org/) it has visualization tools and an online tester (http://lab.antlr.org/ http://lab.antlr.org/). There are also tools for visualizing generic EBNF grammars like this: https://jacquev6.github.io/DrawGrammar/ https://jacquev6.github.io/DrawGrammar/