Chapter 9: Code generation

Code Generator Generator

. Code generation by tree rewriting

. target code is generated during a process in which input tree is reduced to a single node

. each rewriting rule is of the form replacement template { action} where

- replacement is a single node

- template is a tree

- action is a code fragment