Skip to content

Commit a832346

Browse files
committed
Typographic fixes, spacing after \opt
* occurrences of "\opt \terminal{" apparently always require "\opt{}" to not eat the intervening space (despite the \xspace in the definition of \opt) * cleaned up two occurrences of "\opt\ " (in noptr-abstract-pack-declarator \terminal{[} constant-expression\opt\ \terminal{]} attribute-specifier-seq\opt\br in declarators.tex and grammar.tex) to consistenly use "\opt{}" instead * cleaned up two occurrences of "\opt{}" (in pp-tokens\opt{} new-line in grammar.tex and preprocessor.tex) that did not need the "{}"
1 parent f60466c commit a832346

14 files changed

+115
-115
lines changed

source/classes.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
\begin{bnf}
3232
\nontermdef{class-specifier}\br
33-
class-head \terminal{\{} member-specification\opt \terminal{\}}
33+
class-head \terminal{\{} member-specification\opt{} \terminal{\}}
3434
\end{bnf}
3535

3636
\begin{bnf}
@@ -449,7 +449,7 @@
449449

450450
\begin{bnf}
451451
\nontermdef{member-declaration}\br
452-
attribute-specifier-seq\opt decl-specifier-seq\opt member-declarator-list\opt \terminal{;}\br
452+
attribute-specifier-seq\opt decl-specifier-seq\opt member-declarator-list\opt{} \terminal{;}\br
453453
function-definition\br
454454
using-declaration\br
455455
static_assert-declaration\br
@@ -468,7 +468,7 @@
468468
\nontermdef{member-declarator}\br
469469
declarator virt-specifier-seq\opt pure-specifier\opt\br
470470
declarator brace-or-equal-initializer\opt\br
471-
identifier\opt attribute-specifier-seq\opt \terminal{:} constant-expression
471+
identifier\opt attribute-specifier-seq\opt{} \terminal{:} constant-expression
472472
\end{bnf}
473473

474474
\begin{bnf}
@@ -1390,7 +1390,7 @@
13901390
A \grammarterm{member-declarator} of the form
13911391

13921392
\begin{ncbnftab}
1393-
identifier\opt attribute-specifier-seq\opt \terminal{:} constant-expression
1393+
identifier\opt attribute-specifier-seq\opt{} \terminal{:} constant-expression
13941394
\end{ncbnftab}
13951395

13961396
\indextext{\idxcode{:}!field declaration}%

source/declarations.tex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444

4545
\begin{bnf}
4646
\nontermdef{alias-declaration}\br
47-
\terminal{using} identifier attribute-specifier-seq\opt \terminal{=} type-id \terminal{;}
47+
\terminal{using} identifier attribute-specifier-seq\opt{} \terminal{=} type-id \terminal{;}
4848
\end{bnf}
4949

5050
\begin{bnf}
5151
\nontermdef{simple-declaration}\br
52-
decl-specifier-seq\opt init-declarator-list\opt \terminal{;}\br
52+
decl-specifier-seq\opt init-declarator-list\opt{} \terminal{;}\br
5353
attribute-specifier-seq decl-specifier-seq\opt init-declarator-list \terminal{;}
5454
\end{bnf}
5555

@@ -84,7 +84,7 @@
8484
\grammarterm{simple-declaration}
8585

8686
\begin{ncsimplebnf}
87-
attribute-specifier-seq\opt decl-specifier-seq\opt init-declarator-list\opt \terminal{;}
87+
attribute-specifier-seq\opt decl-specifier-seq\opt init-declarator-list\opt{} \terminal{;}
8888
\end{ncsimplebnf}
8989

9090
is divided into three parts.
@@ -1778,7 +1778,7 @@
17781778

17791779
\begin{bnf}
17801780
\nontermdef{enum-specifier}\br
1781-
enum-head \terminal{\{} enumerator-list\opt \terminal{\}}\br
1781+
enum-head \terminal{\{} enumerator-list\opt{} \terminal{\}}\br
17821782
enum-head \terminal{\{} enumerator-list \terminal{, \}}
17831783
\end{bnf}
17841784

