The Gateway to Computer Science Excellence

+1 vote

Which of the grammars are ambiguous?

- $S\rightarrow 0S1 \mid 01$
- $S\rightarrow +SS \mid -SS \mid a$
- $S\rightarrow S(S)S \mid \epsilon$
- $S\rightarrow aSbS \mid bSaS \mid \epsilon$
- $S\rightarrow a \mid S+S \mid SS \mid S^{\ast} \mid (S)$

52,345 questions

60,490 answers

201,835 comments

95,301 users