APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : SEMESTER 6

Subject : Compiler Design

Year : 2019

Term : DECEMBER

Scheme : 2015 Full Time

Course Code : CS 304

Page:1





PDF Text (Beta):

Reg No.:_ Name:

Max. Marks: 100

2

3

4

5 ஐ
b)

6 a)
b)

7 2)
b)

F192029 Pages:2

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY

SIXTH SEMESTER B.TECH DEGREE EXAMINATION(S), DECEMBER 2019

Course Code: CS304
Course Name: COMPILER DESIGN

PARTA

Answer all questions, each carries3 marks.
Scanning of source code in compilers can be speeded up using input buffering.
Explain.
Draw the DFA for the regular expression (a | b)* (abb | at 0).
Differentiate leftmost derivation and rightmost derivation. Show an example for
each.
Find out context free language for the grammar given below:

ऽ -> abB
^ -> aaBb | ‏ع‎
‏ط8‎ -> bbAa

PART ‏تا‎
‎Answer any two full questions, each carries9 marks.

Explain compiler writing tools.
Given a grammar :
5೨ (Da
[21,515

(1) Is the grammar ambiguous? Justify

(ii) Give the parse tree for the string (a,((a,a), (a,a)))
Construct the predictive parsing table for the following grammar:

S->(L)|a
L->L,S|S
Explain how the regular expressions and finite state automata are used for the

specification and recognition of tokens?

Explain the working of different phases of a compiler. Illustrate with a source
language statement.

Can recursive descent parsers used for left recursive grammars? Justify your

answer. Give the steps in elimination of left recursion in a grammar.

Page 1 of 2

Duration: 3 Hours

Marks

(3)

(3)
(3)

(3)

(5)
(4)

(5)

(4)

(5)

(4)

Similar Question Papers