12-06-2013, 12:07 PM
SEMESTER EXAMINATIONS FOR ADVANCED COMPILER DESIGN
ADVANCED COMPILER.pdf (Size: 30.51 KB / Downloads: 20)
Answer any five questions
All questions carry equal marks
1. a) Explain Boot strapping process with clear description.
b) Give the reasons for separating the lexical analysis from syntax analysis.
2. a) What is Recursive Descent Parser? Write the recursive descent parser for the following grammar:
E→TE’
E’→ +TE’ | ε
T→FT’
T’→ *FT’ | ε
b) What are the pre-processing steps required for predictive parsing?
3.a) Remove the left recursion for the following grammar and also find FIRSTs and FOLLOWs.
S→iEtSS’ | a
S’→eS | ε
E→b
b) What are the differences between LL (1) Parsing and LL (k) Parsing?
4.a) Construct the Syntax Directed Translation scheme to convert a given arithmetic expression into three address code.
b) Compare & Contrast S-Attributed definitions with L-Attributed definitions.
5. Describe various forms of implementing a symbol table with their merits and demerits.
6. Translate the arithmetic expression a * - (b + c) into
a) Syntax tree
b) Postfix notation
c) Three-address code
d) Triples
e) Quadruples
f) Indirect Triples.
7. a) Explain the process of partitioning a basic block.
b) Write the applications of DAG.
8. Write a short note on the following:
a) Data Flow Analysis
b) Loop Unrolling