Skip to content

Commit 4b13433

Browse files
committed
Replace \opt with \opt{}
1 parent 3f1292a commit 4b13433

16 files changed

+201
-201
lines changed

source/access.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
(Clause~\ref{class.derived}):
201201

202202
\begin{ncbnftab}
203-
access-specifier \terminal{:} member-specification\opt
203+
access-specifier \terminal{:} member-specification\opt{}
204204
\end{ncbnftab}
205205

206206
An

source/basic.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@
686686
\item for a declaration of the form
687687

688688
\begin{ncbnf}
689-
class-key attribute-specifier-seq\opt identifier \terminal{;}
689+
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
690690
\end{ncbnf}
691691

692692
the \grammarterm{identifier} is declared to be a
@@ -1656,7 +1656,7 @@
16561656
\grammarterm{qualified-id} of the form:
16571657

16581658
\begin{ncbnf}
1659-
nested-name-specifier\opt class-name \terminal{::} \terminal{\tilde} class-name
1659+
nested-name-specifier\opt{} class-name \terminal{::} \terminal{\tilde} class-name
16601660
\end{ncbnf}
16611661

16621662
the second \grammarterm{class-name} is looked up in the same scope as the
@@ -2016,7 +2016,7 @@
20162016
following form:
20172017

20182018
\begin{ncbnf}
2019-
class-key attribute-specifier-seq\opt identifier \terminal{;}
2019+
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
20202020
\end{ncbnf}
20212021

20222022
the \grammarterm{identifier} is looked up according
@@ -2031,7 +2031,7 @@
20312031
form:
20322032

20332033
\begin{ncbnf}
2034-
class-key attribute-specifier-seq\opt identifier \terminal{;}
2034+
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
20352035
\end{ncbnf}
20362036

20372037
the \grammarterm{elaborated-type-specifier} is a declaration that
@@ -2197,7 +2197,7 @@
21972197

21982198
\begin{bnf}
21992199
\nontermdef{translation-unit}\br
2200-
declaration-seq\opt
2200+
declaration-seq\opt{}
22012201
\end{bnf}
22022202

22032203
\pnum

source/classes.tex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434

3535
\begin{bnf}
3636
\nontermdef{class-head}\br
37-
class-key attribute-specifier-seq\opt class-head-name class-virt-specifier\opt base-clause\opt\br
38-
class-key attribute-specifier-seq\opt base-clause\opt
37+
class-key attribute-specifier-seq\opt{} class-head-name class-virt-specifier\opt{} base-clause\opt{}\br
38+
class-key attribute-specifier-seq\opt{} base-clause\opt{}
3939
\end{bnf}
4040

4141
\begin{bnf}
4242
\nontermdef{class-head-name}\br
43-
nested-name-specifier\opt class-name
43+
nested-name-specifier\opt{} class-name
4444
\end{bnf}
4545

4646
\begin{bnf}
@@ -445,13 +445,13 @@
445445

446446
\begin{bnf}
447447
\nontermdef{member-specification}\br
448-
member-declaration member-specification\opt\br
449-
access-specifier \terminal{:} member-specification\opt
448+
member-declaration member-specification\opt{}\br
449+
access-specifier \terminal{:} member-specification\opt{}
450450
\end{bnf}
451451

452452
\begin{bnf}
453453
\nontermdef{member-declaration}\br
454-
attribute-specifier-seq\opt decl-specifier-seq\opt member-declarator-list\opt{} \terminal{;}\br
454+
attribute-specifier-seq\opt{} decl-specifier-seq\opt{} member-declarator-list\opt{} \terminal{;}\br
455455
function-definition\br
456456
using-declaration\br
457457
static_assert-declaration\br
@@ -469,9 +469,9 @@
469469

470470
\begin{bnf}
471471
\nontermdef{member-declarator}\br
472-
declarator virt-specifier-seq\opt pure-specifier\opt\br
473-
declarator brace-or-equal-initializer\opt\br
474-
identifier\opt attribute-specifier-seq\opt{} \terminal{:} constant-expression
472+
declarator virt-specifier-seq\opt{} pure-specifier\opt{}\br
473+
declarator brace-or-equal-initializer\opt{}\br
474+
identifier\opt{} attribute-specifier-seq\opt{} \terminal{:} constant-expression
475475
\end{bnf}
476476

