Which of the following is true?

2014

Which of the following is true?

  1. A.

    Canonical LR parser is LR(1) parser with single look ahead terminal

  2. B.

    All LR(k) parsers with k > 1 can be transformed into LR(1) parsers

  3. C.

    Both (A) and (B)

  4. D.

    None of the above

Attempted by 16 students.

Show answer & explanation

Correct answer: C

Option A correctly defines Canonical LR parsers as LR(1) with a single lookahead symbol. Option B is valid because all LR(k) grammars for k>1 can be transformed into equivalent LR(1) parsers. Since both statements are theoretically accurate, Option C is the correct choice.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…