What is a compiler and its need?
A Compiler is a program or set of programs that converts source code written in a high-level language to low-level language (assembly language or machine language). A programming language can have many compilers. For example – GCC C, Turbo C, Quick C etc. are different compilers for C programming language.
Why do we need a compiler?
What do a compiler do?
- Performs a pre-processing of source code. Gather all files required for the source code to compile.
- Parses the entire source code. Checks for any syntax errors in the source code.
- Performs a thorough syntax analysis of the source code. To understand the structure and semantic of the source code.
- Optionally translates the source code in an intermediate code known as object code to enhance the performance.
- Translates the object code to binary language known as executable code.
Some popular compilers
Language | Compilers | Developed by |
---|---|---|
BASIC | FreeBASIC | FreeBASIC development team |
QuickBASIC | Microsoft | |
Visual Basic | Microsoft | |
C | GCC C | GNU Project |
Borland Turbo C | Embarcadero | |
Quick C | Microsoft | |
C++ | GCC | GNU Project |
Borland C++ | Borland | |
Visual C++ | Microsoft | |
C# | Visual C# | Microsoft |
Mono | Xamarin | |
Java | javac | Sun Microsystems (Owned by Oracle) |
gcj | GNU Project |
0 Comments: