ND-2020-CS 2352-Principles of Compiler Design
ND-2020-CS 2352-Principles of Compiler Design
S → A a | b
A → Ac | S d |∈
6. Define backpatching.
11. a) Explain in detail about the phases of compiler and translate the statement
pos : = init + rate * 60. (16)
(OR)
b) Compare NFA and DFA. construct a DFA directly from an augmented regular
expression ((ε/a)b*)*. (16)
14. a) i) Explain in detail about the various issues in design of code generator. (10)
ii) Write an algorithm to partition a sequence of three address statements
into basic blocks. (6)
(OR)
b) i) Explain the code-generation algorithm in detail. (8)
ii) Construct the dag for the following basic block. (8)
d : = b* c
e : = a + b
b : = b * c
a : = e – d
–––––––––––––