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

Discussion

The error handler in a compiler is best placed

  • A.at the very end of the compilation so all errors appear together
  • B.inside the lexical analyser since most errors are lexical in nature
  • C.in the back end where the target machine constraints are known
  • D.so that every phase can report errors to it as they are found

Answer: D

Errors arise in every phase, so the handler is drawn spanning all of them in the classical diagram. Each phase reports what it finds and, where possible, recovers so that compilation can continue and further errors be reported.

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

Post your comment

Please log in or register to post a comment.