GATE Computer ScienceHardNIELIT Scientist B

For E → T E′; E′ → + T E′ | ε; T → F T′; T′ → * F T′ | ε; F → ( E ) | id, what is the sum of the sizes of the FOLLOW sets of E, E′, T, T′ and F?

  1. A. 13
  2. B. 15
  3. C. 16
  4. D. 14

Correct answer: D. 14

FOLLOW(E) = FOLLOW(E′) = {), $} (2 each), FOLLOW(T) = FOLLOW(T′) = {+, ), $} (3 each), FOLLOW(F) = {*, +, ), $} (4): total 14.

More Compiler Design questions

Exams that ask this topic