5.5 Symbol Table Handling
We already had a preliminary discussion about Symbol Tables in Chapter 3, Section 3.2. A Symbol Table exists throughout the compilation steps. Major operations required for a symbol table are:
- modify contents of a node,
- deletions are purely logical (depending on scope and visibility) and not physical,
- keywords are often stored in the symbol table before the compilation process begins, so that Scanner and Parser are able to trap them.
The Symbol Table is accessed at every stage of the compilation process:
Scanning: Insertion of new identifiers.
Parsing: Access to ensure that an operand exists.
- Determination of types of identifiers from declarations,
- Type checking to ensure that ...