Ohm's Peg-to-WASM Compiler

(ohmjs.org)

28 points | by azhenley 2 days ago

2 comments

  • joshmarinacci 1 hour ago
    I’ve been following the Ohm project for years and it’s the best way to build parsers I’ve ever seen. I’ve used it to parse many program languages and even markdown. I’m happy to see it get even faster.

    https://joshondesign.com/2021/07/16/ohm_markdown_parser

    • wslh 51 minutes ago
      What is great about the Ohm approach compared to typical lex/yacc/ANTLR parsers is that it avoids ambiguity by using ordered choice (the first matching rule wins), instead of requiring you to resolve conflicts explicitly. This makes working with Ohm/PEGs less painful in the initial phase of a project.

      It's also important to highlight that this makes the parsing process slower.

  • kristianp 2 days ago
    I'd be interested to know some applications of ohm. What have people built with it?