Sie sind auf Seite 1von 3

Register Number

B.TECH. DEGREE EXAMINATIONS: APRIL / MAY 2010


Fifth Semester
INFORMATION TECHNOLOGY
U07IT505: Principles of Compiler Design
Time: Three Hours

Maximum Marks: 100


Answer ALL the Questions:PART A (10 x 1 = 10 Marks)

1. These processors augment older language with more modern flow of control and data
structuring facilities
a) Macro processing

b) File inclusion

c) Rational preprocessors

d) Language extensions.

2. ----------- automatically generate lexical analyzers, normally from a specification based on


regular expression.
a) Parser generators

b) Scanner generators

c) Automatic code generators

d) Data flow engines.

3. ----------- misspelling an identifier, keyboard, or operator.


a) Lexical

b) Syntactic

c) Semantic

d) Logical

4. On discovering an error, a parser may perform, local correction on the remaining input.
a) Panic-mode recovery

b) Phrase level recovery

c) Error productions

d) Global correction.

5. A ----------- is a record structure with four fields.


a) Triples

b) Assignments statements

c) Quadruples

d) All the above

6. Translate a Boolean expression into three address code without generating code for any of
the Boolean operators and without having the code necessarily evaluate the entire
expression.
a) Numerical representation

b) short-circuit code

c) flow of control statements

d) all the above

7. Cost of an instruction to be one plus the costs associated with the source and destination
address modes.
a) Instruction costs

b) Implementation costs

c) deployment costs

d) analysis cost

Page 1 of 3

8. ----------- allocation by using relative addresses for storage in activation records.


a) Static allocation

b) stack allocation

c) Resource allocation

d) Register allocation

9. Each execution of a procedure body is referred to as ------------a) Procedures

b) Activation trees

c) Control stacks

d) The scope of a declaration

10. -------------- allocates and deallocates storage as needed at run time from a data area
a) Static allocation

b) Stack allocation

c) Heap allocation

d) Register allocation

PART B (10 x 2 = 20 Marks)


11. Write short notes on static checkers
12. Define Query interpreters
13. What are the goals of error handler in a parser.
14. Define Ambiguity.
15. Write short notes on Three-Address code.
16. Define Triples.
17. What is target program.
18. Define peephole optimization.
19. What is code motion.
20. Define Data flow analysis
PART C (5 x 14 = 70 Marks)
21. a) Describe the Cousins of the compiler.
(OR)
b) Explain the phases of a Compiler.
22. a) Construct minimum state DFA for the following regular expression.
(ab)*a(ab)(ab)
(OR)
b) Construct minimum state DFA for the following regular expression.
(ab)*a(ab)(ab)(ab)

Page 2 of 3

23. a) Construct a predictive parser for the grammar.


bexpr bexpr or bterm bterm
bterm bterm and bfactor bfactor
bfactor not bfactor (bexpr) truefalse
(OR)
b) Construct a recursive descent parser with back tracking for the grammar.
S aSbSbSaS
24. a) Describe Assignment statement in detail.
(OR)
b) Explain the transformations on Basic blocks.
25. a) Explain Data flow analysis.
(OR)
b) Describe storage organization in detail.

**********

Page 3 of 3

Das könnte Ihnen auch gefallen