How To Exam?

a knowledge trading engine...


Rajasthan Technical University 2010-7th Sem B.Tech Computer Science and Engineering (Main) Computer science & engineering, Compiler Construction - Question Paper

Friday, 24 May 2013 11:00Web


Rajasthan tech. University
B.Tech seven sem (Main)
Computer science & engineering,Jan 2010

(7CS1) Compiler Construction

RoH No.:_

~7E4091

B.Tacfc. (Smh.VI) (Main) Ciwta<iow. J&mttty MW Consul* Sdtncft (7CS1 CtnpDw Cowlnirtlw)

1 im*: 3 Hours)    (Total Marks: M

[Min. Passing Marks: 34 v

Attempt overall five Questions. AH questions carry equal marks. (Schematic diagrams must be shown wherever necessary. Any data . you feel missing may suitably be assumed and stated clearly. Units of quantities used/calculated must be stated clearly)

Use of following supporting material is permitted-during examination.

/Mentioned in form No. 205)

1._____Nil______" 2.___;_____Nil___

J (a) Explain all the phases of compiler with the help of suitable example.

(b) What is the basic task of scanning ? What are the difficulties found in delimiter oriented scanning ? How can .this be removed ?

1 (a) Explain the concept of input buffering in details.

(b) What is the LEX ? Explain.

8

- (a) Consider the following LL (1) grammar describing a certain sbrt of rested lists :

S-*T; S |e T->U T\U


-109, IMliiimil *    (Contd...


ii) left factor this grpmmor.

?

;ii) Give the First and Follow svis for each non terminal in the grammar obtain in part (i).

.1

'Ui) Usi!;r fHi# information, coii-noct a:i LL pamac tblc tor tiu ikTtiamar obtained in part (i).

3

2    <a; tvpL.n var'ous error recovery strategic* in TOP DOWN

r arsing.

b

ft) Show that following grammar S -* Ac | bAc | Be | bBa

, \-*d B-*d <S. A, B are nonterminal, a, b. c, d are. terminal) is Lh(l) *>at ..<. u-UJM).

.

OR

(t) Frame the transition table and Action / Goto table for the grammar E -4 E+E \E* E [<E) | id.

8

3    (a) Explain L attributed definition.

8

<b) Give the syntax directed definition below with the synthesized attribute va], draw the annotated pavsc tree for the expression (8 + 4) <5 + 6) :

/, -> E    L.val = E.val

E -*T    E.val =T.val

E-tEiT    E.val=Ej.val+T.val

T -*F    T.val=F.val

7E4091 ISMSI1KIIBIH 2    irontH -



8

Tval=T,.val - F.val

P.val * E.val P.vai = digit. ltM val.

T-TtF * F - digit


OR

.1 Geaerate tto thiw iMkm coJ* for th tallowing C pruinin :

ntain ( I

4    *

<Bt i - I; iat a [10]: while (i<=10> aft'=;

i

18

4 (a) Explain procedure call with an "example.

8

(b) Explain various approaches to symbol table organization.

OK

4 (a) Explain format of an activation record.

8

(l>) If we want to support local arrays of variable size, then suggest the storage allocation that is Suitable to meet the

requirement.

8

5 (a) Construct the DAG for the following: basic block : Z>: = BC E-.~ A* B B: - B*C

A'.-E-D

8

7E4091] iiBRsms.Ktai 3    |Contd..

r . o *


Discuss various popular node improvement technique.

' ,

(b)

5 (a)

(b)


OR

Kxplain bask block and control flow graph.

What is loop in variant computation, give an example ?

7E4091J    I 4500







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Rajasthan Technical University 2010-7th Sem B.Tech Computer Science and Engineering (Main) Computer science & engineering, Compiler Construction - Question Paper