477477
\begin{bnf}
@@ -1294,7 +1294,7 @@
12941294
A \grammarterm{member-declarator} of the form
12951295

12961296
\begin{ncbnftab}
1297-
identifier\opt attribute-specifier-seq\opt{} \terminal{:} constant-expression
1297+
identifier\opt{} attribute-specifier-seq\opt{} \terminal{:} constant-expression
12981298
\end{ncbnftab}
12991299

13001300
\indextext{\idxcode{:}!bit-field declaration}%

source/declarations.tex

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
\begin{bnf}
4747
\nontermdef{nodeclspec-function-declaration}\br
48-
attribute-specifier-seq\opt declarator \terminal{;}
48+
attribute-specifier-seq\opt{} declarator \terminal{;}
4949
\end{bnf}
5050

5151
\begin{bnf}
@@ -57,7 +57,7 @@
5757
\nontermdef{simple-declaration}\br
5858
decl-specifier-seq init-declarator-list\opt{} \terminal{;}\br
5959
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{;}
6161
\end{bnf}
6262

6363
\begin{bnf}
@@ -93,7 +93,7 @@
9393
\grammarterm{nodeclspec-function-declaration} of the form
9494

9595
\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{;}
9797
\end{ncsimplebnf}
9898

9999
is divided into three parts.
@@ -258,7 +258,7 @@
258258

259259
\begin{bnf}
260260
\nontermdef{decl-specifier-seq}\br
261-
decl-specifier attribute-specifier-seq\opt\br
261+
decl-specifier attribute-specifier-seq\opt{}\br
262262
decl-specifier decl-specifier-seq
263263
\end{bnf}
264264

@@ -1042,7 +1042,7 @@
10421042

10431043
\begin{bnf}
10441044
\nontermdef{type-specifier-seq}\br
1045-
type-specifier attribute-specifier-seq\opt\br
1045+
type-specifier attribute-specifier-seq\opt{}\br
10461046
type-specifier type-specifier-seq
10471047
\end{bnf}
10481048

@@ -1055,7 +1055,7 @@
10551055

10561056
\begin{bnf}
10571057
\nontermdef{defining-type-specifier-seq}\br
1058-
defining-type-specifier attribute-specifier-seq\opt\br
1058+
defining-type-specifier attribute-specifier-seq\opt{}\br
10591059
defining-type-specifier defining-type-specifier-seq
10601060
\end{bnf}
10611061

@@ -1232,9 +1232,9 @@
12321232

12331233
\begin{bnf}
12341234
\nontermdef{simple-type-specifier}\br
1235-
nested-name-specifier\opt type-name\br
1235+
nested-name-specifier\opt{} type-name\br
12361236
nested-name-specifier \terminal{template} simple-template-id\br
1237-
nested-name-specifier\opt template-name\br
1237+
nested-name-specifier\opt{} template-name\br
12381238
\terminal{char}\br
12391239
\terminal{char16_t}\br
12401240
\terminal{char32_t}\br
@@ -1468,10 +1468,10 @@
14681468

14691469
\begin{bnf}
14701470
\nontermdef{elaborated-type-specifier}\br
1471-
class-key attribute-specifier-seq\opt nested-name-specifier\opt identifier\br
1471+
class-key attribute-specifier-seq\opt{} nested-name-specifier\opt{} identifier\br
14721472
class-key simple-template-id\br
1473-
class-key nested-name-specifier \terminal{template}\opt simple-template-id\br
1474-
\terminal{enum} nested-name-specifier\opt identifier
1473+
class-key nested-name-specifier \terminal{template}\opt{} simple-template-id\br
1474+
\terminal{enum} nested-name-specifier\opt{} identifier
14751475
\end{bnf}
14761476

14771477
\pnum
@@ -1486,11 +1486,11 @@
14861486
forms:
14871487

