Computer Science EngineeringVery hard

For a given grammar, an LALR(1) parser has the same number of states as which other parser?

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

Correct answer: D. SLR(1)

Both are built on the LR(0) item sets, whereas canonical LR(1) may have many more states.

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

Exams that ask this topic