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

Discussion

A token for a numeric literal typically carries as its attribute

  • A.a pointer to a symbol table entry created for the literal
  • B.the line number on which the literal appeared in the source
  • C.the name of the type that the literal will eventually take
  • D.the numeric value obtained by converting the matched text

Answer: D

Converting the text to a value in the scanner saves later phases from repeating the work. Some compilers instead intern literals in a table so that identical constants share one entry. Interning saves space when the same constant appears many times in one program.

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

Post your comment

Please log in or register to post a comment.