Labs ICT
⭐ Pro Login

Symbol Tables

Tracking identifiers, types, and scope information

Tracking Information

A symbol table is a data structure used by the compiler to store information about identifiers β€” variables, functions, types, etc.

What Symbol Tables Store

Scope Management

0) β”‚  ← temp
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  When entering a block: push new scope
  When leaving a block: pop scope
  Lookup: search from innermost scope outward

πŸ§ͺ Quick Quiz

What is a symbol table used for?