1.6

编程入门 行业动态 更新时间:2024-10-27 14:27:45

1.6

1.6

请不要转载本文;请不要以任何形式重新出版,发布本文;请在下载本文 24 小时内将其删除;禁止将本文用于商业目的。

1 General [intro]

1.6 Syntax notation [syntax]

 

1 总则 【总则】

1.6 语法表示法 【语法】

 

In the syntax notation used in this International Standard, syntactic categories are indicated by italic type, and literal words and characters in constant width type. Alternatives are listed on separate lines except in a few cases where a long set of alternatives is presented on one line, marked by the phrase “one of.” An optional terminal or nonterminal symbol is indicated by the subscript “opt,” so
    { expressionopt }
indicates an optional expression enclosed in braces.

 

在本标准使用的语法表示法中,语法范畴由倾斜字体表示,字面的词汇和字符用等宽字体表示。除了少量情况用带有“之一”语句标志的一整行列出长串的候选条目外,都分列在单独的行上。可选的终结标记或非终结标记被标以“opt”下标,于是
    { 表达式opt }
表示被包围在花括号中的一个可选表达式。

 

Names for syntactic categories have generally been chosen according to the following rules:
  • X-name is a use of an identifier in a context that determines its meaning (e.g. class-name, typedef-name).
  • X-id is an identifier with no context-dependent meaning (e.g. qualified-id).
  • X-seq is one or more X's without intervening delimiters (e.g. declaration-seq is a sequence of declarations).
  • X-list is one or more X's separated by intervening comma (e.g. expression-list is a sequence of expressions separated by commas).

 

选择语法范畴的名字通常依据以下规则选择:
  • 某-名称 表示通过上下文决定的某个标识符(比如 类-名称类型定义-名称)。
  • 某-标识符 表示上下文无关的标识符(比如 限定-标识符)。
  • 某-序列 表示一个或多个无分隔符的某条目(比如 声明-序列 是一系列声明)。
  • 某-列表 表示一个或多个被逗号分隔的某条目(比如 表达式-列表 是一系列被逗号分隔的表达式)。

 

PREV [intro.structure] | NEXT [intro.memory]上一页 【总则.结构】 | 下一页 【总则.内存】

更多推荐

1.6

本文发布于:2024-03-07 05:29:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1716965.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!