| I'm less familiar with ometa. Chevrotain shares two main ideas/concepts with Ohm. 1. Separation of grammar and semantics, but in a less opinionated manner as it does not enforce the separation as Ohm does (it is still possible to embed actions directly in the grammar). 2. Grammar Inheritance. Although while those ideas are not common they are also
not that rare (For example the same concepts exist in Antlr). I think there are three big conceptual differences. 1. In Chevrotain Performance is considered as a major feature.
Which results in it being two orders of magnitude faster (in the benchmark linked above) 2. Chevrotain attempts to provides capabilities relevant for writing IDEs, for example automatic error recovery/tolerance and syntactic content assist. 3. Internal vs External DSL - From an implementation perspective there is a vast difference
as Ohm is an external DSL while Chevrotain is an internal DSL.
In practical(user) terms this means that you can place a breakpoint directly in a Chevrotain grammar, but you cannot do so in Ohm.
Or that you will need a separate editor to edit an Ohm grammar while
you can use any JavaScript editor to create a Chevrotain grammar. It also means that Ohm could be ported to different target runtimes (Like Antlr actually is) while Chevrotain can only
run in an ECMAScript engine. |