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

Compiler-1

Compiler design notes

Uploaded by

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

Compiler-1

Compiler design notes

Uploaded by

tuhfatu.alfi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 13
Compifere Deri Trtroducthion pe . = pi \i uy) \ tarrile, Choedre| Orepe Gaueot tecturers SE depactreent te peaeh DUT po b+ TARFO reanplatere oF coe. ate. beteoeer? corpibre & mmterepredet: (24120149, 1g) lor | @® Shet- is preeprescarsore 9 Denerti be 5 ene ob prepreseemert. (24,2.0)48) Ne © Define ayrrbol stable. What orc Hus unetions © symbol dope. (20/49) © What do you: mean Py awermblare & |Loadere. (47) @ Sree are He “ky per of: orcreeren sound lan diferent phope oe compiler « (199 © Urat do ou mean 2’ token. Explain 4,44) | acPhrant Fypen of oben. 1D) Denerube “H- language proeenb'9ng sgstom C4) Comp bere Teis a sedhoare/ progres thar comverds a pitas reo ustutien in Sigh Level Pes (Sovtrcea terguase) ate hoveh. fanguege. (object /torge- Lagqueg- THe also reports eruvere preset inn pourra Souttea- [ Corrpi ler] —2 oeget Freagrearn Wearntnag — Ererrored “Type> of eormpilerce D+rypen. © Sirgle: Poms corpilere: i» a type of com pilere Hot preocan> Hie Doultee code oy once. Se Orcpe— @Muli por compileres i> a. type. oP corrpiloe Rte Bete a Coes ae rouldipie. time rte eenverct source coda to a code, od: [ey iCermpilere Vp _“Eterepretors | Temtoreprekoe | D Takes entire preyrem|A) a token digi. tine |at- once. of code. at o Hime. [9 Hag’ speed. 55 Low speed: pDMer raquiremnert 3) Meme paquirmnen i& mop becoupe ilies lens curpe. NO gererster inptorernediako— ieee code [code . erected. & ALL orrrorvs arc 14. Continues Areanpleding idisplayare tegethere. vHae preegreamn wk | Hat | 48% orurcore 14 yeh ID [Which cape it step: 5 Frocone. detache? 1s [ Compitox I 5. Ercrere detestron i difFiewkh je. G.Carmpilere> ore. lager |6.intereprector> oot in ize. mallee Id Size. 7. Cert Uden compiler. 17. Bylbors Ruts US | inpterepret ore. Orepe. © | Phaze, ef Compilers + HLL Source. code | j | | Arolysis Phasd/ Frentend Lexical. Fratys is Twken Syntax Analysis. Rae No Tenge Coda / LLL /Bssambly Cade AD LesicaL Arabpeore: TR rend “the preegream © omnvatis rf pote fokens; wing a dl call. LEX tool. Albo it peme rep Chista Dprsabstobs comments ot. 1 Syoto_Anedyere? He ie atve called parser. TH constructs ce. pore. bros. ye he tekens, one one. ont i ae Ippo Contoyct Free. Gerearama) . Hor ni Seka! “lo be. checked Shethert tia ip arumet ore net One. Der Semanrte, Analyoore: J vereiGors us. poree bree, Whothere H- 1S THeanrn (2. ore. po}: T4- uber the. pereon.. roo. ian) ingoreredion in pee pmbel table. to eho ek (hype. cheeking, dePinthons Of -Hhe. veractbley uveds Lo blo | checking pogplovs correo! ebeck’rg ae Pre perrantic. corsisteneg . ; Source prey Letter mediate Code. Grsnarcetore | “Eb go nercetor> Dddreryr Cede... |sLhe. Fnrferemedrate. code Uke. “Trees. There code. convartks into moehine lan laxt- tise phoser which are. pli —ferun | dependent. O.Lede_Optimizon: Remeying unnecano ode. | Unen bere 1 -0e- at lee optimized codé.. .Tt- atompts -to emprco re. Hue. jotoremediote. code go that HH runs —Rortere & conpumer ler> reerery. fe eget Coe Ganeseedors: Frost phaba of Hae. compilerc Which Generates aan cfoogot— code. @: mbe| Table. FF, i> a docter otruehye. beirg | uped she cormpi lore. +o Afore. all tte Mp fer— metion related fe idem rere Lt he. “hype? IEF betp> Ke o uy Seopa S120. rlocahion » rpare. ote compiler. to Runchon noo bly by Finding He Ider Piern ee Ory. = - Oe renal Te wlan oP ercreore hand ne ene nen echoel each ercrcore , report ce es & ee male. Acme. reecovert TI Implement -thern te bardle. ero. Hig 6yrnbol. “Table.: Spmbel tabla. iv> avn irqporctark- clade, struceteurea, creeccted and maintained by eompilerr tn ereder. “to Gore. tnjoremetion ebouk— bre cccunemes. of varcioud entitan puer yoriabla. namer,jSunehion name/> ob zocts Clam? | cterdiyrbol- table. i> ae both are} ysis ayrrtnanits parcs ef on compliers: Function of syrmbel- seas all 2M Hey I ne pore hue neen7er of corern of OTe place. c han been declarnd - (4) PlLocedion: aieade. a new empty sgrnbek tebl- 2p Fiat To remer® alt entrier avd Pron storey of aaa +tople. Onpe- SD Lip) We moanch Fora pare ‘ ch ay - a pointer to its ontny re a name ard refuren Wainer “imperck a Name. 'n O- & rekutn a pointer te its entry P : : D) Sct—attri beeches TO ascot. an adribte OT? Q given entry. (6) Gusher puta Te with a giver entry: am bo | tobe - pire ot 5 ayociated % GhReprepentet ter of toe Ailey | etoternent ee each phone of corvpilesc: pradtreFo pradtien7o \Am: Oncpas [= rraptie Pr Arelyeore| | | a’ \, | 4™ ido. idg irk £o rect (FO) Toteremediate. Code Gonacto}t tx int to reat(Jo) -tornpd t= ig 7010 idy t= ido+ tarp v Cade Gronorestorc v movF R21 ide MULE Ra.2 FFE “0 movF Ra ida appF Par Pa mov idd Pe Onpe- BEpmonn und in diPRrent pl compilers fund in dP Brent phase af frercore> darting covrpi ALoxical Frereope | SP spelling errr. > BLeeeding Shu leg oP-Hua. identifiers ot [numeric carton of iNegor epeoractou> Fore with an incorred— lation con be. StYPS? Examp: ci ah sokok- values Jrnvelid varuobe rant na gpriny ore Syncs SOT “> Ererere, 1? eprouct ore | + Unbalanced porenrtrss!s | > Missi" crore? Lxarnp-4 | ii apg BIKcen lq wor Panel) [erierrteg closhey ; ¥ anchor pedly Gi) a otere 1001009) bomicolon (etd) 3 U7 (iri clesirg i> 5 = (ere © mF Gi pao i=Jj ih pebeoee D Wyte + OS Lier amet ; i ; 2 ok + Ope O2Sement. a > Operand> ° incompetible. type >Vartiable. net detected etal argguerent- The Rifere.-te mateh He 4 corth Hw -Poremal. cogumen Example: Go) ink maint) F | ink azov bet sum=atbh) 7 nT 5 Gb ink bstabets ineemporibe. H7Pc? oe : | Gi) ior main} | ctor. doer net int a=b-S3 [J the — ° | ee 6; suppero axsgurnents oh type SG inthalized veou'ablo. progr elernot of — G 3 cork be Purtbor Jooucol analy sts pro good] Onpe. : a aKeyrvoresla : Koy woreda are Wwo reopert! afore ore lorte ‘ rap ee p peseposas & imply a epesiok meal —bo “Hu. compilerua . Tos Koy word emus rot be uved “fore naming) arvoru'adle» -Aynchion ee: . Qn TdertiPiert Ts pamen given -bo vor dow? yr Pe preqrarm Ube “Hua Rerctiona ' In name, Coe called ide fee ye, idertifierr. diPforant S| opercet ery> jm & jorere + anpernblet + irrlerepreetere / ete: oe. Souurtco_ Code/ HLL Rropreocensone oes. coda,/ Pure, HLL Cornpi loe __| “Brg Pasermbly pregrem Asssomb lore TP etocaabe machine. co (Objet Cle) Leadarc/Li : [Lee [Juin tent) TTager vrnchine. code. @xtectabla code ao) Abrclute. Machine code Uzere vorehen O prgqrcare in @ torguage nigh level language). Ta Cc coropilere , ennpiten He preggrcam & Acar lorer ito amor by prepem (oom levd Lary blere -pponctranelotes voge). Am anoem! Lys. amembl preegrere wade mmaeine code (objxt). A “nbn ro ty uped Fe unk alb “Hus. pases oP A yam “teptherc Pore oxecution (erected code”): PD loadere load? abt oP -than i mB extacutad . ron Hee prey mi precarns 9 Oxpe- ered i P “cde, “ persia foe oO gees st Oy m pu Ore Pilere , i | eae! comnpileren, E+ an ING, Angrnormtect - ° with larg age exbendien ete Lion Pile ¢nelunion, rT fevel Jou ifr inrtorepretore, reoarpless ngr- eee ee low-level rmaching. loguege An iyrtoreprester— yroad? cu pketernent-fteorn Hus input, commords A te an yrrtercmediata code, execute tt then speupen HU mort ctohernut— FP an ereore occ ust, an jntere Hen and reports ik unk? ard ™ 7 ee pn ebe 7 adert | pa oP pret mbosderi |? ie jeosing e ecutal 7 — JOR a wef and eqecud® hem ie Ca omens a re of Sores ram & epeo.cten memolef ue 2! i

You might also like