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

Discussion

An error entry in a predictive parsing table means

  • A.the input has been accepted and parsing is complete
  • B.the lookahead token cannot legally appear at that point
  • C.the grammar contains an error that must be corrected
  • D.the parser has run out of stack space to continue

Answer: B

Blank cells outnumber filled ones in a typical table. Reaching one invokes the error routine, which reports the fault and attempts to bring the parser back into step with the input. Good recovery is what distinguishes a usable compiler from a merely correct one.

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

Post your comment

Please log in or register to post a comment.