Beginner
Theory of Computation
Q18 / 100
What is ambiguity in a context-free grammar?
Correct! Well done.
Incorrect.
The correct answer is B) When a string has more than one leftmost derivation (or parse tree)
B
Correct Answer
When a string has more than one leftmost derivation (or parse tree)
Explanation
A grammar is ambiguous if there exists a string that can be parsed in two different ways (two distinct parse trees or leftmost derivations). Ambiguity in programming language grammars causes operator precedence problems.
Progress
18/100