0% found this document useful (0 votes)
14 views12 pages

CD Imp Questions

CD IMPORTANT QUESTIONS 2

Uploaded by

panetirahul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views12 pages

CD Imp Questions

CD IMPORTANT QUESTIONS 2

Uploaded by

panetirahul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

COMPILER DECIGN

TpORTANT QoECTiOnlS

Ofte abot a TTanslatu2


2KOito a) the phoces oCDpila
ompileOT
escbe he output for he Vanou phaes oh
SNe&pect o folauinq laarpents
aFotion Iritial+Rali 60
b)flost 1,3
i=i* o+j+2
(a+b) *C+d)

4 CompaTe Henpreteq an Compile


6/o phale anel pae
5) dibterence
efte abod Trpe9 ot Conpil
0hesemerstal b CDK

Explai Briety about BooCtroPpim a

eohot is the Rsle of lical Analyzn


a) o tte buiety about pst Butfesing
abcuur Topes oAucpmta. and -the
IExploin BrieHy
representatio» oh Autorta.

) Desigo FA Ohich accopty ocdd upbe o 1 ard an


nubes Os.
0 Copctuet
C NFA l h E ohch actupë a lange

CEtett Constng the o any orbaj t a


c's.
Solaoed by any no o bs folooeed by Ony no.
o

14) Corvant Hhe ven NP to bPA

a) o O

Tohe%313

t3

15) Corvet the NA to t's equivalent DFA

(
)Consrott he, inimom tcte Automafa Jor the
Jolboing ron&thioy diagror

RE,
1wite all the Stops owoting o NPA Um
RE 1O+(O+u)o*1.
19Desiap a Fa foor iven

19) COte all he Eoors in Compile


the genera omat of a LE Poa)
0) Sive
)
Hoanclotior) Tules ofa Lex
what oe tHe ditherent rora9

a) Dekine RE 2 ot te a e poopesrtieg o Regulhj Expresso


29wate a LEx progranD to recarize hte spate

dertifi, if, then and else.


COedey the Cordtional 6tmt 10x>3) then y 5 e1
3) taterment
10 How doeg LA helps the above
Proces9 of cOmpilation 2
3

ONTT-T. f

belond-
Congoden the namma ier
EE+E /E-E/E *E/e/ealb
rigutmot dlesivation or he oinq
Oblin lehtmostond
atb a+b
used i Corppiler
9 Eplai Vanious pazno teciques

3 h t ave the Problems


Top-bn porsng ?Exploi 9

porSing and
Bw Top-doun
What ose 4he differences
BoHom- UP po sinA
e folloung granmai.
5)Eliminate LeftTecursion for

EEFT/T
TT*F/F

E->E+E /ExE/cE)/id
Conside foloaing
he gramay,
i s ombiguous.Eimipte the Oonbluigthy fou
Showthat
this rammal.

b9nq Recuotve Descent


T Ipenest the follouoin9 grama

Poo1Se

S Aa/bAc/bBa
A-d

B .
and FoLLoW.
9List out he Rles for IRST
2
FoLLot forthe grommo),
FIRST ad
o) COstauct
EET/T
T TAf /
FE/1d
gronmaj.
table for
)Constqutt
predective paTSing
bSLL)/a
aEET/T
LL,s/s
TT*F /F (a,a) belong
the
check ohath
P ED/t4 t o Hhat qromma.

omo .

LLtD PoTse table foo follodA


constutt

S Aa/bAce/ee/bBo
A d

2 at ore the achons Performed by Shift -Redce parse


13 Consde the rommo

EE-E/EX E/id
Perfn-sf+ Reduce poirg } p stonq i-idaids

4) Deine handle Poing? Explain &tock implementolon


shitt Teduce porse oith the help ot
example
prececdenceqroi)oi voith an Exanple )
15 what is opestador
R Por3e1g.
6)Descoibe in boief obout

13 Detine cLosURE (T) and Golo oncdion in LR PoaSino


gramo.
9 Constsut SLR PNsing table for fdhaing

EETT A c c e p t psling
id *id+id
TTAelF

P E )/td.
Desibe
b r jolouig
aomo
Set of items
LRC) table of +h at
9) nd conslstut Paose
diarau and
State

9-CC
CcC
Tammah.
sLR poSing table for JoluLoinA
a0 Corstwt

SAs/b
ASAla.
table foo e folung o n
2D
Constt he LRCD porSi
SCC aadd
Pahse he Hput
sting
Cd.

an agovithp fr Oompudia LR(K)


22ote
22) corstouoet LALR Pmse able fov he dolluong giomrh

$L-R, S-sR, L ¥R R - L

tt ConStud LALR areing Table.


84) ite a procedure

LALR PonSing Tabe foo follouong gramoty


a5) Give
SaAd/bBAaBc/bAc
Ae

Be

LALR & LR pa7sers.


Compare ond corztrast Bctween SLR,
ac)
yACC pons Gensotur
2 Give tHe Srifcotion t h e

ae Explain briefty abaut Sirphficadon o) Gamenay

