GATE Computer ScienceModerateGATE CS · ISRO

How many states does the canonical LR(0) collection of the augmented grammar S′ → S; S → A A; A → a A | b contain?

  1. A. 6
  2. B. 7
  3. C. 8
  4. D. 9

Correct answer: B. 7

Constructing the closure and goto sets from I0 gives 7 distinct item sets.

More Compiler Design questions

Exams that ask this topic