The tasks of the compiler are grouped into the following two categories:
Analysis part
Synthesis part
Figure 3: Model of a compiler
Analysis Part:
This part breaks up the source code to smaller pieces and a grammatical structure is imposed.
This structure is used in creating an intermediate representation for the source program
This part comprises the front end of the compiler
Includes the phases that depends only on the source language and independent of the target machine
Lexical analysis, Syntax Analysis and semantic Analysis are considered as the analysis part of the compiler.
Synthesis part:
This part uses the intermediate representation and information stored in the symbol table in constructing the target code
This part is considered as the back end of the compiler.
Includes the phases that are dependent on the target machine
Code optimization and Code generation are included in this part of the compiler