# 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

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

1.Appearance that the subjoined expressions are uncertain 8 – S->aS |Sa| E E->E +E E*E id (Note: To appearance expression is uncertain, grasp shortest string/sentence which has past than undivided interpret tree and induce solely couple interpret tree) 2.Apportion prosper and original of subjoined expressions 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 prosper(A),it achieve enjoy b as original of B contains b ,when you prostrate b as be vacuity inhibit hush so repeatedly you enjoy to inhibit the subjoined estimation) the beta achieve referable 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 Defense

Hey,

Since you enjoy requested multiple questions, I am gonna defense solely undivided of them (The fourth undivided). Ce other questions, delight request seperately.

Ans4)

Readability: This refers to the enjoyment with which programs (in the phraseology underneathneath compensation) can be underneathstood. This is chiefly great ce software means-of-support.

Undivided can transcribe a hard-to-comprehend program in any phraseology, of passage (e.g., by using non-descriptive variable/subprogram names, by lame to cemat mode acccording to legitimate conventions, by omitting comments, anticipation.), yet a phraseology’s characteristics can frame it easier, or past opposed, to transcribe easy-to-read programs.

1) Plainness : The phraseology must be primal to underneathstand with the required constructs.

2) Orthogonality : meaning the estate of nature defiant (not-absolute to triton else)

3) Basis Types : Adequate facilities ce defining basis types and structures aids readability.

4) Syntax Artfulness

Writability: This is a estimate of how amply a phraseology can be verificationd to enunciate programs ce a clarified amount estate.

Factors imposing writability :

1) Plainness and Orthogonality : Sebesta favors a not-absolutely fine enumerate of quaint constructs (simplicity) and a agreeing regular of rules ce combining them (orthogonality).

2) Support ce Abstraction : This authorizes the programmer to eliminate and verification intricate structures/operations in ways that authorize implementation details to be ignored. This is a clew concept in late phraseology artfulness.

3) Expressivity : This is enhanced by the closeness of strong operators that frame it likely to perfect a doom in a rare lines of mode.