You are on page 1of 2

R.M.K.

COLLEGE OF ENGINEERING AND TECHNOLOGY


R.S.M NAGAR, PUDUVOYAL-601206
6th Semester B.E. / B.Tech.
First Internal Assessment Test Feb 2013
Subtitle
Sub .Code
Time

: Principles of Compiler Design


: CS2352
: 100 minutes

Date
Branch
Max.Marks

: 01.02.2013
: CSE
: 50

PART-A (5x2=10)
1. Define compiler.
2. What is the role of lexical analysis phase?
3. Construct a parse tree (a+b)*c for the grammar E->E+E/E*E/ (E)/id.
4. Eliminate left recursion for the following grammar
E->E+T | T
T->T*F | F
5. Define ambiguous grammar with example
PART-B (16*2 + 8*1 = 40 marks)
6. a) Explain the various phases of a compiler in detail with neat diagram.(16)
(Or)
b) Explain Role of Lexical Analyzer and Input Buffering with example. (16)
7. a) Construct predictive parsing table for the following grammar and hence check whether the
String (a,a) is accepted or not.

(16)

S -> ( L ) | a
L -> L, S | S
(Or)
b) With suitable examples, Explain Tokens with its attributes. (16)

8. a) Explain the various Compiler Construction Tools.(8)


(Or)

b) Briefly explain the recursive descent parsing with an example. (8)

You might also like