14881488
\begin{ncsimplebnf}
1489-
class-key attribute-specifier-seq\opt identifier \terminal{;}\br
1490-
\terminal{friend} class-key \terminal{::\opt} identifier \terminal{;}\br
1491-
\terminal{friend} class-key \terminal{::\opt} simple-template-id \terminal{;}\br
1489+
class-key attribute-specifier-seq\opt{} identifier \terminal{;}\br
1490+
\terminal{friend} class-key \terminal{::\opt{}} identifier \terminal{;}\br
1491+
\terminal{friend} class-key \terminal{::\opt{}} simple-template-id \terminal{;}\br
14921492
\terminal{friend} class-key nested-name-specifier identifier \terminal{;}\br
1493-
\terminal{friend} class-key nested-name-specifier \terminal{template\opt} simple-template-id \terminal{;}
1493+
\terminal{friend} class-key nested-name-specifier \terminal{template\opt{}} simple-template-id \terminal{;}
14941494
\end{ncsimplebnf}
14951495

14961496
In the first case, the \grammarterm{attribute-specifier-seq}, if any, appertains
@@ -1927,17 +1927,17 @@
19271927

19281928
\begin{bnf}
19291929
\nontermdef{enum-head}\br
1930-
enum-key attribute-specifier-seq\opt enum-head-name\opt enum-base\opt
1930+
enum-key attribute-specifier-seq\opt{} enum-head-name\opt{} enum-base\opt{}
19311931
\end{bnf}
19321932

19331933
\begin{bnf}
19341934
\nontermdef{enum-head-name}\br
1935-
nested-name-specifier\opt identifier
1935+
nested-name-specifier\opt{} identifier
19361936
\end{bnf}
19371937

19381938
\begin{bnf}
19391939
\nontermdef{opaque-enum-declaration}\br
1940-
enum-key attribute-specifier-seq\opt nested-name-specifier\opt identifier enum-base\opt{} \terminal{;}
1940+
enum-key attribute-specifier-seq\opt{} nested-name-specifier\opt{} identifier enum-base\opt{} \terminal{;}
19411941
\end{bnf}
19421942

19431943
\begin{bnf}
@@ -1966,15 +1966,15 @@
19661966

19671967
\begin{bnf}
19681968
\nontermdef{enumerator}\br
1969-
identifier attribute-specifier-seq\opt
1969+
identifier attribute-specifier-seq\opt{}
19701970
\end{bnf}
19711971

19721972
The optional \grammarterm{attribute-specifier-seq} in the \grammarterm{enum-head} and
19731973
the \grammarterm{opaque-enum-declaration} appertains to the enumeration; the attributes
19741974
in that \grammarterm{attribute-specifier-seq} are thereafter considered attributes of the
19751975
enumeration whenever it is named.
19761976
A \tcode{:} following
1977-
``\tcode{enum} \grammarterm{nested-name-specifier\opt} \grammarterm{identifier}''
1977+
``\tcode{enum} \grammarterm{nested-name-specifier\opt{}} \grammarterm{identifier}''
19781978
within the \grammarterm{decl-specifier-seq} of a \grammarterm{member-declaration}
19791979
is parsed as part of an \grammarterm{enum-base}.
19801980
\begin{note} This resolves a potential ambiguity between the declaration of an enumeration
@@ -2275,12 +2275,12 @@
22752275

22762276
\begin{bnf}
22772277
\nontermdef{named-namespace-definition}\br
2278-
\terminal{inline\opt} \terminal{namespace} attribute-specifier-seq\opt identifier \terminal{\{} namespace-body \terminal{\}}
2278+
\terminal{inline\opt{}} \terminal{namespace} attribute-specifier-seq\opt{} identifier \terminal{\{} namespace-body \terminal{\}}
22792279
\end{bnf}
22802280

22812281
\begin{bnf}
22822282
\nontermdef{unnamed-namespace-definition}\br
2283-
\terminal{inline\opt} \terminal{namespace} attribute-specifier-seq\opt{} \terminal{\{} namespace-body \terminal{\}}
2283+
\terminal{inline\opt{}} \terminal{namespace} attribute-specifier-seq\opt{} \terminal{\{} namespace-body \terminal{\}}
22842284
\end{bnf}
22852285

