|
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
|
|
1458 | 1458 |
|
1459 | 1459 | \begin{bnf}
|
1460 | 1460 | \nontermdef{elaborated-type-specifier}\br
|
1461 |
| - class-key attribute-specifier-seq\opt nested-name-specifier\opt identifier\br |
| 1461 | + class-key attribute-specifier-seq\opt{} nested-name-specifier\opt{} identifier\br |
1462 | 1462 | class-key simple-template-id\br
|
1463 |
| - class-key nested-name-specifier \terminal{template}\opt simple-template-id\br |
1464 |
| - \terminal{enum} nested-name-specifier\opt identifier |
| 1463 | + class-key nested-name-specifier \terminal{template}\opt{} simple-template-id\br |
| 1464 | + \terminal{enum} nested-name-specifier\opt{} identifier |
1465 | 1465 | \end{bnf}
|
1466 | 1466 |
|
1467 | 1467 | \pnum
|
|
1476 | 1476 | forms:
|
1477 | 1477 |
|
1478 | 1478 | \begin{ncsimplebnf}
|
1479 |
| -class-key attribute-specifier-seq\opt identifier \terminal{;}\br |
1480 |
| -\terminal{friend} class-key \terminal{::\opt} identifier \terminal{;}\br |
1481 |
| -\terminal{friend} class-key \terminal{::\opt} simple-template-id \terminal{;}\br |
| 1479 | +class-key attribute-specifier-seq\opt{} identifier \terminal{;}\br |
| 1480 | +\terminal{friend} class-key \terminal{::\opt{}} identifier \terminal{;}\br |
| 1481 | +\terminal{friend} class-key \terminal{::\opt{}} simple-template-id \terminal{;}\br |
1482 | 1482 | \terminal{friend} class-key nested-name-specifier identifier \terminal{;}\br
|
1483 |
| -\terminal{friend} class-key nested-name-specifier \terminal{template\opt} simple-template-id \terminal{;} |
| 1483 | +\terminal{friend} class-key nested-name-specifier \terminal{template\opt{}} simple-template-id \terminal{;} |
1484 | 1484 | \end{ncsimplebnf}
|
1485 | 1485 |
|
1486 | 1486 | In the first case, the \grammarterm{attribute-specifier-seq}, if any, appertains
|
|
1922 | 1922 |
|
1923 | 1923 | \begin{bnf}
|
1924 | 1924 | \nontermdef{enum-head}\br
|
1925 |
| - enum-key attribute-specifier-seq\opt enum-head-name\opt enum-base\opt |
| 1925 | + enum-key attribute-specifier-seq\opt{} enum-head-name\opt{} enum-base\opt{} |
1926 | 1926 | \end{bnf}
|
1927 | 1927 |
|
1928 | 1928 | \begin{bnf}
|
1929 | 1929 | \nontermdef{enum-head-name}\br
|
1930 |
| - nested-name-specifier\opt identifier |
| 1930 | + nested-name-specifier\opt{} identifier |
1931 | 1931 | \end{bnf}
|
1932 | 1932 |
|
1933 | 1933 | \begin{bnf}
|
1934 | 1934 | \nontermdef{opaque-enum-declaration}\br
|
1935 |
| - enum-key attribute-specifier-seq\opt nested-name-specifier\opt identifier enum-base\opt{} \terminal{;} |
| 1935 | + enum-key attribute-specifier-seq\opt{} nested-name-specifier\opt{} identifier enum-base\opt{} \terminal{;} |
1936 | 1936 | \end{bnf}
|
1937 | 1937 |
|
1938 | 1938 | \begin{bnf}
|
|
1961 | 1961 |
|
1962 | 1962 | \begin{bnf}
|
1963 | 1963 | \nontermdef{enumerator}\br
|
1964 |
| - identifier attribute-specifier-seq\opt |
| 1964 | + identifier attribute-specifier-seq\opt{} |
1965 | 1965 | \end{bnf}
|
1966 | 1966 |
|
1967 | 1967 | The optional \grammarterm{attribute-specifier-seq} in the \grammarterm{enum-head} and
|
|
2270 | 2270 |
|
2271 | 2271 | \begin{bnf}
|
2272 | 2272 | \nontermdef{named-namespace-definition}\br
|
2273 |
| - \terminal{inline\opt} \terminal{namespace} attribute-specifier-seq\opt identifier \terminal{\{} namespace-body \terminal{\}} |
| 2273 | + \terminal{inline\opt{}} \terminal{namespace} attribute-specifier-seq\opt{} identifier \terminal{\{} namespace-body \terminal{\}} |
2274 | 2274 | \end{bnf}
|
2275 | 2275 |
|
2276 | 2276 | \begin{bnf}
|
2277 | 2277 | \nontermdef{unnamed-namespace-definition}\br
|
2278 |
| - \terminal{inline\opt} \terminal{namespace} attribute-specifier-seq\opt{} \terminal{\{} namespace-body \terminal{\}} |
| 2278 | + \terminal{inline\opt{}} \terminal{namespace} attribute-specifier-seq\opt{} \terminal{\{} namespace-body \terminal{\}} |
2279 | 2279 | \end{bnf}
|
2280 | 2280 |
|
2281 | 2281 | \begin{bnf}
|
|
2291 | 2291 |
|
2292 | 2292 | \begin{bnf}
|
2293 | 2293 | \nontermdef{namespace-body}\br
|
2294 |
| - declaration-seq\opt |
| 2294 | + declaration-seq\opt{} |
2295 | 2295 | \end{bnf}
|
2296 | 2296 |
|
2297 | 2297 | \pnum
|
|
2602 | 2602 |
|
2603 | 2603 | \begin{bnf}
|
2604 | 2604 | \nontermdef{qualified-namespace-specifier}\br
|
2605 |
| - nested-name-specifier\opt namespace-name |
| 2605 | + nested-name-specifier\opt{} namespace-name |
2606 | 2606 | \end{bnf}
|
2607 | 2607 |
|
2608 | 2608 | \pnum
|
|
2642 | 2642 |
|
2643 | 2643 | \begin{bnf}
|
2644 | 2644 | \nontermdef{using-declarator-list}\br
|
2645 |
| - using-declarator \terminal{...}\opt\br |
2646 |
| - using-declarator-list \terminal{,} using-declarator \terminal{...}\opt |
| 2645 | + using-declarator \terminal{...}\opt{}\br |
| 2646 | + using-declarator-list \terminal{,} using-declarator \terminal{...}\opt{} |
2647 | 2647 | \end{bnf}
|
2648 | 2648 |
|
2649 | 2649 | \begin{bnf}
|
2650 | 2650 | \nontermdef{using-declarator}\br
|
2651 |
| - \terminal{typename\opt} nested-name-specifier unqualified-id |
| 2651 | + \terminal{typename\opt{}} nested-name-specifier unqualified-id |
2652 | 2652 | \end{bnf}
|
2653 | 2653 |
|
2654 | 2654 | \pnum
|
|
3117 | 3117 |
|
3118 | 3118 | \begin{bnf}
|
3119 | 3119 | \nontermdef{using-directive}\br
|
3120 |
| - attribute-specifier-seq\opt{} \terminal{using namespace} nested-name-specifier\opt namespace-name \terminal{;} |
| 3120 | + attribute-specifier-seq\opt{} \terminal{using namespace} nested-name-specifier\opt{} namespace-name \terminal{;} |
3121 | 3121 | \end{bnf}
|
3122 | 3122 |
|
3123 | 3123 | \pnum
|
|
3592 | 3592 |
|
3593 | 3593 | \begin{bnf}
|
3594 | 3594 | \nontermdef{attribute-specifier-seq}\br
|
3595 |
| - attribute-specifier-seq\opt attribute-specifier |
| 3595 | + attribute-specifier-seq\opt{} attribute-specifier |
3596 | 3596 | \end{bnf}
|
3597 | 3597 |
|
3598 | 3598 | \begin{bnf}
|
|
3614 | 3614 |
|
3615 | 3615 | \begin{bnf}
|
3616 | 3616 | \nontermdef{attribute-list}\br
|
3617 |
| - attribute\opt\br |
3618 |
| - attribute-list \terminal{,} attribute\opt\br |
| 3617 | + attribute\opt{}\br |
| 3618 | + attribute-list \terminal{,} attribute\opt{}\br |
3619 | 3619 | attribute \terminal{...}\br
|
3620 | 3620 | attribute-list \terminal{,} attribute \terminal{...}
|
3621 | 3621 | \end{bnf}
|
3622 | 3622 |
|
3623 | 3623 | \begin{bnf}
|
3624 | 3624 | \nontermdef{attribute}\br
|
3625 |
| - attribute-token attribute-argument-clause\opt |
| 3625 | + attribute-token attribute-argument-clause\opt{} |
3626 | 3626 | \end{bnf}
|
3627 | 3627 |
|
3628 | 3628 | \begin{bnf}
|
|
0 commit comments