Page |1
ACE
Engineering College
(An Autonomous Institution)
ACE-R20
Question Paper Code: CS602PC
Semester End Examination
III B. Tech- II Semester Regular & Supplementary Examination- August -2024
COMPILER DESIGN
(CSE)
Time: 3 Hours Max. Marks: 70
H. T. No
Note: This question paper contains two parts A and B.
1.Part A is compulsory which carries 20 marks. Answer all questions in Part A.
2. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries
10 marks and may have a, b as sub questions
PART- A MARKS: 10*2=20
Q.No: 1 Question Marks
a) Define finite automata 2
b) What is the purpose of the Lexical-Analyzer Generator LEX? 2
c) Differentiate between top-down parsing and bottom-up parsing. 2
d) What is LR parsing. 2
e) Define three-address code (TAC). 2
f) What is the role of L-attributed SDDs in syntax-directed translation? 2
g) Define Activation tree. 2
h) List out the disadvantages in the design of a Code generator. 2
i) Define basic block? 2
j) Define Data Flow Analysis. 2
Page |2
PART- B MARKS: 5*10=50
Q.No Question Description Marks
2. Describe the design and working of a Lexical-Analyzer Generator ( LEX) including 10
its application.
(OR)
3 Discuss the steps involved in the optimization of DFA-based pattern matchers in 10
lexical analysis.
4 Consider the following grammar. 10
S-> AS|b,
A->SA|a
Construct the SLR parse table for the above grammar. Show the actions of the parser
for the input string abab
(OR)
5. Explain LR parsers in detail with examples. 10
6 Explain with an example to generate the intermediate code for the flow of control 10
statements.
(OR)
7 Describe the various components of syntax-directed definitions (SDDs) and discuss 10
their role in compiler design.
8 Differentiate between stack and heap storage with an example. 10
(OR)
9 Define Code Optimization. Explain about the types of Code Optimization. 10
10 Explain about the Loop Optimization techniques in detail. 10
(OR)
11 Explain about the Constant Propagation With an example. 10