Printed Pages: 1 Sub Code: RCA404
Paper Id: 214432 Roll No. _____________________
MCA
(SEM IV) THEORY EXAMINATION 2017-18
COMPILER DESIGN
Time: 3 Hours Total Marks: 70
Note: Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
1. Attempt all questions in brief. 2 x 7 = 14
- What are the two parts of compilation? Explain briefly.
- Define symbol table.
- List the phases that constitute the front end of a computer.
- Differentiate tokens, patterns, lexeme.
- List the various error recovery strategies for a lexical analysis.
- Briefly explain the concept of derivation.
- Mention the types of LR parser.
SECTION B
2. Attempt any three of the following: 7 x 3 = 21
- What is translator? Differentiate between compilation and interpretation.
- Define DFA. Write an algorithm to convert NFA to DFA.
- Check whether the following gammar is LL(1) grammar or not
- Make left and right derivation using top-down parsing to drive a statement:
- Explain the working and algorithm of LR parsers.
SECTION C
3. Attempt any one part of the following: 7 x 1 = 7
- What is syntax directed translation schemes? Explain how they are used to make syntax trees.
- Create three address code for the following expression:
4. Attempt any one part of the following: 7 x 1 = 7
- Define bootstrapping with the help of an example.
- What do you mean by operator precedence grammar? Computer the operator precedence table for the given grammar.
5. Attempt any one part of the following: 7 x 1 = 7
- Define syntax directed translation. Write the syntax directed translation for simple desk calculator and give annotated parse tree of the expression
. - Explain any two syntax directed translation schemes.
6. Attempt any one part of the following: 7 x 1 = 7
- What are different issues in code optimization? Explain it with proper example.
- With the help of diagram explain the various phases of compiler and explain its functioning.
7. Attempt any one part of the following: 7 x 1 = 7
- Explain the problems associated with top-down parsing.
- Write short notes on:
i. Panic mode
ii. Peephole optimization
Thank You!
Leave a Comment