Sunday 28 April 2013

Kerala University B.Tech Computer Science Sixth Semester Compiler Design previous Question 2003 Scheme

Sixth Semester B.Tech.Degree Examination,December 2012
(2003 Scheme)
03.601:COMPILER  DESIGN(RF)



PART-A
Answer all questions
  1. Explain the differences between compilers and interpreters.
  2. Explain the use of regular expressions in compilers.
  3. Define syntax and semantics of a language with suitable examples.
  4. What is meant by 'backpatching' in code generation?
  5. Define handle and handle pruning.
  6. Explain the difference between NFA and DFA.
  7. Explain the differences between top down and bottom up parsing.
  8. Explain left recursion elimination with example.
  9. Explain global optimization.
  10. Explain major sources of errors.
PART-B
Answer any one question from each Module.Each question carries 20 marks.
Module-I
  11.a)  Explain the phases of compiler.
       b)  Explain the algorithm for minimizing the number of states of a given DFA.
  12.Construct NFA from the regular expression ab(a|b*a)*ab and convert to minimized DFA.
Module-II
  13..Consider the following grammar

           E-->E+T/T
           T-->T*F|F
           F-->(E)|id
       Construct the SLR parsing table for this grammar.

OR
 14.a) With example explain operator precedence parsing.
      b) Explain ambiguous grammar with suitable example.
Module-III
 15.a) Explain the various methods for code optimization with example.
      b) Write the syntax directed translation for a desk calculator.

OR
16.a) Write a note on translation of Boolean expressions.
     b) Write quadruples,triples and indirect triples for the expression
            -(a+b)*(c+d)-(a+b+c).
       




No comments:

Post a Comment