COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Compiler
|
|
Interpreter
|
|
Assembler
|
|
None of the mentioned
|
Detailed explanation-1: -By whom is the symbol table created? Explanation: Symbol table is created by the compiler which contains the list of lexemes or tokens.
Detailed explanation-2: -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-3: -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).
Detailed explanation-4: -In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier (or symbol), constant, procedure and function in a program’s source code is associated with information relating to its declaration or appearance in the source.
Detailed explanation-5: -A compiler maintains two types of symbol tables: a global symbol table which can be accessed by all the procedures and scope symbol tables that are created for each scope in the program. To determine the scope of a name, symbol tables are arranged in hierarchical structure as shown in the example below: . . .