mid paper
mid paper
mid paper
~ '1
FI\CULTY OF ~NC IN EEHING & ' I 1.C ll~OI.OG\'
SJ\NKl\l.CI 11\NU P/\Tl! t. COl.l.~GL 01·
ENGINEERING VISNJ\GAH
lnSlrJIClions:
1) Mt1ke sutt,1ble cl',sllmpllons wherever necessary
.!.1 I 1gurc 10 the ngh1 rndicarc full marks.
QUE:
(A) Anc;wcr the follo,\fog questions:(Any four) (20)
.,.,1. What 1s a compiler? Explam lhe various phases of compiler m detail, with a neat sketch.
2. Write the cwo me1hods used m lexical analyzer for buffering the input. Which technique
is used for speeding up the lcx1tal analyzer?
4. Construct DFA for following Regular ~pression. Use firstpos, lastpos andfollowpos
functions to consrruct DFA.
(u·!b•)"'
5. Construct the collection of sets of LR(O) llems for the following grammar.
S-> Aa I bAc I de l bda
A-"'d
tJ
Pr,1grommr "'
~\; O T ~h - C\m tpm rr En~mttnng lnf om ,:it iM Tercru
,olog)
\ ISNAGAR
., ...
Brunch: Da tr: _, 09 ':~1~
Senu•.,.cr r: \lJ Time: I ~:00 PM TO I :30 P\1
n Pf\.'lgr.1Illmtn,_!!
To tal ~o
Subject Namt>: P) tha
Ma r~ :
SuhJr.cl C'odr: I F.Tll1307u::
In~, ruction~:
I) (.) Ui.: 'illl n l\() I ·~ i:om ru '!ll'I') 11.
..... \.o 2 10 Que :--.ll .
2) .\nempt n) "I '1ueslll.,ns fro.'TI Q
\1. "e ~u.mtilc nssum ruons ,, her
e,er ne-~e~ ~
J)
rli.s
4) Figure 1~ the n~ht inJ,c 1e full mJ
- - - - - (05)
Multiple Choit'\' Qut>~lion~ - - - -- - - - - -
Q- I tuple?
(i} luch of the fr,lkm in~ is J f>.\ 1hon
' \\
lb) ( l.:: .3l
(o)f l. :.3 l (d) ' }
._ __ le) (I , ::. 3l dis t 1.pop( I l""
, (ii) 1 Suppose list I i:; [3. -t
5. ::o, 5. 15, 1, 3]. "h at 1s list I ltt~
(b) [ 1. 3. 3. -t 5. 5. "SJ::o.
(a) (). 4. 5. 20, 5. 25. l. 3] [ I " •I -
(d) "O - ,
). ~ -i
' ' I '] • ·'· "'· ). - •
- .,0
(c)I.,~• .'.I.
.. -·.
- • :-. • .,
----------------------------------------------------------------------------------------------------------------------------