Compiler Design Aug 2021
Compiler Design Aug 2021
Compiler Design Aug 2021
4. Develop LR parser for the given grammar and check the acceptance of [14M]
input string of your own: RR+|+R|RR|R*|(R)|a|b.
5. a) Write and explain semantic rules for flow-of-control statements like [7M]
if-then, do-while and switch-case.
b) Convert the following expression into syntax tree and three address [7M]
code: h=(b*-(a+b)/d)-c+6.
6. a) What are the issues to be considered while generating code? Explain [7M]
with code generation algorithm.
b) Explain division of tasks between caller and callee in stack allocation [7M]
scheme.
7. a) Write short notes on: i) Instruction Scheduling; ii) Elimination of Loop [7M]
invariant variable.
b) Explain the equation for identifying live variables in a given flow [7M]
graph with dataflow analysis.
*****
|''|''|||''|'''|||'|