Difficulty: Easy
Correct Answer: a permanent table which lists all key words and special symbols of the language in symbolic form
Explanation:
Introduction / Context:
Compilers maintain several tables to speed up and standardize processing. A “terminal” in grammar terms is a basic symbol of the language (e.g., keyword, operator, delimiter). The Terminal Table provides canonical representations of these terminals so scanners and parsers can recognize and process them consistently.
Given Data / Assumptions:
Concept / Approach:
The Terminal Table enumerates the set of terminals with their symbolic forms and possibly attributes (token codes, precedence). It differs from the token (uniform symbol) list produced per-program by lexical analysis, and from parse decision tables used by the parser. It also differs from constant tables, which hold numeric/string literals found in the user’s program.
Step-by-Step Solution:
1) Distinguish global language metadata (terminals) from program-specific data (tokens, constants).2) Recognize that terminals are keywords and special symbols defined by the language.3) Conclude the Terminal Table is the permanent listing of these items in symbolic form.
Verification / Alternative check:
Compiler textbooks depict terminal tables or keyword tables used by the scanner to map lexemes to token kinds, confirming this definition.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming terminals equal tokens. Tokens are instances recognized in a given compilation; terminals define the language’s alphabet.
Final Answer:
a permanent table which lists all key words and special symbols of the language in symbolic form.
Discussion & Comments