Lexical Analysis in Compiler
Posted by Unknown
0
comments
One of the most important part of compiler is LEXICAL ANALYSIS. In the following posts we will going to discuss about this phase. It plays a initial role in the working of compiler
Components of Compiler
Posted by Unknown
0
comments
Hello friends, in our previous posts we have discussed about
basics of compiler. Components of compiler are the next important step to
understand compiler. These are very important and interesting to understand
compiler. Compiler has been divided into no. of components to make its working
simpler. These works together to produce the desire output
Compiler Design
Posted by Unknown
0
comments
The study of compiler can be considered as the boost to
the computer programming language. It saves a lot of effort of the programmer
and makes the development of an applications much more easier.
So what is a COMPILER?
Why do we need it?
How it can be developed?
All these questions will be answered in the following post.
WHAT IS A COMPILER?
It is a program that reads a program in one language(source language) and translate it into EQUIVALENT program in second language(target language).
So what is reason of translating one language into another. The answer is simple we must be getting some kind of benefits from it then only we are doing this translation.
Let us understand compiler’s need with the help of and example.
Suppose you want to write a program to find square of a number in “machine language”. You must be thinking that it would be very difficult to write a simple program in machine language and indeed it is very difficult. So suppose if want to build a big application then writing programs in machine language is not possible. So overcome this problem we developed a new language which is easy to understand and implement(English like language).
Also we know that finally program has to be in machine language to get executed , so this new language has to converted to machine language and for this conversion we use COMPILER.
Source language-->COMPILER-->Target language
What are the basic requirement that a compiler must fulfill :-
1. Correctness : the translation performed by the compiler must be correct because failure in the compiler will lead to the failure of final application.
2. Efficiency : the time and space required by compiler for the translation purpose should be optimum.
3. Inter-operability : programs runs with library codes and not in isolation so it is required for compiler to perform inter-operation between interfaces.
4. Usability : the compile must be easily usable by all the user.
5. Retargetability : a compiler may generate more then one “target code”.
Components of compiler:
Compilation procedure is divided into 6 phases and these are grouped into 2 parts.
1. Analysis
What happens in this is that the given source program is broken into different pieces and creates an intermediate representation.
It also consists of some intermediate operations which will be available in the next posts.
2. Synthesis
In this the construction of desired target program done from the intermediate representation.
It consists of several operations which can be read from the next posts.
POINTERS IN C
Posted by Unknown
0
comments
We have discussed about the basics of C.But without the use of pointers it is incomplete.
So what are pointers?Why do we need them? All these questions will be answered in the following
discussion.Pointers are the variables that contain address of another variable.




