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
Vijay
I am Business Man
  • No comments found

Latest Articles

Chikungunya is a Mosquito borne viral disease caused by RNA virus. The word " Chikungunya" means " That which Bends up ", of the contorted posture of the
With the changing climatic conditions and rainfall pattern we need to shift our focus towards climate resilient crops.Hence Millets are seen as an alternative
Strong enough (223 Hits)
Mark was the second son of a Bank officer & a housewife. He was born in Perth Australia, & had his primary schooling there. He was very good at

Related Articles

Debit or credit card fraud is so common in today's world that just thinking about it can strike a fear. Thieves or hackers can strike your credit or debit
Well Well Well. Time has come to start writing about one of my favourite topic: Credit Cards.  What are they: The Concept is very old. Its just
Credit card is a way to freedom from cash but.... Most of us who use credit cards may feel secured and free from keeping cash in our wallets. However,
To purchase cell phone, we use credit card. To send money home we do online money banking. We will be worried if there is no ATM card with us. As we got
Most of the professionals swipe their plastic money called Credit cards without even thinking the ways to pay them and then after that they lose all