How To Exam?

a knowledge trading engine...


Acharya Nagarjuna University (ANU) 2007 B.E Information Technology Compiler Design - Question Paper

Sunday, 10 February 2013 07:25Web


III/IV B.Tech Degree Examination, October/November 2007
Second Semister
info Technology
Compiler Design


(IT 322 (NR

IILOV B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2007.

Second Semester

Information Technology

COMPILER DESIGN

: Three hours    Maximum : 70 marks

Answer Question No. 1 compulsorily.

(1 x 14 = 14)

*

Answer ONE question from each Unit.

(4 x 14 = 56)

All questions'carry equal marks.

(a)    What is interpreter?

(b)    What is parse generator?

(c)    What do you mean by symbol table?

(d)    Give example for LR(O) grammar.

(e)    What is loop optimization?

(f)    What is the role of look ahead operator?

(g)    What ia DAG?

(h)    What is LEX?

(i)    What is activation record?

(j) What is right recursion? Give example.

H:

Ck) Is LALR is top-down parser?

(1) What is YACC?

(m) Name any three phases of compiler.

(n) List and explain the basic functions of language translator.

.    UNIT I

2. (a) escribe various phases of a compiler while translating following assignment statement in to assembly language?

amount = principle + rate * 40    (12)

(b)    What is the effect of increasing number of passes in a compiler?    (2)

Or

(c)    Define token, lexeme and pattern. Give examples for each.    (6)

(d)    Describe the process of generating lexical analyzer using LEX tool. Also explain the syntax of LEX specification with example.    (8)

3.    (a) Write algorithm for non-recursive predictive parsing.    (7)

(b)    Eliminate left recursion from the given grammar.

b expr b expr or b term/ b term b term - b term and b factor/b factor b factor > not b factor/{b expr)/triie/false. (7)

*

(c)    Write parse tree for the following grammar E > e + e/e * e /(e)/- e/id.

for the input string (id + id) fid.

Is this grammar ambiguous or not!.    (10)

(d)    How does YACC resolve parsing action conflicts when it is used with ambiguous grammar? (4)

UNIT III

4.    (a) What is synthesized attribute? Explain with an example.    (7)

(b)    Differentiate between syntax directed definition and translation scheme. Give one example for each. (7)

Qr

(c)    Discuss the symbol table organization for block structured languages like PASCAL or C, (14)

UNIT IV

5. (a) Describe various storage allocation strategies employed by a compiler.    (10)

(b) Explain.

() Control stack.

r. Or

(ii) '


(4)


(c)    Describe code generation algorithm foT a simple three address statement.

x : - y z    (9)

(d)    Why nest use information collected by a code generator?    (5)

(IT 322 (NR))







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Acharya Nagarjuna University (ANU) 2007 B.E Information Technology Compiler Design - Question Paper