You are on page 1of 2
602 ‘B. E. (Computer Engg.) VIith Semester Examination, December-2002 PRINCIPLES OF COMPILER DESIGN Paper-CSE~403-C Time allowed : 3 hours Maximum Marks : 100 Note : Attempt any five questions. 1. (a) What is meant by a translator What are the characteristics of a good translator ? to (©) What is meant by book-keeping ? Which phases of compiler perform this job ? Justify your answer, 10 2. (a) Explain the role of lexicat analyzer in compiler. 10 (@) What is meant by input buffering ? How itis useful in design of lexical analyzer? 10 3. (@) What do you mean by # handle ? Explain the stack implementation of shift-reduce parser with the help of an example. 0 (b) What do you understand by ambiguous grammar ? How ambiguity can be removed ? Give an example. 10 4. Following is an LL (1) grammar for regular expressions overalphahet (a,b), with + standing for union operator (1) and E for symbol €. B>TE B-+Ele T3ET 602-1 400-P24Q-) PTO. (2) T4Tle FoPr Fore po)lafble (@) Compute First and Follow for each nonterminal of above grammar. (b) Show that grammar is LL. (©) Construct the predictive parsing table for grammar (@) Construct a eursive-descent parser for grammnt Explain the syntax directed translation scheme for thedesk aleulator which performs +, + operations of simple data types. ‘Also evaluate the expression 23 «5+48. 20 ‘yinat information a good symbol table should contain? Explain how the information about deta is stored and fetched from symbol table when needed. 20 ‘what ave the various sources oferror "Explain sone ofthe possible action a good compiler should take after finding some errors. 20. ‘Write short notes on : (a) Peep Hole Optimization (b) Code Motion (©) Induction variables. 20 602-1,400

You might also like