FirstRanker Logo

FirstRanker.com - FirstRanker's Choice is a hub of Question Papers & Study Materials for B-Tech, B.E, M-Tech, MCA, M.Sc, MBBS, BDS, MBA, B.Sc, Degree, B.Sc Nursing, B-Pharmacy, D-Pharmacy, MD, Medical, Dental, Engineering students. All services of FirstRanker.com are FREE

📱

Get the MBBS Question Bank Android App

Access previous years' papers, solved question papers, notes, and more on the go!

Install From Play Store

Download GTU BE/B.Tech 2019 Summer 7th Sem New 2170701 Compiler Design Question Paper

Download GTU (Gujarat Technological University) BE/BTech (Bachelor of Engineering / Bachelor of Technology) 2019 Summer 7th Sem New 2170701 Compiler Design Previous Question Paper

This post was last modified on 20 February 2020

GTU BE 2019 Summer Question Papers || Gujarat Technological University


FirstRanker.com

Subject Code: 2170701

GUJARAT TECHNOLOGICAL UNIVERSITY

--- Content provided by⁠ FirstRanker.com ---

BE - SEMESTER-VII(NEW) EXAMINATION - SUMMER 2019
Subject Name: Compiler Design
Date: 10/05/2019
Time: 02:30 PM TO 05:00 PM
Total Marks: 70

--- Content provided by‌ FirstRanker.com ---

Instructions:

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

Q.1 (a) Define lexemes, patterns and tokens. [03]

--- Content provided by‍ FirstRanker.com ---

(b) Differentiate compilers and interpreters. [04]
(c) Explain analysis of source program for compilers. [07]

Q.2 (a) Give regular definition for signed and unsigned numbers. [03]
(b) Check whether the following grammar is ambiguous or not. [04]
S=>(S)S

--- Content provided by⁠ FirstRanker.com ---

S->e
(c) Draw DFA from regular expression without constructing NFA. [07]
(a|b|c)*a(b|c)* #
OR
(c) Draw NFA from regular expression using Thomson’s construction and convert it into DFA. [07]

--- Content provided by FirstRanker.com ---

(a|b)*ab*a

Q.3 (a) Define handle and handle pruning. [03]
(b) Construct operator precedence relations table for following grammar. [04]
E-> E+E
E-> E-E

--- Content provided by‍ FirstRanker.com ---

E-> E*E
E-> (E)
E->id
Assume suitable operator associativity and precedence.
(c) Construct recursive descent parser for following grammar. [07]

--- Content provided by‌ FirstRanker.com ---

E->TA
A->+TA
A->e
T->FB
B->*FB

--- Content provided by​ FirstRanker.com ---

B->e
F-> (E)
F->id
OR

--- Content provided by FirstRanker.com ---

Q.3 (a) Differentiate top down parsing and bottom up parsing. [03]
(b) Construct syntax directed translation scheme for infix to postfix conversion. [04]
(c) Construct LL(1) parsing table for following grammar. Check whether the grammar is LL(1) or not. [07]
A->AaB
A->x

--- Content provided by FirstRanker.com ---

B->BCb
B->Cy
C->Cc
C->e

FirstRanker.com

--- Content provided by⁠ FirstRanker.com ---

Q.4 (b) Construct LR(0) item sets for following grammar. [04]
S -> AaAb
S -> BbBa
A->e
B->e

--- Content provided by‍ FirstRanker.com ---

(c) Explain various error recovery schemes in detail. [07]
OR

Q.4 (a) Differentiate LR(1) and LALR(1) parsers. [03]
(b) Construct syntax tree and DAG for following expression. [04]

--- Content provided by‍ FirstRanker.com ---

a=(b+c+d) * (b+c-d) + a
(c) Explain quadruples, triples and indirect triples with examples. [07]

Q.5 (a) Define basic block with a simple example. [03]
(b) Explain activation record. [04]
(c) Explain various methods of peephole optimization. [07]

--- Content provided by‌ FirstRanker.com ---

OR

Q.5 (a) Explain static storage allocation. [03]
(b) Explain any two parameter passing methods. [04]
(c) Explain various issues in design of code generator. [07]

--- Content provided by FirstRanker.com ---

FirstRanker.com



This download link is referred from the post: GTU BE 2019 Summer Question Papers || Gujarat Technological University

--- Content provided by⁠ FirstRanker.com ---