Before we know about the phases of compiler,we must know waht is compiler.

Compiler :

Compiler is a simple program  which reads a program written in one language (i.e., High Level Language (or) Source Language) and it translates to an equivalent target program (i.e., Low Level Language).

Now we are going to  know  what are the different phases of compilers.

Phases of Compiler:

Compiler consists of 2 phases.

1.Analysis Phase

2.Synthesis phase

1.Analysis Phase :

Analysis Phase performs 3 actions namely

a)Lexical analysis - it contains a sequence of characters called tokens.Input is source program & the output is tokens.

b)syntax analysis - input is token and the output is parse tree

c)Semantic analysis - input is parse tree and the output is expanded version of parse tree

2.Synthesis Phase :

Synthesis Phase performs 3 actions namely

d)Intermediate Code generation - Here all the errors are checked & it produce an intermediate code.

e)Code Optimization - the intermediate code is optimized here to get the target program

f) Code Generation - this is the final step & here the target program code is generated.

Like it on Facebook, +1 on Google, Tweet it or share this article on other bookmarking websites.

Written by
I am Business Man
  • No comments found

Latest Articles

Kids bring back some very vibrant childhood memories. The memories which are buried deep down, forgotten and almost lost. Until there is a kid (especially
One of the principles of politics and world power equations is that they are never static,  but dynamic and change at no stated interval. Thus we
Islam came to the sub-continent nearly 1300 years back when the first invasions from Arabia took place. Initially, the Muslims came to plunder but later

Related Articles

Micromax Canvas Colors A120 is my latest android medium budget phone. Well, this smart phone offers all latest android features that any other expensive
When I was a teenager I always thought that Apple was overrated and their products weren’t worth the price. Then I got an iPod touch, I used it for
Apple has recently launched their latest model of the iPhone which they call iPhone 5 and it already became fastest selling smart phone as per sources.
Samsung Corby Pro is generally the mobile phone which serves with good feature. It is very stylish and easily accessible. It has good feature. It is very
Samsung GALAXY Y, where Y stands for YOUNG. This mobile is majorly launched earlier in 2011 targeting the youth as an entry level android based smart phone.