Professional Documents
Culture Documents
B.tech. Computer COT-404 2012
B.tech. Computer COT-404 2012
B.tech. Computer COT-404 2012
Month and Year of the Examination: MAY/JUNE 2O12 Programme : B.Tech Semester: 8th
Subject.
...COMPILER DESIGN...
Course No............COT-
4O4..
Maximum Marks......S0......
..
Number of Questions to be attempted...5.... Time allowed.........3 HRS.... Total No. of Questions.. . . .. ......7 . Total No. of Pages used...2....
Assume suitably and state, additional data required, if any.
The Candidates, before starting to write the solutions, should please check the question Paper for any
discrepancy, and also ensure that have been delivered the question paper of right course ao. and right subject title.
I 2 3 4 5
I Give
Structure of Compiler and explain the output different phases of compiler for the following,ptatement: While A<= 2* B 1 5 &A < B doA = A* B* C
(10)
| Construct a LL (1) parsing table for the following grammar wi:ere S is the starting symbol.
S-+aRDh B---+cC
grarnmar:
I (10)
following
I ttOt
I bSaS I
construct LALR Parsing Table for the following grammar: S ---+ CC C-+ cC ld
ttot
parse tree translations and stack implementation for the I ttOt | Give calculator I expression (74*42+91*23 implementation.
using a desk
Explain the data structufe'used for symbol table with their complexities.
Write three address code for the following statement: While (a.b) do if (cid) then x= y+z else x = y-z
(5)
(b)
(s)
7
d1
(10)
a:2
b= I
d2
d3: c =a+2
a:
.,:
d4:'d=ofb
d9: e = e*c
d5: l=c*1
..)
:
i ii
lr:
.i!
.i
d6: e=c*d
:::
.;
-:.
i;l
-t