GATE Computer ScienceVery hardGATE CSE · UGC NET

Grammar: S → A B C; A → a | ε; B → a | b | ε; C → a | c | ε. How many cells of the LL(1) table contain more than one production?

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

Correct answer: C. 2

FOLLOW(C) = {$}, FOLLOW(B) = {a, c, $}, FOLLOW(A) = {a, b, c, $}. Multiply-defined cells: A|a, B|a.

More Compiler Design questions

Exams that ask this topic