Written by Vijay. Posted in General Reference on 03 July 2009.
Hot 27077 hits 0 favoured
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.

Vijay

Author: Vijay

441 21813 15
I am Business Man
  • No comments found
Powered by CjBlog

Latest Articles

The Chinese Government has, early this week, devalued its currency by 1-2%. This has caused surprise and shock in world capital and stock markets. The
The aim of writing this articles is to throw some light on a critical and less known topic called ' Lead poisoning'. I believe lead is silent killer because
Also known as the “City of Joy” and the “Cultural Hub of India”, Kolkata is amongst few cities in India to still retain its old world charm. Located

Categories

Related Articles

As per science, the universe was born with the Big Bang. Religions argue that everything was created by an almighty God. Amidst the scientific theories
We are guests in this world; at the same time, we are hosts too. We have come as guests and are converted into hosts. That is the law of nature.  Everyone
Water is the elixir of life, the basic need for survival for any organism on the planet. It is known as a universal solvent and yet people are not aware
Man was not created by God, but was evolved from apelike ancestors; declared the evolutionist. Most of the religions became uncomfortable with this statement
Introduction Origin of life is one of the greatest challenges of scientists, which still remains as an unresolved mystery. There are different ways of