22862286
\begin{bnf}
@@ -2296,7 +2296,7 @@
22962296

22972297
\begin{bnf}
22982298
\nontermdef{namespace-body}\br
2299-
declaration-seq\opt
2299+
declaration-seq\opt{}
23002300
\end{bnf}
23012301

23022302
\pnum
@@ -2478,7 +2478,7 @@
24782478
whose \grammarterm{class-head-name} (Clause \ref{class}) or
24792479
\grammarterm{enum-head-name}~(\ref{dcl.enum}) is an \grammarterm{identifier}, or
24802480
whose \grammarterm{elaborated-type-specifier} is of the form \grammarterm{class-key}
2481-
\grammarterm{attribute-specifier-seq\opt} \grammarterm{identifier}~(\ref{dcl.type.elab}), or
2481+
\grammarterm{attribute-specifier-seq\opt{}} \grammarterm{identifier}~(\ref{dcl.type.elab}), or
24822482
that is an \grammarterm{opaque-enum-declaration},
24832483
declares (or redeclares) its \grammarterm{unqualified-id} or
24842484
\grammarterm{identifier} as a member of \tcode{N}.
@@ -2607,7 +2607,7 @@
26072607

26082608
\begin{bnf}
26092609
\nontermdef{qualified-namespace-specifier}\br
2610-
nested-name-specifier\opt namespace-name
2610+
nested-name-specifier\opt{} namespace-name
26112611
\end{bnf}
26122612

26132613
\pnum
@@ -2647,13 +2647,13 @@
26472647

26482648
\begin{bnf}
26492649
\nontermdef{using-declarator-list}\br
2650-
using-declarator \terminal{...}\opt\br
2651-
using-declarator-list \terminal{,} using-declarator \terminal{...}\opt
2650+
using-declarator \terminal{...}\opt{}\br
2651+
using-declarator-list \terminal{,} using-declarator \terminal{...}\opt{}
26522652
\end{bnf}
26532653

26542654
\begin{bnf}
26552655
\nontermdef{using-declarator}\br
2656-
\terminal{typename\opt} nested-name-specifier unqualified-id
2656+
\terminal{typename\opt{}} nested-name-specifier unqualified-id
26572657
\end{bnf}
26582658

26592659
\pnum
@@ -3122,7 +3122,7 @@
31223122

31233123
\begin{bnf}
31243124
\nontermdef{using-directive}\br
3125-
attribute-specifier-seq\opt{} \terminal{using namespace} nested-name-specifier\opt namespace-name \terminal{;}
3125+
attribute-specifier-seq\opt{} \terminal{using namespace} nested-name-specifier\opt{} namespace-name \terminal{;}
31263126
\end{bnf}
31273127

31283128
\pnum
@@ -3595,7 +3595,7 @@
35953595

35963596
\begin{bnf}
35973597
\nontermdef{attribute-specifier-seq}\br
3598-
attribute-specifier-seq\opt attribute-specifier
3598+
attribute-specifier-seq\opt{} attribute-specifier
35993599
\end{bnf}
36003600

36013601
\begin{bnf}
@@ -3617,15 +3617,15 @@
36173617

36183618
\begin{bnf}
36193619
\nontermdef{attribute-list}\br
3620-
attribute\opt\br
3621-
attribute-list \terminal{,} attribute\opt\br
3620+
attribute\opt{}\br
3621+
attribute-list \terminal{,} attribute\opt{}\br
36223622
attribute \terminal{...}\br
36233623
attribute-list \terminal{,} attribute \terminal{...}
36243624
\end{bnf}
36253625

36263626
\begin{bnf}
36273627
\nontermdef{attribute}\br
3628-
attribute-token attribute-argument-clause\opt
3628+
attribute-token attribute-argument-clause\opt{}
36293629
\end{bnf}
36303630

36313631
\begin{bnf}

0 commit comments

Comments
 (0)