Skip to content

Commit d9cbb1c

Browse files
committed
Use \opt{arg} instead of suffix \opt{}
This was machine-converted using sed -i 's/\([-a-z]\{1,\}\)\opt{}/\opt{\1}/g' *.tex sed -i 's/::\opt{}/\opt{::}/g' *.tex sed -i 's/\(\terminal{[^}]*}\)\opt{}/\opt{\1}/g' *.tex
1 parent ad88795 commit d9cbb1c

17 files changed

+258
-258
lines changed

source/access.tex

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

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

206206
An

source/basic.tex

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

689689
\begin{ncbnf}
690-
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
690+
class-key \opt{attribute-specifier-seq} identifier \terminal{;}
691691
\end{ncbnf}
692692

693693
the \grammarterm{identifier} is declared to be a
@@ -1664,7 +1664,7 @@
16641664
\grammarterm{qualified-id} of the form:
16651665

16661666
\begin{ncbnf}
1667-
nested-name-specifier\opt{} class-name \terminal{::} \terminal{\tilde} class-name
1667+
\opt{nested-name-specifier} class-name \terminal{::} \terminal{\tilde} class-name
16681668
\end{ncbnf}
16691669

16701670
the second \grammarterm{class-name} is looked up in the same scope as the
@@ -2024,7 +2024,7 @@
20242024
following form:
20252025

20262026
\begin{ncbnf}
2027-
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
2027+
class-key \opt{attribute-specifier-seq} identifier \terminal{;}
20282028
\end{ncbnf}
20292029

20302030
the \grammarterm{identifier} is looked up according
@@ -2039,7 +2039,7 @@
20392039
form:
20402040

20412041
\begin{ncbnf}
2042-
class-key attribute-specifier-seq\opt{} identifier \terminal{;}
2042+
class-key \opt{attribute-specifier-seq} identifier \terminal{;}
20432043
\end{ncbnf}
20442044

20452045
the \grammarterm{elaborated-type-specifier} is a declaration that
@@ -2205,7 +2205,7 @@
22052205

22062206
\begin{bnf}
22072207
\nontermdef{translation-unit}\br
2208-
declaration-seq\opt{}
2208+
\opt{declaration-seq}
22092209
\end{bnf}
22102210

22112211
\pnum

source/classes.tex

Lines changed: 11 additions & 11 deletions
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}
@@ -441,13 +441,13 @@
441441

442442
\begin{bnf}
443443
\nontermdef{member-specification}\br
444-
member-declaration member-specification\opt{}\br
445-
access-specifier \terminal{:} member-specification\opt{}
444+
member-declaration \opt{member-specification}\br
445+
access-specifier \terminal{:} \opt{member-specification}
446446
\end{bnf}
447447

448448
\begin{bnf}
449449
\nontermdef{member-declaration}\br
450-
attribute-specifier-seq\opt{} decl-specifier-seq\opt{} member-declarator-list\opt{} \terminal{;}\br
450+
\opt{attribute-specifier-seq} \opt{decl-specifier-seq} \opt{member-declarator-list} \terminal{;}\br
451451
function-definition\br
452452
using-declaration\br
453453
static_assert-declaration\br
@@ -465,10 +465,10 @@
465465

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

474474
\begin{bnf}
@@ -1314,7 +1314,7 @@
13141314
A \grammarterm{member-declarator} of the form
13151315

13161316
\begin{ncbnftab}
1317-
identifier\opt{} attribute-specifier-seq\opt{} \terminal{:} constant-expression brace-or-equal-initializer\opt{}
1317+
\opt{identifier} \opt{attribute-specifier-seq} \terminal{:} constant-expression \opt{brace-or-equal-initializer}
13181318
\end{ncbnftab}
13191319

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

0 commit comments

Comments
 (0)