What are the phases of a compiler construction?

What are the phases of compiler construction?

Phases of a compiler:

The phases of a compiler are linking together on the similarities of function. Phases of compiler deals with logical organization. Many of the phases of a compiler are grouped in one pass that helps to improve the working of a compiler. As some of them do processing on input while other for output.

  • Front End
  • Back End

Further, these phases of the compiler also have many other sub-phases.

Front End:

The front end of phases of compiler depends on source language(input). It analyzes the input and produces intermediate code for the back end. All analysis on the input is done in this phase. It is independent of the target language(target machine). All the given functions are performed in this phase of the compiler.

  • Lexical analysis
  • Syntax analysis
  • Semantic analysis
  • Intermediate code generation


front end of compiler


Back end:

The back end synthesizes the target code from the intermediate code. The final code for execution is preparing in the back end phase.

  • Code optimization.
  • Code generation.


back end of compiler


For full detail of all these visit websites.As we collect all the information about all these points separately.

What is compiler history?

What are the types of Compiler?