COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
a record for each identifier
|
|
attributes of each identifier
|
|
both the options
|
|
none of the mentioned
|
Detailed explanation-1: -Symbol Table is an important data structure created and maintained by the compiler in order to keep track of semantics of variables i.e. it stores information about the scope and binding information about names, information about instances of various entities such as variable and function names, classes, objects, etc.
Detailed explanation-2: -The symbol table is used to store essential information about every symbol contained within the program. Virtually every phase of the compiler will use the symbol table: The initialization phase will place keywords, operators, and standard identifiers in it.
Detailed explanation-3: -The symbol table can be implemented in the unordered list if the compiler is used to handle the small amount of data. A symbol table can be implemented in one of the following techniques: Linear (sorted or unsorted) list. Hash table.
Detailed explanation-4: -3. What is the use of a symbol table in compiler design? Explanation: Both the analysis and synthesis components of a compiler use the symbol table. i) To keep all of the names of all entities in one place in a systematic format.