Compiler Design - Architecture
Compiler Design - Architecture
A compiler Design’s architecture is majorly divided into two parts depending upon their compiling method.
Analysis Phase
Also called the Front-end compiler, this phase of the compiler goes through the source code/ source program as in any high-level language, separates it into its main fundamental parts, and after that compiler looks for error detection and recovery which includes lexical, syntax, and grammatical. The front end of the compiler produces an IR or Intermediate-conceptual representation of the source code with a symbol table as its output which is sent as an input to the synthesis phase.
Synthesis Phase
Also called the back-end compiler, this phase of the compiler makes target code or you can say machine code depending upon the system/ target machine, using the IR (intermediate-source-code-representation) fed as an input including the symbol table.
A compiler contains N number of phases and passes.
● Pass: A pass means the processing and running of the compiler throughout the whole program.
● Phase: A phase can be called a detectable stage of a compiler, which accepts the result of the previous stage as an input, analyzes and operates it to bring out the output which can be used further as an input for the proceeding stage. Moreover, a pass comprises multiple phases.
Frequently Asked Questions
BBA Management Eligibility, Top Colleges, Admission Process, Entrance Exams, Syllabus, Scope, Salary