11.9.1 Interpretive Code Generators

11.9.2 Pattern Matching Code Generators

11.9.3 Table-Driven Code Generation

11.9 Retargetable Code Generation

Retargetable code generation is a step towards automatic code generation. The code generator is designed so that it can be changed to produce code for a new machine. These may be categorized (Ganapathi et al., 1982) as (1) interpretive code generators, (2) pattern matching code generators and (3) table-driven code generators. In all of these, an attempt is made to separate the code generation algorithm from the machine code itself. This fits our model of a driver and the information on which the driver operates with the code generation algorithm analogous to the driver.