You are on page 1of 2
© Seemanta Engineering < lege DEPARTMENT OF MCA SURPRISE TEST BRANCH: MCA SEMESTER: 3rd SEM SUBJECT: COMPILER DESIGN DATE: 28/11/2023 For Student Use Only Name ofthestudent: MOHIT KUMAR GEHERA Rollo: 2% YLMCA 0% BPUT Regi ionNo: QAO FAOlOIG ‘Answer all the questions. Each Question Carried 2.5 Marks. Q1. Explain different phases of a compiler. Q2. What is parser ? Discuss about the different parsing techniques. ANSWE KR MFTesent chases of a compiles , <0 Laxical Analysts 2 Scan ThA SOUR code to optimize F ats texemes Hfomeing o sivearo of jones . GD syntax Analysis Panses yhe tore ciyeann do create Sylar anee voces figing tha codes aathesence to the language’! oysamimare a GB) semaniit Analysis : Examines rh meaning of syntiay tree erecting Foy SenANhTE etrrorey ond ensuring conterfual cennettness g ROLE Cece esatio) 2 LD rertenmeniOne CAE ORNEEEH | THanslales te g\oay yee 2040 oD THEr~WMEMU represent a4Tor | FOAR pendeot te Le fangey Mathing CF eade_geneneti09 one] Spl MRA Produces the fangeh machine coh Repo Fh TO hesmediase — gol oohesaing a fon ereieennyS gq reams oF Hee ond space, lpPage DX Pose A ree #3 a crucial component ofa Compilery that onalyzes Pe SYMRATE stoucturye of source cole hase| 09 forsee Jem UW genesatey a Wevawenites nepresent et70%) of a ewe S48 oy A POMse spee or cvostsact syotgn tE2Q, DiPPewent homed technique Me€uale | U1) Top-Down Pansi Co) ER Parsing Clery toRight , LePtmos cleaves LE pansess’ read iMput Prom LePt te nighh and and Corstruc a heStmost devivation .LLCK) parsers predict tha production rule te opr based of K tokens of feck aheal, CH) Reewesive Descent Pons Hene earn nof-texminal Th the gwammer: Corsespad to a preoc ed uree Fm the parses Cole . The pantery recursivel do matey tha impuf with the grammes | Ci) Gottem-Yp Pansind.. CER Ca eR, Parsing t LePt to Right, Rightmast clewivatioa) LR parsers reasl Mpet From lePt to right aoe con couct aersivadton .EREN) parses preaitt th production nule usin oKen ef Leokahead aN cb) LALR Parsing ( teckahead LR 7 oe pansing taples, maxing, ther) om mong eG) ef Eictegt Ca xo LR poses. 4 cal}s these paccedure & night most Mohit Kumada Meheng Signature of Student Signature of Teacher 2IPage

You might also like