Compiler Design KCS 502 2020
Compiler Design KCS 502 2020
Compiler Design KCS 502 2020
B TECH
(SEM-V) THEORY EXAMINATION 2020-21
COMPILER DESIGN
Time: 3 Hours Total Marks: 100
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
P
f. Discuss about non-linear type intermediate code. 2 CO 3
0Q
1
g. Write short note on “Activation Record” 2 CO 4
13
29
2.
i. Discus about constant folding. 2 CO 5
0E
24
j. Discuss about designing issues of code generator. 2 CO 5
P2
SECTION B
5.
_Q
.5
2. Attempt any three of the following: 17 3 x 10 = 30
TU
a=b+c*70.
4 8
S→AA, A→aA|b
:1
directed definition.
02
SECTION C
5-
P
case 1: x=x+1
0Q
1
case 2: y=y+2
13
29
case 3: z=z+3
2.
default: c=c-1
0E
24
P2
5.
_Q
symbol table.
4
fact(n)
Fe
{
int f=1;
5-
f=f*i;
return f;
}
b. Define a DAG. Construct a DAG for the expression: 10 CO 5
p+p*(q-r)+(q-r)*s
2|Page
AKTU_QP20E290QP | 25-Feb-2021 09:18:48 | 117.55.242.131