Hacker News new | ask | show | jobs
by gklitt 1908 days ago
Ohm’s key selling point for me is the visual editor environment, which shows how the parser is executing on various sample inputs as you modify the grammar. It makes writing parsers fun rather than tedious. One of the best applications of “live programming” I’ve seen.

https://ohmlang.github.io/editor/

2 comments

A lot of regex testers do this and I can't imagine writing a regex or a parser without.
>a parser without

can you show me a parser generator that produces this kind of visualization?

Not a syntactic parser generator, but [chevrotain](https://chevrotain.io/playground/) can generate flow diagrams for your ruleset. IIRC not just in the playground, but in general.
antlr has many that produces such visualization, vscode has some great plugins for it.
great thanks!
I used to debug parsing process for VHDL grammar (which is ambiguous on lexem level) with parsing combinators and Haskell REPL.

Whenever my "compiler" found a syntax error in test suite, I was able to load part of source around error and investigate where my parser's error or omission is by running parser of smaller and smaller part of grammar on smaller and smaller parts of input.

It was 12 years ago.

And yes, it is fun. ;)