A grammar is ambiguous if it has more than one Parse-Tree for some string.
– Equivalently, there is more than one right-most or left-most derivation for
some string.
• Ambiguity is bad: Leaves meaning of some programs ill-defined since we
cannot decide its syntactical structure uniquely.
• Ambiguity is a Property of Grammars, not Languages.
• Two alternative solutions:
1. Disambiguate the grammar
2. Use extra-grammatical mechanisms, like disambiguating rules, to
discard alternative Parse-Trees