Question: In all cases means the empty string and S is the Start Symbol 2. Consider the following grammar. S a SA | A b A
In all cases means the empty string and S is the Start Symbol
2. Consider the following grammar.
S aSA |
A bA |
(a) (5 pts) Prove that the grammar is ambiguous by drawing two different derivation trees for the string: aabb.
(b) (5 pts) Specify the language generated by the ambiguous grammar above.
(c) (5 pts) Construct an equivalent unambiguous grammar for the grammar above.
Note: Two grammars are equivalent when they generate the same language.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
