2 ms·
How does this compare with Chevrotain[1]? More specifically, can I build lexers with Ohm? Can it generate a syntax diagram from a grammar? [1]: https://github
by microflash 3y ago
How does this compare with Chevrotain[1]?
More specifically, can I build lexers with Ohm? Can it generate a syntax diagram from a grammar?
[1]: https://github.com/chevrotain/chevrotain https://github.com/chevrotain/chevrotain
- pdubroy 3y agoOhm and Chevrotain solve a similar problem, but chose quite different spots in the solution space. Ohm is focused on being easy to use. Grammars are generally very readable, and people love our online editor (https://ohmjs.org/editor/ https://ohmjs.org/editor/). Performance is fine for many use cases (hobby programming languages, query and schema parsers, etc.) but not good enough for a production programming language. Chevrotain is much more focused on performance — honestly, it blows Ohm (and some other tools like ANTLR and PEG.js) out of the water. The tradeoff is that writing grammars is a bit more complex than with Ohm, and the result is not as readable.