A context-free grammar is ambiguous if:

PYQ GATE 1987

A context-free grammar is ambiguous if:

  1. A.

    The grammar contains useless non-terminals.

  2. B.

    It produces more than one parse tree for some sentence.

  3. C.

    Some production has two non terminals side by side on the right-hand side.

  4. D.

    None of the above.

Attempted by 188 students.

Sign up free to check your answer

Sign up free

Explore the full course: Compiler Design

Loading lesson…