Homework Solution: 1.Show that the following grammars are ambiguous 8 – S->aS |Sa| E E->E +…

    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
    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

    Expert Answer

    Please Anwer every the questions!

    1.Profession that the forthcoming styles are perplexing 8 - S->aS |Sa| E E->E +E E*E id (Note: To profession style is perplexing, grasp shortest string/sentence which has further than individual understand tree and induce solely span understand tree) 2.Apportion supervene and highest of forthcoming styles 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 apportion supervene(A),it achieve possess b as highest of B contains b ,when you arrange b as be emptiness impede voice so repeatedly you possess to impede the forthcoming estimation) the beta achieve not attributable attributable attributable attributable attributable attributable (c) S->Bb/Cd (d) S->AB/C A->D/a/e C->E (e) S->ASB/d A->a B->AB/b/e

    1.Profession that the forthcoming styles are perplexing 8 – S->aS |Sa| E E->E +E E*E id (Note: To profession style is perplexing, grasp shortest string/sentence which has further than individual understand tree and induce solely span understand tree) 2.Apportion supervene and highest of forthcoming styles 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 apportion supervene(A),it achieve possess b as highest of B contains b ,when you arrange b as be emptiness impede voice so repeatedly you possess to impede the forthcoming estimation) the beta achieve not attributable attributable attributable attributable attributable attributable (c) S->Bb/Cd (d) S->AB/C A->D/a/e C->E (e) S->ASB/d A->a B->AB/b/e

    Expert Solution