【发布时间】:2019-08-27 06:50:46
【问题描述】:
如何解释(opt)?它是应用于整个“复合”词还是仅应用于它所附加的词?
在下面的例子中,很明显它适用于整个“复合”词。但如果在所有情况下都是这样呢?我在哪里可以找到它的规则?
statement:
labeled-statement
attribute-specifier-seq(opt) expression-statement
attribute-specifier-seq(opt) compound-statement
attribute-specifier-seq(opt) selection-statement
attribute-specifier-seq(opt) iteration-statement
attribute-specifier-seq(opt) jump-statement
declaration-statement
attribute-specifier-seq(opt) try-block
【问题讨论】:
-
"选择ional"?
-
属性说明符是可选的。在语句中并不常见,但是,例如,案例语句中的 [[fallthrough]] 或 if 语句中的 [[likely]]。
-
一个字。
-
attribute-specifier-seq 是语法特定元素的名称
标签: c++ syntax language-lawyer grammar