0% found this document useful (0 votes)
42 views31 pages

TOC and CD - Short Notes BEST FOR STUDY

The document discusses various concepts related to formal languages, including definitions of strings, prefixes, and the structure of languages. It covers topics such as regular languages, finite state machines, and grammars, emphasizing the relationships between different types of languages and their properties. Additionally, it touches on mathematical laws and operations relevant to language theory.

Uploaded by

Kartikey Verma
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)
42 views31 pages

TOC and CD - Short Notes BEST FOR STUDY

The document discusses various concepts related to formal languages, including definitions of strings, prefixes, and the structure of languages. It covers topics such as regular languages, finite state machines, and grammars, emphasizing the relationships between different types of languages and their properties. Additionally, it touches on mathematical laws and operations relevant to language theory.

Uploaded by

Kartikey Verma
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/ 31
Peis leetocentest ww! om spl. = _ ool ¢ LLevoect urst] vrepoanted A Lescr Cone ele sym LAP Also Knoon Oo Terminals ange tS Symobob. Denoted by 1 SEE vangy HBO finite, and Seay fnatler. atengin f sting 321 No of symbols Invelved in the ching. wiz abed 1. \i\e4 #(Mever) | lo] #40 4, Empty Shing or Null Shing (2) Shin leer Shing mot a symbot] EGmeat. of shings(-) Coneat ef 2 abing ust alioaip be = ching. Dito F to, Sangisenqreiston Re [Eieng Fong e = omg 6 Prefix La Sting: Wsabed +. Prefe(10,)= €,a,ab ,abe ,abed, is Sea of banding. W2=9204 Prefix (lo,)=€,a,aa, aaa, aaa. Suymbbote. ina 2 5 ye DLA Shing it & prefix f jkself. trial). tale tye yo * Satie fa Shing wizabed . Cave €,ded bed, abed, Sef be Hingy ok shing Ta se fix of tscle $: Sub Stings HR a ohn. presnt inne shing - wozabed — subchings - 7© a abate Ged Pwol=n; shen ral gato wed \ Tos ne = ed Sub she = PES Spay + Valid wohen all aymbeds arc wigqueric gals 9 Reve, ka ind (60%) : tttelie dkhnek]. B Sted"): WFabed 5 w®- donn [68s 48 to} palindzone -, Sey: wee _ le. longunge t Sat of Shings [ay be finile ov tn fite] xEmply Lanquage & pemible L= 7b =6 # day W Alphabet:(=) Non emely fuk set f Symbols om which, the Lan! & 4 qeege defined, ® Le d i W Aithabel, Language % tat ponte eee 4 uf Length O je [wl=o- Rin Gate Alphabet nok possible alphatset f $ al © = docant emtain €- valid % Paroer of ahi [orl ne zy ®=abe » Fo =é]; W3= Www = abealeake . Langue. + Tusk Like Gartetlan prod, fa selr bY tae TL 2Y Bement of @ Lang Jf only ifs “tgs far,az, bi, bry bethof them cue fake. —_— "2 Concord L Scanned with CamScanner a a ke el 3 I) fe cod Gt the Lang in the ot [Gang = ang-d= 9 | Ye oo 2 then Ganeat Te oo. "Revere of a langua e [UR] ot | LF contains wf for Vive Ls Lafab, baa bby a) Hh 1. LR Sha ,ab, aa, bb, a, bY 5 Peoen eb Longuage [it lnewi] Hh teed Me dey Uer=hany 7 peask L% Li = fark sary =faa,ab ef | @tnen ond ihiseehen £2 lang cofll alors be a Language ||" Gemplement Lang £11; WiSet d00: oe oe ={e.raaaaa-. | LSS Universal - L AK gives a tong coop. | | { CAFE A combinatinon 2 Wversal EG i & and & . ee 7 eo | Ploy. Gay] PE fovea. bom oe ef ® Kost = or] i | 19) Positive Coerei(at) at. Uae OS a *] io at= ar- B= B and (ate oy aot = oto a 4 Scanned with CamScanner Toe+ Requlan Language; @ranquage i ‘ cegula, {f accepted by De ule Stalé Machine + FA tu. zd Fr, Sh ps (Q22>G] [Sgxs sas] gx evey~a?| DPA “NFA TS NFA. @A FM Moy have Ow moe final abaly, but exeielly one dual wteld Turivtent Rink + 7 If Language cmlalie € ,then init slate Usil be final alate. Pak Stale | final, then lang. emtains €. ' A Lang. may have mere than one Fem for iky bal yuin FSM Kakosus undqrec . © Fem fav Piatt Lang. ust clea have Fsm will neven have loops. Thar Slal?- psa. Cara| Neal ENFA)- n mm. 7 Psite, Langua h always requlan. > Pinay Lang . > ifwe make alt Slates fal fo DPA, then It Qeceps I*. Tet ete emer They hn nee ee, oe R alvoays Regular , ore altory> seqular, eX Sumbel ~) Ne- To -NEAR| conga. Non-Linear Ryo, > Temp ne Regd > Paso = Trap stalk con never be final atake «And Gn BA, obnunt L TRAP. IP we make att stak as PINE In NAG then it tll laceept Prefix CL) [ie Lan { ¢ q Smlmining all the prefixes Pall © bilge. 4 Complement of afsm 3 [aye] Ghange s/ inal => wan Pinel > AMR Banta valld for Npas sand ton Fianl—» Pinar | invalid £0 se, @ Power Revere the arracs . ~ GIhe complement f @ requian lang % alee aequlan . Othe eeneal- f 9 Leng & cluaap vegulen . Revene {a Machine: [a1?] 7 Make IniMlal alalt as Final shale, and al final statz as Tm final.and init, Revere the arracs. GPrevere DFA Could bo NEAL @ Rev of RL A always RE > 1 merecthan 1 tulhel alale (efh? eowenion) then make Neve init statt wy © transi len \5 them. Scanned with CamScanner s He Lome dmem aah ae et Lane Ings, msif we Hef arb [naa or yh RL S- {amb [noi meab aL PE = Lem em | asm bay AL bP farbm | nam say RL J) Br tarem nm eh a Tefomem [atin neh AL | Lament ech a | {27k | n-m=sh ware 4 rdanbm [Demet > om. [13 fa%™ | too-n omé RL | 4d aM b™| nam PARE Has: La b™| nomy nee & Laren] nyamy age BL APRN] nym SY NEL | Lathe | emg nee | q f{a?| Po Pitre wae [20 Lam bom Inge smeah RL A-f arb am] ney, mea ¥ NRL a fambrem/ n> 1 ,mot Pee ag -foMb™e™| n=amy NRL Ayr LarumeP | nemep Y-NRE > Larbmc? | namxpP NRL lag. Laem ef | n= amap ENRE ag = farbren|nety nee ae. LaF | Prprime, [Piss°h Bt aq farbrar| ns loFY RL Ps f amar | nly AL poses manasa 8 Hp tered me rte Teeter FSR tan im : 7 Peay vane tat . oan [ioe CG NRL qe Ru Bf 33.4, v0 (wR) | 0 € Care 34-4 ooh] we Cab¥ fT NAL Bf wo Joe Cab & RE Bod toe oR [rose € Corby P RL 33-4 vox wh | lox € Car hh RL Se-$ x woth | rE Carey BL IA +f xvowoR [o0-€ Ca.b)* Pave tof coua® x | ore € CWS RE 4+ wro® x | wore (aey® P-NAL i St ph Bf xey lye Cab RL 43 “iy fe 3 Vamur cP ey > Pl mingps of RE LP 22] oyor€ Cab, Vol =ttont FB 65 Po] Se Cangk | tele) -auol] ga fer every petix sf 0 PAL Scanned with CamScanner re. memion * Mathe matical focmula used 1 Fepe HE one uslas Expremn * pe for & Lanquage exPre then is RL- ® @ Re for a given lang » wil qencrale ml shins Semi- Reabichad (S, C) €ytyt 0,0) Rerblcked CE6,0 ork 4 ait. Tm Sylniahe Piles CC), ak at, res of evatualiun. Ara ly fos, € free Ps) ae one R-EB , whe gre: it hao unt que den 9 B> gP*- Algelroie Lauss “ne * Commutative Lavo: Assoelative Lave : jo the given rad . “foto a ore p47, OW |en4 Re @ eer. = any © wWaGa tes) = @ rH) ee © mr, tan ® Gen) ts = CG). Bbbulive Law + < mit Gory 7 3) f (ern) Cart G) Crest aidbitoulive base Awds J ® Carty) = nererers Link & valid | eohits Lave Adempotent Lave + @ tp =, CO) meres, Lvelidl O nean cB) ery Foe [not 1 Genta oF a. Oe Sep 3. Bt- B ne Ge Ori 5 er=feb 6. wets ete yr F. K_ pty! eieeesrers ye OU TVET We + ecte * Ti Ceabre Gas (are aheey® - b akg ag > (abe + bat)Fe Garut)* p= v= Sete ANB Cutan) = (ey Scanned with CamScanner I teak Nets + | g ttle of am te aliodys' BL and untan 9 Com Pintle anion of Bute clio BL - ' ' *inBaike anion of FL may ox maynel be BE: 7 Fine | ee Inherseaton Bat “Te always BL: A ae ; ONT Galler section & met RL. CNL) - ioe | mustative and’ hy 4. Coreak: £2 A more. RLF always BE | oa | & Subset of RL may or maggot be eRe” [ers oe" » & Subect of vee may be AL. )* RLU bem 2 bere RL A bert = DeFE ; BLU cAL L ce BLO cer = CPE! RL U.CsL = car Rel case rCee 44 ‘ RLU Ree = Ree RLO Ree= REC RLU RB = RE Ren Ree RE- |) Kleene closure @) ond ave clewre GE) £ RL ® along 9. Revene a REN always AL. ai, Wo. Every NBL Noo ‘atleast t BL’ cupersik (Univers ey) he Ons aot be a AL v®© = BL Re NR U NRE Need not be wequlan » = ( i BL U® = wae Wee REA NRL =O mayer ahoays Nee may ret be Ri, BBD NRL ON NAL - © KenL A@® = Re May or may not may e may nek | be TRL. vd" BL. Mathematical model of fem i Enput Tape Link] alalbele fe fe Ta L a z rUF bea. Frnt heal [CR] end marlin, Fa ' ett 4 = BPA + 0d Stack = DPRA Power (NPBA) > “NPA feo Stack = NPBA Pacer CRP DA) a | DRA + Rablt Slack = DRA NPA + Poul Staek =-NPA Scanned with camScanner 7 tr syne Meal aN alien ice CPM ey PD FZ QAO I dus { roe funetions ] i pambcigted es) War _ svete i sind of Stoll ee pas a Ar Qrez— A) oft Ve ° (0.1) ZO Co. oe 1)00 6") to= afP= 1000 6") afp= 01000 (At): @ there @ mackinin one cath - A(on.2): -eenves} ble no. £ shabi- ut. [Moore > Mealy}? 7° change io 2. [Mealy —> smoore! ne. of stabi many inereat- ® tn Mealy mye T\a\= m> and Jalen, the maible- No & stein tr Mosse = (man) 3 mx Pe 7 ts Gaunt octuranee SF > Cowhuet a “Mealy and Mere m/e Sabsbing ‘ab’ in'the input uw. | ain Oe KG SS -Moo RE 4>-mocre ond mealy for : areidh A lahen abing ends ust 00, B when ends with 11 , © otherwte. Scanned with CamScanner LTeC~ Gramme. | | > Set of * Tales by vohieh, we ve} fo Language * ey 7 preacal Ko Gibee STW @ Language,then there exhly & Gramma, Languc ° . -®1 a ‘4 we Jorma fr not pomible . : may Have mae than | valld @ramnmer° BGrammar lwp Langage fe povible “[-fulile ord @ A Grammer ean qenelaly Gdmet | Langage: Gr5VT SPS A Tuple- Vestiable Terminale Short Podueclim Vorlable Rule. Conique) Te devtve 2 abing frsm the grammer: Left most symbol “ba bived ak Bubs Right mat sambel resolved fish * Gorter! Rep: Parse Tree y abslract syntorTree, derivation Fee. 1. TP theve ex Peis Mb b Leb for a ching. Aner tune WOM ex feb 1G ond) ites ven 2. Parse Tres Luis and RMD Maou not be game. 3. We may have mevethan 4 Lmb/ AME fora Shing. 4 TP None of IMB’ one ponible, then exactig -N RMB ane also parsible- < ent A Ambiques Mah_> [USELESS] - ae Thete of mere than 1 LMb oe Rein fer ong giver sbing in the. grammer then WS ambi quay G ParseTee f IMD ov Rup may be aiff: / G Grammer % amblauue fF we find [atleast £ ching. fr which More than ~LMB( AMD exits + & No algaritnen exicls $5 GB cheek ombigaity [undecrdable J G There ont fram which we | en oicere aeanny: A ta G Then ant geome gramman frm whieh we ean) inhere ntl never remove nib quikg cong we ry < —D ud Gane Re may & mag nek (No) ee REC be ambi quar. coe cre BC FL], unambi quo li RL L . ad Scanned with CamScanner ®™atmot ore Variable - am RUS of Produclio , @ fing Pegulrr grammer. @an be emvarted en Linermbiguas ramen? ype? ammo: (CPG.) | ix Single varable defines amy thing. * Even requian Greamman Ke CFG. FROTE] 1. To cheek $f A grammons one eayrivalent oe nok fe undecidatle - 2.To check %f.2 Regulon grammer one cqpivalent oF ne & decidabe. TypeB1. Context Serrifive % Xap be wernt pot Type Oo: Unreobteted Grammars xP Be Cvs* +2? Becveryt Ato reamehions 5 B> [ius s \has}) # Toxing m/e foc LeLiey & not poshde WD * Contest Senritive Gram man doeont/Poduce € + GNP: Chomsky Normal Prime eee Te podichae ont ct type [Va vy & V>T] | Fan CNR, © & not alloood | PAlgeiter fe emesting (erq— ene). , 1 Remove €-Production Cunlen enhexent:) 2. Remove ant Peduelor - 3. Simpify the Jammer s > Remove woilers Vartable © Remove unreachable Var. oof Ste ta Bebtvalion NT! 7 Grretbach Noemal Porm? < daself L Re eibach Neemal Form: ~poduelion ductus ofthe form + Lat | Set ane 6 ly cae terminal followed Ih oma me oF vortables , Ek allooed only % the atert vostabie, - ® Meg grammar “con be eanverbed Woo Gur CaR@) PE Scanned with CamScanner { [ioe | [acheline Ba! | Puink= ane union. OSE ECC Fem Gur) @ap Length of Shknq 'f NA] 3 Remove Left Recursion fen ide nied “aibseps . 3 Remove & Production fue clesvatim frm . “SMove urit Bocluc tow GNF: ]| 4: Senputy the yanmen. ‘ | Removal Left Recut ions AP Aelp Aes Ipeu| pew Aoty [P| P---[Pa sige J (er. Multiple rn A eg a ban lata |e toa! Qieft Recinsicn Gane removed fram every CRy. © fndivect Left Becunnion % alec pontble- es, ction ¢ »f So aBle SAB so hp\plale Roafh\a Amakle >| pranla Bo bBI & BIbLBIE [as eB\b. act YM emlains €; then cart vemove~ » Removal efuvit Producten: a. E> Brt|® eo ket [rer |® — By eeT ITEM CED Id TS TPB > To tRelCe) Id 7? TItTee|Ce) [iA Fo ce) liad F>Ce) [ed Fo(e) ltd. | Smplifieats Grammer + DUerlew Veo able : Variables ©) Unreachableveniable: the that doit have tecminalt "4 age oearlt Lie te the Vee ofctot Var> ‘ ina » [s sae SoaBlba sable Gre (E23 x{RSbARaSlar|= [Bo aBEles\> B= Be) Bi o 5 aBB ES |b ' Scanned with CamScanner wr S—SC*TL:srees CL eeu fe more paverfial than berL. @ matical Mode! PDA: agate [zs | [11 $1 [ls Fike Tape CIP) - ail 2) totiat Seek Prog ram fev 4 af seyret p pha . B,=L8,1 ee) pul ¢ CQive Fi 2,8, - + Ba Pinal slalz Tr sack Araboks Po Bioeth) J Int. Slack symbet. PDA: 6: Gx {ZUEPAT — Qx pear] Por/ser arpa: 8: @ xdzveyx Tx pust|per sie} estoy Seo gens © Boe] gras oa. Spotonteaioe Berse pherof RDA! SCY, a, &) PCy, pesh| por] MPD Bua? $(}0,0, %) F(M, Azo) part Say, AYE (vs €) SCr ra, a) by Caan) SC, ber C¥s-=) S(%.b.A) b> Ca, BA) Sele: Scag ,c, 8) CV B) @ve can push mae than one element ak atid, ond abe per meethan me clement of a tme- Cel uch = CPL Bett v BeFL = CFL lperc@2 bee ares @aL] Ber Ucrr =cAr beeS= BeFL cFLe= est en Peer 0 Beri= es_ L_Cst"= Gsu (may be CPE Sstdi tl prpertica s Beri - Beet = @su Bert - R= Bert B- beeL = beer CFL- beer = ert Ber, - CPL = Csi CFL- GPL= CSL Tnportant Pans : A BY PDA we cast clo more than 4 cemportsen. * We coril seeognine nm Linear pawn. fh wf Poa. * Sting matehing nob purrikle [ie Lf ooh not ert] Stu tevene matehing fe punikke. ie duowkb | Seme Tm portant PDAS Lele qd arbre [nea b THR Ke Final Wee - aA aa Bale Shake PDA» Yen ate jae bly alin corey Gaon ake ¢ ater SL emply Can be mer seu . =. ‘Scanned with CamScanner “To@- Closure Ropestics r OPERATION. ~T Re | Beet [GPL Test |Ree Pre t. Unio (yw) aK x oK oK OK ok 2. Fntersect C9) [ ok avd [x "OK oK oe |p 8. Complement Ce) eK OK x oK te Coneat « Cc) oK x oK | oK 5. Set SiC) om x x ok -~ & Kleene Clune Ce) oie x oK T ok ok ony Ftve closure (+) oK x OK oK ok ox & Reversal (LR) on x Pon aK ox | ox oa LORD 7 oK oK OK ‘Te Re oK (ok ok - = = pte ba ‘ oK oK OK K (Ae REL on pon |x ile | «| x | 2% bL URL °K ok OK oK OK ok 13. Pre fix CL) or DutCL) oK OK ok | ok ox | eK ‘ly, Subset.” : : x | x 4 x |x x ix x x | x x x x & x x x ax s< x if | Scanned with CamScanner ~ Re and KE Ap. Py undecidabhe gi 2 ami-devidable Ae (2 -r hecidile\y (ave) a Ree vRe = RE Ree v REc~ REC _ReURE =RE FTA P Ace [att ~ a eatin 2 Loup “[rining elasidable ] [tusing Resoanixa ' [Ree Ree : * sMathem ical Model «f Tee . alaLele le [eee] Ace! Vell Myf Mall p only Aheosehically pazible, precticall we cari Knead, AC, beth woes Tite woe cane Clelad embal L . ' ——__—— uple We shale reads a, goer te Stak ay, ,and usrina ~ tm plaee € d', and moves Left ow want &rw Czy wo @axR) Standard Well Knaon Poblena + 1 Slate Enbiy Problem: [Given a Tr, a clay ge @ and west deade + the ctalt oy ever entered 2]Undecclgble . 2 Balting Probiems [Given deserptian & TM and uhiw provided ippiteelP fa L Ur d Led aecee! “em I Lue daw, f uncamtable tal (at gota nes Were | > Subset 2 Se ar nar ef ciee conten: | > Set ofall Ret one Gquntable, i 3 rae sv Mere camboble set f alucc go countable - | € countable’ get = uneauntable Plo @eunkable) = unesuntable P| PC Unesuntale) = unennbable. a= unesnlabee | > Cartesian Product of 2 cauntuble set k alidayp cruntable. | ? Complement & Gaintable , may or maynot be 4 8 Countable « (P Complement funeaimbalsle mayer maynel be Countable P Trlevseson may oe may not he Chuntable- | @BWe cannot reduce an undecicable problem A decidable fr polynomial Hw « ie op AWSs hao 45 be: — = Gy Undeeidable- Undecidable 7 2 ‘sy -h eine idable \ #7 need net Be \ a. B® sy deeidable. ad Scanned with CamScanner —pewem Ru bert Jcrt [@sc [Ree —| cael b B > B 5 X nan b & b x x |x gee” b x x 3 x x \ yer ba 6 x Ba x x x th She 5 x x x x xs OL b gb OL, Ps x | EL Arak b b > x x x Complement % bd x Same type. 4 e x bB bs amt . i Re b > x x « x ® farbrerd®... 27. Y & est, bot ie complement és alway erm. Scanned with CamScanner ee CD -Inbduchot | defn: Convert high Level Lanquage ts Lao Level Cang FLD Language pag a @igh Level Language can perfornm mere than oe operation fa a Single Stale ment + @ Lew Level Lang can pexform atmat one operation Tn a ket Analysts: and. suntheste model Compilern_* ‘Seuree fp an? Analyste || Lexical Analyzer. Gomriver Syhlor Analy ken } Analyss |Su ‘ ee as Pin L Target - ft i 4K ne | feemante ‘Analy Ron j a I : | _~y tv SL finteimedall eode cane aes 2 Fr @® There ane 6 wT proses of the oN Compiler » r enevation, ee Pe APR Synthese orga! 4 Inter mediatt Code gen: STAR phase, maker the loork ? L. Levies! Analy xen s i h ere. gion of BIR. B chee next A phases much eart for'apelting mitaker of — Enfurces veypreabilily and Program. pababiusg * = ® divides source code ints %. Code OpHmizaton, “” Sheam of Tokens 1) Loop invariant egvehuet 2: Syotec Analyzer _* 2) Common sul expe eliminabot Cheeks qrammes heal vrs of the begrom (Parser) ® Porsen & a BPBA- 3) Strength Reduehon 4) fanchoni dnlining. 5) Dead code eléminattat 3. Semanke Analyzer + ee Me Pe ee G-Symbel Table : Cheeks Lor Meaning sftne Prgrayp: D bald about data Cmela dala) eq: TYRE Mics match, 25 Bald Shuchive Uned by. Staek Oven Fino- Compiler and shared “by all the phone - ® vio sumbel Table compiler. Seve handler a cannol! vourle SOR Still look. Scanned with CamScanner yV LED- Gtram man, 2 y ~ 3CR4, ° 8m compiler we only we ¢ Tyre2@ra) and Tyre 2G8s) 2D Gampilen = Pogeam ‘of Grammar ompilen = Member ship Algonthmn. ; Prgpenmming Language fe ER 28o- CCS) + y “Stse Tree and Suntoe Treas || St boeetlT tober o Ter Te Rat PRP ET EL UAPIR aae eT 7 deat T 7 aH ATE nS ES axary Parse Tree ‘: tars eben + Synboxe Tree 2 © > Procedural eS 7 Inbaisde = Vorlable ® + (7) ~ Whole derivation 8 4 fe represented. 1 4", Bitedes the i a 3 Ceneept only, DG 4 Oto cheates prod | Nesoatalivits't i ® 8 | Randemly derive fil u have. enough Operatms, then cheek rhieh one & ; clone fist Y on Ost eats cf) a operate; ana ee net Left and Right ampociative, > Amb qusue Gr¥ammar, DC userese] ttem. Fo Botlem Ups. [ @D- Porsen] duced ( Xx.) alotGak the enc. , aon qe (xvx-ep | Ce no-terminals) ' S Vorhabie aftercey Staft > at. €B] LE termi nals) Germinal offs, dot). Scanned with CamScanner oe Gp- Syntax Analyt pavical Gover ON shiek check: zarnh nae ry Lexteal | ore help Pa sartet FT anaignen 5 POSE on. bani cally DPDAS. guna AERO 1 fe Backed Unc); ves nen | Reguvshve non- Reeunsive at pacerful Meomsive iomhe Garces, ORT | L Paves @hN of these powsers ore LLG) Table ‘driven: . predtetive Mathe malieal Médel'sf Parser t', Gruke Tore : 1s) Fuk Wead [LORI Pavain Tate @Parsers genera Powe Tree , for a iver Sbing by the given qrammo~ v 4 °3 q 4 Ly “Top daon Porser ( LL0) ¢ ATH uses LMp and % Cquivalent Algorithm 45 Cousbuet Parsing Table + fs, Bes fr Geaph. 1 Bemove Left Beeassion. if any: 2. Left facta. [ Remeve cemmaen of eal. [Pe Sere 2. Find Keb and Fellno set 4- Consbuet the Table. @| @% we inexeane the look ahead syrnbel? > Sbenath of parser T = Complexity of porse2T Due bs Common Prefix Beethees| Due 45 Left Recunion: 20 Ree: Removal of Camman Profit (Left Pactor )+ 1. S4 alablaa a Saray Yo e|byA- 2 A+abAlaalb. » Aaax\d CE en® \ Ro ob | xo ba jaxle Aaax|b Xa ax \by Yo Ale ‘Scanned with CamScanner | “tl ond Follnoz * Exst Sol» extream Lefl terminal frau volel I, ‘that Veotable bowls + batetn “€'- it never canlaivia, Vorbabes, bul may canto’ Owe can olicery> frid the ferck of any vor’ * Peles sot» Failan set cenlatina terminals ond $ Tean never egntetn varalle and “Ee”. rt How Is find -follno sel 2 1 Tnelude $ in files of sla variable '2-Tf production fof tyre ] A+ «Bp [expo shings of qraminen symba. fotinemof | Piivo(s) = Pat D_ | Mf Pe, te Aap then felteo(wy = foo) _| ® Prduction Like: |, t sets fame Gxt ond Qk, @oan giver -No alles the Shing sf he WS Sets |} SoABlen Pict | illus [date i Asahla [Dare ¥ 7 : |p Bowe Al @a b wt || Csaclje fp Bb $ i H bo apla a cf A | 5 a ‘$ ’ Seed inl Tees F Top Moe Pp BeNo of Recs 2 No f uniaue Varidble: ty Grammar. 2 Nef Colamma = [Terminaly + #] ae ae || 3. For Vontable (Row) All the -Cel Germinal) fb Fr haa Wa is fake u7 the ‘pedueHen eajd. '' WG fin fst put Ve. unde Boa th Poriewn. ® Fang @ cet has multiple kn, Hen nek nis Pomible is have IL (1) Parveen. Sinee tat oot | Ee ambi quay. | a @ffn wp’ oon ‘toe’ do's “desSation all n Betlom- Up We de = Reduction 1 Scanned with CamScanner Pre onsbuct LLG) Parsing Table far the given arom man: ] Paget] Ts TS Te PLE 5 FO CEDtAS } Go ypemoving bef} Recursion: e>Te’ lp poste lé G Ie” To @T’ L FF TO KPT le EP € +, 4,9 oO Lech ten pers | g ue Faeboving mab Regyt Cis — aarabuclion of Tables [1L¢1)] + * Cc > td $ E Jerre: | ever [E36 | errer |Eote’. | errar € erate] evr | erm feoe | erm | eve T [eee [erre |Toer | exe fT pq | evrer, py [Toe |roaer| ever [oe | evra [Toe & fever | errr | Facey] evra ] Raid ferre. O@since for Gy, Table comsbucted tay no multiple enhic, Pence suceenfully completed. Henee Gy ie LLC4). 99 @onsbuet LLU) Parsing Table for the Pllawing yams S>L=RIRS LoaeRlid 5 FOL: Ge tel Factoring: six 1G font Eilos fe ee xe =erlel 1 STx ocd $ eae al Loariaf xP oe g > Bore ; LI *Lid d,s RR) Kota [ge oe Consbuction of Table : , K = zy} $74 * 1 S9LX | cree | SoLx © ake « wy ene Grammar Le«R | cre | Lid] eve s L Bi] Roe fierce | Rov | errer x errr [X7=B | erece [XIE Scanned with CamScanner | t@eely of Parser +: [for e-free Gramrne”l t CLA) o% LAC LaLacty ees* oie E~ producing Grammens . even LLC MRAy ee La ROD. | Bete] we castt corsbuet an me parser for ambi quan grammar + 2 ep}: Operali presidences Por Ponible for “some ambtn ues yanmar - * # thee an some ‘un ambi ij Moe ore ne parten , BWassasa les blalb ia) = W@ (a+b) wR HF Codd palin diane ). Ret RG Te mot 1101) 20 if may be ambi gues» 37 SEBVE o¢ Comman Prefix |) o Roses exe amily fr she gromman SP 05 Lang. % Bert ) O Ree ne pen sph lang & beFL but ne H Operatar Preedence Grreimmar:, | Egemet: 1ve 2 oe more variable side by side 2.Ne € product on - ictis “Grammar, for vohich wer 4 un ambigquas ut no Parsr- SE ETIT pace 94 aselbeblaly. | To TKRIFE Es lxe o an i Fo Cedlid Eaalk 1. 1 SOA os. Aah || Checking Luci) w/o fable ¢ ee - An on on [ets then Aral pal €- | Se 5 : ft Gn) A Ast Gn) =o fist Ca) NV fietea) =p fi 6 | fist Coa) 9 ie er.) = fist x) 0 frst (a2p i fist Gada frst @ yep Pte) a fat dag. | Palaa (A) Often) = g | folloo CADFink(oad=g folloo An Brat (OG) = B | Scanned with CamScanner AMD in Aeverse « " THU) no problem WY t ‘LR (0) are iets Beeursien, Yo eS ocheed or tef ie l LRCID =e LR(O) + J lool ad, ay Prefix. [ERED ERO + Honk ahead] we comm [No Povse® pomible fev ambt qumus yrammon 4 Ly mee 2¢ Some unambi quewr Yammer fee puehs there are no Pavkon. | the Lanquage of tbe aramman must bo ber, | paste Algetinm for Carabueten + . ; a hvament the grammon. and expand it. And give number boit cmabuet LR(0) or LROD dem ael- 3 dingl | 2 Prom that £1 the enbids th the Table accescling|y. Taper ef Enbico + Osh EL Eobiee 21 Q Stale ends ' Pom YP Por sexs * BRC Linen CH biguy Bam In ey ‘ean Fransiiens on. terminals. Ransition on non-terminal. | a CVonlables ) fla Variable. O——® xe Terminal A cna eg FRY Eten | O— “SD = Sels. at hele. Oe : rys ft enbies 16 By ol | Sa ae fr @Same for atl bettom uP Paver. @ Reduee Bobgig) > Done fox cach separaly produ cHin ‘ww the icin act of | Pes [Ze a] Be 4 Prod. No | * 2 Xo x2 Woduelag Var. | tne A> Grammer, SOG» SABO) Peasen + © SiR W) Parsons QAR and ere SLR (1) Porson, Ds Put Ry Te eve: Pat Re only Pat Ri oy has etl ef the sef Yo the Bellmotx) look aheds Sof he tracker table farm the. “produghen i \ Gut Grammar. 1» Clockaheads ) © Fetlnocd ) Conftics + a LR (0) Pawsen ¢ 1 SUR Cid Poreen | SR: Shift Reduce Cmflict +38 Shen - CRIN yt EEE ALS aeaePY Confitet 5 Confile SC € Fetlmo CY) BB: Reduce Reduce ol eon Fiiet+ then epee CED se Farina (%) 9 Pollno CY) # 9) Scanned with CamScanner

You might also like