Walchand Institute of Technology
Symbol Table Genearation
What is Symbol Table ?
The compiler has to identifier used in source program.
It has to collect information about them like storage allocation for an identifier
it’s type, scope where in program they are valid and
in procedure name information about the :
Type of its argument,
Method of passing of this arguments ,
All this is stored in data structure called Symbol Table.
A symbol table is a necessary component because
Declaration of identifiers appears once in a program
Use of identifiers may appear in many places of the program text
USE OF SYMBOL TABLE
Symbol table information is used by the analysis and synthesis
To verify that used identifiers have been defined (declared).
To verify that expressions and assignments are semantically
correct – type checking.
To generate intermediate or target code.
printf("ntData type tLengthttSymbolttAddress");
printf("nCan't open a file.");