@@ -1791,7 +1791,7 @@
17911791

17921792
\begin{bnf}
17931793
\nontermdef{opaque-enum-declaration}\br
1794-
enum-key attribute-specifier-seq\opt identifier enum-base\opt \terminal{;}
1794+
enum-key attribute-specifier-seq\opt identifier enum-base\opt{} \terminal{;}
17951795
\end{bnf}
17961796

17971797
\begin{bnf}
@@ -2130,7 +2130,7 @@
21302130

21312131
\begin{bnf}
21322132
\nontermdef{unnamed-namespace-definition}\br
2133-
\terminal{inline\opt} \terminal{namespace} attribute-specifier-seq\opt \terminal{\{} namespace-body \terminal{\}}
2133+
\terminal{inline\opt} \terminal{namespace} attribute-specifier-seq\opt{} \terminal{\{} namespace-body \terminal{\}}
21342134
\end{bnf}
21352135

21362136
\begin{bnf}
@@ -2283,7 +2283,7 @@
22832283
replaced by
22842284

22852285
\begin{ncsimplebnf}
2286-
\terminal{inline}\opt \terminal{namespace} \uniquens{} \terminal{\{ /* empty body */ \}}\br
2286+
\terminal{inline}\opt{} \terminal{namespace} \uniquens{} \terminal{\{ /* empty body */ \}}\br
22872287
\terminal{using namespace} \uniquens{} \terminal{;}\br
22882288
\terminal{namespace} \uniquens{} \terminal{\{} namespace-body \terminal{\}}
22892289
\end{ncsimplebnf}
@@ -2908,7 +2908,7 @@
29082908

29092909
\begin{bnf}
29102910
\nontermdef{using-directive}\br
2911-
attribute-specifier-seq\opt \terminal{using namespace} nested-name-specifier\opt namespace-name \terminal{;}
2911+
attribute-specifier-seq\opt{} \terminal{using namespace} nested-name-specifier\opt namespace-name \terminal{;}
29122912
\end{bnf}
29132913

29142914
\pnum
@@ -3161,7 +3161,7 @@
31613161
%
31623162
\begin{bnf}
31633163
\nontermdef{linkage-specification}\br
3164-
\terminal{extern} string-literal \terminal{\{} declaration-seq\opt \terminal{\}}\br
3164+
\terminal{extern} string-literal \terminal{\{} declaration-seq\opt{} \terminal{\}}\br
31653165
\terminal{extern} string-literal declaration
31663166
\end{bnf}
31673167

@@ -3403,8 +3403,8 @@
34033403

34043404
\begin{bnf}
34053405
\nontermdef{alignment-specifier}\br
3406-
\terminal{alignas (} type-id \terminal{...}\opt \terminal{)}\br
3407-
\terminal{alignas (} constant-expression \terminal{...}\opt \terminal{)}
3406+
\terminal{alignas (} type-id \terminal{...}\opt{} \terminal{)}\br
3407+
\terminal{alignas (} constant-expression \terminal{...}\opt{} \terminal{)}
34083408
\end{bnf}
34093409

34103410
\begin{bnf}

source/declarators.tex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
\nontermdef{noptr-declarator}\br
122122
declarator-id attribute-specifier-seq\opt\br
123123
noptr-declarator parameters-and-qualifiers\br
124-
noptr-declarator \terminal{[} constant-expression\opt \terminal{]} attribute-specifier-seq\opt\br
124+
noptr-declarator \terminal{[} constant-expression\opt{} \terminal{]} attribute-specifier-seq\opt\br
125125
\terminal{(} ptr-declarator \terminal{)}
126126
\end{bnf}
127127

@@ -218,7 +218,7 @@
218218
\begin{bnf}
219219
\nontermdef{noptr-abstract-declarator}\br
220220
noptr-abstract-declarator\opt parameters-and-qualifiers\br
221-
noptr-abstract-declarator\opt \terminal{[} constant-expression\opt{} \terminal{]} attribute-specifier-seq\opt\br
221+
noptr-abstract-declarator\opt{} \terminal{[} constant-expression\opt{} \terminal{]} attribute-specifier-seq\opt\br
222222
\terminal{(} ptr-abstract-declarator \terminal{)}
223223
\end{bnf}
224224

