10

Symbol Table

1. What is symbol table and what kind of information it stores? Discuss its capabilities and also explain the uses of symbol table.

Ans: A symbol table is a compile time data structure that is used by the compiler to collect and use information about the source program constructs, such as variables, constants, functions, etc. The symbol table helps the compiler in determining and verifying the semantics of given source program. The information in the symbol table is entered in the lexical analysis and syntax analysis phase, however, is used in later phases of compiler (semantic analysis, intermediate code generation, code optimization, and code generation). Intuitively, a symbol table maps names into declarations (called ...

Get Express Learning: Principles of Compiler Design now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.