Gujarat Technological UniversitySummer 2026 Examination

GTU 2170701 Compiler Design (CD) Summer 2026 Paper Solution & PDF

B.E. · Computer Engineering · Semester 7 · Subject Code: 2170701
Download Official GTU PDF
Share:
Total Marks70 MarksExternal theory exam
Passing Marks23 Marks33% minimum cutoff
Exam Duration2.5 Hours2:30 PM – 5:00 PM
Paper Structure5 QuestionsWith internal OR choices
Jump toQ1Q2Q3Q4Q5

Question 1

14 MarksMedium
(a)
Define compiler, interpreter and assembler.
3 Marks
(b)
What is the role of lexical analyzer? Justify your answer with example.
4 Marks
(c)
Explain phases of compiler with a neat diagram and suitable example.
7 Marks

Question 2

14 MarksMedium
(a)
Define
i)Parse tree
ii)Annotated parse tree
iii)Syntax tree.
3 Marks
(b)
Differentiate top down parsing and bottom up parsing.
4 Marks
(c)
Convert the following regular expression to DFA using subset construction method:

((0|1)(0|1))*#

7 Marks
OR OPTION
(c)

Construct NFA for the following RE using Thomson's construction method and then convert it to DFA: (a|b)*abb

7 Marks

Question 3

14 MarksMedium
(a)
Explain error recovery strategies in brief.
3 Marks
(b)
Differentiate between synthesized and inherited attributes with example.
4 Marks
(c)
Construct LL(1) parsing table for E→E + T|T, T→T * F|F, F→(E)|a
7 Marks
OR OPTION
(a)
Explain S-Attributed Definitions and L-Attributed Definitions.
3 Marks
(b)
Explain the difference between NFA and DFA with example.
4 Marks
(c)
Construct LR (1) item set for following grammar.
E -> E+T | T
T -> T*F | F
F -> id
7 Marks

Question 4

14 MarksMedium
(a)
What is Ambiguous Grammar? Describe with example.
3 Marks
(b)
Explain various parameter passing methods.
4 Marks
(c)
Explain various data structures used in symbol table management.
7 Marks
OR OPTION
(a)
Define handle and handle pruning.
3 Marks
(b)
Explain peephole optimization.
4 Marks
(c)
Explain operator precedence parsing method with example.
7 Marks

Question 5

14 MarksMedium
(a)
Differentiate LR(1) and LALR(1) parsers.
3 Marks
(b)
Explain Control Stack.
4 Marks
(c)
Write and explain the generic issues in the design of code generators.
7 Marks
OR OPTION
(a)
What is flow graph? Give suitable example.
3 Marks
(b)
Write a brief note on buffering techniques.
4 Marks
(c)
Explain various code optimization methods with example.
7 Marks
College Exam Groups

Studying for Compiler Design?

Circulate this solved paper with KaTeX formulas and 1-click AI step solvers to your batchmates on WhatsApp or Telegram.

About this Examination Paper & Attribution

Official Gujarat Technological University (GTU) examination paper and step-by-step solutions for Compiler Design (CD) (Summer 2026, B.E. · Computer Engineering, Sem 7). Features complete 70-mark regular & remedial examination pattern, official marking distribution across all 5 questions, and direct 1-click official PDF download.

Transcribed for student exam preparation from Gujarat Technological University official examination archives. Questions, syllabus guidelines, and curriculum marking schemes remain the intellectual property of Gujarat Technological University.

Download PDF