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).

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact