--- Content provided by FirstRanker.com ---
GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER-VII (OLD) EXAMINATION — SUMMER 2019
Subject Code: 170701 Date: 18/05/2019
--- Content provided by FirstRanker.com ---
Subject Name: Compiler Design
Time: 02:30 PM TO 05:00 PM Total Marks: 70
--- Content provided by FirstRanker.com ---
Instructions:
- Attempt all questions.
- Make suitable assumptions wherever necessary.
- Figures to the right indicate full marks.
--- Content provided by FirstRanker.com ---
Q.1 (a) Explain different phases of compiler. [07]
(b) (1) What is a symbol table? Discuss the most suitable data structure for it by stating merits / demerits. [04]
--- Content provided by FirstRanker.com ---
(i1) Explain linker & loader. [03]Q.2 (a) 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]
(b) Construct a DFA without constructing NFA for following regular expression. Find minimized DFA.: (a|b)*a [07]
--- Content provided by FirstRanker.com ---
OR
(b) Construct NFA for following Regular Expression : (a | b)*abb. [07]
Q.3 (a) (1) Compare top-down and bottom-up parser. [04]
--- Content provided by FirstRanker.com ---
(i1) Explain right-most-derivation-in-reverse with the help of an example. [03](b) What is left recursion? Eliminate the left recursion from the following grammar. [07]
E ? E+T | T
--- Content provided by FirstRanker.com ---
T ? T*F | F
F ? (E) | id
--- Content provided by FirstRanker.com ---
OR
Q.3 (a) Construct predictive parsing table for following. [07]
S ? A
--- Content provided by FirstRanker.com ---
A ? aB | Ad
B ? bBC | f
--- Content provided by FirstRanker.com ---
C ? g(b) Explain Operator precedence Parsing technique in detail. [07]
Q.4 (a) What is an activation record? Explain how they are used to access various local and global variables. [07]
--- Content provided by FirstRanker.com ---
(b) Explain: Error Recovery Strategies in Compiler in brief [07]OR
Q.4 (a) Translate the expression -(a+b)*(c+d)+(a+b+c) into [07]
--- Content provided by FirstRanker.com ---
1. Quadruples
2. Triples
--- Content provided by FirstRanker.com ---
3. Indirect triples(b) Explain various code optimization technique [07]
Q.5 (a) Write a brief note on input buffering techniques [07]
--- Content provided by FirstRanker.com ---
(b) Define: DAG. Explain DAG representation of basic block with example. [07]OR
Q.5 (a) Discuss issues in the design of code generation [07]
--- Content provided by FirstRanker.com ---
(b) Explain Peephole Optimization in detail. [07]
--- Content provided by FirstRanker.com ---
This download link is referred from the post: GTU BE 2019 Summer Question Papers || Gujarat Technological University