@@ -231,7 +231,7 @@
231231
\begin{bnf}
232232
\nontermdef{noptr-abstract-pack-declarator}\br
233233
noptr-abstract-pack-declarator parameters-and-qualifiers\br
234-
noptr-abstract-pack-declarator \terminal{[} constant-expression\opt\ \terminal{]} attribute-specifier-seq\opt\br
234+
noptr-abstract-pack-declarator \terminal{[} constant-expression\opt{} \terminal{]} attribute-specifier-seq\opt\br
235235
\terminal{...}
236236
\end{bnf}
237237

@@ -583,7 +583,7 @@
583583
has the form
584584

585585
\begin{ncsimplebnf}
586-
\terminal{*} attribute-specifier-seq\opt cv-qualifier-seq\opt \terminal{D1}
586+
\terminal{*} attribute-specifier-seq\opt cv-qualifier-seq\opt{} \terminal{D1}
587587
\end{ncsimplebnf}
588588

589589
and the type of the identifier in the declaration
@@ -697,8 +697,8 @@
697697
has either of the forms
698698

699699
\begin{ncsimplebnf}
700-
\terminal{\&} attribute-specifier-seq\opt \terminal{D1}\br
701-
\terminal{\&\&} attribute-specifier-seq\opt \terminal{D1}
700+
\terminal{\&} attribute-specifier-seq\opt{} \terminal{D1}\br
701+
\terminal{\&\&} attribute-specifier-seq\opt{} \terminal{D1}
702702
\end{ncsimplebnf}
703703

704704
and the type of the identifier in the declaration
@@ -1003,7 +1003,7 @@
10031003
has the form
10041004

10051005
\begin{ncsimplebnf}
1006-
\terminal{D1 [} constant-expression\opt \terminal{]} attribute-specifier-seq\opt
1006+
\terminal{D1 [} constant-expression\opt{} \terminal{]} attribute-specifier-seq\opt
10071007
\end{ncsimplebnf}
10081008

10091009
and the type of the identifier in the declaration
@@ -1357,7 +1357,7 @@
13571357
\indextext{declaration!function}%
13581358
\begin{bnf}
13591359
\nontermdef{parameter-declaration-clause}\br
1360-
parameter-declaration-list\opt \terminal{...}\opt\br
1360+
parameter-declaration-list\opt{} \terminal{...}\opt\br
13611361
parameter-declaration-list \terminal{, ...}
13621362
\end{bnf}
13631363

@@ -1372,7 +1372,7 @@
13721372
attribute-specifier-seq\opt decl-specifier-seq declarator\br
13731373
attribute-specifier-seq\opt decl-specifier-seq declarator \terminal{=} initializer-clause\br
13741374
attribute-specifier-seq\opt decl-specifier-seq abstract-declarator\opt\br
1375-
attribute-specifier-seq\opt decl-specifier-seq abstract-declarator\opt \terminal{=} initializer-clause
1375+
attribute-specifier-seq\opt decl-specifier-seq abstract-declarator\opt{} \terminal{=} initializer-clause
13761376
\end{bnf}
13771377

13781378
The optional \grammarterm{attribute-specifier-seq} in a \grammarterm{parameter-declaration}
@@ -2182,7 +2182,7 @@
21822182
A function definition of the form:
21832183

21842184
\begin{ncbnf}
2185-
attribute-specifier-seq\opt decl-specifier-seq\opt declarator virt-specifier-seq\opt \terminal{ = default ;}
2185+
attribute-specifier-seq\opt decl-specifier-seq\opt declarator virt-specifier-seq\opt{} \terminal{ = default ;}
21862186
\end{ncbnf}
21872187

21882188
is called an \grammarterm{explicitly-defaulted} definition.
@@ -2284,7 +2284,7 @@
22842284
A function definition of the form:
22852285

