JNTU Previous Papers-B Tech-CSE-3rd -year-Language Processors-Aug/Sep 2008

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

LANGUAGE PROCESSORS

(Computer Science & Engineering)

SET-II

 

1. (a) Write a procedure for minimizing number of states of a DFA, and explain with one example.

(b) What are the different translation rules of a LEX program?

 

2. (a) Construct operator precendence parser for the following grammar for reference expressions.

R ! R‘1?R|RR|R?|(R)|a|b.

(b) What are the common conflicts that can be encountered in shift reduce parsers.

 

3. (a) What is an SLR grammer

(b) Construct LALR(1) parsetable for the following grammer

S ! Aa|bAc|Bc|bBa

A ! d

B ! d .

 

4. Write short notes on:

(a) type conversion with example

(b) type coercion with example

 

5. (a) Which data structure will be used to implement a symbol table in an efficient way? Give reasons.

(b) Discuss and analyze about all the allocation strategies in run-time storage environment .

 

6. (a) What are the applications of DAG. Explain how the following expression can

be converted in a DAG a+b*(a+b)+c+d

(b) Explain how loop invariant components can be eliminated.

 

7. (a) Explain how ?Redundant sub expression elimination? can be done at global level in a given program.

(b) Explain how syntax trees can be constructed for the following expression

a*b-(c+d)

a*b+(a*b)

 

8. (a) Write the general format of Macro Prototype statement and Macro call Give an example.

(b) What is meant by Conditional expansion and Expansion time Loops?

(c) Define Macro Expansion Counter ( MEC). Mention its functions.

Leave a Comment