You are on page 1of 74
Compiler Desion (1 .) vate lexical Bnalysis parsing! Syntax Divected Translahin (sot) Indermeciate code qeneration a eS OI as ee eo Transa ¢ B software system hres Convert the Source Loc a Fem ore form of language +o anotbes four of Language 18 cated Trams tachos Tupee of transaloters There a7€ tw36 type of Trancalotors Compiler 2. Assembler. > Compilers B transclater whith convert the Sousce cod from hgh level language to lows level language ~ Cablect Compiles ru bee Compiles -—> Source Target code Code > ) ss Assembler? Erravs Sarnia, Ro SoPtuccse Sim whith comves}? agkembly Cade mto okjtc code ov Bmary code is colléd fh ccernbler a ASL objetk code ; —— | Assembley | 5S ; bmary code Eumchors: of Language Procemum System (LPS): ; Deeg Bo So w we Ye. pe a Peprcescer | Pure HLL [compiles Cd File Teelasten G@> maces Bvaluahoe ole ch -cocte net zl LN. [ Assernbier | Relocatable Absol object Code maple | Res object code exe.code Pneproceuer includes atl the beacles flex and alse evoluale fF Te prep any macro ik arduded. comer ya alto called ai MACRO Evaluator Pneproceng 4 ephane! ie i} any language whith dot not cuppet #irmctude and macRos prepyocHy fa not Hequived Compiler joke the prebroceos a4 inpub and conves Tho axrernbly code Assemble a Clrmary biking and leading provider four Allocahon pes se Gett cytiem and cenvert the assembly Language into ob ee coda) of Crnachme code) funchons Relocation Linker Loader mg the memory womhens Fram opesahrg stormg Me objet dota or Objet Code Caetatve — Cprysicalr adele se) Adclweuy ( ¢ ¢ © Dp Relocation: Mapping the sidlahve adideeu to the phy weat: addres and nelogahag. the ebjcet code Combine: ath executable object module to pre guagle executable Fle. Loader: Lectelrmagy Ibe exccumabie file into pesmanenta Design of Compiler Ve EEG" OF Compile i lex. Analysis Sy oiox Pralpis Cporsig) Symanhc knalpis Csot) Intermediate. code gene code Optimization Target code fas ole Phase Converting the fource code From one form Slepmaentehse tb anvthey form a sebyeuniahen «1 colled Phase Lex "Sf sSticot Pacts + lexical Analyses scan the source cod ane Awide orto tokens ie input 1 source cade anel ofp & Stveam of tokens. ext ind lets Trot ! Joe \ kw id opt cot or kus val SPT Gana

You might also like