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

    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

     
    Hey, Since you have asked multiple questions, I am gonna answer only one of them (The fourth one).

    1.Exhibition that the subjoined rhetorics are dubious 8 - S->aS |Sa| E E->E +E E*E id (Note: To exhibition rhetoric is dubious, conduct shortest string/sentence which has further than single analyze tree and delineate solely couple analyze tree) 2.Compute supervene and simple of subjoined rhetorics 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 compute supervene(A),it conciliate keep b as simple of B contains b ,when you dispose b as be space impede silence so frequently you keep to impede the subjoined letter) the beta conciliate referable (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.Exhibition that the subjoined rhetorics are dubious 8 – S->aS |Sa| E E->E +E E*E id (Note: To exhibition rhetoric is dubious, conduct shortest string/sentence which has further than single analyze tree and delineate solely couple analyze tree) 2.Compute supervene and simple of subjoined rhetorics 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 compute supervene(A),it conciliate keep b as simple of B contains b ,when you dispose b as be space impede silence so frequently you keep to impede the subjoined letter) the beta conciliate referable (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 Rejoinder

     

    Hey,

    Since you keep prayed multiple questions, I am gonna rejoinder solely single of them (The fourth single). Control other questions, gladden pray seperately.

    Ans4)

    Readability: This refers to the satisfaction with which programs (in the speech inferior importance) can be inferiorstood. This is especially significant control software defence.

    Single can transcribe a hard-to-conceive program in any speech, of succession (e.g., by using non-descriptive variable/subprogram names, by lame to controlmat mode acccording to legitimate conventions, by omitting comments, absence of wonder.), excepting a speech’s characteristics can fabricate it easier, or further intricate, to transcribe easy-to-read programs.

    Factors important readability :

    1) Sincerity : The speech must be weak to inferiorstand with the required constructs.

    2) Orthogonality : meaning the characteristic of entity recalcitrant (not-absolute to triton else)

    3) Grounds Types : Adequate facilities control defining grounds types and structures aids readability.

    4) Syntax Contrivance

    Writability: This is a estimate of how easily a speech can be authenticationd to enunciate programs control a clarified quantity inclosure.

    Factors important writability :

    1) Sincerity and Orthogonality : Sebesta favors a not-absolutely minute calculate of simple constructs (simplicity) and a consonant be of rules control combining them (orthogonality).

    2) Support control Abstraction : This allots the programmer to determine and authentication involved structures/operations in ways that aldoom implementation details to be ignored. This is a clew concept in novel speech contrivance.

    3) Expressivity : This is enhanced by the influence of puissant operators that fabricate it likely to achieve a doom in a lacking lines of mode.