Skip to content

Commit 834208e

Browse files
committed
Replace \opt with \opt{}
1 parent c7d27eb commit 834208e

15 files changed

+191
-191
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
@@ -1657,7 +1657,7 @@
16571657
\grammarterm{qualified-id} of the form:
16581658

16591659
\begin{ncbnf}
1660-
nested-name-specifier\opt class-name \terminal{::} \terminal{\tilde} class-name
1660+
nested-name-specifier\opt{} class-name \terminal{::} \terminal{\tilde} class-name
16611661
\end{ncbnf}
16621662

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

20192019
\begin{ncbnf}
2020-
class-key attribute-specifier-seq\opt identifier \terminal{;}
2020+
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
20212021
\end{ncbnf}
20222022

20232023
the \grammarterm{identifier} is looked up according
@@ -2032,7 +2032,7 @@
20322032
form:
20332033

20342034
\begin{ncbnf}
2035-
class-key attribute-specifier-seq\opt identifier \terminal{;}
2035+
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
20362036
\end{ncbnf}
20372037

20382038
the \grammarterm{elaborated-type-specifier} is a declaration that
@@ -2198,7 +2198,7 @@
21982198

21992199
\begin{bnf}
22002200
\nontermdef{translation-unit}\br
2201-
declaration-seq\opt
2201+
declaration-seq\opt{}
22022202
\end{bnf}
22032203

22042204
\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}
@@ -442,13 +442,13 @@
442442

443443
\begin{bnf}
444444
\nontermdef{member-specification}\br
445-
member-declaration member-specification\opt\br
446-
access-specifier \terminal{:} member-specification\opt
445+
member-declaration member-specification\opt{}\br
446+
access-specifier \terminal{:} member-specification\opt{}
447447
\end{bnf}
448448

449449
\begin{bnf}
450450
\nontermdef{member-declaration}\br
451-
attribute-specifier-seq\opt decl-specifier-seq\opt member-declarator-list\opt{} \terminal{;}\br
451+
attribute-specifier-seq\opt{} decl-specifier-seq\opt{} member-declarator-list\opt{} \terminal{;}\br
452452
function-definition\br
453453
using-declaration\br
454454
static_assert-declaration\br
@@ -466,9 +466,9 @@
466466

467467
\begin{bnf}
468468
\nontermdef{member-declarator}\br
469-
declarator virt-specifier-seq\opt pure-specifier\opt\br
470-
declarator brace-or-equal-initializer\opt\br
471-
identifier\opt attribute-specifier-seq\opt{} \terminal{:} constant-expression
469+
declarator virt-specifier-seq\opt{} pure-specifier\opt{}\br
470+
declarator brace-or-equal-initializer\opt{}\br
471+
identifier\opt{} attribute-specifier-seq\opt{} \terminal{:} constant-expression
472472
\end{bnf}
473473

474474
\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: 31 additions & 31 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.
@@ -259,7 +259,7 @@
259259

260260
\begin{bnf}
261261
\nontermdef{decl-specifier-seq}\br
262-
decl-specifier attribute-specifier-seq\opt\br
262+
decl-specifier attribute-specifier-seq\opt{}\br
263263
decl-specifier decl-specifier-seq
264264
\end{bnf}
265265

@@ -1035,7 +1035,7 @@
10351035

10361036
\begin{bnf}
10371037
\nontermdef{type-specifier-seq}\br
1038-
type-specifier attribute-specifier-seq\opt\br
1038+
type-specifier attribute-specifier-seq\opt{}\br
10391039
type-specifier type-specifier-seq
10401040
\end{bnf}
10411041

@@ -1048,7 +1048,7 @@
10481048

10491049
\begin{bnf}
10501050
\nontermdef{defining-type-specifier-seq}\br
1051-
defining-type-specifier attribute-specifier-seq\opt\br
1051+
defining-type-specifier attribute-specifier-seq\opt{}\br
10521052
defining-type-specifier defining-type-specifier-seq
10531053
\end{bnf}
10541054

@@ -1225,9 +1225,9 @@
12251225

