The grammar
E $\rightarrow$E + E |E*E|(E)| id is
-
left recursive
-
ambiguous
-
both (1) and (2)
-
none of these
C
Correct answer
Explanation
E$\rightarrow$E + Eand E$\rightarrow$E*E are left recursive. This grammar permits two distinct leftmost derivations for the sentence id + id *idE$\Rightarrow$E + E E$\Rightarrow$E*E $\Rightarrow$id + E $\Rightarrow$E + E*E $\Rightarrow$id + E*E $\Rightarrow$id + E*E $\Rightarrow$id + id*E $\Rightarrow$id + id*E $\Rightarrow$id + id*id $\Rightarrow$id + id*ESo it is ambiguous also.