Skip to content

Commit 19c30a3

Browse files
committed
Replace \opt with \opt{}
1 parent 38675ca commit 19c30a3

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

@@ -1043,7 +1043,7 @@
10431043

10441044
\begin{bnf}
10451045
\nontermdef{type-specifier-seq}\br
1046-
type-specifier attribute-specifier-seq\opt\br
1046+
type-specifier attribute-specifier-seq\opt{}\br
10471047
type-specifier type-specifier-seq
10481048
\end{bnf}
10491049

@@ -1056,7 +1056,7 @@
10561056

10571057
\begin{bnf}
10581058
\nontermdef{defining-type-specifier-seq}\br
1059-
defining-type-specifier attribute-specifier-seq\opt\br
1059+
defining-type-specifier attribute-specifier-seq\opt{}\br
10601060
defining-type-specifier defining-type-specifier-seq
10611061
\end{bnf}
10621062

@@ -1233,9 +1233,9 @@
12331233

12341234
\begin{bnf}
12351235
\nontermdef{simple-type-specifier}\br
1236-
nested-name-specifier\opt type-name\br
1236+
nested-name-specifier\opt{} type-name\br
12371237
nested-name-specifier \terminal{template} simple-template-id\br
1238-
nested-name-specifier\opt template-name\br
1238+
nested-name-specifier\opt{} template-name\br
12391239
\terminal{char}\br
12401240
\terminal{char16_t}\br
12411241
\terminal{char32_t}\br
@@ -1469,10 +1469,10 @@
14691469

14701470
\begin{bnf}
14711471
\nontermdef{elaborated-type-specifier}\br
1472-
class-key attribute-specifier-seq\opt nested-name-specifier\opt identifier\br
1472+
class-key attribute-specifier-seq\opt{} nested-name-specifier\opt{} identifier\br
14731473
class-key simple-template-id\br
1474-
class-key nested-name-specifier \terminal{template}\opt simple-template-id\br
1475-
\terminal{enum} nested-name-specifier\opt identifier
1474+
class-key nested-name-specifier \terminal{template}\opt{} simple-template-id\br
1475+
\terminal{enum} nested-name-specifier\opt{} identifier
14761476
\end{bnf}
14771477

14781478
\pnum
@@ -1487,11 +1487,11 @@
14871487
forms:
14881488

14891489
\begin{ncsimplebnf}
1490-
class-key attribute-specifier-seq\opt identifier \terminal{;}\br
1491-
\terminal{friend} class-key \terminal{::\opt} identifier \terminal{;}\br
1492-
\terminal{friend} class-key \terminal{::\opt} simple-template-id \terminal{;}\br
1490+
class-key attribute-specifier-seq\opt{} identifier \terminal{;}\br
1491+
\terminal{friend} class-key \terminal{::\opt{}} identifier \terminal{;}\br
1492+
\terminal{friend} class-key \terminal{::\opt{}} simple-template-id \terminal{;}\br
14931493
\terminal{friend} class-key nested-name-specifier identifier \terminal{;}\br
1494-
\terminal{friend} class-key nested-name-specifier \terminal{template\opt} simple-template-id \terminal{;}
1494+
\terminal{friend} class-key nested-name-specifier \terminal{template\opt{}} simple-template-id \terminal{;}
14951495
\end{ncsimplebnf}
14961496

14971497
In the first case, the \grammarterm{attribute-specifier-seq}, if any, appertains
@@ -1928,17 +1928,17 @@
19281928

19291929
\begin{bnf}
19301930
\nontermdef{enum-head}\br
1931-
enum-key attribute-specifier-seq\opt enum-head-name\opt enum-base\opt
1931+
enum-key attribute-specifier-seq\opt{} enum-head-name\opt{} enum-base\opt{}
19321932
\end{bnf}
19331933

19341934
\begin{bnf}
19351935
\nontermdef{enum-head-name}\br
1936-
nested-name-specifier\opt identifier
1936+
nested-name-specifier\opt{} identifier
19371937
\end{bnf}
19381938

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

19441944
\begin{bnf}
@@ -1967,15 +1967,15 @@
19671967

19681968
\begin{bnf}
19691969
\nontermdef{enumerator}\br
1970-
identifier attribute-specifier-seq\opt
1970+
identifier attribute-specifier-seq\opt{}
19711971
\end{bnf}
19721972

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

