0% found this document useful (0 votes)
3 views7 pages

Assignment1 S

The document outlines various topics related to computer science and engineering, including grammar analysis, code generation, and parsing techniques. It discusses the construction of deterministic finite automata (DFA) and the computation of FIRST and FOLLOW sets for grammar. Additionally, it addresses ambiguity in grammars and provides examples of parsing and tokenization.

Uploaded by

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

Assignment1 S

The document outlines various topics related to computer science and engineering, including grammar analysis, code generation, and parsing techniques. It discusses the construction of deterministic finite automata (DFA) and the computation of FIRST and FOLLOW sets for grammar. Additionally, it addresses ambiguity in grammars and provides examples of parsing and tokenization.

Uploaded by

anshmohanty14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 7
Department of Cc Faculty of Engineering & Technology (ITER) 2 mputer Science & Engineering an (0) staat dillon! opub Sexdpul af the soto phases oo anger don the axignment ghatement C= CF-32)* CS /4) fea> Q) Th levied Aralapis ~ Topul-> ounce cade as o.seunce of chacaclors Oulu» A efrcar of keke! Tdenkfter (c) , ovign-op(=), Le rumber (32), mtheioh!. par numb), yh 8" Paren, mult ep Cn), fell paren, number Cc) dv.op (/), ~parten P)Snlee Alen Syphax A aly, Tope > Token aiceam Be ssl ny Cb Fase Tee [Mio Syphax Tree CHT) cepanentig the expenion gle cae a > TX f ete ‘ | Semen Aralysis > Tapuk—+ AST fom dhe spl: ovals hoe \ paren, idenfilien CF), casi minus op), Cudpub-> Anche MT wth bye tleamalte ena : *) Check hype compaltiihy Ce9- nner fox arith » k eric, 2 anithme lic) ¥) Valioble vartable declareatiene om Al) Tnleemediate Code gereraion -> Topuk -Annoteck AST Out» Trkecmedihe repasrenteation, offen ty Hree-oddreu osde (TAC) -« dis F-32 l= bs = bisely aly ©) Code OpHnirabion -» Trput > Thtermediale code Oulpd > Opkintseal folenmmedtale coole sramovirg redundancies CAP HPFHHSHHHHHHHHCHHSHHOHSKEHVOGHHSE SO ®O Ube Fag \ c= ble Osesg J. Name: __ Regd No: ae DRRRRnneeneentnty Fro cercosesceeocereuoseasnacguiuurcliuinanamnnerinsycneer dus cuiusiescusuarcuaesseunienes isco obec cc al Department of Computer Science & veaty of Engineering & Technology (IT 7 ( ¢) Code-generalion > Inpub-s Cplimizesl intermediate Coole - Oubpat > Assembly or mockine_ caole 2 hoacl F Py Sub 32 Mul O-SSSE a Shae C sa ing ard taading Dap Obj cade 5 Cetpul> Ereculeble machine cede nody fon execution *)Protde. cexidoe experts te churacleine the foloiny Ke local Hone a © Taeniers » Regylan exprenton > (a-24-21(Ta-2A.20-9.J™[a-zA-20-71)? ? 5) Numbers ~ F TNE Rey expmison + (OHA. 6-40) Cee JEIIE aed ~ *)) ©) While space > [Sines 5 OD rlbrlte Operators > CHIN INK IV Jay Io) 9 Lexie, Conberk> Clean lee) 9 F) egfcal Oporbrs> Gext salt) Cnet fanlfor) 2 9) Comparison Operahns Cebel Cit thenlelse) D i) Literal Hrdings + *CO THOTT 9)" 3 QB) A gamma for brarching Pelomnls isdelined as Qo e a Rrs> ez A © d 1?) RegdNov eo e2F oH FFHSCRCHHEHHHHHCHSHC HK HOHSHFHHHG HHO EG ic department of Computer Science & Engineering, aculty of Engineering & Technology (ITER) \ (% Detign the DFA Rnthe gfien Regulax Expresttoo aCal b)“o. 9) Goverct the RC bo @-rirA ngs og GL © & ) Govert the @-nirn kenrg arch EH te Miotmtaed OFF Moss “WS @ Gace oy © Pride de lllacieg C pram tle argeagrade foreard cant Ihe oonbos of hlen Pon} Cathal Suave Cx) f Neal x, rs /*reekaroe %-sqpared ost Brever mere den 100° / redoan (x <=-10.0 Woe >= 10.09 100; 2x A Lexeme Arf ') Bloat -» Kegooml 1)limibecl Suore + Teron ij) C+ Lell parents y)y Teli yp RIE prenlhest, vi) P Led beace Abad degcond © visi n> Diertilfon: ix)5 > Panthuab oo Cemtcolon) .) /¥ nehuens Squared but neverrmore May 10D°/—> Cornmenh Groned hy Lect onaby’s) x1) ; Fal onakuts) xt tos + Leywoond, X11) Cs LeMlpancoffess 9155) ma Berl AY) <>» Reldine, Chnelee 09> hilt yy 4 eet a fi) 0.0 > Mumbo 4 7 c Tolentohte i) Umer svi) > Loar cal wD) co RE stay feo i) Wodas wee / 8) 10:00 Muhbor wi89 Conditioned ZIOS > Murrben rex) 1-> GndPltonef wnte),r-s Peelten anv) * - Rchabion SV) Pig Bes wx) 9 oR porn Number of token = 29 (4) —_.g 39) See Regd No: Department of Computer Science & E Faculty of Engineering & Technology (® Conidor He conto! feo grammar? 34 CDlq LALSIS and dhe ting a a) Ge He feltmed darialon edhe fag YC He nigel dudnbin dn Besking Pres SCL) Ass S(t) La) z L,3,8) ey >G,3,8) > >@,3,9) CLs (2) >Ch8),3,8) (18, @)) >Gs,8),88) ae >G8),3,8 >(8,4,@) tewae) (Wa, @)) ~ a),0, 8) C9) ,0, (a) > G9), 0, CL) > Go9),0,() ~> (0,0) a, C8)) >(C5,4), 0, @)) > (0,0) Gy, (0) CO BKGive a parte free fou the vein Anas g Regd No: 2, 09900909 ) : J to) ) fers eos ede eevee eeresee Fes eet boenneae ® Department of ¢ Faculty of Engine (d)yy Hegrammarcatvbigacus ox urembiquons ) Tadhly youre ans.oon Ans> A grammre fs ambos if asty b sfitcg can have mulliple dlsfineh porte trees on denen} olen’ vaktone “Ths grammars ambiguous because He shiry oon be ded in mrlligle tog bectng dk different parse dees: ®) Clintnake the Lol re ceustery Baom the grammar Gheny) Mm SCL)IBe LAL, Ig Rule h> 1,8 is left recursive because -appaus on dhe Left stle trodes alten |. Rewribe rule Loa L Nea Cramroar. hese Sale E>, 8V Je Losp Les, wie D Leb G be the pe Follosirg contort Bee grower, where Ei the dod syeboll of 6. ESOC) >eicEll=£2 | er Ex Bccea less ca ye3 > &3>C4 ICarey1 63 Cy SCyscuridrial W) td El I= CQ>E4 I= E> | =CQ ¥) CAC3> C4 mid Vi)id-« tds id [id aie Regd No: __ d | Department of Computer Science & Engineering Faculty of Engineering & Technology (ITER) . %) Let Gbedhe Fallorsing Gobert~ Pree Grammar. a Pax Qee Go y2/z 2 aoe Compule Ihe FERST ond FOLLOW fanction fercall fe ren Heeb S 4 teratrals present the above Jiterrmares 4 Pee Ret | lists 7 oo Tt zn 3 ty x} hey? ) fuse) ayt Nyt iH 2 D Coneider He Falesting grommae N>XY1Yx a X> a|Zx2 A Y> bizy Z>ealb o 5 Feat Follow A ni fab} $ a x byt tbat 4 Y fb,a} {B, ab] . o fabs fab? = eS: EEC Table 5 . a b ~ No meviy~ nsayiyx | O ‘ X>alaxz 22 “ a b/z7@9 5 © a b A : DT Ut roman won) x Am > Nlo. Conllich extsle in Re parsing ble “A Mattiple enhrice ba sare. nen-hrninal ot Foorval palm Regd No: Department of Computer Science & Engineering a velty of gineering & Technology (ITER) Vert fhe given grommet soobiyuaus ea fia Joh dative « shing ababo al N+Yx N>YRX ZXZY > 29x >ZyYx Ab > 2ZYX > ZYZxXZ > ZZLYX Sabone mababa Thegrommain ts ro abhiguoce ast dilnt hove come sing gree Aan dif Purse kteos 9) Gonlon de Flluciggrammare > +88 1*26 la avd Me seg omen. 9) Conghel He SLR seh.of theme of He above Gagne gem ie has! gos [Ses Sarge ty Sie 8486 a Se 95 Soa D) Compute the GOTO funckian foe Here Peder hs ol“tem. Stouothe porstig able foe tr rare Se Ms graromon Go SLR 9 a a e a °° ” a e a e a a “ a a a a a a a ” a a a a a“ a Ans» an G0T0 4 Aelion To * a So ae Sta Regenesis? oo ee ha no confttck in asing Ty ‘i a table. Tete Tee Tg ers ¢ Fey Wie Ohiveatty, 7, Te me cs Te =k Be Tyee ay & Dae tee hey eee, Cy \ Deen Gna Name: i a Regt i

You might also like