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

Well I don't think there's a better way to express your love for someone, than through songs. Cards, or the well planned 'unexpected gift at an unexpected
BUZZ SONGS (161 Hits)
If you're a Rock fan, you'll be aware that Rock music helps to raise your energy levels quickly. It creates a buzz, that re-energizes you. In this post
It all started off in Manchester, a band was formed by the Gallagher brothers. Liam & Noel Gallagher, started writing, & composing music, hoping

Related Articles

I've gone through a seachange in the last few years. I'm no longer the timid, tall guy that I was during my late teens, or the angry young man in my 20s.
Earlier in olden days before the invention of telephones and other means of communication people, people would travel miles and miles to see their friends,
 "Triple Talaq is here to go"- this made the headlines of majority of news channels in country. When the judgement against Triple Talaq was being
Photo of Mustang by me Oil changed the lifestyle of Dubai and overnight it was transformed into a vibrant city. Money from oil fueled an upsurge in
Before we discuss this topic, its worthwhile to dwell on an aspect of human relationship between sexes. Do men feel that there is a need for multiple sex