Вы находитесь на странице: 1из 2

)S's &D$

f,N,
Reg. No.:

Question Paper Code : 8LL42

B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 20L5.

Seventh Semester

Computer Science and Engineering

O8O23OO45 PRINCIPLES OF COMPILER DESIGN


-
(Regulation 2008)

Time : Three hours Maximum : 100 marks

Answer ALL questions.

PARTA-(10 x2=20 marks)

1. What is difference between compiler and assembler?

2. What are cousins of the compilers?

3. Give regular expression notation to describe an identifier.

4. Write about the tool for generating lexical analyzer.

5. Given a left recursive pair of prdductions A + AolB, eliminate the left


recursion.

6. What are the disadvantages of operator procedure parsing?

7. Give some forms of intermefiate language.

8. Give the translation scheme for assignment statements.

9. Construct the DAG for the following basic block:


D = B*C; E =A+ B; B = B + C; A= E-D.

10. What will happen to a compiler if optimization phase is removed?


PARTB-(5x 16=80marks)
11. (a) What are the phases of a compiler? Explain the function of each phase in
the compilation process.

Or
(b) (i) tools.
Discuss the various compiler construction (10)
(ir) Explain the process of Bootstrapping. (6)

t2. (a) (i) What is the role of lexical analyser? What is the need for lexical
analysis? Discuss the issues in lexical analysis. (8)
(ii) Construct a minimum state DFA for the regular expression
(a/b) * abb (a/b). (8)

Or
(b) (i) Prove that the given two regular expressions are equivalent by
showing that their minimum state DFA s are the same (a* | b*) and
((e I a)b *)*. (8)
(i') Discuss the input buffering schemes in lexical analysis. (8)

13. (a) (i) Define a regular grammar. Construct a regular grammar which will
generate all strings of 0's and l's having both an odd number of 0's
and odd number of 1's. (8)
(ii) Explain predictive parsing technique with an example. (8)

Or
O) Construct a recursive descent parsing for
E + E+T/T
T + T*FIF
T -+ id/@)
After making the necessary transformation to the above grammar.

14. (a) Detail the translation scheme for flow control statements and procedure
call.

Or
(b) Discuss back patching of Boolean expression.

15. (a) What are principal sources of optimization? Write a note on peephole
optimization.

Or
(b) Design a simple code generator. Illustrate with an example.

2 8t142

Вам также может понравиться