The following grammar is ambiguous. Demonstrate the ambiguity by creating two parse trees for some string that you create. Note that is the start symbol.
/wwswswswwwwwwww3ww3w333w3w3ww3w3w33w3w3'''' ::= b
::= b e ::=
::= s
The following grammar for a fictitious operator '$' is ambiguous. Demonstrate the ambiguity by creating two parse trees for the expression 2 $ 3 $ 0. Note that is the start symbol.
::= 0|1|2|3
::=
::= $
Fix the grammar in Problem #3 so that it is not ambiguous. Is your fixed grammar left associative or right associative?