Download AKTU B-Tech 6th Sem 2014-2015 Compiler Design Question Paper

Download AKTU (Dr. A.P.J. Abdul Kalam Technical University (AKTU), formerly Uttar Pradesh Technical University (UPTU) B-Tech 6th Semester (Sixth Semester) 2014-2015 Compiler Design Question Paper

Printed Pages : 3
11111111111111$11111111111111111 mm
(Following Paper ID and Roll No. to be ?lled in your Answer Book)
PAPER ID 2 110603
Roll No.
B. Tech. .
(SEM. VI) THEORY EXAMINATION, 2014-15
COMPILER DESIGN
Time : 3 Hours] [Total Marks : 100
Note ': Attempt all Questions.
1 Attempt any four parts of the following. 1 5X4=20
(a) Explain all the necessary phases and passes of a
compiler design.
(b) What is a cross compiler ? How is boot-strapping
of a compiler done to a second machine ?
(c) Write short note on :
(1) Context free grammar
(1i) Yacc parser generator.
(d) Check whether le? recursion exists for the following
grammar :
S ?> Aa/ b
A ?> Ac / Sd/ e
110603] 1 [ Contd...

(e) How does ?nite automata useful for levdml analysis ?
Construct the NFA and DFA for the following
regular expression
(a + b) * abb.
(f) Discuss the role of Macros in programming
languages.
Attempts any two parts of the following : 10X2=20
(a) Generate three address code for the following code
segment :
While (a < b) do
If (c < d) then x = y + z
(b) What is syntax directed translation ? How are
semantic actions attached to the production ?
Expalin with an example.
(c) What is post?x translation ? Explain it with suitable
' example.
Attempts any two parts of the following : 10X2=20
(a) Construct the CLR paIse table for the following
Grammar.
S?>CC
C?>cC
C?>d
110603] 2 [ Contd...
(b) Give algorithm for constructing of predictive paxsing
table. Consider the following grammar and construct
predictive paxsing table
S ?> iEtSS1 la
E ?> b
(c) Descn'be various representation of three address
codes. Translates the expression :
--(a+b)*(c+d)+(a+b+c)
Attempts any two parts of the following : 10X2=20
(a) Discuss the various data structures used for symbol
table with suitable example.
(b) Write short note on
(1) Sowing
(ii) Activation record
(1h) Backpmchms'
(c) What do you understand by lexical error and
syntacticetror?Alsosuggestmethodsforrecovely .
of errors.
Attempts any two parts of the following : 10X2=20
(a) What is DAG 7 What are its advantages in context
of optimization ?
(b) What is data ?ow analysis ? How does it use in
code optimization ?
(c) Explain what constitute a loop in a ?ow graph and
how will you do loop optimizations in code
optimization of a compiler.
110603] 3 [14475]

This post was last modified on 29 January 2020