Contents
Prev
Next
Page+10
Index
Sequential Phases of a Compiler[This
slide adapted from one by John Werth.]
Input is a source program.
- Lexical analyzer: characters → words
- Syntax analyzer: words → sentences
- Semantic analyzer
- Intermediate code generator
- Code optimizer
- Code generator
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.
These two modules are active throughout the compilation process:
- Symbol table manager
- Error handler