Compiler Design Question Bank-UNIT 1
Compiler Design Question Bank-UNIT 1
Compiler Design Question Bank-UNIT 1
(Approved by AICTE, New Delhi & Affiliated to Anna University, Chennai) MANGAYARKARASI
NAGAR, PARAVAI, MADURAI – 625 402
Website: E-Mail: :
Source
Compiler Target
Program
Program
Error Messages
2. What are the two parts of Compilation? Explain briefly. (Understand) (Apr 2016, Apr 2017)
There are two parts of compilation process
Analysis part
Synthesis part
Analysis Part – It breaks up the source program into constituent pieces and applies the
grammatical structure on them. It uses this structure to create an intermediate representation
of the source program. It also collects information about the source program and stores it in a
data structure called symbol table.
The analysis must provide information to the user if the source program is
syntactically incorrect and semantically unsound, so the user can take the corrective
measures. The analysis part is called as front end of the compiler.
Synthesis Part – It constructs the desired target program from the intermediate representation
and the information in the symbol table. The synthesis part is called as back end of the
compiler.
Source Program
Preprocessor
Compiler
Assembler