How To Exam?

a knowledge trading engine...


Visvesvaraya Technological University (VTU) 2008-6th Sem B.E Computer Science and Engineering compiler design - Question Paper

Wednesday, 12 June 2013 10:35Web


sixth semester compiler design ques. paper DEC-07/Jan-08

CS664

, urfsV

v>i j iUJrtfr-i


Sixth Semester B.E Degree Examination, Dec. 07 / Jail. 08

Compiler Design

Time; 3 hrs.    Max. Marks:100

Note : Answer any FIVE full questions.

1 a. Explain the different phases of a compiler with a block diagram.    (10 Marks)

b.    Construct transition diagram for the following: i) Relational operators    ii) Identifiers and keywords iii) Unsigned numbers.    (06 Marks)

c.    Construct a NFA for regular expression (a/b) abb    (04 Marks)

a.


(08 Marks)


b.


(12 Marks)


Define Ambiguity. Show that the following grammar is ambiguous :

E ->E + E / E - E / E * E / (E) / id

Given the grammar: E -> E + T / T ; T T * F / F ; F -> (E) / id.

i)    Remove left recursion.

ii)    For the resulting grammar, construct LL (1) parsing table.


(10 Marks) (10 Marks)

4

a.

Construct LALR parsing table for the grammar :S-CC ; C c C / d.

(10 Marks)

b.

Briefly explain the concept of syntax directed definition with an example.

(10 Marks)

5

a.

Explain L - attributed definition in detail.

(10 Marks)

b.

Briefly explain the different da la structures used for symbol table.

(10 Marks)

6

a.

Briefly explain the different types of intermediate codes with an example.

(10 Marks)

b.

Explain the structure preserving transformation on Basic blocks.

(10 Marks)

7

a.

Explain in detail various issues involved in Code Generation phase.

(10 Marks)

b.

Briefly explain any five kinds of code optimization with an example each.

(10 Marks)

8 Write short notes on:

a.    Determine the operating precedence relation table for the grammar : E ->E + E | E - E | E * E | E / E | E t E | (E) | - E | id, assuming

i)    T is of highest precedence and right-associative.

ii)    * and / are of next highest precedence and left associative and

iii)    + and-are of lowest precedence and left - associative.

b.    Construct Canonical LR (1) parsing table for the grammar.

E E + T / T ; T - T * F / F ; F ->(E) / id


a.    LEX

b.    Recursive Descent Parsing.

c.    Error recovery in Operator - precedence parsing.

d.    DAG representation of Basic blocks.    (20 Marks)







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Visvesvaraya Technological University (VTU) 2008-6th Sem B.E Computer Science and Engineering compiler design - Question Paper