Grammar Inheritance

Chevrotain supports Grammar Inheritance, This is useful to represent multiple variants of the same grammar for example a grammar for ECMAScript 6 extends an ECMAScript 5.1 grammar.

Chevrotain Grammars are JavaScript classes, so Grammar inheritance is simply JavaScript inheritance with the replacement of the RULEopen in new window DSL method with OVERRIDE_RULEopen in new window method when needed.

See executable exampleopen in new window for further details.