Please Anwer all the questions!
1.Show that the following grammars are ambiguous 8 – S->aS |Sa| E E->E +E E*E id (Note: To show grammar is ambiguous, take shortest string/sentence which has more than one parse tree and draw only two parse tree) 2.Calculate follow and first of following grammars 10 (a) S->xyz/aBC B->c/cd C->eg/df (b) S->ABCDE A->a/e C->C D->d/e E->e/e (when you calculate follow(A),it will have b as first of B contains b ,when you put b as be empty check note so again you have to check the following symbol) the beta will not (c) S->Bb/Cd (d) S->AB/C A->D/a/e C->E (e) S->ASB/d A->a B->AB/b/e