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

Discussion

Epsilon appears in FIRST(X) exactly when

  • A.X happens to be a terminal that no scanner would ever emit
  • B.X heads more than one of the rules written in the grammar
  • C.X occurs nowhere at all on the right hand side of any production
  • D.X is capable of deriving the empty string

Answer: D

The marker records that the symbol may vanish entirely, which is what forces the parser to look at FOLLOW instead. Whether epsilon propagates through a whole right side depends on every symbol in it being able to vanish, and tracking that is the part most often got wrong when the sets are computed by hand.

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

Post your comment

Please log in or register to post a comment.