Difficulty: Easy
Correct Answer: <>
Explanation:
Introduction / Context:
Formal descriptions of programming language syntax often use grammar notations such as BNF (Backus–Naur Form) or EBNF. In these notations, it is standard to distinguish nonterminals (syntactic categories) from terminals (literal tokens). This question asks which symbols are commonly used to mark nonterminals.
Given Data / Assumptions:
Concept / Approach:
In BNF-style grammars, nonterminal symbols are frequently written as <nonterminal> using angle brackets, whereas terminals are often represented with quotes. Braces {} can indicate repetition or sets in some EBNF variants, and quotation marks indicate literal terminals. A bare zero is unrelated to grammar categories. Hence, angle brackets best fit the conventional marking of nonterminals.
Step-by-Step Solution:
Verification / Alternative check:
Most compiler design texts (e.g., on lexical and syntax analysis) illustrate nonterminals with angle brackets, reinforcing the choice.
Why Other Options Are Wrong:
Common Pitfalls:
Mixing terminal and nonterminal conventions; assuming braces or quotes mark categories rather than repetition or literals.
Final Answer:
<>
Discussion & Comments