What is Compiler
A compiler is a program that converts statements written in some particular programming language into a low-level language (Machine Level Language or Assembly Language).
The above diagram depicts the flow of language processing in the computer system. There are various software programs other than Compiler like Pre-processor, Assembler, Linker, Loader that perform some specific tasks so that a system can understand the code written in high-level languages like C, C++, Java. In this article, we will discuss the compiler only.
Phases of Compiler
Compiler Consists of six phases:
- Lexical Analyzer
- Syntax Analyzer
- Semantic Analyzer
- Intermediate Code Generator
- Code Optimizer
- Target Code Optimizer
The first four phases are called analyzers and the last two phases are called synthesizers.