12-06-2013, 02:24 PM
SEMESTER EXAMINATIONS FOR COMPILER DESIGN
COMPILER DESIGN.pdf (Size: 20.32 KB / Downloads: 18)
Answer any five questions
All questions carry equal marks
1.a) What are the various phases of the compiler. Explain each phase in detail. Write down the output of each phase for the expression a:=b+c*50.
b) Briefly explain the Compiler-Construction tools.
2.a) Explain the process of constructing an NFA from a regular expression. Find NFA for the expression (a/b)*a(a|b)(a|b).Convert the obtained NFA into DFA.
b) What are the issues of the lexical analyzer?
3.a) Explain the error recovery strategies on Predictive parsing.
b) Explain the LR parsing algorithm with an example.
4. Explain the various data structures used for implementing the symbol table and compare
them.
5. Explain the advantage of indirection in symbol table.
6.a) What are the issues in the design of the code generator? Explain.
b) Explain the DAG representation of the basic block with an example.
7. Explain the principle sources of code optimization in detail.
8. Write notes on implementing block structured language. What is basis block? Explain the role of flow graph in basis block.