Introduction To Compilers
A Compiler is a software that typically takes a high level language (Like C++ and Java) code as input and converts the input to a lower level language at once. It lists all the errors if the input code does not follow the rules of its language. This process is much faster than interpreter but it becomes difficult to debug all the errors together in a program.
A compiler is a translating program that translates the instructions of high level language to machine level language. A program which is input to the compiler is called a Source program. This program is now converted to a machine level language by a compiler is known as the Object code.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
There are different Compilers :
- Cross-Compiler – The compiled program can run on a computer whose CPU or Operating System is different from the one on which the compiler runs.
- Bootstrap Compiler – The compiler written in the language that it intends to compile.
- Decompiler – The compiler that translates from a low-level language to a higher level one.
- Transcompiler – The compiler that translates high level languages.
A compiler can translate only those source programs which have been written in the language for which the compiler is meant. Each high level programming language requires a separate compiler for the conversion.
For Example, a FORTRAN compiler is capable of translating into a FORTRAN program. A computer system may have more than one compiler to work for more than one high level languages.
Top most Compilers used according to the Computer Languages –
- C– Turbo C, Tiny C Compiler, GCC, Clang, Portable C Compiler
- C++ -GCC, Clang, Dev C++, Intel C++, Code Block
- JAVA– IntelliJ IDEA, Eclipse IDE, NetBeans, BlueJ, JDeveloper
- Kotlin– IntelliJ IDEA, Eclipse IDE
- Python– CPython, JPython, Wing, Spyder