Sequential Phases of a Compiler[This
slide adapted from one by John Werth.]
Input is a source program.
We may think of this as an analysis process (understanding what
the programmer wants to be done) followed by synthesis of a program
that performs the intended computation.
- Lexical analyzer
- Syntax analyzer
- Semantic analyzer
- Intermediate code generator
- Code optimizer
- Code generator
These two modules are active throughout the compilation process:
- Symbol table manager
- Error handler