Professional Documents
Culture Documents
Month and Year of the Examination: MAy/JUNE 2O12 Programme : B.Tech Semester: 7th Subject............COMPILER DESIGN..
Course
No............IT-403
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 no. and right subject title.
Explain different phases of compiler in detail. Also give ol of each phase for the following stat'ement. stat'ement.
output I ttol
I I I
x=(a*b+c-d)/e
construct a operator precedence parsing table for the following I ttot grammar where E is the starting symbol. : E --+ E+f I f T--r T*F I F F .-r(E) | id
I
I
Explain & grve algorithms to construct LALR parsing table canonical LR parsing table.
&
I ,ro,
I
I
Define and differentiate between the euadruple, Triple & Indirect Triple representation of three address code and give three address code for the following statement:
I trot
IfA=BthenM=B*(C+D)
(a)
example.
an
I
I
I lst '
(b)
Give algorithm to minimize no. of states in a Finite automaton and explain it with the help of an example.
I lat
6(a)
(b)
for
symbol table with their complexities. Show all the contents of the data storage, symbol table and I (5) block table and tJle string table for the points labeled Ll and L2: begin Integer A,B;
| (5)
' Ll:
L2:
begtn
real A,C; end
begrn
[Explain ud-chaining, its applications and give algorithm for | 1tO] l.eomputing.IN and.OUT with an examptre.
.
.\
li
!,