Part – A (10 x 2 = 20 Marks)
1. What are the functions of preprocessors?
2. Define a symbol table.
3. What is an ambiguous grammar?
4. What is a predictive parser?
5. What are the notations used to represent an intermediate languages?
6. Give the ways of representing three address statements.
7. What are basic blocks and flow graphs?
8. What are the limitations of static allocations?
9. Define Activation tree.
10. What is inline expression?
Part – B (5 x 16 = 80 Marks)
11. (a) (i) Explain in detail about the role of lexical analyzer with possible error
recovery actions. (Marks – 6)
(ii) What is a complier? Explain the various phases of complier in detail,
with a neat sketch. ( Marks-10)
Or
(b) (i) Give the minimized DFA for the following expression (a/b)*abb. (Marks–10)
(ii) Draw the transition diagram for unsigned numbers. (Marks – 6)
12. (a) (i) Explain the Role of parser in detail. (Marks – 4)
(ii) Construct predictive parsing table for the grammar (Marks – 12)
E ? E+T T, T ? T*F F, F ? (E) id.
Or
(b) (i) Give the LALR parsing table for the grammar (Marks – 12)
S ? L=R R
L ? *R id
R ? L.
(ii) What are the reasons for using LR parser technique? (Marks – 4)
13. (a) (i) Explain about the different type of three address statements. (Marks – 8)
(ii) What are the methods of translating Boolean expression. (Marks – 8)
Or
(b) (i) Write short notes on back patching. (Marks – 8)
(ii) Explain procedure calls with an example. (Marks – 8)
14. (a) (i) Construct the DAG for the following basic block : (Marks – 6)
d:=b*c
e:=a+b
b:=b*c
a:=e-d.
(ii) Explain in detail about primary structure-preserving transformations on
basic blocks. (Marks – 10)
Or
(b) (i) Describe in detail about a simple code generator with the appropriate
algorithm. (Marks – 8)
(ii) Explain in detail about run-time storage management. (Marks – 8)
15. (a) (i) Explain in detail about principal sources of optimization. (Marks – 10)
(ii) Describe in detail about optimization of basic blocks with example.
(Marks – 6)
Or
(b) (i) Describe in detail about storage organization. (Marks –10)
(ii) Explain in detail various methods of passing parameters. (Marks – 6)
No comments:
Post a Comment