Demonstration of Ambiguity in Context-Free Grammars
What is ambiguity in context-free grammars?
In the expression 'id + id * id', what makes the grammar E → E + E | E * E | id ambiguous?
What is a parse tree?
For the grammar S → SS | ab | ba, why is the string 'abab' ambiguous?
What is the 'dangling else' problem in programming languages?
In a side-by-side derivation comparison, what are you observing?
In the arithmetic expression E → E + E | E * E | (E) | id, if 'id + id * id' is parsed as E[E[id] + E[E[id] * E[id]]], what does this represent?
For the if-then-else grammar with the string 'if E then if E then other else other', what causes the ambiguity?
When stepping through ambiguous derivations, what pattern would you observe in the derivation steps?