Consider the grammar G with the following production: S → S + S | a Which…

Consider the grammar G with the following production:

S → S + S | a

Which statement is correct?

  1. A.

    Every string generated by G has exactly one parse tree.

  2. B.

    The string a+a has two distinct leftmost derivations.

  3. C.

    The string a+a+a has exactly one parse tree.

  4. D.

    Grammar G is ambiguous.

Attempted by 212 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…