Computer Science EngineeringVery hardISRO SC

Consider the grammar L -> L , S | S; S -> id | ( L ). The canonical LR(0) collection (with the augmented production S' -> start symbol) has how many states?

  1. A. 9
  2. B. 10
  3. C. 8
  4. D. 11

Correct answer: A. 9

Build closure and goto sets from {S' -> .S}; the automaton has 9 states.

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

Exams that ask this topic