GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER- VII (New) EXAMINATION — WINTER 2019
--- Content provided by FirstRanker.com ---
Subject Code: 2170701
Subject Name: Compiler Design
Time: 10:30 AM TO 01:00 PM
Total Marks: 70
Date: 23/11/2019
--- Content provided by FirstRanker.com ---
Instructions:
- Attempt all questions.
- Make suitable assumptions wherever necessary.
- Figures to the right indicate full marks.
Q.1 | (a) Explain tokens, lexemes, Pattern with example. | 03 |
(b) Distinguish between ambiguous and unambiguous grammar? | 04 | |
(c) Explain the analysis synthesis model of compilation. List the factors that affect the design of compiler. Also List major functions done by compiler. | 07 | |
Q.2 | (a) Write a regular definition for
--- Content provided by FirstRanker.com --- | 03 |
(b) Explain backtracking with example. | 04 | |
(c) Construct a DFA for a given regular expression (ab)*abb. OR Construct DFA without constructing NFA for following regular expression: a*b*a(a | b)b*a#. | 07 | |
Q.3 | (a) Perform the Left factoring of following Grammar. S — iEtS /iEtSeS / a --- Content provided by FirstRanker.com --- E—b | 03 |
(b) Write a brief note on input buffering techniques. | 04 | |
(c) Explain Recursive Descent Parser with example. OR Explain the following:
--- Content provided by FirstRanker.com --- | 07 | |
Q.4 | (a) Explain non-recursive predictive parsers. Draw the block diagram of it. | 03 |
(b) Generate the SLR parsing table for the following Grammar. S—Aa | bAc |bBa A—d B—d | 04 | |
(c) Define attributed grammar? Which phase of the compilation process does it facilitate? Explain with example. | 07 | |
Q.5 | (a) Explain Stack Allocation and Activation Record Organization in brief. | 03 |
(b) Write down steps to set precedence relationship for Operator Precedence Grammar. Design precedence table for: E—E+E | E*E | E*E | id. --- Content provided by FirstRanker.com --- ORConstruct a DAG for (a+b)* (atb+c). | 04 | |
(c) Explain Error Recovery Strategies in Compiler in brief. | 07 | |
Q.5 | (a) Show syntax directed definition for simple desk calculator. Also show annotated parse tree for 3*5+4n, where n indicates newline. | 03 |
(b) Differentiate: static v/s dynamic memory allocations. | 04 | |
(c) Discuss symbol table management in detail. | 07 | |
Q.5 | (a) Write short note on following
| |
Q.5 | (a) Explain any three code optimization techniques with example. | 03 |
(b) Explain various parameter passing methods. | 04 | |
(c) Explain various issues in design of code generator. | 07 |
--- Content provided by FirstRanker.com ---
This download link is referred from the post: GTU BE/B.Tech 2019 Winter Question Papers || Gujarat Technological University
--- Content provided by FirstRanker.com ---