8) ConSidy
the jollaing 3omo
SOA A8/0/
A09Ae/1
0A A9
Consttt LeftmoSt deivadionS povse toee ollouna
foo follouina
i , 11 oolol.
O1o
h e Predetve dolowing 43ammal.
porSe o
20) Constut
26)
s EE+T/T TSTAF/F F- FA* /a/b.
UNTT-I
in detor.
4 Exploin the comept ofSnox dive ted Defliniion

whot is atibuted Guromm09 xpl the SyntheSize a


nhetited otsbutes.
otobuted
)Dtesence BJw Surtheszed and I-heited
4DeSiqn the. dependenut ropb of h. olouoirng.
SST Lst
T i t Hoat (cho1 deubl
List ist,id/id
5) Expaio the Boaluction Ordn for SDD.
HS
)hodt is Sysx drected ranslion echemt and
advatq2s
taes Soo xpresion used
DExplain the Cobsiaudhon of Synbn
for SDT 2
and Latrobudes. ond Aher difesences
8) uwhot S
ntemeolate ede ond the Properties
o h o t is

different
intesmediote fmns.
1 Expoirn
A b s t 9 a u Surstox Aree.

b) Polish Nlotaton

c)Fsee address Code


) hat is the thpee oddress
oe and xplain 4he

toiple or irdiret ride oth uiloble EXample.


quadruple,
azb*-Cb*-C.
ond oote he Stalrnert

o Type dhecker in Cornpiler.


4he ole
12) Exploin n bsief
and pe CorTSon.
Explon in brief about upe hecking

tronslotur gheme 4o Corvot the EpTeSShon


14) Give the
Code.
mpi in b thoree address
ram
Sd=E

EE,+E/ExE -E, (E i.
iemecioa ode tor the
o u ould you qenaiote the
5)
Corsto) sBatemeryts. explainy
with Fxamples.
tow ot
ith the TequiTed
intepnediate Code Seqment oalorg
) Geeaale
9cheme
Snan dsected transpdion
4 Ca> b)
X atb

X= - b
and b iS on int dta tupe.
0 e Teol
hee
here a and x

s Br
14hot ioa a
predure
proceduve ?
ules for declavadion
he Cesmarntic
14) Give
UNTT-
ofaPgro)
he Tun firne Stovoge cpriodion)
DExplan
mEHS
a)Explorn Vaoious Storoge allocoion Aotnies oth
an demesiiS.
Hs advartoges,
3) uite abod heop oooge allocation od
uRte all he ialds in AR
Define Actvocion fecord.ond
dedi).
5) Exphip Memvy esorchy
mutator in GC
the te qalbage ullechion ord
6) Expain eochable

Foagmeytartion Explain he Contupt


whotis
objects n frogmertadion.
tut tan bo patttamed to donge
EApoin the fous spachbns
the e t of seachable dbjects
Oceuy dui toate
&tats +hot may
whot ote diterent

Bosed algoithos
Balit moKOn Sweep Algdlithms
10) Expain
Code qerearion Should podses
prtparhej tut
n Mention the sues
DeNq9
DeScoibe Code eneacor
12
tooget poogram
are the fovos of a
1G) uhoat
detil
14) he fooms of Toget mouhine code tn
I4) Explain

Basic Blotks or LASt the Teomiologies ?


15 Deioe
16) uhat is DAG?Mertion opplicodions and Aloith for
eonslauding a DAG

Basie Block
7Conslsut DAG fo foluoing
T A+B
T2 C+D

T2 E-T2

4 Ti-3.
Sed regi&te alloatier
1 Constotet how DAG Can be
PHoceds ? Give Exomple
the OA fUr Staknernt z x-Y +X* y*U-V/%
19) show hot
+X+V.
desciptot and address deSmphs
is meont by Teaieten
20) what
*=fa+b)-(¢He)
code for he follooirg xp:
a) Geota tho
ond qso Copuate
its oSt
code Secuene
the folauoing
aa) Considej
i, Mov BA
MOV 8,Ro
ADD , Ro ADD C,A
mov Ro, A

peephole optioizotion 9
vodous meltod to hondle
Expldin
a) 9
instaudior
allocate vegisegs to
24) Ho0 to

poi-ipe of Dynamic Paoaraing


Explain the ODking
5)
wi Sutable bkample 9
UNDT-
zochorn 9 and
Duohot is macbine îndepedent Coce Optiri

Adhonlagel oCode opliizodion ?


Techmiques
)Explain Voious Code optimizaion

)Explai Hhoee loop oplhoizaBon Technique' uitb Exomple


Prorams?
)LOife abauur Dau lao Arnyss of Sinutural
6what is ivenss xpan lveess th
Sitable xample 9

Flau EquadionS e Se up ond &dved


hw dda
) Epaio
rrpooirg code DFE?
Car be done oing
Explai hoo CopH poopogadion
Can be
edundat b Expreston ehrrinates
9Exploi) bpio
done at abbal laved n

he Le0Rs Aow Graphs 9


) Exptalo

1 Expan
te pootial Redondont E finaHor

You might also like