3 ms·
I've had great experience using PEG.js, another PEG-based parser generator. How does Ohm compare?
by simplify 9y ago
I've had great experience using PEG.js, another PEG-based parser generator. How does Ohm compare?
- pdubroy 9y agoIt's somewhat similar, but the main difference is that Ohm has a strict separation between syntax and semantics. We think this has several benefits, which we describe a bit here: https://github.com/harc/ohm/blob/master/doc/philosophy.md https://github.com/harc/ohm/blob/master/doc/philosophy.md Another difference is that Ohm grammars can contain left recursion -- both direct and indirect. IMHO this is a pretty big deal, but I know that some people don't agree, and think that avoiding left recursion is not a big problem.
- yazaddaruvala 9y agoAny thoughts on https://github.com/nikomatsakis/lalrpop https://github.com/nikomatsakis/lalrpop, and it's first priority being "Nice error messages"? Sidenote: I created this issue a while ago, but never got a response: https://github.com/nikomatsakis/lalrpop/issues/180 https://github.com/nikomatsakis/lalrpop/issues/180
- vidarh 9y ago'Nice error messages' is an important goal - it is one of a few things that tends to stop people from using parser generators for 'production' compilers. Parsing itself is the easy bit, and while things like left recursion can make some things a bit easier, the workarounds are so well understood it is not what stops people. But error handling does.