Written by Vijay. Posted in General Reference on 03 July 2009.
Hot 27791 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 25
I am Business Man
  • No comments found
Powered by CjBlog

Latest Articles

Below you can find a few upper body exercises to not only strengthen the back but also prevent back pain:Before getting to know about these exercises,
We are a nation at cross roads.  The more we imagine ourselves to be very progressive, the more we are back to square one.  Yet, in spite of
 The sword is part of Hindu psyche and its origin can be traced to 5000 BC. The first mention of a sword is in the Mahabharata. The epic mentions

Categories

Related Articles

We are a nation at cross roads.  The more we imagine ourselves to be very progressive, the more we are back to square one.  Yet, in spite of
Jawaharlal Nehru was India's first prime minister. In a way, he was the most important man in Indian history after independence as he was to lead India
India is a secular democratic republic. Unfortunately, the world secular has not been  properly understood in India and many people including educated
Introduction India and China have been neighbours since the dawn of history. However, Tibet was the adjacent country and most times acted as a buffer
India became free in 1947 after the British had won a pyrrhic victory over Hitler's Germany. They at that time were too weak to hold on to their possessions