|
A terminal symbol, in BNF jargon, is a symbol that represents a constant value. For instance, to represent an integer, the following BNF may be described:
- <integer> := ['-'] <digit> {<digit>}
- <digit> := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
Here, the symbols (-,0,1,2,3,4,5,6,7,8,9) are terminal symbols. <digit> and <integer> are called nonterminal symbols.
A terminal symbol can be thought of as an indivisible entity — it is not possible to express a terminal in terms of other terminals or nonterminals.
|