Question 125Asked in CIL MT Systems, 26 Mar 2017 (12:30 PM)

What will be the "First" and "Follow" of E and F for the following grammar?

What will be the "First" and "Follow" of E and F for the following grammar? E -> TE' E' -> +TE' / ε T -> FT' T' -> *FT' / ε F -> id / (E)
  1. AFirst(E)={id, (, ε}, Follow(E)={ε, )}, First(F)={id, ), $}, Follow(F)={*, $, (}
  2. BFirst(E)={id, (}, Follow(E)={$, )}, First(F)={id, (}, Follow(F)={*, $, ), +}
  3. CFirst(E)={id, ), ε}, Follow(E)={ε, )}, First(F)={id, )}, Follow(F)={*, $, (, +}
  4. DFirst(E)={id, )}, Follow(E)={$, )}, First(F)={id, (, $}, Follow(F)={*, $, ), +}
Show answerHide answer

Correct answer: (B) First(E)={id, (}, Follow(E)={$, )}, First(F)={id, (}, Follow(F)={*, $, ), +}

From CIL MT Systems PYQ, 26 Mar 2017 (12:30 PM)

This is question 125 of CIL MT Systems PYQ, 26 Mar 2017 (12:30 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.