22862286
\begin{ncbnf}
2287-
attribute-specifier-seq\opt decl-specifier-seq\opt declarator virt-specifier-seq\opt \terminal{ = delete ;}
2287+
attribute-specifier-seq\opt decl-specifier-seq\opt declarator virt-specifier-seq\opt{} \terminal{ = delete ;}
22882288
\end{ncbnf}
22892289

22902290
is called a \term{deleted definition}. A function with a

source/derived.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
\begin{bnf}
3232
\nontermdef{base-specifier}\br
3333
attribute-specifier-seq\opt base-type-specifier\br
34-
attribute-specifier-seq\opt \terminal{virtual} access-specifier\opt base-type-specifier\br
34+
attribute-specifier-seq\opt{} \terminal{virtual} access-specifier\opt base-type-specifier\br
3535
attribute-specifier-seq\opt access-specifier \terminal{virtual}\opt base-type-specifier
3636
\end{bnf}
3737

source/exceptions.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@
700700

701701
\begin{bnf}
702702
\nontermdef{dynamic-exception-specification}\br
703-
\terminal{throw (} type-id-list\opt \terminal{)}
703+
\terminal{throw (} type-id-list\opt{} \terminal{)}
704704
\end{bnf}
705705

706706
\begin{bnf}

source/expressions.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@
583583

584584
\begin{bnf}
585585
\nontermdef{lambda-introducer}\br
586-
\terminal{[} lambda-capture\opt \terminal{]}
586+
\terminal{[} lambda-capture\opt{} \terminal{]}
587587
\end{bnf}
588588

589589
\begin{bnf}
@@ -1249,9 +1249,9 @@
12491249
primary-expression\br
12501250
postfix-expression \terminal{[} expression \terminal{]}\br
12511251
postfix-expression \terminal{[} braced-init-list \terminal{]}\br
1252-
postfix-expression \terminal{(} expression-list\opt \terminal{)}\br
1253-
simple-type-specifier \terminal{(} expression-list\opt \terminal{)}\br
1254-
typename-specifier \terminal{(} expression-list\opt \terminal{)}\br
1252+
postfix-expression \terminal{(} expression-list\opt{} \terminal{)}\br
1253+
simple-type-specifier \terminal{(} expression-list\opt{} \terminal{)}\br
1254+
typename-specifier \terminal{(} expression-list\opt{} \terminal{)}\br
12551255
simple-type-specifier braced-init-list\br
12561256
typename-specifier braced-init-list\br
12571257
postfix-expression \terminal{. template}\opt id-expression\br
@@ -2816,8 +2816,8 @@
28162816

28172817
\begin{bnf}
28182818
\nontermdef{new-expression}\br
2819-
\terminal{::}\opt \terminal{new} new-placement\opt new-type-id new-initializer\opt \br
2820-
\terminal{::}\opt \terminal{new} new-placement\opt \terminal{(} type-id \terminal{)} new-initializer\opt
2819+
\terminal{::}\opt{} \terminal{new} new-placement\opt new-type-id new-initializer\opt \br
2820+
\terminal{::}\opt{} \terminal{new} new-placement\opt{} \terminal{(} type-id \terminal{)} new-initializer\opt
28212821
\end{bnf}
28222822

28232823
\indextext{\idxcode{new}!storage allocation}%
@@ -2846,7 +2846,7 @@
28462846

28472847
\begin{bnf}
28482848
\nontermdef{new-initializer}\br
2849-
\terminal{(} expression-list\opt \terminal{)}\br
2849+
\terminal{(} expression-list\opt{} \terminal{)}\br
28502850
braced-init-list
28512851
\end{bnf}
28522852

@@ -3322,8 +3322,8 @@
33223322

33233323
\begin{bnf}
33243324
\nontermdef{delete-expression}\br
3325-
\terminal{::}\opt \terminal{delete} cast-expression\br
3326-
\terminal{::}\opt \terminal{delete [ ]} cast-expression
3325+
\terminal{::}\opt{} \terminal{delete} cast-expression\br
3326+
\terminal{::}\opt{} \terminal{delete [ ]} cast-expression
33273327
\end{bnf}
33283328

33293329
The first alternative is for non-array objects, and the second is for arrays. Whenever

0 commit comments

Comments
 (0)