RTU Previous Question Papers B-Tech CSE 7th Sem
Compiler Construction Dec 2011
Paper Code: 7E4091
a) Explain all the phases of compiler with the help of suitable example.
b) What is the basic task of scanning? What are the difficulties found in delimiter oriented scanning? How can this be removed?
a) Explain the concept of input buffering in details.
b) What is the LEX? Explain.
a) Consider the following LL(1) grammar describing a certain sort of rested lists:
i) Left factor this grammar.
ii) Give the First and FOLLOW sets for each non terminal in the grammar obtain in part (i).
iii) Using this information construct an LL parsing table for the grammar obtained in part (i).
a) Explain various error recovery strategies in TOP DOWN parsing.
b) Show that following grammar:
(S,A,B are nonterminal. a, b,c,d are terminal) is LR(1) but not LALR(1).
c) Frame the transition table and Action/ Go to table for the grammar E->E+E|E*E|(E)|id.
a) Explain L attributed definition.
b) Give the syntax directed definition below with the synthesized attribute val, draw the annotated parse tree for the expression (3+4)*(5+6):
F->digit F.val=digit. Lean val.
Generate the three address code for the following c program:
} [Marks 16]
a) Explain procedure call with an example.
b) Explain various approaches to symbol table organization.
a) Explain format of an activation record.
b) If we want to support local arrays of variable size. Then suggest the storage allocation that is suitable to meet the requirement.
a) Construct the DAG for the following basic block:
b) Discuss various popular code improvement technique.
a) Explain basic block and control flow graph.
b) What is loop in variant computation? Give an example?