HANDBOOK / GENTLE PRIMER /

# Optimal Rule Selection

This section introduces cost-driven rule selection. This is of particular use for unparsing systems that do not define a unique translation. The compiler writer does not have to specify how to combine pieces to form the best translation but simply lists possible alternatives for the parts.

- Code Generation for Expressions
- A Stack Computer
- Unparsing
- A Computer with an Accumulator
- A Combined Stack and Accumulator Computer
- Nondeterministic Unparsing
- A Code-Generator Specification
- Cost-Driven Rule Selection
- Using Output Parameters
- The Two Processing Phases
- Well-formed Rules