Can a tree parser inherit from another tree parser?
Terence Parr Sure. In fact, this is a great way to do multiple-phase tree transformations. Have the super grammar contain all common rules and the complete set of token types used by your system so that the token types can be shared amongst all phases. (usually, the grammar of your phases changes but some of the token types need to overlap so phase n can create the input for phase n+1).