定义和转换Definitions and Conventions

终止符是语法定义中的终结点。Terminals are endpoints in a syntax definition. 不提供其他解决方法。No other resolution is possible. 终止符包括保留字和用户定义的标识符的集。Terminals include the set of reserved words and user-defined identifiers.

非终止符是语法中的占位符并在此语法摘要中的其他位置进行定义。Nonterminals are placeholders in the syntax and are defined elsewhere in this syntax summary. 定义可是递归的。Definitions can be recursive.

可选组件由带下标的 opt 指示。An optional component is indicated by the subscripted opt. 例如,For example,


{  
expression <SUB>opt</SUB> }  

指示包含在大括号中的可选表达式。indicates an optional expression enclosed in braces.

语法约定对语法的不同组件使用不同的字体特性。The syntax conventions use different font attributes for different components of the syntax. 符号和字体如下所示:The symbols and fonts are as follows:

特性Attribute 描述Description
nonterminalnonterminal 斜体类型指示非终止符。Italic type indicates nonterminals.
constconst 粗体类型的终止符是必须按所示方式输入的文本保留字和符号。Terminals in bold type are literal reserved words and symbols that must be entered as shown. 此上下文中的字符始终区分大小写。Characters in this context are always case sensitive.
optopt 后跟 opt 的非终止符始终是可选的。Nonterminals followed by opt are always optional.
default typefacedefault typeface 用此字样描述或列出的集中的字符可在 C 语句中用作终止符。Characters in the set described or listed in this typeface can be used as terminals in C statements.

跟在非终止符之后的冒号 (:) 引入其定义。A colon (:) following a nonterminal introduces its definition. 替代定义将在单独的行中列出(以单词“one of”开头的情况除外)。Alternative definitions are listed on separate lines, except when prefaced with the words "one of."

另请参阅See Also

C 语言语法摘要C Language Syntax Summary