Computer Science EngineeringHard

Which parser accepts the largest class of grammars among the following?

  1. A. SLR(1)
  2. B. LALR(1)
  3. C. Canonical LR(1)
  4. D. LL(1)

Correct answer: C. Canonical LR(1)

CLR(1) is strictly more powerful than LALR(1) and SLR(1), and LL(1) grammars are a subset of LR(1) grammars.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic