Symbol Table Requirements:
- Structural Flexibility: The symbol table should be able to store all necessary information about identifiers based on how they are used in the program.
- Fast Lookup/Search: Searching for entries in the symbol table should be quick, so that programs can efficiently access information about identifiers.
- Efficient Space Utilization: The symbol table should be able to adjust its size dynamically to use memory efficiently.
- Handling Language Characteristics: It should be capable of handling language features like scoping and implicit declaration, which affect how identifiers are treated.
Demerits of Uniform Structure:
- Limited Name Length: If the symbol table has a fixed limit on the length of identifier names it can store, longer names won’t fit, causing problems.
- Waste of Space: If the symbol table reserves a fixed amount of space for each entry, shorter names will leave unused space, which is inefficient.