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

Discussion

Phrase level recovery in a predictive parser inserts or deletes symbols in order to

  • A.allow parsing to continue past the point of the error
  • B.correct the source program so it compiles successfully
  • C.ensure that no further errors will be reported at all
  • D.convert the grammar into an LL(1) grammar automatically

Answer: A

The repair is local and aimed only at continuing. There is a risk of an infinite loop if the correction consumes no input, so implementations guard against that explicitly. A common guard is to require that at least one token be consumed per repair.

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

Post your comment

Please log in or register to post a comment.