Printed Pages: 1 Sub Code: RCA404
Paper Id: 214432 Roll No. _____________________
(SEM IV) THEORY EXAMINATION 2017-18
Time: 3 Hours Total Marks: 70
Note: Attempt all Sections. If require any missing data; then choose suitably.
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.
2. Attempt any three of the folloing: 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:
using following grammar:
Check whether the grammar is ambiguous for above statement.
- Explain the working and algorithm of LR parsers.
3. Attempt any one part of the folloing: 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 folloing: 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 folloing: 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 folloing: 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 expain its functioning.
7. Attempt any one part of the folloing: 7 x 1 = 7
- Explain the problems associated with top-down parsing.
- Write short notes on:
i. Panic mode
ii. Peephole optimization