0% found this document useful (0 votes)
15 views3 pages

Compiler Construction Exam Paper 2016

This document is a computer engineering exam paper containing 5 questions with multiple parts each. It covers topics like compiler construction, grammars, parsing, symbol tables, code generation and optimizations. The exam is 3 hours long and carries a maximum of 80 marks. Candidates must attempt any 5 questions by selecting one from each unit. Relevant diagrams and assumptions must be shown/stated. Units of calculated quantities must also be stated clearly.

Uploaded by

Anonymous 4CQ2ID
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

Compiler Construction Exam Paper 2016

This document is a computer engineering exam paper containing 5 questions with multiple parts each. It covers topics like compiler construction, grammars, parsing, symbol tables, code generation and optimizations. The exam is 3 hours long and carries a maximum of 80 marks. Candidates must attempt any 5 questions by selecting one from each unit. Relevant diagrams and assumptions must be shown/stated. Units of calculated quantities must also be stated clearly.

Uploaded by

Anonymous 4CQ2ID
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

RollNo.

Total No of Pages: E
u) 787035
cF-
CN
B. Tech. VII Sem. (MainlBack) Exam.o Nov.-De c.-2016
rsl Computer Engineering
f- 7CS5A Compiler Construction

Time: 3 Hours Maximum Marks: 80


Min. Passing Marks Main: 26
Min. Passing Marks Backz 24
Instructions to Candidates :
Attempt any ftve questions, selecting one question from euch anit. All questions
carry eqaal marks. Schematic'diagrams must be shown wherever necessary. Any
datayoufeel missing suitably be assumed and stated ctearly.
Units of quantities used./calculated must be stated clearly.
Use of following supporting material is permitted during examination.
(Mentioned inform No. 205)
1. NIL 2. NIL

UNIT - I
Q.l (a) What are the phases of a compiler? Explain the function of each phase in

brief? t8l
(b) Describe bootstrapping is detail. ISI

OR
Q.1. (a) Define the term NFA and DFA with an example. What are the rules to get a NFA

for a regular expression? t8l


(b) Construct NFA to accept a (a/b) * b. t8l

17E7fi3sl Page 1 of3 Is760]


UNIT - II
Q.2 (a) What do you mean by context free grammer? Give distinction between regular

and context free grammer & limitatiops of context free grammer' t8l

(b) Write a short note on operator precedence parsing and function. t8l

OR

Q.2 (a) Consider the following gramrirer to declare a list of variables' [5x2=10]

D -) Type list;
Type -) inUfloat
Iist -)
id, tlist
Tlist -)
id, tlist/E
(i) construct the FIRST and FOLLOW sets for the graillmer.
(iDConstructapredictiveparsingtableforthegrammer.
(b) Give the model for LR parser & explain its actions' t61

UNIT - III
t8l
Q.3 (a) Write syntax directed definition for a given assignment statement'
-S -+ id=E
E -+ E+E
E -+ E*E
E-)-E
E -+(E)
E-+id
(b) Write the specification of a simple type checker with example. t8l
OR

Q.3 Translate the arithmetic expression. l4x4=I6l


(a+b) * (c + d) + (a+b + c) into
(a) Syntax tree
(b) Three address code
(c) QuadruPle
(d) Triples
.. i*

17E70351"
Page 2 of3 [s760l
Q.4 (a) Explain the symbol table management system. t8l
(b) Differentiate between stack allocation and heap allocation. IBI

B
Q.4 Write a short note on f8x2=161
(a) Activation Record
(b) Parameter Parsing

Q.s Write a short note on - l4x4=161


(a) Code optimization

O) Flow graph
(c) Basic block
(d) DAG
OR
Q.5 Generate code for the following C statements for the simpleharget machine essuming

all variables are static and three register are available. - tl6l
(a) x=alil+l
(b) a[i]=btclill
(c) a [i] = a til +b Lil
(d) alil+=bUl

[7E7o3s] Page 3 of3 lrzool

You might also like