UGC NET Paper 2 (Computer Science)Hard

For the same grammar, an LALR(1) parser has the same number of states as:

  1. A. A canonical LR(1) parser
  2. B. An SLR(1) parser
  3. C. An LL(1) parser
  4. D. An operator precedence parser

Correct answer: B. An SLR(1) parser

LALR merges LR(1) states with identical cores, so its state count equals that of LR(0) and SLR(1); only the lookaheads differ.

More UGC NET Computer Science and Applications questions

Exams that ask this topic