10cs63

USN

Sixth Semester B.E. Degree Examination, Dec.20l4lJan.20l5

Gompiler Design Time: 3 hrs.

Max. Marks:100 Note'. Answer finy

FIW fall

questions, selecting

o o o

g

PART _ A

C3

E

'€d) Cd

L

?a

la.

]

b.

-:>

2a.

;vf oo

ioo',

b.

i-I

(g$

--.

o

Y:J

w

-(J -+

..5

Explain with neat diagram. the phases of compiler with example. (10 Marks) Construct a transition diagram for recognizing relational operators. Sketch the nrosram ral segrnent to implement it, showing the frst state and one final state. (10 't Marks)

Bliefly explain the problems associated with top down parser. (03 Mafks) Showthatfollowinggrammdris'amb'guous: S-+S+SlSxsiid.Giveanunambigrious grammar lor the above grammar such that '*' has highest priority and x has less priority and

bbth are:left associative. Given the gran'.nar A -+ (A) i a ,' i), Construct predictive parser table. ii) Check the grammar is LL( I ) or not. iii) Show the parser steps for the inpur ((a)).

i

(.07

Marks)

(10 Ntarks)

oaJ

50i (dcd e^

>i: r'6

a. Obtain LR(0) items for the following grammar: .b' S-+L:R|R L-+*RiidR-+L. Obtain FIRST and FALLO* table. Is the grammar SLR?

a.

"a ,t .2 6: @LE !O

>-

,*

oeo

coa :iq e!

e< *(.l o

for the grammar shown in Q.3(a) and obtain SLR parsing (12 Marks)

''

Oj: ^X

,.r,

(08Marks)

b. c.

i.

1l

Given the grammar:

i

j

A-+CC C-+aC lb i), Construct sets of LR( I ) items. ii) Construct canonical LR(l) parsing'table. Write

a note on the parse generator '_

)i

, (12 Marks)

YACC.

(03 Marks)

W:ite the YACC specification of a simple desk calculator with fotlowing grammar, Ior arithnretic expression

:

"

E'-+E+TlT

T-+T*F lF F + (E) | digit

where digit between 0 to 9.

z 1rJ

p.

I of2

(05 Marks)

i

jr

PART-B

:

: ,l

i

i,

;t , ii ;,, i il

i :

,

i , ,i 'ii' a. Explarnitype of attributes f,or non terminal with example. i ; : .i,ti , ii,(uMark$).. --'-,;;;'.' I '.tt-, : L rr'.; I t, n i,l b. Write annotated' parde tree for expressionls + 4 x 3n where grimmar is ', .i ''il'jli q"lk;;', L-+Enl ..:,, I , 'li ":t :: I ' '' ',^E-EiTiT,' i; lI: .l ' .t

,i

i. :l

i I

I

:.,j i

:

:

i

i r

t

:l

:l

,i

