A Compiler is a program that reads a program written in one language and translates it into an equivalent program in another language the Target Language.
We all write our codes in HLL ( High Level language) (in English) and computer only understands Binary(0,1). So to execute our programs we need one compiler through which our programs can be understand and run by Computer and that is why we need COMPILER..
There are two parts of compilation:Source Language--> Compiler--> Target Language
What is happening in Language Processing System??
- First, We need executable program and executable files (Remember when we install any software in our system we need .exe file/setup file. These both are same to run a program).
- Need source programs also called all modules to execute the program and all distinct program called Preprocessor. (Remember lot of files executes simultaneously to install a software.. like green colour small boxes type).
- The compiler assembly codes that is translated by an assembler into machine code and then linked together with some other library routines into the code actually runs on the machine.
- Finally we get our Machine Code and now we can understand how its working..
- Everything you are doing in system its always translated by system softwares and they all are called Compilers.
Compiler has simple work routine and a fixed process how we can translate one language into another one.
- Lexical Analyzer
- Syntax Analyzer
- Semantic Analyzer
- Intermediate Code Generator
- Machine Independent Code Optimizer
- Code Generator
- Machine Dependent Code Optimizer
- We learnt what is compiler??
- We understood Language Processing system??
- Phases of Compiler??
- Further we will categorize Phases of Compiler??
- Try to understand if we don't have compilers so how can we talk with computers??
- If we don't have compilers so computer can not work fast as much as its doing right now because all the instructions and any big to big program will definitely convert into Machine language and in the form [0,1].
- Further will see in next chapter till den..visit my website and have fun..