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

Discussion

The code generator must consult the symbol table in order to

  • A.determine which production the parser applied
  • B.settle how many passes over the program are required
  • C.check that the source program is free of errors
  • D.find the storage location and type of each name

Answer: D

Correct answer: find the storage location and type of each name

The generator needs to know where each name lives - a register, a frame offset, a static address - and what type it has, since the type determines which instructions apply. Both come from the symbol table, which is why it survives long after the parse.

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

Post your comment

Please log in or register to post a comment.