Namespace symbol, delivered for T1.
The handling of the symbols. In the program, the rule for identifiers is to be used many times: at least once for its definition, and once for each use. Just think about the number of occurrences of
size_t
in a C program for instance.To save space one keeps a single copy of each identifier. This provides additional benefits: the address of this single copy can be used as a key: comparisons (equality or order) as much faster.
The class
symbol::Symbol
is an implementation of this idea. See the lecture notes.
The handling of generic symbol tables, i.e., it is independent of functions, types and variables.