Components of Compiler
Posted by Unknown
0
comments
Hello friends, in our previous posts we have discussed about
basics of compiler. Components of compiler are the next important step to
understand compiler. These are very important and interesting to understand
compiler. Compiler has been divided into no. of components to make its working
simpler. These works together to produce the desire output
1.
Analysis: In this part source program is broken
into constituent pieces and creates an intermediate representation of the
source program. It includes following important phases.
a.
Lexical analysis
b.
Syntax analysis
c.
Semantic analysis
2.
Synthesis: in this part construction of the
desired target program from intermediate representation is done. It includes
following important phases.
a.
Intermediate code generation
b.
Code optimization
c.
Storage allocation
d.
Code generation
These phases will be discussed in more detail in next posts.
1.
Earlier compilers were divided into many passes
to save SPACE. When each pass is finished, the compiler can free the space.
2.
Modern compiler user “TWO STAGE” design:
a.
First stage:
i.
front end: source language Intermediate
representation
b.
Second stage:
i.
Back end : intermediate representationàoutput language




