Enrolment No.
GUJARAT TECHNOLOGICAL UNIVERSITY FirstRanker.com
BE - SEMESTER-VII (Old) EXAMINATION — WINTER 2019
--- Content provided by FirstRanker.com ---
Subject Code: 170701 Date: 30/11/2019
Subject Name: Compiler Design
Time: 10:30 AM TO 01:00 PM Total Marks: 70
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 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) What does the linker do? What does the loader do? What does the preprocessor do? Explain their role(s) in compilation process. (07)
--- Content provided by FirstRanker.com ---
-
Q.3 (a) Construct a DFA for a given regular expression (010+00)*(10)* (07)
-
Q.3 (b) Write a brief note on input buffering techniques to Lexical Analyzer. (07)
OR
--- Content provided by FirstRanker.com ---
Q.3 (b) Explain Shift-Reduce parsing with suitable example. (07)
-
Q.4 (a) Test whether the following grammar is LL (1) or not. Construct predictive parsing table for it. (07)
S—1ABIE
A—1AC|0C
--- Content provided by FirstRanker.com ---
B—0S
C—1
-
Q.4 (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
--- Content provided by FirstRanker.com ---
Q.4 (b) Construct the canonical parsing table for the following Grammar (07)
S?S'
S?CC
C?cCl d
-
Q.5 (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)
-
Q.5 (b) Eliminate left recursion from the following grammar and rewrite the Grammar. (07)
S?Aalb
A?Ac|Sd|e
--- Content provided by FirstRanker.com ---
-
Q.5 (a) Explain the types of attributed grammar? Which phase of the compilation process does it facilitate? Explain with example. (07)
OR
Q.5 (a) Explain activation record. How is task divided between calling & called program for stack updating? (07)
-
Q.5 (b) Explain: Error Recovery Strategies in Compiler in brief. (07)
-
Q.5 (a) Explain various code optimization techniques. (07)
-
Q.5 (b) Explain: Symbol Table Management. How symbol table differs from other data structures? (07)
--- Content provided by FirstRanker.com ---
OR
Q.5 (b) Discuss generic issues in the design of code generation. (07)
-
Q.5 (a) Compare Static and Dynamic memory allocation. (07)
--- Content provided by FirstRanker.com ---
--- Content provided by FirstRanker.com ---
--- 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 ---