Computer Science EngineeringHardISRO SC

Consider the grammar S -> a S b | epsilon. The number of terminals (including the end marker $) in FOLLOW(S) is

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

Correct answer: C. 2

Computed from FOLLOW propagation: FOLLOW(S) = {$, b}.

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

Exams that ask this topic