3 ms·
So basically ohm is Ian Piumarta's peg compiling to JavaScript, not C. And ohm-editor is the visualizer when going down the operator precedence rabbit-hole, whi
by rurban 10y ago
So basically ohm is Ian Piumarta's peg compiling to JavaScript, not C. And ohm-editor is the visualizer when going down the operator precedence rabbit-hole, which is the only peg problem, compared to a conventional back-recursive parser generator. One advantage of peg is that it doesn't need a flex lexer. Strange name then. I would have called it pegjs.
- igravious 10y agore: pegjs - that name is taken - https://pegjs.org/ https://pegjs.org/ Have used it in the past, would use it again.
- awarth 10y agoFrom Ohm's README file: > Like its older sibling OMeta, Ohm supports object-oriented grammar extension. One thing that distinguishes Ohm from other parsing tools is that it completely separates grammars from semantic actions. In Ohm, a grammar defines a language, and semantic actions specify what to do with valid inputs in that language. Semantic actions are written in the host language -- e.g., for Ohm/JS, the host language is JavaScript. Ohm grammars, on the other hand, work without modification in any host language. This separation improves modularity, and makes both grammars and semantic actions easier to read and understand. You can read all about it here: https://github.com/harc/ohm https://github.com/harc/ohm