Subjects
Applied Mathematics for Electrical Engineering - 3130908
Complex Variables and Partial Differential Equations - 3130005
Engineering Graphics and Design - 3110013
Basic Electronics - 3110016
Mathematics-II - 3110015
Basic Civil Engineering - 3110004
Physics Group - II - 3110018
Basic Electrical Engineering - 3110005
Basic Mechanical Engineering - 3110006
Programming for Problem Solving - 3110003
Physics Group - I - 3110011
Mathematics-I - 3110014
English - 3110002
Environmental Science - 3110007
Software Engineering - 2160701
Data Structure - 2130702
Database Management Systems - 2130703
Operating System - 2140702
Advanced Java - 2160707
Compiler Design - 2170701
Data Mining And Business Intelligence - 2170715
Information And Network Security - 2170709
Mobile Computing And Wireless Communication - 2170710
Theory Of Computation - 2160704
Semester
Semester - 1
Semester - 2
Semester - 3
Semester - 4
Semester - 5
Semester - 6
Semester - 7
Semester - 8
Compiler Design
(2170701)
CD-2170701
Winter-2018
BE | Semester
7
Winter - 2018
|
15/11/2018
Total Marks
70
Q1
(a)
List the cousins of compiler and explain the role of any one of them.
3 Marks
Q1
(b)
Write a brief note on input buffering techniques.
4 Marks
Q1
(c)
Explain front end and back end of compiler in detail.
7 Marks
Q2
(a)
Define the following terms and give suitable example for it.
1.) Handle 2.) Handle Pruning 3.) Left Factoring
3 Marks
Q2
(b)
Explain all error recovery strategies used by parser.
4 Marks
Q2
(c)
Construct LL(1) parsing table for the following Grammar:
E -> E+T | T
T -> T*F | F
F -> (E) | a
7 Marks
(c)
OR
Q2
(c)
Construct NFA for following regular expression using Thompson’s notation and then convert it into DFA. (a/b)*abb#
7 Marks
Q3
(a)
Define the following terms and give suitable example for it.
1) Augmented Grammar 2) LR(0) Item 3) LR(1) Item
3 Marks
Q3
(b)
Differentiate Top Down Parsing and Bottom up parsing.
4 Marks
Q3
(c)
Construct SLR parsing table for the following grammar :
S ->(L)|a
L->L,S|S
7 Marks
Q3
(a)
Give the difference between SLR and CLR Parser.
3 Marks
Q3
(b)
List the different conflicts that occur in Bottom up parsing and give examples for that.
4 Marks
Q3
(c)
Implement the following grammar using Recursive Descent Parser.
S -> Aa | bAc | bBa
A -> d
B -> d
7 Marks
Q4
(a)
What is Ambiguous Grammar? Describe with example.
3 Marks
Q4
(b)
Give the difference between synthesized attributes and inherited attributes.
4 Marks
Q4
(c)
Construct CLR parsing table for the following grammar :
S ->AA
A->aA|b
7 Marks
OR
Q4
(a)
List the different issues in code generation phase and describe any two issues.
3 Marks
Q4
(b)
Explain parameter passing techniques for procedure.
4 Marks
Q4
(c)
Explain Quadruple, triple and indirect triple with suitable example.
7 Marks
Q5
(a)
Draw syntax tree and DAG for the statement
x=(a+b)*(a+b+c)*(a+b+c+d)
3 Marks
Q5
(b)
Explain dynamic memory allocation strategy.
4 Marks
Q5
(c)
What is an activation record? Explain how they are used to access local and global variables.
7 Marks
OR
Q5
(a)
Write a note on stack allocation strategy.
3 Marks
Q5
(b)
Give the translation scheme that converts infix to postfix expression for the following grammar and also generate the annotated parse tree for input string : “id+id*id”
E -> E+T | T
T -> T*F | F
F -> id
4 Marks
Q5
(c)
Discuss various code optimization techniques with examples.
7 Marks