{"i11

:

,,:i,",,,,

..i

,

,'.i. ir.il rs*J!,h.mjFtFi,l

:!i

ir fll-rieiei l,-trf ".*-j

r

'

i',

r

'

,

rr ,,,

1.

,

i;

,

, j idigit; i,; How q,l#Vlelrt ulassss rruw clisses ur of JLrl-, SDD'ss that tnat guarantee n+11-q,1]

{lfuent

obtain postfix SDT for simple desk 'I

i6 i

a.

:'

ii

,' i evaluation,order? evalUatlonr Ofd'ef'/

calculator.

:..-',' I' , .. ,i.u"

j ,

' : t

L,,',

fortheexpressionx*x the expression x + 4-g,(fi 4cyclic graph for agycJig (y+

Explain the followinf followin[ lvith ivith

:

.

What is activation record?

record.

:

,iifoouurt ,l(06 Marks) r) ,io+

uu.r.rj

i

I

z)+(y*z) x w.

T example: ; i) Quadqaples il hirpfpq iii;,rnAirect tripleg;t:, , c. Explain,SDT of switch statement.

a.

:,

I

* t,,, I:i.,,-*;1 , l'':"'g"r{i

:

""

tt-:: : Obtainthedirected Obtain the directed

:b.

iI .i., ;i I

(06Marks)

{

' ..'!'..,,.t:

nipp

i :

.

,

,1sr rvru.Lg

(08 Marks)

i

struqtdt"ahO purpose of each rfield in the activarion

b. Explain;tasks of callpr and callee *fidAi;dure called and exit. i, I .i c. Explaio;briefly the performance. rne{rics

" -:

[3:ffi:[]]

to be considered while desigiling garbage collector. (S6 Marks)

,,

8 a.

b.

i

'1,!

'"

,r,, ",..,

Write intermediate code for the following soui.."cod.' ,ill.i::r. ". for i from I to l0 do :i : , : .,,n,,rr. ' ::,,,',]:,] for i from I to l0 do ul' 'i a [i, j] : 0.0: for i froin I to t0 do a [i, i] : 1.0; and identify basic blocks. "'issues Discuss,,; in the design of a code generator. I ,:,

lt:;

(10 Marks)

:Y .:

(10 Marks)

"i,

!i .;l i

2 of2

cd dec 14.pdf

... Construct predictive parser table. ii) Check the grammar is LL( I ) or not. iii) Show the parser steps for the inpur ((a)). (10 Ntarks). a. Obtain LR(0) items for the ...

1MB Sizes 1 Downloads 237 Views

Recommend Documents

Dec-15
Term-End Examination. December, 2015 ... integrated social order ? 3. What, according to you, ... condition for the Satyagraha campaign. Discuss at length. 9.

Dec-15
No. of Printed Pages : 4. •714. BACHELOR OF EDUCATION. 00 s.0. Term-End Examination. C. December, 2015. ES-331 : CURRICULUM AND INSTRUCTION.

Dec-15
PART I. Answer any three questions in about 500 words each. 3x5=15. 1.1 Define library automation. Discuss its evolution since 1970's. 5. 1.2 Discuss the ...

Dec-15
Graphs and Figures in teaching of social studies. 2. Answer the following question in about. 600 words : Prepare an instructional strategy including instructional ...

Dec-15
*'tr-A 7. 2. >n. •cT- 31Q kii-11\31 1 wrcr-qt * R-R. Trd~T Tfrwr 14H I I 1-4-RiR ... r TR-0 ? c. Trt. 15 st;ki 3-talittzT TrRA *I len. ItPrwr ? 7. i if n. Pirvi. -4-t-4-(wrft.

Dec-15
*'tr-A 7. 2. >n. •cT- 31Q kii-11\31 1 wrcr-qt * R-R. Trd~T Tfrwr 14H I I 1-4-RiR ... r TR-0 ? c. Trt. 15 st;ki 3-talittzT TrRA *I len. ItPrwr ? 7. i if n. Pirvi. -4-t-4-(wrft.

Dec-15
(e) Methods and techniques of data collection. (f). Data analysis. (g) Interpretation of findings. 3. Explain the importance of paradigms in 20 counselling and ...

Cheap For Gp X Portable Cd Walkman⁄ Cd Player ⁄Cd Machine⁄ Cd ...
Cheap For Gp X Portable Cd Walkman⁄ Cd Player ⁄Cd Machine⁄ Cd Disc Free Shipping & Wholesale Price.pdf. Cheap For Gp X Portable Cd Walkman⁄ Cd ...

Dec 5-Dec 9 Elementary Lunch Allergen Info.pdf
Printed: 11/10/2016, 9:32:41AM Filename: C:\Program Files (x86)\WebSMARTT\web\Reports\Menu Plan\MenuPlanItemAllergens.rpt Page 1 of 5. Whoops!

NIT_Continuation_of_Floodway_and_Setup_of_ACs_07-Dec-2017 ...
l. de Tender Comnrittee Menrbers, Gelephu,4.Jotice Boald. 2.F Person ... PDF. NIT_Continuation_of_Floodway_and_Setup_of_ACs_07-Dec-2017.PDF. Open.

Dec 04 issue 17
advantage of the often fractious or feckless character of fledgling ... national broadcast media, the Russian Duma, polit- ... per se provide answers to economic and social problems. Yet, fair .... East a part of his antiterrorism campaign, although.

Dec-13
(a) Write short note on the following : 5x1=5. (i) WDF. UGs. (iii) PIA. (iv) SLNA and. (v) NDC. (b) What is the process of opening of WDF 5 account in Bank discuss ...

Dec-13
The tools that increase the automation of a task 1 so that the efficiency and productivity of the team is enhanced is known as. 3. A scanner which can recognise ...

Dec-14
(b) Print layout view. (c) Reading view. (d) Print preview ... (b) HTML. 14. Write the basic features of MS-Word and write its advantages. 15. What is the purpose of ...

DEC 212U1
Mobile Phone Nos.- 0915-116-8501: 0908-820-1187. AMCOA -. Ina,n,thoa1 S,mina, wtd Thother &tuxabDn of a, AELRS. 0761/Oce,ter i4/2O/22.J?kj.imbmr3S.

Dec-13
Explain the linkage between Job Description. Job 20 specification and job analysis with examples from the tourism industry. Also mention the use of job.

Dec-14
(i) Recovery. (ii) Scheduling. (iii) Dairy. (iv) Journal. (v) Liquidity ... (b) Discuss the processes that comprise business management. 5. 8. Write short notes on any ...

Cheap The Weeknd Starboy - Cd New- New Cd Album Free ...
Cheap The Weeknd Starboy - Cd New- New Cd Album Free Shipping & Wholesale Price.pdf. Cheap The Weeknd Starboy - Cd New- New Cd Album Free ...

DEC. 2017 Newsletter.pdf
Dec. 22 Darissa VanHolton. Dec. 24 Olivia Gentry. Dec. 30 Robin Davis & Aliyah Speck. Dec. 31 Dalton Messersmith. Hand Hygiene and Health. It is the time of year that various illnesses spread. Please. review with your children (and practice yourself)

Nov Dec 2010_NoRestriction_NoRestriction.pdf
6. How wilt ,ou telt the mrly laid sws lines? ?. Dlaw tho .Lekh of{ di4Esion tEn L. 8. Stste the Dethods t y which 6ludeE i. dispced o[. 9. What i. sD 6yga .ag .1lrc?

Dec-2.pdf
Page 1 of 14. Lindon. Elementary. Newsletter. December. 2017. -12/5-7 Christmas in Color @ Provo Towne Center. -12/8 School Spirit Day/ T-shirt orders due.

Cheap Cd Player Wall-Mounted Cd Player Household Hanging ...
Cheap Cd Player Wall-Mounted Cd Player Household H ... etooth Speaker Free Shipping & Wholesale Price.pdf. Cheap Cd Player Wall-Mounted Cd Player ...

Nov Dec 2011HE_NoRestriction_NoRestriction.pdf
What are BOT proj€cts? Defi ne limiling gradient. What is extra widenirg? /4. Define optimum moisture content. Wlat are dowel bars? Differ€ntiate between Tar ...

Dec 2017 Forecast_Final.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Dec 2017 Forecast_Final.pdf. Dec 2017 Forecast_Final.pdf. Open. Extract. Open with. Sign In. Main menu.