Roll No.. Total No.
of Printed Pages: 101
Total No. of Questions: [09
B. Tech CSE (Semester 5")
-
COMPILER DESIGN
sUBJECT coDE: BCSESI501
Paper ID: [18111120
Time: 03 Hours Maximum Marks: 60
Instruction for candidates:
1. Section A is compulsory. It consists of 10 parts of two marks each.
2. Section B consist of 5 questions of 5 marks each. The student has to attempt any 4
questions out of it.
. Section C consist of 3 questions of 10 marks each. The student has to attempt any 2
questions.
Section - A (2 marks each)
Q1. Attempt the following:
a. Define Input Buffering and its application.
b. ldentify the different types of tokens in the expression: total_val = count + val * 45
Differentiate between syntax tree and parse tree.
d. Define peephole optimization.
e. Define push down automata.
f. What is symbol table?
g. What is ambiguity in parsing phase?
h. List various operations in SLR parser.
i. Define regular expression.
. Define activation record.
Section - B
(5 marks each)
Q2. Design DFA over alphabet set = {a, b} that accept all strings start with ab.
Q3. Discuss code generation phase of compiler.
Q4. What is YACC? Explain its role in compiler development.
Q5. Explain various types of memory allocations in run time environment.
Q6. Translate the expression: -(a+b)*(ctd) in three address code and represent it as
quadruples.
Section C (10 marks each)
Q7. Construct transition diagram and parsing table for LR(0) parser with following grammar:
S->AA
A->aA/b
Q8. What is code optimization? Explain various types of code optimization.
Q9. Explain various phases of compiler in detail.