5. 6.
lbtal No. of Questions : 8 ]
[ Total No. of Printed Pages : 2
602/2004 B. E. (Seventh Semester) EXAMINATION, May, 2004 (Computer Science Engg. Branch) PRINCIPLE
OF COMPILER DESIGN (CSE--403-C)
r Maximum Marks: 100
Tllne : Three HOllrs ]
Note: Attempt any ft~'e questions. 1.
Discuss all the. ph~es of a compiler in detail. Differenl.iate between phase and pass of a compiler.
(a )
20
their construction.
(b) Write and explain the Glgo to minir.1izi: ~h..: n\2u:;bu of states of DFA. ~ ,
~E;, ;:
)
~-i".';' :
"-,),.-'3
conventions fOi
I
,
·-'r-r
(~)
(b)
ere.
; u What is meant by left recursion? Wnte an :Jjgmi,hm to remove left rCI.:msion. It.
4.
(a)
Write the rules to Ciilcubre the opera~or p1t:CCGc,ce relation between t"vo L.:rmi:lals a arid b of a!.l opnil'UT
granunar. In
o
(h )
"What do you );jean by pn.:dj,tive parser ?Vrir:; the
[ 2 ] 8.
write how SLR parsing tables are constructed ? Give an example to support your answer.
20
6. (,,) Explain how the entries are stored in symbol table using self organizing list ?
(0) DisclLss how scope information is stored in symbol table? 7.
8.
10
10
Discuss briefly the following : 7. (a) Code optimization.
1
(b) Error handJjng.
0
1 Assuming appropriate translation fields for E given below, provide a syntax directed translation scheme for the following 0 gramar : 20 S -+ repeat S until ElbeglD L clid/do N times S
L ...•. L;s./s N -+ id/const
602/2(}fM