0% found this document useful (0 votes)
61 views

CD Unit 2,3 (1) Class Notes.

Complete class notes

Uploaded by

S. Charulakshmi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
61 views

CD Unit 2,3 (1) Class Notes.

Complete class notes

Uploaded by

S. Charulakshmi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 65
j ee et * gloalan. b ete dangunge 4p Apeeitying texto! Analy | hex & a toct ov Language cotiich 2s une for gpnorating | the Cunatyxer K | sletyy. 6 Sourepam . lx Cfdanouna-2) ——> | Computer | lore ya € 14 Comput SoCs os Ye —+[a-owt _. Aequonee tokohs , Sutetiva of a tex progam’ | Odeclonatfon OTrarctition autos 6 MOY Fin, Peclararen to frtanwlationAuty tre aucxttary function, Odectarantn -. TRE post nut eataion oy ot “ft Vesfabte Varfabts, fonstont bd) fe: ne int ayb; leat erm 5 ns digit To-d Translation Rule: Fray au Ls specified by patun sfortowed aby aetion Patten Le a tigulag seprion - Hetiin Ba ¢ Language zhatement. aot ™ fa ash Paawrn factidny => igh fprentb ( feqwerd 7T Pattern {ction rh. Atecitasy furetins: fe action, TN holds ausitany functtin yd th te action Syrton ra fn 5 Wile, s MX progam to find ec feven’- of cine £5 %y ne 5 Céxa)==0 {POH lesen 9:3 ee Spxinty Crea) 33 hh math (9 t 44 Laxey, 5 Ute Program to check lp & agit OF non: np # Incterch ¢ctetdo. nS “y nh To-sS faints (one te aig *):5 Forty nal fpsinth (onder o ayn"); § ne ant maine? L “aon UNIT SYNTAX Anatysis Syoton Arty TH Bo prouss of detwrmining werner a Ahing Pb 40M can be qenoatid by a qummat, AM checks the syntatital Abaucue of the qfuen Lnpub, | Taste. 'eTep- clown parang CRecuuPve ov puting pas 2 Bottom up parsing Ciwlft Reduce parsing) Top-down Paxung:- 6 *, aa Ty top-down Tipaning , build ine pan yo ret node 40 the lent node - Bottom-up parting, Tn botiam-up paring» puildt the pare Yrom the leag fede tp the woot neds | Ree Oh Panu. fees fotuching —infomanbo avout Vaslow! toesn Rt Weld: on amutie ganged Hutte tomy, bend on the. yommay , TH tonimey the paw Tass Ft aap tne pron Context Four Gro1ammer Cy) pete cvur)« ONAN Hon - Texmfnal Tat generate a valid Madeg with a help oh Pomme toy sapleting teaminals en, the bt cotth te A0ung on production. te Loft Most DenPvateBn © RGhE Mest sOpxfvaddin .°* : LOH Mest povtatin ; t Eda pera Apt most non~ termbnalés &xpanded RGat more denfvection - Sn each sbp the Might most non~ towel & Xpancled » fa . ured] © Foevslewrfeo|ta ¢ fnpue Shing; td + fata imp: > RMoY E pte ete tse Fmevexe E fates & fagfase £ erte ld, F ->erid aid, tar fae Bd 5 Par Pan Ra Behl ee > ; © @ AN #5551350 /a 66 ear + frpur suing; aa tan ia amp: cree) so Sse tna S > ostse gn 5 > asise sett daly S Saasse eer sane S saatax DePvatton Tree or Teue Tue: mh 4 hubeorchicd — sbuueture Cohch sa pacienes dlestvation hoo Grammar to yfete Input sting Raw yor pour tu thu wre ECL ede must be the Stax Sybe # HE love Of the parte tna must be te tewitnal a the vthbnal neotte ase non foiminat. $5041 ssa tip aasan A A No fe aarax Rear aatat Comsioen the apetiouing grammar and Coniuet EMP and Part sor thu follostng ‘put sting F>oalisloli. Aoslisly B> oAlis ® oer, BOA laseg 1B Ia sog. > DlOAT Ay Solo ow - i) Wooioy $* Blears Q B113[ $200 oO A HOA LA—sog © € Moos! ssig ~NCOLBl axon © > HO CLOA TA nootor OMG @@ 1100101 a Consider the qpltowing Grammar © St la da ysls (D what ase ane hon dewsnals, Jeani%rass Short Syke, Nar 8 T- 0,8 | S.8- S D wirrind Lap and RMD and Pane for tre Following . stath Ca,a Gd C4, (aay) | ® cara) imp. $> 0) fens) > O55) [195 > (5,8) toa > faysy [sa - Lees Roo: $+ C1) frousy — Cis) Jasa > C4sa) [tss) 2 O48) fea > Ca ,ay i (a, ta,ayy pmo sath hs yg * C195) 8 ca) fuses ~ 68) 15 0556) |psa 509) [ious Uy (159) [iss ea CERT) (4 (a,09) “las Cassy) > Casla,ay) RD» $> 1 [1s & C9] 590) ét S Oo >Chipr|as ig ook C649) | 90 > Gs (9d) Jivy Pts 09 [toe bs (0,09) |r g > (ayaa) (5) (4409) Jena. mm “aa abaab IMD and Rup ‘fox the Shing “aa ab 8 as) asbs)e S> as [$sasbs PRA Sbaab Ios. Aaa Shaak je. Sana baa, 8) Chick whither Ke ahd canbe S>aAshbale Raabe Bile Saseleraey Lee Gane The’ aneg _f ene € a. sag a B accepted an nee. Sane] Asan, OAb Blase TAP loot ~*a4bba| ee Panky. BEE aT able " fntiquens grief) Aniyiy A gamma that produus mow than | pause he for the ame dentin 8 sald te be an Aambigucut rs .eertjeweltd ee) Tp tadta rtd. EVE fs oree i texefe st hd ad oe ls oty, E cwid afd x fy Frese lEoe se oy espe Efe+'d idrexk fe oid aid tide |e +l F ids fl etd Te Grammer ds anbsquous © sone, Boyab Avan eee Bob tp: aoe - r Imp. ® Fo ablnoen a8) poy $ aap. wi © PABA Sa ~a8| Boab S-saay Me qrarmar, fh asakiquons , #8 oshs 3 baas OG sot pave b s+ ashs| srvsas Sr abeesha| s>e = abashs| se > ababs [soe $ + anap tw S448] 8-54) aarale > anbel $y asbs fare -yabs|S>ashs a aes abashs) se bl Ae > ababe|sre be S ~-abap Te prom A onbiquew « ail We $0) ssle foo oot iM wo $55] S09) ~>ts)s [Se +) 8)6->e6 S085 [sses) SOO sore OOS |s ey SOOO $s] s>¢ 2000 Ww S—> S88 |b>s55 > S88] $-»cs) 6855 | 356 OSS |5-s069 09S I-56 2008 )s-sc0 FO00D [s€ S wood The qramenas fs amiequows - Fulatnatlon of tape goaunston ond Rit seewsseon »- Ay Adal, hey pal Als ota'le aah Fore Pane Te tee Fei, T> ey! Toy eer, Fe) Iq a Note >- A> hee, Ins}. | Apia’ [B. 41 A aa] Br toate. &g:- o> pl setlesle Fuss! fas! Sly xs! |abs'le 2 expr expn 4 enepy asap dares CPA > fd oxpy! tp > + onpy exp 3. 8 sosisfo) fois! SLoosiss'Je *) gen) Joe) Le dishs foe Ix Pacer Howe. Ire a $y Aah. Axvae [sd]t A> AclAad led 14 aah es Be ae Abdalla! Arca ladatle « [exp x expn ta : Amiens, "a eps expen so Finfwation of Left Factoring Anat lepa] - [alt Realy ag A’ —> pp] pa © 4 esleutsed a, Ans rein Sieles 2A aAB)od Ja ete Aan! *' alle Bee bls ple oz /xex/n p>ials Xxx’ [Dd Waele D+ iala ‘Fortes Tolle lee) Bs fare le F's le TInt Tle) pe Volar. ©a Mey Ribwt (Me fey © pre PSO" Fast 06 5S doeurt tontafa € FEU © BSat 005 0 put COVE B constaiye Feltew + WT se ug Steve, Symbol Fonteweed -5 4 PA+xep, ae Foltaw (B) PFE R) lb Rit (8) dosed Gndaine Feltcwo(e) = Fotteora) 4 eout0e) wontaire - DAsep Fotowl® = Felten) o : > ESTE Flogect'le Ter r' aevle Foch. Fist > rete = BO tay Fait) > fy ey Fae) = F6%dy Fb (= fered, i. rabur (OD = PG tay j Follow Fotteats) = f4$.)} p> Fouow ie): Sy FHS 4) Fottow (r) °F} rortow (r) = 4H APY Fottow(F) > Prt Mp} SP ABCDE A> ale Bele > Be D> dle E>ele Fut Foot 6) 2 farbsey Feut (A) ~ farey Faust (8) = they Rout fe - fey Fast WD) = fey Fuutte) = feek Fottours- Fotowre> = BAY Fouow (A) fue} Fotiow(s)= Fe 5. Fottow0ed= fq ye ob 4 Follower) (2,44 Fottowte)> $44. fr ima 5) §>a4Rb eo bodle Pout Kiwees) © faz FLEA). eye Figst (B ~ Sdye¥ Fottow: - Foltow (s> = £44 Feltow (a) > fsa sb Foltow (8) = far any gq 03k ” gree | cool 5a Am dal pe Bogle. C- hle Fant FU(S) ~ fas dehvesbs a4 Faint = faqs nse ¥ Fait (8) fae} Fait (0 = fhyey Folie Fotieu (gy = f8} Foto . thog, 4 Fetwute = ffearbs94 Feuoweed= $4,454, 44 5») $>aBoh Boec Cecle Der. E >gIe E> Sle. Fowt Fauutes) + fay, Feut @) fey Fit Ce) = foyey Fawr) - fase, 44 Fast (e) = prey. Fait CF). 44, 64 Fotow:- Fetowts) = 1$4. Followed - LAY far 4ohy Fotlow( - AHS fa dinh Fotlowee) = FY, Feuowle) - 444% Feuow (Fd - fry | Botte up. aN / : A ‘ Wawufy, Puffy Shit Opautoe Ve ae ut prucederu Sunt Parting ay a 1s Suk dae Op Pracliztiy, fy bas tle st POU or La ly pe “Non Ries ve Bearer enn : { J<— | Pudivtve rove] ouapur La] : Piwing table MeATCey cans seuaton oper cera © NELimnation of tpt Rrewusien P ktlmsiation of opt -fetoring mOewlation oy yint § follow rConburetion of parsing tape. wi checking whether the Ep Stoing & accepted by fhe Poser 6% net - Corsiuuction of Pautng tabte Ae, ce (vor) () Fivtfa) -a add Ave to MIA, aJ ds (x)~e be esate eeaes cree aid nome te NCA A) , Gendruck LLC panu ov Paste pare Fe Farsi vam Peres Tater le Fote)}ta SMP: Elfofvation of supt Reeunsceet« AS aw A~Ba A's calle Fs iafy Earp! Es eretle Tom, IF Torr! Taser Fed ty SOPRA Elfofnahion of lett Jaton No "9 lee factorsig SOP 3. Pout and bette Fut (e) 2 Fe,fay Flute)» fe} Fuout Or) = fe, fay Fou (r= fee} Foil tp Fe Fay Foltow Foucwte) = £49.04 Faint) = fifyy Fotiowtt) «fas b fs} FOUCECT) «EH Fy ie” tet eyy eee eee eet SPA Con buctin °h Panning table» wees DT ype! Fem) festa} ad wire] “D1, t4J D> Toeptt thee D Fotowrr')= $4.9 9 rast (71) fe wats MIT ay 1 Mt) See I MET) Orme te rite tr) ch Fiat: gia add fe Teta 299% wate.) Moe ta) ke 7 fig input & acvepted 0 not. 5 chucking veothe sting R accepted by the given Bvammor . a F } © foe stde e «fasta. we" Conduite a trey PeruenCep prafve pain We chest te geen thing (a) dh accepind ny tne folimning Aremman o pot — $> cola tty Sep i Fltmtnation ob te peuwuien = GAS vale el Aare Sr (ple Los ovale SIDR Flt nation of tebe fectexing NE Leb fetoning PR Ft and Foto | Fee Flt 6d. $tya4 FOOD: Fea} Fou cs freey Fottew Foleo) £4, yt Footy ry 4 Fellew Un) ayy SH A Feuthg Tabte sa) Sea Fr (52 fy wi 0 wlye) te si! Fabs 05)» fey Q6d rts) “Tsay > osu! Vos Cae Fettow (4!) > §9) utes) aad mpi',\) ce 1 SHPe chuck tne faput sising accep Ot OE [staa “Te Sting averepted by Yee gaa . SHPO: Passe Toe | “A \ i | | @@ cave ow SHE! fltwtinaion of Lege Recursion No Jett Reewuaton Sep ar siatoation of rept Fatlonng , fo tetssle 8's clog seeoane SHP 3. Fat and Foltew: Fae a4 Flue (s) = fee 4 Fut (6) © (6 Fottoto:- Fences 64 Fenowre) = sey Fonow (ED = fy Fite) =f ; Fb oy S'oes fot (Deu MTeeey or Farelbale A->aable Bobble tes aan SHPIS Lett erewuaton Ne SHP A: tebe Ne Aehe Rawdon Factowtng HOt Facioaing SFP 3: Rowe and Follow Fast Flout (= farbye% Fodut (AD Fobur Ce Foucw Foltow (9) Fotlow0a) Fotlow (a> fasey fee} Tey + fbed3 + fa sr 4ag eels Eisst (Sua MIs, a} Soba Frast (s)~b sb) BrbB} Bre oe L ge ns FottowD= £4 oe | p> be 7 A>aAap rustle) « fo) Fiona) ca ra wDAsay f i, Boe . i rotiow fe) $4} FeilewlA)= foay MImed meesd) mra.aj SHPT cheek bn ‘te slong accep oF not 1 | Stack es | fers ve The Fle bung A accept by Hea grammar . i Sec be past eae | 8 6, | 6 © Ae bbe aan ‘Recursive Oescany “Besse Rates: “TG fp de a non teunined then tail the Covveyponding prouduu a non -ternfnal 275 fp Ba ctumfnat Hien compar tie fomminad WIth tre Fp, cep ot da game the fle poten ary «then jnvumear mes than ® production ten all te procturction howd be setts Hanehucn 79 preduchin hon terminal psteduce i the corvespenig A-24 we define mace urchin, then onul dee gan ymbot from ne math -funekion , mort Ba top-down Pasion, Tt vuquixer packtsaeking to Lead tee coarse | Preductton fo be applied . THe paring progiam Conidt Oh a set oF proudunry ee gor elich, en ternsinal. yes Povoce dues begins with the Aart Aymbor | Re prewdien & cated unith att non botmuialy ane | expanded, (0 | eter Vos stele Hoo samfrans 5 Proadum £O i USut es Fopute +4) Errimery y 4 FPRine cy i Ctopay) Ae opus 445 %b Comput = 109) vipat 44; Erame cd, Fr @ Feary MT e h Fo ceyid Remove ett Reaeaion Eyre! saree Teer Ty ettle. Fs ceylia, Poe edune:- EO i TH; PRIME OS 4 EPRMEO Li SE (Faput Erase 0; Fpenen; ue sunny oe To $ FO} FRIME OD; 4 TPRIME) peel antuan 6), 4 Fo t hb putes ” i § putes £0; We etopiies + sry faput iy: 5 . He 1 Congas ia ‘Asian BOTTOM uP pareses TH Botan -up pawn pai sme pat 1A fem MOVE ste soot, Tt dhe degtned 4 xoduting the unput Abing to (de ftar Aymbo Fof the qramman hy arg Cub me Right mot ctehyahiin sn ALveLe orden THT Dues PARSE Rs Te pave amu fe conidiueled from -hoy bo Swot Tt wt 2 datasvudbau . oe Teput busier > stoning Ep Aidng yak laa eel —* dad.» stoning & actowing me panduckcn | fue OPERATIONS: DP Shige cpus) moving the Symbols from Flp buphin inte the shack (Pusu) 2) Rectuce:- (pop) | TH handle appews on the top of fre Stack fan, Atduietibo by using appropaints paduuchio Aule | DAccepe:- i ; frei ny Hite dymuel fee ers , Es if fle hapten Lysis [staan = + FC dea tes $e. #U, Arse Isca tases £ liye. lt | matag | wid | viaduue FM. | ste | jeeeal | aidy an | tag | attye | + Ftd, | 4 Tote + reper | « pend [tp bupjer | Avtioo | | Castaad)¢ Ahigt a, cara) | shibt start | gra Reduce yar 4 | neduer Log | rtasaryt Brat (avay)4 | Ahige aya) hint vant dues Sa sayyt asckute Ls ayy shige pet) | 4 3E a4 $ Pooa | sayyy shubt $Os0, ayy4 | shit | 4 Os654 4 | soa | $ Cte fey y, ouiduw 19449) $a iss | Shift | + Osa) s4 Neduu 3->00> Hor — |i, | Poy radius 1945)] \4 | eat Mu | 1% shige | . i pee poy | feduw 330) | | 4s hood aecepd | | | © breauerions Fraga Fara Ey flp: a2403 / —_ , — aback lp busser | Action | aaa Bryaag | Anite we ayaag | Anite % 22 was shige $ 3a4 234 roduc EA, $328 asg anit $ ao62 34 Sosts S> sas Said Stack __flp bupter_ t Par Pdefd ¢ 4 hd eid fd ¢ shibt ae gota, | ts afd stag | shigt [eas | fasted | shtse $bsifa +f ¢ caduse sta | | ters tia g etre et | | $s afd 4 anit 4 faa ae | 4sita ¢ acduiee S->fd | dss : vectuce C-ssts ts 1 eaccepted sls}om 1 Pro qr a bottom-up parser reads ne dnguut from deft te sige and da a vadght mest cefvanie Typ! Le, - Simple te (OH 18¢0)(%) SEC ese > Cancrfial #® S>LALR > deok ohend LE ha tRey lam ye So. ep Bee ‘following Grremmar stonebuet “Re Cronica, mt Me skh. peut id Pee the ‘Fg wf stg oe SPP 2S uti ened gramme, @ sas O soise ® soe ® oar @ isd ® roe Stop 3: ind Cannonitat RIOD bm a YO o at the so 4 Lue) u gy sLee ser r. Lavewr. | Lota, | i Reb.) Mp Ruled oI 5.4, aoa fd) foto (10,5) Son OH f° (Fo) re "ty Ro). 2 fet (ae) Soe, $ (z0,4) te.g Roset Lae Lota eh (20,44) Lota, dete cr» 52) Ro x, ele (a4 4) borer Rael po ewe. [En Loutd Gob (2p ja) toa. 2%, Git On, R> SLER. 7%, qo (Ze 2) Roi 7 goto (Loy #) Loar Roer 7ry got Ce, fd) Jeto j s |e je | fas i | ‘ 4 | 3 5 & 4] ty % [is] is 2 es een ee ret Fatewtsy = ¢FY Fettew oy = 424hS. gounte) ” Ebeef Fal Thum ne Ta. Ro. 2@ Halo te Holewber 4 + @ Tey sop, ma fo th foto ve Tq er. a Hour w 06 05) @ lack * bet lis lt ota [fous "4 JHoentiy “MY teste) }gounaig = fab, Yecrey }$org stag | Se foraze fa. a Jor zseids ¢ ay grid) fouartng webs 4 te [ee Attijoment ® coasts Asafa fle -abap rec Tote ele Fe iq Tasta stg o Sash, AS Ssala te a © ss @ ros Ginets one Sepa’ Aujumenta gan @ sag © sas @ em, O Arca ® r-sa. Ap 9. eabd cancaeas of 14t0 Th: g's Sas seb yt asa so a Mp hy And pul ss Ay bya) Fe (Tors) aw ae Ciera Sats Seb Ye (Fo, (ot Ti Cay ayy thar Stes) ASR sons | 8 oAs Go.y. | Te A sen 4 a. Y Gotw G53 Av sen A>osa Asa | To S As, Seb crete (71, a) Aa. 4 3, Grote Gn) Sb. 575 Goto 3a (Sa, b,ad Goto ys) Sas. | APA Aaa A->e9A Sas Sab 14 Givto (Tay A) Sas Shs | ty Sob ASK Ac ‘et | Geto (72, a) | Aya. —>h. Gate T5(S.aybya) Moto G545) Sas. A> sa Ares 4. Aza > tAS ore Grete (t5 A) Shes $> as Sb YIg- A> 8A Aso Geto (t5 > b) Sb. 75 Goto (m5 4) Aas —> ry. Got Te ( Ay 5,496) tioto (765A) AD Sas Sas soeuas [Ts sb Ao 5A Ane mete cre, 55 RS 3.4 Ae sa. Ansa [me 8 AS Sou Goto (Te, a) Got 4 (4,5 ,an) Saas A> SAL 3S > +Aas Shs 3 >/b. Seas Bs AD-SA Sie pa aa A mesa sea Amea Geto(z4 5. A> SAC ASA A> a \Te Sas Sob cute (14) 4) Anza 4 Gob (14>) Sob. 773 Foltew :- Fottow (sy = £Hasny Foun (a) sf pasbj Final diam: eeestere! Ip-> 8 > b.-@ Ta. te ate% follow le) °> Far} Jy ey Ab -O tn fo Tn follow CA) A> 84, 7O. fr fotlow(A) -94rb Daye 5 => 13 fn To sss. 20 fottow (5) > FHA bY Ja~ y tn Ta fo T Bessel aa ae buper | toay | tong |fonang tomes a etd elon ‘tes, 4 3 Sy $osiay bg MH (A>) fosian euad as tA>say fon 4 bq 3 |For anal 4 Mass) | | 4 onass ' m (saad) | fost $ actepted eae eset dl afobn OR Carenftal 1 parser e+ 86 panne Gorath ee Presse Tabi for te Fetleweng Grama FAO and pau i fp Cen dd. See CHelld Ele ad Atquinertted, Grramman © sys © sce @ erec © ord, 1ROD tien FRO + Leok ated part Shisyg 8 eg { t0 C6 sel, Coed seta Goto 15 (S650, 4) Groto (To, 5) Sore $ —& wre (50, ¢) Scees$ Cs cl yet Cdk Goto (to, <> Coe ycld coal eld Cred eld » oto (To, d) Cd, , eld Te —”

You might also like