A grammar is said to be ambiguous if there exists a string which can be derived in more than one way from the start symbol.
Step 2:
Now, let's analyze each of the given grammars.
(A) $S \rightarrow(S) S|[S] S| \varepsilon$
For the string "()", it can be derived
Show more…