GATE 2004_45

original question was :

Consider the grammar with the following translation rules and E as the start symbol

E→ E1 # T {E.value=E1.value ∗ T.value}

| T {E.value=T.value}

T→T1 & F {T.value=T1.value + F.value}

| F {T.value=F.value}

F→num {F.value=num.value}

original question was :

Consider the grammar with the following translation rules and E as the start symbol

E→ E1 # T {E.value=E1.value ∗ T.value}

| T {E.value=T.value}

T→T1 & F {T.value=T1.value + F.value}

| F {T.value=F.value}

F→num {F.value=num.value}