# 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 RULE (opens new window) DSL method with OVERRIDE_RULE (opens new window) method when needed.

See executable example (opens new window) for further details.