Machine-translated by Google. Questions are authored in English.
Top

Discussion

The end of input marker is placed in the FOLLOW set of

  • A.no nonterminal
  • B.the start symbol of the grammar
  • C.every nonterminal in the grammar without exception
  • D.only those nonterminals that can derive epsilon

Answer: B

Correct answer: the start symbol of the grammar

The end of input marker can follow the start symbol and nothing else at the outermost level, so it is placed in FOLLOW of the start symbol and propagates from there to whatever can appear at the end of a sentence. It is not added to every nonterminal, though many will acquire it through propagation.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.