JNTU previous year question papers – B -Tech IIIrd sem – Compiler design – Aug/Sep 2008

JNTU III B.Tech Supplimentary Examinations, Aug/Sep 2008

COMPILER DESIGN

(Computer Science & Engineering)

SET-I

1. (a) Explain the bootstrapping process with suitable diagrams.

(b) Explain how input buffering helps lexical analyzer in compilation process.

 

2. (a) What is recursive descent parser? Construct recursive descent parser for the

following grammar.

E ! E + T|T

T ! TF|F

F ! F_|a|b

(b) What is ambiguous grammar? Eliminate ambiguities for the grammar:

E ! E + E|E_E|(E)|id.

 

3. (a) What is an operator grammar? Give an example.

(b) Write an operator precedence parsing algorithm.

 

4. Write short notes on the following:

(a) S-attributed definitions.

(b) L-attributed definitions.

(c) Dependency graph.

 

5. What are the various operations performed on the symbol table? Explain each of them in detail.

 

6. Explain different principal sources of optimization technique with suitable examples.

 

7. (a) Explain reducible and non-reducible flow graphs with an example.

(b) Explain natural loops and inner loops of a flow graph with an example.

 

8. (a) Describe, how addressing modes can be used for reducing the memory access time

(b) Generate the code sequence using Code generation algorithm for the following

expression [8+8]

W:=(A-B)+(A-C)+(A-C)

Leave a Comment