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

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

This post was last modified on 20 February 2020

GTU BE/B.Tech 2018 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 2018

Subject Name: Compiler Design

Time: 10:30 AM TO 01:00 PM

Instructions:

  1. Attempt all questions.
  2. --- Content provided by FirstRanker.com ---

  3. Make suitable assumptions wherever necessary.
  4. Figures to the right indicate full marks.

Q.1

  1. List the cousins of compiler and explain the role of any one of them. (03 MARKS)
  2. Write a brief note on input buffering techniques. (04 MARKS)
  3. --- Content provided by‍ FirstRanker.com ---

  4. Explain front end and back end of compiler in detail. (07 MARKS)

Q.2

  1. Define the following terms and give suitable example for it. (03 MARKS)
    1. Handle
    2. Handle pruning
    3. Left Factoring
    4. --- Content provided by⁠ FirstRanker.com ---

  2. Explain all error recovery strategies used by parser. (04 MARKS)
  3. Construct LL(1) parsing table for the following Grammar: (07 MARKS)
    E->E+T|T
    T->T*F | F

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

    F->(E)|a
    OR
    Construct NFA for following regular expression using Thompson’s notation and then convert it into DFA.
    (a/b)*abb#

Q.3

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

  1. Define the following terms and give suitable example for it. (03 MARKS)
    1. Augmented Grammar
    2. LR(0) Item
    3. LR(1) Item
  2. Differentiate Top Down Parsing and Bottom up parsing (04 MARKS)
  3. --- Content provided by‍ FirstRanker.com ---

  4. Construct SLR parsing table for the following grammar : (07 MARKS)
    S ->(L)|a
    L->L,S|S
    OR
    Give the difference between SLR and CLR Parser.

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

    List the different conflicts that occur in Bottom up parsing and give examples for that:

Q.4

  1. Implement the following grammar using Recursive Descent Parser. (03 MARKS)
    S -> Aa|bAc|bBa
    A->d

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

    B->d
  2. What is Ambiguous Grammar? Describe with example. (04 MARKS)
  3. Give the difference between synthesized attributes and inherited attributes (07 MARKS)
    Construct CLR parsing table for the following grammar :
    S ->AA

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

    A->aA|b
    OR
    List the different issues in code generation phase and describe any two issues.

Q.5

  1. Explain parameter passing techniques for procedure. (03 MARKS)
  2. --- Content provided by‌ FirstRanker.com ---

  3. Explain Quadruple, triple and indirect triple with suitable example. (04 MARKS)
  4. x=(a+b)*(a+b+c)*(a+b+c+d) (07 MARKS)
    Explain dynamic memory allocation strategy.
    What is an activation record? Explain how they are used to access local and global variables.
    OR

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

    Write a note on stack allocation strategy.
    Give the translation scheme that converts infix to postfix expression for the following grammar and also generate the annotated parse tree for input string “id+id*id”
    E->E+T|T
    T->T*F | F
    F->id

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

    Discuss various code optimization techniques with examples.

Date: 15/11/2018

Total Marks: 70

FirstRanker.com


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


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