Compiler Design 18CSC28 (2)
Compiler Design 18CSC28 (2)
: 18CSC28
CHAITANYA BHARATHI INSTITUTE OF TECHNOLOGY (Autonomous)
B.E. (CSE) VII Sem (Main) Examination December 2021
Compiler Design
Time: 3 Hours Max Marks: 70
Note: Answer all questions from Part - A and Part – B at one place in the same order.
13 (a) Construct FIRST and FOLLOW sets for the following grammar (5) 3 3
S iEtSS’/a S’ eS/E E b.
(b) Write the algorithm for the construction of predictive parsing (5) 3 2
table.
(OR)
Page 1 of 2
Code No.: 18CSC28
14 (a) Define handle. Explain the conflicts that occur in shift reduce (5) 3 2
parsing with example.
(b) Identify an algorithm to construct the SLR parsing table. (5) 3 3
15 (a) Define syntax directed definition. Give and explain the syntax- (5) 4 2
directed definition for a simple desk calculator.
(b) What is the conceptual view of the syntax-directed translation? (5) 4 2
Also explain the construction of syntax trees.
(OR)
16 (a) What are synthesized and inherited attributes? Construct (5) 4 3
annotated parse tree for the input string 5*6+7;
(b) Explain the parser stack implementation of postfix SDT (5) 4 2
Page 2 of 2