Question #50616

1. What is next use information? Write an algorithm to determine the livesness and next use info for each statement in a basic block. Apply the same for the following basic block:

T1 = Add(A) – 4

T2 = 4 * i

T3 = T1[T2]

sum = sum +T3

i = i+1

if i<=20 goto 3

2. Write the three address code, identify the leaders and draw the Control Flow Graph for the following code.

begin

prod := 0;

i := 1;

do begin

prod := prod + a[i] * b[i];

i = i+ 1;

end

while i <= 20

end

3. Translate the arithmetic expression: a + - (b + c ) in quadruple, triple and indirect triples

4. Construct an LR parsing table for the following grammar.

S xAy | xBy | xAz

A qS | q

B q

Please forward me these question answer's ASAP. I need this answers by tomorrow.

Please could you do that ?

T1 = Add(A) – 4

T2 = 4 * i

T3 = T1[T2]

sum = sum +T3

i = i+1

if i<=20 goto 3

2. Write the three address code, identify the leaders and draw the Control Flow Graph for the following code.

begin

prod := 0;

i := 1;

do begin

prod := prod + a[i] * b[i];

i = i+ 1;

end

while i <= 20

end

3. Translate the arithmetic expression: a + - (b + c ) in quadruple, triple and indirect triples

4. Construct an LR parsing table for the following grammar.

S xAy | xBy | xAz

A qS | q

B q

Please forward me these question answer's ASAP. I need this answers by tomorrow.

Please could you do that ?

Expert's answer

## Comments

## Leave a comment