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

Discussion

A single pass compiler generates intermediate code

  • A.before parsing begins, from the token stream directly
  • B.only when the optimiser asks for it for some particular block
  • C.during the parse, using semantic actions attached to productions
  • D.after the entire program has been parsed into a tree

Answer: C

Actions emit instructions as productions are reduced or procedures return. Forward references are handled by backpatching, since the destination may not yet be known. Nothing can be revisited once the parser has moved past it.

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

Post your comment

Please log in or register to post a comment.