The document is an exam for a compiler design course containing 8 questions. It covers various phases of compilers like lexical analysis, syntax analysis, intermediate code generation, code optimization and error handling. It also includes questions on removing left recursion from grammars, constructing SLR parsing tables, storing information in symbol tables and providing a translation scheme for a given grammar. The exam tests students' understanding of key concepts in compiler design.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
115 views
Principles Compiler Design May 2004
The document is an exam for a compiler design course containing 8 questions. It covers various phases of compilers like lexical analysis, syntax analysis, intermediate code generation, code optimization and error handling. It also includes questions on removing left recursion from grammars, constructing SLR parsing tables, storing information in symbol tables and providing a translation scheme for a given grammar. The exam tests students' understanding of key concepts in compiler design.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
5.
6. lbtal No. of Questions : 8 ] [ Total No. of Printed Pages : 2
602/2004
B. E. (Seventh Semester) EXAMINATION, May, 2004
(Computer Science Engg. Branch) PRINCIPLE
OF COMPILER DESIGN (CSE--403-C)
Tllne : Three HOllrs ] r Maximum Marks: 100
Note: Attempt any ft~'e questions.
1. Discuss all the. ph~es of a compiler in detail. Differenl.iate
between phase and pass of a compiler. 20 (a ) their construction. (b) Write and explain the Glgo to minir.1izi: ~h..: n\2u:;bu of states of DFA. ·-'r-r ~ (~) "-,),.-'3
, conventions fOi ere. ;
, ) I ~E;, ;: ~-i".';' : (b) u What is meant by left recursion? Wnte an :Jjgmi,hm to remove left rCI.:msion. It. 4. (a) Write the rules to Ciilcubre the opera~or p1t:CCGc,ce relation between t"vo L.:rmi:lals a arid b of a!.l opnil'UT granunar. In o (h ) "What do you );jean by pn.:dj,tive parser ?Vrir:; the [ 2 ] 8. write how SLR parsing tables are constructed ? Give an example to support your answer. 20 6. (,,) Explain how the entries are stored in symbol table using self organizing list ? 10 (0) DisclLss how scope information is stored in symbol table? 10
7. Discuss briefly the following : 7.
(a) Code optimization. 1 (b) Error handJjng. 0 8. Assuming appropriate translation fields for E given below, 1 provide a syntax directed translation scheme for the following 0 gramar : 20 S -+ repeat S until ElbeglD L clid/do N times S L ...•. L;s./s