I'm trying to find out if the following grammar is ambiguous or unambiguous:
stmt -> IF expr THEN stmt | matchedStmt
matchedStmt -> IF expr THEN matchedStmt ELSE stmt | other
It implements the if-then-else struct.
expr
and other
are considered to be terminal symbols, as we don't care about them in this question.
I've been trying to find a string that has more than one parse trees, but I can't.
Can you please help me?