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

Discussion

An epsilon production is applied by a predictive parser by

  • A.reporting an error
  • B.popping the nonterminal and pushing nothing at all
  • C.pushing a special epsilon symbol onto the parser stack
  • D.consuming one token from the input without matching it

Answer: B

Correct answer: popping the nonterminal and pushing nothing at all

An epsilon production derives the empty string, so applying it removes the nonterminal from the stack and contributes nothing in its place. No input is consumed, and there is no epsilon symbol to push - epsilon is the absence of symbols rather than a symbol of its own.

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

Post your comment

Please log in or register to post a comment.