1.6 - [syntax] - 【语法】

请不要转载本文;请不要以任何形式重新出版,发布本文;请在下载本文 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]上一页 【总则.结构】 | 下一页 【总则.内存】
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值