RADHA GOVIND ENGINEERING COLLEGE, MEERUT

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING 2ND SESSIONAL TEST-2008-2009 B.Tech:V Sem (CS) Compiler Design Time: 1Hr. NOTE: Attempt any 5 questions. . Q1.Construct a predictive parsing table for the following grammer. E-> TE’ E’->+TE’/Λ T->FT’ T’->*FT’/ Λ F->(E)/id This Λ shows empty character. Q2. Proof that the following grammer is LL(1). Test whether the following grammer is LL(1) • S->AaAb/BbBa A-> Λ B-> Λ • S->1AB/ Λ A->1AC/0C B->0S C->1 MM:30

Q3.Consider the following augmented grammer S’->S S->CC C->eC/d Find canonical collection of LR(1) items. Q4. Give the algorithm to construct non recursive predictive parsing table. Q5. Construct LALR parsing table for Q3.augmented grammer. Q6. Write short note with one example for the following: • • • Synthesized attributes Inherited attributes Quadruple notation of 3 addr code

Triple notation of 3 addr code

Sign up to vote on this title
UsefulNot useful