Subject Code: 2170701
GUJARAT TECHNOLOGICAL UNIVERSITY
--- Content provided by FirstRanker.com ---
BE- SEMESTER-VII (NEW) EXAMINATION - WINTER 2020Subject Name: Compiler Design
Time: 10:30 AM TO 12:30 PM
Total Marks: 56
Date: 19/01/2021
--- Content provided by FirstRanker.com ---
Instructions:
Attempt any FOUR questions out of EIGHT questions.
Make suitable assumptions wherever necessary.
Figures to the right indicate full marks.
-
- Compare and contrast compilers and interpreters. [03]
- Write a short note on LEX Tool. [04]
- Explain phases of compilers with suitable example. [07]
--- Content provided by FirstRanker.com ---
-
- Define terms: pattern, lexeme, token [03]
- Write any one method used in lexical analyzer for buffering the input. [04]
- Construct nondeterministic finite automata by using Thomson’s Construction for following regular expression. Show the sequence of moves made in processing the input string ababbab. (a|b)*abb [07]
--- Content provided by FirstRanker.com ---
-
- Consider the following grammar to construct leftmost and right most derivation for the sentence abab. S->aSbS|bSaS|e [03]
- Write rule(s) to check grammar is left recursive or not. Remove left recursive from the following grammar. S—>aBDh B->Bb|c D->EF E>g|e F>f|e [07]
-
- Construct the SLR parsing table for the following Grammar. E -> E+T|T T> T*F|F F> (E)|id [03]
- Write rule(s) to check grammar is operator grammar or not. [04]
- Explain any two error-recovery strategies. [07]
-
- Define : 1) synthesized attribute 2) inherited attribute [04]
- Explain any two parameter passing methods. [07]
--- Content provided by FirstRanker.com ---
-
- What is activation record? [03]
- What is Intermediate form of the code? What are the advantages of it? [04]
- Construct syntax directed translation scheme and definition that translate arithmetic operation from infix to postfix in which an operator appears before its operand as for example xy- is a positive notation for x-y . Give annotated parse tree for the input 9-5+2 and 9-5*2. [07]
--- Content provided by FirstRanker.com ---
-
- Explain any two issues in design of code generator [03]
- Compare: static v/s dynamic Memory Allocation. [04]
- Translate the expression —(a+b)*(c+d)+(a+b+c) into 1. Quadruples 2. Triples 3. Indirect triples [07]
-
- What are the limitations of static storage allocation? [03]
- Write a short note on Symbol table management. [04]
- Write any two methods of code-optimization in detail. [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 B.Tech 2020 Winter Question Papers || Gujarat Technological University
--- Content provided by FirstRanker.com ---