本文介绍了BSON |终端和非终端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通读,我遇到了终端和非终端字词。例如:
Reading through the BSON specification I came across the terminal and non-terminal terms in it. For example:
< ...>
终端和非终端做什么用
推荐答案
在形式语法中,终端符号是一个无法进一步细分的,例如文字字符或数字(但不一定取决于语法),非结束符号是可以通过生产规则(定义语法的规则)进一步简化的符号,直到它被简化为终端符号,例如,在下面的语法中, integer
是非终端符号, 0-9
In formal grammar, a terminal symbol is one that cannot be broken down further, e.g. a literal character or digit (but not necessarily as it depends on the grammar), a non-terminal symbol is a symbol that can be reduced further by the production rules (the rules that define the grammar) until it's reduced to a terminal symbol, for example, in the following grammar integer
is a non-terminal symbol, 0-9
are terminal symbols.
<integer> ::= ['-'] <digit> {<digit>}
<digit> ::= '0' | '1' | '2' | > '3' | '4' | '5' | '6' | '7' | '8' | '9'
这篇关于BSON |终端和非终端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!