You are on page 1of 2

BR-14

MODEL QUESTION PAPER D4


Subject Code: R14CSE1118
SRI INDU COLLEGE OF ENGINEERING & TECHNOLOGY
(An Autonomous Institution under JNTUH)
III B.Tech - I Semester –End Examinations (Regular)
COMPILER DESIGN
Duration: 3 Hrs Max Marks: 70M
Section – A
Note: Answer All the following questions Marks: 5x4 = 20M
1. Differentiate between Compilation and Interpretation.
2. Explain the error recovery strategies in Lexical Analysis.
3. What is Symbol table? How it is managed in Compiler.
4. What are basic blocks and flow graphs? Explain with example.
5. Explain flow-of-control optimizations.
Section – B
Note: Answer any FIVE questions choosing at least one from each Unit
Marks: 5x10 = 50M
UNIT : I
6. Describe the Phases of Compiler with neat diagram and example code.
(OR)
7. Construct predictive parsing table for the given grammar.
ETE' E'  +TE' | € T  FT' T'  *FT' | € F  ( E ) | id

UNIT : II
8. Write a YACC Program for sample desk calculator.
(OR)
9. What is bottom up Parsing? Compare and contrast three LR parsing methods.

UNIT : III
10. Give a syntax directed definition to translate infix expression into infix expression
without redundant parentheses for e.g. since + and * associate to the left ((a*(b+c))*(d)) can be
rewritten as a* (b+c) *d.
(OR)
11. What are the different storage allocation strategies? Explain.

UNIT : IV
12. How do you represent basic blocks with DAG representation?

(OR)
13. Explain three address code and Quadruples.

UNIT : V

14. Explain different code optimization techniques with suitable examples.

(OR)

15. What is register-interference graph? Explain its role in code generation.


BR-14
MODEL QUESTION PAPER D4
Subject Code: R14CSE1118
SRI INDU COLLEGE OF ENGINEERING & TECHNOLOGY
(An Autonomous Institution under JNTUH)
III B.Tech - I Semester –End Examinations (Regular)
COMPILER DESIGN
Duration: 3 Hrs Max Marks: 70M
Section – A
Note: Answer All the following questions Marks: 5x4 = 20M
1. Why Lexical Analysis Phase is separated from Syntax Analysis Phase? Give Reasons.
2. What is Left recursion in the grammar? How do you eliminate?
3. Differentiate Inherited and Synthesized Attributes in Syntax Directed Translations.
4. Explain about peephole optimization in detail.
5. How do you use registers in Code generations?
Section – B
Note: Answer any FIVE questions choosing at least one from each Unit
Marks: 5x10 = 50M
UNIT : I
6. Describe the Phases of Compiler with neat diagram and example code.
(OR)
7. How do you recognize the Reserved Words and Identifiers in the given source code in
Lexical Analysis.
UNIT : II
8. Find the string aa+a* is accepted by the given grammar through SLR parsing method.
SSS+|SS*|a
(OR)
9. Explain Shift Reduce Parser with an example.
UNIT : III
10. Explain S attributed and L attributed definitions with examples.

(OR)
11. What is a type checker? How does it work?

UNIT : IV
12. Explain structure-preserving transformations.

(OR)
13. Explain the principle sources of optimization with suitable examples.

UNIT : V

14. Explain register allocation by graph coloring.

(OR)

15. Explain how DAG is used in generating the target code.

You might also like