Skip to content

Commit 0e003d8

Browse files
jensmaurerzygoloid
authored andcommitted
Use \opt{arg} instead of suffix \opt{}
1 parent d29bd8c commit 0e003d8

18 files changed

+278
-276
lines changed

source/access.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
(\ref{class.derived}):
196196

197197
\begin{ncbnftab}
198-
access-specifier \terminal{:} member-specification\opt{}
198+
access-specifier \terminal{:} \opt{member-specification}
199199
\end{ncbnftab}
200200

201201
An

source/basic.tex

+5-5
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@
776776
\item for a declaration of the form
777777

778778
\begin{ncbnf}
779-
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
779+
class-key \opt{attribute-specifier-seq} identifier \terminal{;}
780780
\end{ncbnf}
781781

782782
the \grammarterm{identifier} is declared to be a
@@ -1775,7 +1775,7 @@
17751775
\grammarterm{qualified-id} of the form:
17761776

17771777
\begin{ncbnf}
1778-
nested-name-specifier\opt{} class-name \terminal{::} \terminal{\~} class-name
1778+
\opt{nested-name-specifier} class-name \terminal{::} \terminal{\~} class-name
17791779
\end{ncbnf}
17801780

17811781
the second \grammarterm{class-name} is looked up in the same scope as the
@@ -2135,7 +2135,7 @@
21352135
following form:
21362136

21372137
\begin{ncbnf}
2138-
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
2138+
class-key \opt{attribute-specifier-seq} identifier \terminal{;}
21392139
\end{ncbnf}
21402140

21412141
the \grammarterm{identifier} is looked up according
@@ -2150,7 +2150,7 @@
21502150
form:
21512151

21522152
\begin{ncbnf}
2153-
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
2153+
class-key \opt{attribute-specifier-seq} identifier \terminal{;}
21542154
\end{ncbnf}
21552155

21562156
the \grammarterm{elaborated-type-specifier} is a declaration that
@@ -2316,7 +2316,7 @@
23162316

23172317
\begin{bnf}
23182318
\nontermdef{translation-unit}\br
2319-
declaration-seq\opt{}
2319+
\opt{declaration-seq}
23202320
\end{bnf}
23212321

23222322
\pnum

source/classes.tex

+11-11
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@
2929

3030
\begin{bnf}
3131
\nontermdef{class-specifier}\br
32-
class-head \terminal{\{} member-specification\opt{} \terminal{\}}
32+
class-head \terminal{\{} \opt{member-specification} \terminal{\}}
3333
\end{bnf}
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 \opt{attribute-specifier-seq} class-head-name \opt{class-virt-specifier} \opt{base-clause}\br
38+
class-key \opt{attribute-specifier-seq} \opt{base-clause}
3939
\end{bnf}
4040

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

4646
\begin{bnf}
@@ -431,13 +431,13 @@
431431

432432
\begin{bnf}
433433
\nontermdef{member-specification}\br
434-
member-declaration member-specification\opt{}\br
435-
access-specifier \terminal{:} member-specification\opt{}
434+
member-declaration \opt{member-specification}\br
435+
access-specifier \terminal{:} \opt{member-specification}
436436
\end{bnf}
437437

438438
\begin{bnf}
439439
\nontermdef{member-declaration}\br
440-
attribute-specifier-seq\opt{} decl-specifier-seq\opt{} member-declarator-list\opt{} \terminal{;}\br
440+
\opt{attribute-specifier-seq} \opt{decl-specifier-seq} \opt{member-declarator-list} \terminal{;}\br
441441
function-definition\br
442442
using-declaration\br
443443
static_assert-declaration\br
@@ -455,10 +455,10 @@
455455

456456
\begin{bnf}
457457
\nontermdef{member-declarator}\br
458-
declarator virt-specifier-seq\opt{} pure-specifier\opt{}\br
458+
declarator \opt{virt-specifier-seq} \opt{pure-specifier}\br
459459
declarator requires-clause\br
460-
declarator brace-or-equal-initializer\opt{}\br
461-
identifier\opt{} attribute-specifier-seq\opt{} \terminal{:} constant-expression brace-or-equal-initializer\opt{}
460+
declarator \opt{brace-or-equal-initializer}\br
461+
\opt{identifier} \opt{attribute-specifier-seq} \terminal{:} constant-expression \opt{brace-or-equal-initializer}
462462
\end{bnf}
463463

464464
\begin{bnf}
@@ -1304,7 +1304,7 @@
13041304
A \grammarterm{member-declarator} of the form
13051305

13061306
\begin{ncbnftab}
1307-
identifier\opt{} attribute-specifier-seq\opt{} \terminal{:} constant-expression brace-or-equal-initializer\opt{}
1307+
\opt{identifier} \opt{attribute-specifier-seq} \terminal{:} constant-expression \opt{brace-or-equal-initializer}
13081308
\end{ncbnftab}
13091309

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

0 commit comments

Comments
 (0)