In programming languages, the symbol table is used to map a symbol (identifier or name) to the attributes of that name. For example, when compiling a program, the symbol table may map a variable to a structure that contains the type of the variable, and what memory location it shall occupy. In an interpreter, the symbol table may be used at runtime to map the variable to its actual value.

The symbol table is just one map or hash table only for the simplest of languages (where all names are global). For languages with nested scoping, a linked list of tables can be used, or a structure where there is only one hashtable but each key maps not directly to the description of the symbol, but to a stack of descriptors. For object oriented languages, the symbol table is more complicated still.

Log in or registerto write something here or to contact authors.