Compiler Design - Phases of Compiler
Compiler Design - Phases of Compiler
Compiler Design - Phases of Compiler
Semantic Analysis
Semantic analysis checks whether the parse tree constructed follows the
rules of language
Code Optimization
The next phase does code optimization of the intermediate code.
Optimization can be assumed as something that removes unnecessary code
lines,
Code Generation
The code generator translates the intermediate code into a sequence of
(generally) re-locatable machine code.
Symbol Table
The symbol table makes it easier for the compiler to quickly search the
identifier record and retrieve it. The symbol table is also used for scope
management.
4. Program Translations
While we normally think of compiling as a translation from a high-level language
to the machine level, the same technology can be applied to translate between
different kinds of languages.