12261226
\begin{bnf}
12271227
\nontermdef{simple-type-specifier}\br
1228-
nested-name-specifier\opt type-name\br
1228+
nested-name-specifier\opt{} type-name\br
12291229
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
12311231
\terminal{char}\br
12321232
\terminal{char16_t}\br
12331233
\terminal{char32_t}\br
@@ -1458,10 +1458,10 @@
14581458

14591459
\begin{bnf}
14601460
\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
14621462
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
14651465
\end{bnf}
14661466

14671467
\pnum
@@ -1476,11 +1476,11 @@
14761476
forms:
14771477

14781478
\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
14821482
\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{;}
14841484
\end{ncsimplebnf}
14851485

14861486
In the first case, the \grammarterm{attribute-specifier-seq}, if any, appertains
@@ -1922,17 +1922,17 @@
19221922

19231923
\begin{bnf}
19241924
\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{}
19261926
\end{bnf}
19271927

19281928
\begin{bnf}
19291929
\nontermdef{enum-head-name}\br
1930-
nested-name-specifier\opt identifier
1930+
nested-name-specifier\opt{} identifier
19311931
\end{bnf}
19321932

19331933
\begin{bnf}
19341934
\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{;}
19361936
\end{bnf}
19371937

19381938
\begin{bnf}
@@ -1961,7 +1961,7 @@
19611961

19621962
\begin{bnf}
19631963
\nontermdef{enumerator}\br
1964-
identifier attribute-specifier-seq\opt
1964+
identifier attribute-specifier-seq\opt{}
19651965
\end{bnf}
19661966

19671967
The optional \grammarterm{attribute-specifier-seq} in the \grammarterm{enum-head} and
@@ -2270,12 +2270,12 @@
22702270

22712271
\begin{bnf}
22722272
\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{\}}
22742274
\end{bnf}
22752275

22762276
\begin{bnf}
22772277
\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{\}}
22792279
\end{bnf}
22802280

22812281
\begin{bnf}
@@ -2291,7 +2291,7 @@
22912291

22922292
\begin{bnf}
22932293
\nontermdef{namespace-body}\br
2294-
declaration-seq\opt
2294+
declaration-seq\opt{}
22952295
\end{bnf}
22962296

22972297
\pnum
@@ -2602,7 +2602,7 @@
26022602

26032603
\begin{bnf}
26042604
\nontermdef{qualified-namespace-specifier}\br
2605-
nested-name-specifier\opt namespace-name
2605+
nested-name-specifier\opt{} namespace-name
26062606
\end{bnf}
26072607

26082608
\pnum
@@ -2642,13 +2642,13 @@
26422642

26432643
\begin{bnf}
26442644
\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{}
26472647
\end{bnf}
26482648

26492649
\begin{bnf}
26502650
\nontermdef{using-declarator}\br
2651-
\terminal{typename\opt} nested-name-specifier unqualified-id
2651+
\terminal{typename\opt{}} nested-name-specifier unqualified-id
26522652
\end{bnf}
26532653

26542654
\pnum
@@ -3117,7 +3117,7 @@
31173117

31183118
\begin{bnf}
31193119
\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{;}
31213121
\end{bnf}
31223122

31233123
\pnum
@@ -3592,7 +3592,7 @@
35923592

35933593
\begin{bnf}
35943594
\nontermdef{attribute-specifier-seq}\br
3595-
attribute-specifier-seq\opt attribute-specifier
3595+
attribute-specifier-seq\opt{} attribute-specifier
35963596
\end{bnf}
35973597

35983598
\begin{bnf}
@@ -3614,15 +3614,15 @@
36143614

36153615
\begin{bnf}
36163616
\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
36193619
attribute \terminal{...}\br
36203620
attribute-list \terminal{,} attribute \terminal{...}
36213621
\end{bnf}
36223622

36233623
\begin{bnf}
36243624
\nontermdef{attribute}\br
3625-
attribute-token attribute-argument-clause\opt
3625+
attribute-token attribute-argument-clause\opt{}
36263626
\end{bnf}
36273627

36283628
\begin{bnf}

0 commit comments

Comments
 (0)