Difficulty: Easy
Correct Answer: Terminal table
Explanation:
Introduction / Context:
Compilers maintain several symbol and support tables during lexical, syntax, and semantic analysis. Distinguishing between tables helps in understanding tokenization, parsing, and code generation phases in language processing.
Given Data / Assumptions:
Concept / Approach:
The terminal table lists all terminal symbols defined by the language: reserved words (if, while), operators (+, *), delimiters (;, ,), and so forth. It is part of the compiler’s static knowledge. By contrast, the literal table records constants from the current program (like 3.14), and the identifier table stores names declared by the program (variables, functions). “Reductions” is an action in parsing, not a static table of terminals.
Step-by-Step Solution:
Verification / Alternative check:
Compiler design texts describe token sets and reserved word/operator tables as part of the language specification embedded in the compiler.
Why Other Options Are Wrong:
Literal/identifier tables depend on the specific program being compiled. “Reductions” denote grammar actions in bottom-up parsing. “None of the above” is incorrect.
Common Pitfalls:
Confusing tokens seen in the current program with the full set of possible terminals defined by the language.
Final Answer:
Terminal table
Discussion & Comments