SmaCC: Transforming the AST #4117
-
I understand that I can transform the source code but are there examples of transforming the AST? For example, I would like to type-check my CPU architecture AST and replace string identifiers with instances of register classes, instructions, etc. @j-brant |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The Transformations section of the SmaCC booklet says
Are these Are there any examples of using these, as well as matching primitives like |
Beta Was this translation helpful? Give feedback.
-
If I'm doing large scale changes, I use the transformation toolkit. For example, here's what I use to convert antlr grammars:
|
Beta Was this translation helpful? Give feedback.
If I'm doing large scale changes, I use the transformation toolkit. For example, here's what I use to convert antlr grammars: