Download GTU BE/B.Tech 2019 Winter 7th Sem Old 170701 Compiler Design Question Paper

Download GTU (Gujarat Technological University) BE/BTech (Bachelor of Engineering / Bachelor of Technology) 2019 Winter 7th Sem Old 170701 Compiler Design Previous Question Paper

1
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY

BE - SEMESTER ?VII (Old) EXAMINATION ? WINTER 2019
Subject Code: 170701 Date: 30/11/2019

Subject Name: Compiler Design
Time: 10:30 AM TO 01:00 PM Total Marks: 70

Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

Q.1 (a) Explain the analysis synthesis model of compilation. List the factors that affect the
design of compiler. Also List major functions done by compiler.
07
(b) What does the linker do? What does the loader do? What does the preprocessor
do? Explain their role(s) in compilation process.
07
Q.2 (a) Construct a DFA for a given regular expression (010+00)*(10)* 07
(b) Write a brief note on input buffering techniques to Lexical Analyzer. 07
OR
(b) Explain Shift-Reduce parsing with suitable example. 07
Q.3 (a) Test whether the following grammar is LL (1) or not. Construct predictive
parsing table for it.
S?1AB|?
A?1AC|0C
B?0S
C? 1
07
(b) What is Intermediate form of the code? What are the advantages of it? What
are generally used intermediate forms? Write N-Tuple notation for:
(a+b)*(c+d)-(a+b+c)
07
OR
Q.3 (a) Construct the canonical parsing table for the following Grammar
S??S
S?CC
C?cC|d
07
(b) What is the difference between parse tree and syntax tree? Write appropriate
grammar and draw parse as well as syntax tree for a*(a-a^a)
07
Q.4 (a) Eliminate left recursion from the following grammar and rewrite the
Grammar.
S?Aa|b
A?Ac | Sd | ?
07
(b) Explain the types of attributed grammar? Which phase of the compilation process
does it facilitate? Explain with example.
07
OR
Q.4 (a) Explain activation record. How is task divided between calling & called program
for stack updating?
07
(b) Explain: Error Recovery Strategies in Compiler in brief. 07
Q.5 (a) Explain various code optimization techniques. 07
(b) Explain: Symbol Table Management. How symbol table differs from other
data structures?
07
OR

Q.5 (a) Discuss generic issues in the design of code generation. 07
(b) Compare Static and Dynamic memory allocation. 07
*************
FirstRanker.com - FirstRanker's Choice

This post was last modified on 20 February 2020