Course of Raku / Regexes and grammars / Grammars / Grammars, classes, and inheritance / Grammars are classes
Quiz — Inheriting grammars
Which keyword makes one grammar inherit from another?
| 1 | is |
| 0 | does |
| 0 | extends |
| 0 | inherits |
A grammar is a kind of class, so it uses the same inheritance
keyword: grammar Loud is Base { … }. The derived grammar
then inherits the base’s tokens and may override individual ones.