INTRODUCTION TO COMPILER DESIGN
KEY COMPONENTS OF A COMPILER
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? a) Compiler b) Interpreter c) Assembler d) None of the mentioned Answer: a Explanation: Symbol table is created by the compiler which contains the list of lexemes or tokens.
Detailed explanation-2: -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-3: -The symbol table is created and populated during the compilation phase, as the compiler scans the program for identifiers and their declarations.
Detailed explanation-4: -Symbol table is accessed only during lexical analysis and syntax analysis.