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 2017 Winter 7th Sem New 2170701 Complier Design Question Paper

Download GTU (Gujarat Technological University) BE/BTech (Bachelor of Engineering / Bachelor of Technology) 2017 Winter 7th Sem New 2170701 Complier Design Previous Question Paper

This post was last modified on 20 February 2020

This download link is referred from the post: GTU BE/B.Tech 2017 Winter Question Papers || Gujarat Technological University


FirstRanker.com

Subject Code: 2170701

GUJARAT TECHNOLOGICAL UNIVERSITY

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

BE - SEMESTER-VII (NEW) EXAMINATION — WINTER 2017

Subject Name: Complier Design

Date: 02/11/2017

Time: 10:30 AM TO 01: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

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

  1. What is the difference between compiler and interpreter? (03 MARKS)
  2. Explain analysis phase of the source program with example. (04 MARKS)
  3. Write an algorithm for Thompson’s construction method. Apply the algorithm to construct NFA for following regular expression. (a | b)*abb. (07 MARKS)

Q.2

  1. What is a pass in a compiler? What is the effect of reducing the number of passes? (03 MARKS)
  2. --- Content provided by FirstRanker.com ---

  3. Explain error recovery strategies used by parser. (04 MARKS)
  4. What is operator grammar? Generate precedence function table for following grammar. (07 MARKS)
    E -> EAE | id
    A -> + | *

OR

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

  1. Define handle and handle pruning. Explain the stack implementation of shift reduce parser with the help of example: (07 MARKS)

Q.3

  1. Give the translation scheme that converts infix to postfix notation. Generate the annotated parse tree for input string 3-5+4. (03 MARKS)
  2. Explain buffer pairs and sentinels. (04 MARKS)
  3. Check given grammar is LL(1) but not SLR(1). (07 MARKS)

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

    S -> AaAb | BbBa
    A -> €
    B -> €

OR

  1. Write a rule of Left factoring a grammar and give example. (03 MARKS)
  2. --- Content provided by FirstRanker.com ---

  3. Explain role of lexical analyzer. (04 MARKS)
  4. Define syntax tree. What is s-attributed definition? Explain construction of syntax tree for the expression a-4+c using SDD. (07 MARKS)

Q.4

  1. Translate the arithmetic expression a*-(b+c) into (03 MARKS)
    1. Syntax tree
    2. Postfix notation
    3. --- Content provided by FirstRanker.com ---

    4. Three address code
  2. Write Syntax Directed Definition to produce three address code for the expression containing the operators :=, +, - (unary minus), ( ) and id. (04 MARKS)
  3. What is activation record? Explain stack allocation of activation records using example. (07 MARKS)

OR

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

  1. What is activation tree? (03 MARKS)
  2. Explain parameter passing techniques for procedure. (04 MARKS)
  3. What is importance of intermediate code? Discuss various representations of three address code using the given expression. a=b *-c+b * -c . (07 MARKS)

Q.5

  1. What is code optimization? Explain data flow equation. (03 MARKS)
  2. --- Content provided by FirstRanker.com ---

  3. Describe code generator design issues. (04 MARKS)

OR

  1. Define following : DAG, Basic Blocks, Flow graph (03 MARKS)
  2. Explain peephole optimization. (04 MARKS)
  3. Explain function preserving transformations with example. (07 MARKS)
  4. --- Content provided by FirstRanker.com ---



This download link is referred from the post: GTU BE/B.Tech 2017 Winter Question Papers || Gujarat Technological University

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