Sunteți pe pagina 1din 1

1. What do you mean by Operator Precedence parsing. Explain.

2. Construct the LALR parsing table for the grammar given below:
S->L=R|R
L->*R|id
R->L
3. What is a TAC? Find out the TACs for the below Codes:
sum=0;
for(i=1; i<=20; i++)
sum=sum+a[i]+b[i];
Assuming there are four bytes per word.
4. What is a basic block? Find out the basic blocks and flow graphs for the
below Codes:
Fact(x)
{
int f=1;
for (i=2; i<=x; i++)
f=f*i;
return (f);
}

S-ar putea să vă placă și