22772277
\begin{bnf}
22782278
\nontermdef{named-namespace-definition}\br
2279-
\terminal{inline\opt} \terminal{namespace} attribute-specifier-seq\opt identifier \terminal{\{} namespace-body \terminal{\}}
2279+
\terminal{inline\opt{}} \terminal{namespace} attribute-specifier-seq\opt{} identifier \terminal{\{} namespace-body \terminal{\}}
22802280
\end{bnf}
22812281

22822282
\begin{bnf}
22832283
\nontermdef{unnamed-namespace-definition}\br
2284-
\terminal{inline\opt} \terminal{namespace} attribute-specifier-seq\opt{} \terminal{\{} namespace-body \terminal{\}}
2284+
\terminal{inline\opt{}} \terminal{namespace} attribute-specifier-seq\opt{} \terminal{\{} namespace-body \terminal{\}}
22852285
\end{bnf}
22862286

22872287
\begin{bnf}
@@ -2297,7 +2297,7 @@
22972297

22982298
\begin{bnf}
22992299
\nontermdef{namespace-body}\br
2300-
declaration-seq\opt
2300+
declaration-seq\opt{}
23012301
\end{bnf}
23022302

23032303
\pnum
@@ -2479,7 +2479,7 @@
24792479
whose \grammarterm{class-head-name} (Clause \ref{class}) or
24802480
\grammarterm{enum-head-name}~(\ref{dcl.enum}) is an \grammarterm{identifier}, or
24812481
whose \grammarterm{elaborated-type-specifier} is of the form \grammarterm{class-key}
2482-
\grammarterm{attribute-specifier-seq\opt} \grammarterm{identifier}~(\ref{dcl.type.elab}), or
2482+
\grammarterm{attribute-specifier-seq\opt{}} \grammarterm{identifier}~(\ref{dcl.type.elab}), or
24832483
that is an \grammarterm{opaque-enum-declaration},
24842484
declares (or redeclares) its \grammarterm{unqualified-id} or
24852485
\grammarterm{identifier} as a member of \tcode{N}.
@@ -2608,7 +2608,7 @@
26082608

26092609
\begin{bnf}
26102610
\nontermdef{qualified-namespace-specifier}\br
2611-
nested-name-specifier\opt namespace-name
2611+
nested-name-specifier\opt{} namespace-name
26122612
\end{bnf}
26132613

26142614
\pnum
@@ -2648,13 +2648,13 @@
26482648

26492649
\begin{bnf}
26502650
\nontermdef{using-declarator-list}\br
2651-
using-declarator \terminal{...}\opt\br
2652-
using-declarator-list \terminal{,} using-declarator \terminal{...}\opt
2651+
using-declarator \terminal{...}\opt{}\br
2652+
using-declarator-list \terminal{,} using-declarator \terminal{...}\opt{}
26532653
\end{bnf}
26542654

26552655
\begin{bnf}
26562656
\nontermdef{using-declarator}\br
2657-
\terminal{typename\opt} nested-name-specifier unqualified-id
2657+
\terminal{typename\opt{}} nested-name-specifier unqualified-id
26582658
\end{bnf}
26592659

26602660
\pnum
@@ -3123,7 +3123,7 @@
31233123

31243124
\begin{bnf}
31253125
\nontermdef{using-directive}\br
3126-
attribute-specifier-seq\opt{} \terminal{using namespace} nested-name-specifier\opt namespace-name \terminal{;}
3126+
attribute-specifier-seq\opt{} \terminal{using namespace} nested-name-specifier\opt{} namespace-name \terminal{;}
31273127
\end{bnf}
31283128

31293129
\pnum
@@ -3596,7 +3596,7 @@
35963596

35973597
\begin{bnf}
35983598
\nontermdef{attribute-specifier-seq}\br
3599-
attribute-specifier-seq\opt attribute-specifier
3599+
attribute-specifier-seq\opt{} attribute-specifier
36003600
\end{bnf}
36013601

36023602
\begin{bnf}
@@ -3618,15 +3618,15 @@
36183618

36193619
\begin{bnf}
36203620
\nontermdef{attribute-list}\br
3621-
attribute\opt\br
3622-
attribute-list \terminal{,} attribute\opt\br
3621+
attribute\opt{}\br
3622+
attribute-list \terminal{,} attribute\opt{}\br
36233623
attribute \terminal{...}\br
36243624
attribute-list \terminal{,} attribute \terminal{...}
36253625
\end{bnf}
36263626

36273627
\begin{bnf}
36283628
\nontermdef{attribute}\br
3629-
attribute-token attribute-argument-clause\opt
3629+
attribute-token attribute-argument-clause\opt{}
36303630
\end{bnf}
36313631

36323632
\begin{bnf}

0 commit comments

Comments
 (0)