|
45 | 45 |
|
46 | 46 | \begin{bnf} |
47 | 47 | \nontermdef{nodeclspec-function-declaration}\br |
48 | | - attribute-specifier-seq\opt declarator \terminal{;} |
| 48 | + attribute-specifier-seq\opt{} declarator \terminal{;} |
49 | 49 | \end{bnf} |
50 | 50 |
|
51 | 51 | \begin{bnf} |
|
57 | 57 | \nontermdef{simple-declaration}\br |
58 | 58 | decl-specifier-seq init-declarator-list\opt{} \terminal{;}\br |
59 | 59 | attribute-specifier-seq decl-specifier-seq init-declarator-list \terminal{;}\br |
60 | | - attribute-specifier-seq\opt decl-specifier-seq ref-qualifier\opt{} \terminal{[} identifier-list \terminal{]} initializer \terminal{;} |
| 60 | + attribute-specifier-seq\opt{} decl-specifier-seq ref-qualifier\opt{} \terminal{[} identifier-list \terminal{]} initializer \terminal{;} |
61 | 61 | \end{bnf} |
62 | 62 |
|
63 | 63 | \begin{bnf} |
|
93 | 93 | \grammarterm{nodeclspec-function-declaration} of the form |
94 | 94 |
|
95 | 95 | \begin{ncsimplebnf} |
96 | | -attribute-specifier-seq\opt decl-specifier-seq\opt init-declarator-list\opt{} \terminal{;} |
| 96 | +attribute-specifier-seq\opt{} decl-specifier-seq\opt{} init-declarator-list\opt{} \terminal{;} |
97 | 97 | \end{ncsimplebnf} |
98 | 98 |
|
99 | 99 | is divided into three parts. |
|
259 | 259 |
|
260 | 260 | \begin{bnf} |
261 | 261 | \nontermdef{decl-specifier-seq}\br |
262 | | - decl-specifier attribute-specifier-seq\opt\br |
| 262 | + decl-specifier attribute-specifier-seq\opt{}\br |
263 | 263 | decl-specifier decl-specifier-seq |
264 | 264 | \end{bnf} |
265 | 265 |
|
|
1035 | 1035 |
|
1036 | 1036 | \begin{bnf} |
1037 | 1037 | \nontermdef{type-specifier-seq}\br |
1038 | | - type-specifier attribute-specifier-seq\opt\br |
| 1038 | + type-specifier attribute-specifier-seq\opt{}\br |
1039 | 1039 | type-specifier type-specifier-seq |
1040 | 1040 | \end{bnf} |
1041 | 1041 |
|
|
1048 | 1048 |
|
1049 | 1049 | \begin{bnf} |
1050 | 1050 | \nontermdef{defining-type-specifier-seq}\br |
1051 | | - defining-type-specifier attribute-specifier-seq\opt\br |
| 1051 | + defining-type-specifier attribute-specifier-seq\opt{}\br |
1052 | 1052 | defining-type-specifier defining-type-specifier-seq |
1053 | 1053 | \end{bnf} |
1054 | 1054 |
|
|
1225 | 1225 |
|
1226 | 1226 | \begin{bnf} |
1227 | 1227 | \nontermdef{simple-type-specifier}\br |
1228 | | - nested-name-specifier\opt type-name\br |
| 1228 | + nested-name-specifier\opt{} type-name\br |
1229 | 1229 | nested-name-specifier \terminal{template} simple-template-id\br |
1230 | | - nested-name-specifier\opt template-name\br |
| 1230 | + nested-name-specifier\opt{} template-name\br |
1231 | 1231 | \terminal{char}\br |
1232 | 1232 | \terminal{char16_t}\br |
1233 | 1233 | \terminal{char32_t}\br |
|
1459 | 1459 |
|
1460 | 1460 | \begin{bnf} |
1461 | 1461 | \nontermdef{elaborated-type-specifier}\br |
1462 | | - class-key attribute-specifier-seq\opt nested-name-specifier\opt identifier\br |
| 1462 | + class-key attribute-specifier-seq\opt{} nested-name-specifier\opt{} identifier\br |
1463 | 1463 | class-key simple-template-id\br |
1464 | | - class-key nested-name-specifier \terminal{template}\opt simple-template-id\br |
1465 | | - \terminal{enum} nested-name-specifier\opt identifier |
| 1464 | + class-key nested-name-specifier \terminal{template}\opt{} simple-template-id\br |
| 1465 | + \terminal{enum} nested-name-specifier\opt{} identifier |
1466 | 1466 | \end{bnf} |
1467 | 1467 |
|
1468 | 1468 | \pnum |
|
1477 | 1477 | forms: |
1478 | 1478 |
|
1479 | 1479 | \begin{ncsimplebnf} |
1480 | | -class-key attribute-specifier-seq\opt identifier \terminal{;}\br |
1481 | | -\terminal{friend} class-key \terminal{::\opt} identifier \terminal{;}\br |
1482 | | -\terminal{friend} class-key \terminal{::\opt} simple-template-id \terminal{;}\br |
| 1480 | +class-key attribute-specifier-seq\opt{} identifier \terminal{;}\br |
| 1481 | +\terminal{friend} class-key \terminal{::\opt{}} identifier \terminal{;}\br |
| 1482 | +\terminal{friend} class-key \terminal{::\opt{}} simple-template-id \terminal{;}\br |
1483 | 1483 | \terminal{friend} class-key nested-name-specifier identifier \terminal{;}\br |
1484 | | -\terminal{friend} class-key nested-name-specifier \terminal{template\opt} simple-template-id \terminal{;} |
| 1484 | +\terminal{friend} class-key nested-name-specifier \terminal{template\opt{}} simple-template-id \terminal{;} |
1485 | 1485 | \end{ncsimplebnf} |
1486 | 1486 |
|
1487 | 1487 | In the first case, the \grammarterm{attribute-specifier-seq}, if any, appertains |
|
1923 | 1923 |
|
1924 | 1924 | \begin{bnf} |
1925 | 1925 | \nontermdef{enum-head}\br |
1926 | | - enum-key attribute-specifier-seq\opt enum-head-name\opt enum-base\opt |
| 1926 | + enum-key attribute-specifier-seq\opt{} enum-head-name\opt{} enum-base\opt{} |
1927 | 1927 | \end{bnf} |
1928 | 1928 |
|
1929 | 1929 | \begin{bnf} |
1930 | 1930 | \nontermdef{enum-head-name}\br |
1931 | | - nested-name-specifier\opt identifier |
| 1931 | + nested-name-specifier\opt{} identifier |
1932 | 1932 | \end{bnf} |
1933 | 1933 |
|
1934 | 1934 | \begin{bnf} |
1935 | 1935 | \nontermdef{opaque-enum-declaration}\br |
1936 | | - enum-key attribute-specifier-seq\opt nested-name-specifier\opt identifier enum-base\opt{} \terminal{;} |
| 1936 | + enum-key attribute-specifier-seq\opt{} nested-name-specifier\opt{} identifier enum-base\opt{} \terminal{;} |
1937 | 1937 | \end{bnf} |
1938 | 1938 |
|
1939 | 1939 | \begin{bnf} |
|
1962 | 1962 |
|
1963 | 1963 | \begin{bnf} |
1964 | 1964 | \nontermdef{enumerator}\br |
1965 | | - identifier attribute-specifier-seq\opt |
| 1965 | + identifier attribute-specifier-seq\opt{} |
1966 | 1966 | \end{bnf} |
1967 | 1967 |
|
1968 | 1968 | The optional \grammarterm{attribute-specifier-seq} in the \grammarterm{enum-head} and |
|
2271 | 2271 |
|
2272 | 2272 | \begin{bnf} |
2273 | 2273 | \nontermdef{named-namespace-definition}\br |
2274 | | - \terminal{inline\opt} \terminal{namespace} attribute-specifier-seq\opt identifier \terminal{\{} namespace-body \terminal{\}} |
| 2274 | + \terminal{inline\opt{}} \terminal{namespace} attribute-specifier-seq\opt{} identifier \terminal{\{} namespace-body \terminal{\}} |
2275 | 2275 | \end{bnf} |
2276 | 2276 |
|
2277 | 2277 | \begin{bnf} |
2278 | 2278 | \nontermdef{unnamed-namespace-definition}\br |
2279 | | - \terminal{inline\opt} \terminal{namespace} attribute-specifier-seq\opt{} \terminal{\{} namespace-body \terminal{\}} |
| 2279 | + \terminal{inline\opt{}} \terminal{namespace} attribute-specifier-seq\opt{} \terminal{\{} namespace-body \terminal{\}} |
2280 | 2280 | \end{bnf} |
2281 | 2281 |
|
2282 | 2282 | \begin{bnf} |
|
2292 | 2292 |
|
2293 | 2293 | \begin{bnf} |
2294 | 2294 | \nontermdef{namespace-body}\br |
2295 | | - declaration-seq\opt |
| 2295 | + declaration-seq\opt{} |
2296 | 2296 | \end{bnf} |
2297 | 2297 |
|
2298 | 2298 | \pnum |
|
2603 | 2603 |
|
2604 | 2604 | \begin{bnf} |
2605 | 2605 | \nontermdef{qualified-namespace-specifier}\br |
2606 | | - nested-name-specifier\opt namespace-name |
| 2606 | + nested-name-specifier\opt{} namespace-name |
2607 | 2607 | \end{bnf} |
2608 | 2608 |
|
2609 | 2609 | \pnum |
|
2643 | 2643 |
|
2644 | 2644 | \begin{bnf} |
2645 | 2645 | \nontermdef{using-declarator-list}\br |
2646 | | - using-declarator \terminal{...}\opt\br |
2647 | | - using-declarator-list \terminal{,} using-declarator \terminal{...}\opt |
| 2646 | + using-declarator \terminal{...}\opt{}\br |
| 2647 | + using-declarator-list \terminal{,} using-declarator \terminal{...}\opt{} |
2648 | 2648 | \end{bnf} |
2649 | 2649 |
|
2650 | 2650 | \begin{bnf} |
2651 | 2651 | \nontermdef{using-declarator}\br |
2652 | | - \terminal{typename\opt} nested-name-specifier unqualified-id |
| 2652 | + \terminal{typename\opt{}} nested-name-specifier unqualified-id |
2653 | 2653 | \end{bnf} |
2654 | 2654 |
|
2655 | 2655 | \pnum |
|
3118 | 3118 |
|
3119 | 3119 | \begin{bnf} |
3120 | 3120 | \nontermdef{using-directive}\br |
3121 | | - attribute-specifier-seq\opt{} \terminal{using namespace} nested-name-specifier\opt namespace-name \terminal{;} |
| 3121 | + attribute-specifier-seq\opt{} \terminal{using namespace} nested-name-specifier\opt{} namespace-name \terminal{;} |
3122 | 3122 | \end{bnf} |
3123 | 3123 |
|
3124 | 3124 | \pnum |
|
3593 | 3593 |
|
3594 | 3594 | \begin{bnf} |
3595 | 3595 | \nontermdef{attribute-specifier-seq}\br |
3596 | | - attribute-specifier-seq\opt attribute-specifier |
| 3596 | + attribute-specifier-seq\opt{} attribute-specifier |
3597 | 3597 | \end{bnf} |
3598 | 3598 |
|
3599 | 3599 | \begin{bnf} |
|
3615 | 3615 |
|
3616 | 3616 | \begin{bnf} |
3617 | 3617 | \nontermdef{attribute-list}\br |
3618 | | - attribute\opt\br |
3619 | | - attribute-list \terminal{,} attribute\opt\br |
| 3618 | + attribute\opt{}\br |
| 3619 | + attribute-list \terminal{,} attribute\opt{}\br |
3620 | 3620 | attribute \terminal{...}\br |
3621 | 3621 | attribute-list \terminal{,} attribute \terminal{...} |
3622 | 3622 | \end{bnf} |
3623 | 3623 |
|
3624 | 3624 | \begin{bnf} |
3625 | 3625 | \nontermdef{attribute}\br |
3626 | | - attribute-token attribute-argument-clause\opt |
| 3626 | + attribute-token attribute-argument-clause\opt{} |
3627 | 3627 | \end{bnf} |
3628 | 3628 |
|
3629 | 3629 | \begin{bnf} |
|
0 commit comments