Beginner Compilers & Programming Language Theory
Q22 / 100

What is a grammar conflict?

Correct! Well done.

Incorrect.

The correct answer is B) When a parser cannot determine which production to use due to ambiguity or grammar structure (shift/reduce or reduce/reduce conflicts)

B

Correct Answer

When a parser cannot determine which production to use due to ambiguity or grammar structure (shift/reduce or reduce/reduce conflicts)

Explanation

Reduce/reduce conflict: two different productions can be applied to the same input. More serious than shift/reduce conflicts. Indicates grammar ambiguity or LR(1) grammar issues requiring grammar restructuring.

Progress
22/100