Computer Science EngineeringHardISRO SC

Consider the grammar S -> iSeS | iS | a. In its LR(0) automaton (augmented grammar), how many states contain a shift/reduce or reduce/reduce conflict when reduce actions are placed under every terminal?

  1. A. 2
  2. B. 3
  3. C. 1
  4. D. 4

Correct answer: C. 1

Inspect each state: a complete item together with a shift item or another complete item is an LR(0) conflict. Count = 1.

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

Exams that ask this topic