BSON | terminal and not terminal

Reading through the BSON specification I came across a terminal and non-terminal terms in it. For example:

Valid BSON data is presented as a document without a terminal .

<...>

The following basic types are used as terminals in the rest of the grammar.

What does “terminal” and “not terminal” mean in the context of the BSON specification?

+7
source share
2 answers

In formal grammar, a terminal symbol is one that cannot be further broken up, for example. a literal character or number (but not necessarily, as it depends on the grammar), a nonterminal character is a character that can be further reduced using production rules (grammar rules) until it is reduced to a terminal character, for example, in the following grammar, integer is a nonterminal character, 0-9 are terminal characters.

 <integer> ::= ['-'] <digit> {<digit>} <digit> ::= '0' | '1' | '2' | > '3' | '4' | '5' | '6' | '7' | '8' | '9' 

http://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols

+12
source

A terminal can also be referred to as a symbol, a small English alphabet such as "a", "b", ... while non terminal is always written to capital when they contribute as production rules for the grammar code.

-3
source

All Articles