Skip to content

Commit f40dd88

Browse files
committed
[various] Remove \obeyspaces, and spell out spaces explicitly.
This allows us to switch to a simpler grammar extraction implementation.
1 parent 958532b commit f40dd88

File tree

5 files changed

+46
-46
lines changed

5 files changed

+46
-46
lines changed

source/declarations.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,7 @@
24302430
\end{bnf}
24312431

24322432
\begin{bnf}
2433-
\microtypesetup{protrusion=false}\obeyspaces
2433+
\microtypesetup{protrusion=false}
24342434
\nontermdef{ptr-operator}\br
24352435
\terminal{*} \opt{attribute-specifier-seq} \opt{cv-qualifier-seq}\br
24362436
\terminal{\&} \opt{attribute-specifier-seq}\br
@@ -9274,7 +9274,7 @@
92749274
\end{bnf}
92759275

92769276
\begin{bnf}
9277-
\microtypesetup{protrusion=false}\obeyspaces
9277+
\microtypesetup{protrusion=false}
92789278
\nontermdef{balanced-token}\br
92799279
\terminal{(} \opt{balanced-token-seq} \terminal{)}\br
92809280
\terminal{[} \opt{balanced-token-seq} \terminal{]}\br

source/expressions.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3136,7 +3136,7 @@
31363136
\end{bnf}
31373137

31383138
\begin{bnf}
3139-
\microtypesetup{protrusion=false}\obeyspaces
3139+
\microtypesetup{protrusion=false}
31403140
\nontermdef{requirement-body}\br
31413141
\terminal{\{} requirement-seq \terminal{\}}
31423142
\end{bnf}

source/lex.tex

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@
635635

636636
\indextext{header!name|(}%
637637
\begin{bnf}
638-
\microtypesetup{protrusion=false}\obeyspaces
638+
\microtypesetup{protrusion=false}
639639
\nontermdef{header-name}\br
640640
\terminal{<} h-char-sequence \terminal{>}\br
641641
\terminal{"} q-char-sequence \terminal{"}
@@ -735,23 +735,23 @@
735735

736736
\begin{bnf}
737737
%% Ed. note: character protrusion would misalign various operators.
738-
\microtypesetup{protrusion=false}\obeyspaces
738+
\microtypesetup{protrusion=false}
739739
\nontermdef{preprocessing-operator} \textnormal{one of}\br
740-
\terminal{\# \#\# \%: \%:\%:}
740+
\terminal{\# \ \ \ \ \ \ \ \#\# \ \ \ \ \ \ \%: \ \ \ \ \ \ \%:\%:}
741741
\end{bnf}
742742

743743
\begin{bnf}
744-
\microtypesetup{protrusion=false}\obeyspaces
744+
\microtypesetup{protrusion=false}
745745
\nontermdef{operator-or-punctuator} \textnormal{one of}\br
746-
\terminal{\{ \} [ ] ( )}\br
747-
\terminal{<\% \%> <: :> ; : ...}\br
748-
\terminal{? :: . .* -> ->* \~}\br
749-
\terminal{! + - * / \% \caret{} \& |}\br
750-
\terminal{= += -= *= /= \%= \caret{}= \&= |=}\br
751-
\terminal{== != < > <= >= <=> \&\& ||}\br
752-
\terminal{<< >> <<= >>= ++ -- ,}\br
753-
\terminal{\keyword{and} \keyword{or} \keyword{xor} \keyword{not} \keyword{bitand} \keyword{bitor} \keyword{compl}}\br
754-
\terminal{\keyword{and_eq} \keyword{or_eq} \keyword{xor_eq} \keyword{not_eq}}
746+
\terminal{\{ \ \ \ \ \ \ \ \} \ \ \ \ \ \ \ [ \ \ \ \ \ \ \ ] \ \ \ \ \ \ \ ( \ \ \ \ \ \ \ )}\br
747+
\terminal{<\% \ \ \ \ \ \ \%> \ \ \ \ \ \ <: \ \ \ \ \ \ :> \ \ \ \ \ \ ; \ \ \ \ \ \ \ : \ \ \ \ \ \ \ ...}\br
748+
\terminal{? \ \ \ \ \ \ \ :: \ \ \ \ \ \ . \ \ \ \ \ \ \ .* \ \ \ \ \ \ -> \ \ \ \ \ \ ->* \ \ \ \ \ \~}\br
749+
\terminal{! \ \ \ \ \ \ \ + \ \ \ \ \ \ \ - \ \ \ \ \ \ \ * \ \ \ \ \ \ \ / \ \ \ \ \ \ \ \% \ \ \ \ \ \ \ \caret{} \ \ \ \ \ \ \ \& \ \ \ \ \ \ \ |}\br
750+
\terminal{= \ \ \ \ \ \ \ += \ \ \ \ \ \ -= \ \ \ \ \ \ *= \ \ \ \ \ \ /= \ \ \ \ \ \ \%= \ \ \ \ \ \ \caret{}= \ \ \ \ \ \ \&= \ \ \ \ \ \ |=}\br
751+
\terminal{== \ \ \ \ \ \ != \ \ \ \ \ \ < \ \ \ \ \ \ \ > \ \ \ \ \ \ \ <= \ \ \ \ \ \ >= \ \ \ \ \ \ <=> \ \ \ \ \ \&\& \ \ \ \ \ \ ||}\br
752+
\terminal{<< \ \ \ \ \ \ >> \ \ \ \ \ \ <<= \ \ \ \ \ >>= \ \ \ \ \ ++ \ \ \ \ \ \ -- \ \ \ \ \ \ ,}\br
753+
\terminal{\keyword{and} \ \ \ \ \ \keyword{or} \ \ \ \ \ \ \keyword{xor} \ \ \ \ \ \keyword{not} \ \ \ \ \ \keyword{bitand} \ \ \keyword{bitor} \ \ \ \keyword{compl}}\br
754+
\terminal{\keyword{and_eq} \ \ \keyword{or_eq} \ \ \ \keyword{xor_eq} \ \ \keyword{not_eq}}
755755
\end{bnf}
756756

757757
Each \grammarterm{operator-or-punctuator} is converted to a single token

source/overloading.tex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3307,13 +3307,13 @@
33073307

33083308
\begin{bnf}
33093309
%% Ed. note: character protrusion would misalign various operators.
3310-
\microtypesetup{protrusion=false}\obeyspaces
3310+
\microtypesetup{protrusion=false}
33113311
\nontermdef{operator} \textnormal{one of}\br
3312-
\terminal{new delete new[] delete[] co_await (\rlap{\,)} [\rlap{\,]} -> ->*}\br
3313-
\terminal{\~ ! + - * / \% \caret{} \&}\br
3314-
\terminal{| = += -= *= /= \%= \caret{}= \&=}\br
3315-
\terminal{|= == != < > <= >= <=> \&\&}\br
3316-
\terminal{|| << >> <<= >>= ++ -- ,}\br
3312+
\terminal{new \ \ \ \ \ delete \ \ new[] \ \ \ delete[] co_await (\rlap{\,)} \ \ \ \ \ \ \ [\rlap{\,]} \ \ \ \ \ \ \ -> \ \ \ \ \ \ ->*}\br
3313+
\terminal{\~ \ \ \ \ \ \ \ ! \ \ \ \ \ \ \ + \ \ \ \ \ \ \ - \ \ \ \ \ \ \ * \ \ \ \ \ \ \ / \ \ \ \ \ \ \ \% \ \ \ \ \ \ \ \caret{} \ \ \ \ \ \ \ \&}\br
3314+
\terminal{| \ \ \ \ \ \ \ = \ \ \ \ \ \ \ += \ \ \ \ \ \ -= \ \ \ \ \ \ *= \ \ \ \ \ \ /= \ \ \ \ \ \ \%= \ \ \ \ \ \ \caret{}= \ \ \ \ \ \ \&=}\br
3315+
\terminal{|= \ \ \ \ \ \ == \ \ \ \ \ \ != \ \ \ \ \ \ < \ \ \ \ \ \ \ > \ \ \ \ \ \ \ <= \ \ \ \ \ \ >= \ \ \ \ \ \ <=> \ \ \ \ \ \&\&}\br
3316+
\terminal{|| \ \ \ \ \ \ << \ \ \ \ \ \ >> \ \ \ \ \ \ <<= \ \ \ \ \ >>= \ \ \ \ \ ++ \ \ \ \ \ \ -- \ \ \ \ \ \ ,}\br
33173317
\end{bnf}
33183318
\begin{note}
33193319
The operators
@@ -3331,17 +3331,17 @@
33313331

33323332
\pnum
33333333
Both the unary and binary forms of
3334-
\begin{ncsimplebnf}\obeyspaces
3335-
\terminal{+ - * \&}
3334+
\begin{ncsimplebnf}
3335+
\terminal{+ \ \ \ \ \ - \ \ \ \ \ * \ \ \ \ \ \&}
33363336
\end{ncsimplebnf}
33373337
can be overloaded.
33383338

33393339
\pnum
33403340
\begin{note}
33413341
\indextext{restriction!operator overloading}%
33423342
The following operators cannot be overloaded:
3343-
\begin{ncsimplebnf}\obeyspaces
3344-
\terminal{. .* :: ?:}
3343+
\begin{ncsimplebnf}
3344+
\terminal{. \ \ \ \ \ .* \ \ \ \ :: \ \ \ \ ?:}
33453345
\end{ncsimplebnf}
33463346
nor can the preprocessing symbols
33473347
\tcode{\#}\iref{cpp.stringize}

source/preprocessor.tex

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@
4545
\terminal{\#} conditionally-supported-directive
4646
\end{bnf}
4747

48-
\begin{bnf}\obeyspaces
48+
\begin{bnf}
4949
\nontermdef{control-line}\br
5050
\terminal{\# include} pp-tokens new-line\br
5151
pp-import\br
52-
\terminal{\# embed } pp-tokens new-line\br
52+
\terminal{\# embed \ } pp-tokens new-line\br
5353
\terminal{\# define } identifier replacement-list new-line\br
5454
\terminal{\# define } identifier lparen \opt{identifier-list} \terminal{)} replacement-list new-line\br
5555
\terminal{\# define } identifier lparen \terminal{... )} replacement-list new-line\br
5656
\terminal{\# define } identifier lparen identifier-list \terminal{, ... )} replacement-list new-line\br
57-
\terminal{\# undef } identifier new-line\br
58-
\terminal{\# line } pp-tokens new-line\br
59-
\terminal{\# error } \opt{pp-tokens} new-line\br
57+
\terminal{\# undef \ } identifier new-line\br
58+
\terminal{\# line \ \ } pp-tokens new-line\br
59+
\terminal{\# error \ } \opt{pp-tokens} new-line\br
6060
\terminal{\# warning} \opt{pp-tokens} new-line\br
6161
\terminal{\# pragma } \opt{pp-tokens} new-line\br
6262
\terminal{\# }new-line
@@ -67,10 +67,10 @@
6767
if-group \opt{elif-groups} \opt{else-group} endif-line
6868
\end{bnf}
6969

70-
\begin{bnf}\obeyspaces
70+
\begin{bnf}
7171
\nontermdef{if-group}\br
72-
\terminal{\# if } constant-expression new-line \opt{group}\br
73-
\terminal{\# ifdef } identifier new-line \opt{group}\br
72+
\terminal{\# if \ \ \ \ } constant-expression new-line \opt{group}\br
73+
\terminal{\# ifdef \ } identifier new-line \opt{group}\br
7474
\terminal{\# ifndef } identifier new-line \opt{group}
7575
\end{bnf}
7676

@@ -79,21 +79,21 @@
7979
elif-group \opt{elif-groups}
8080
\end{bnf}
8181

82-
\begin{bnf}\obeyspaces
82+
\begin{bnf}
8383
\nontermdef{elif-group}\br
84-
\terminal{\# elif } constant-expression new-line \opt{group}\br
84+
\terminal{\# elif \ \ \ } constant-expression new-line \opt{group}\br
8585
\terminal{\# elifdef } identifier new-line \opt{group}\br
8686
\terminal{\# elifndef} identifier new-line \opt{group}
8787
\end{bnf}
8888

89-
\begin{bnf}\obeyspaces
89+
\begin{bnf}
9090
\nontermdef{else-group}\br
91-
\terminal{\# else } new-line \opt{group}
91+
\terminal{\# else \ \ } new-line \opt{group}
9292
\end{bnf}
9393

94-
\begin{bnf}\obeyspaces
94+
\begin{bnf}
9595
\nontermdef{endif-line}\br
96-
\terminal{\# endif } new-line
96+
\terminal{\# endif \ } new-line
9797
\end{bnf}
9898

9999
\begin{bnf}
@@ -508,11 +508,11 @@
508508

509509
\pnum
510510
Preprocessing directives of the forms
511-
\begin{ncsimplebnf}\obeyspaces
511+
\begin{ncsimplebnf}
512512
\indextext{\idxcode{\#if}}%
513-
\terminal{\# if } constant-expression new-line \opt{group}\br
513+
\terminal{\# if \ \ \ \ } constant-expression new-line \opt{group}\br
514514
\indextext{\idxcode{\#elif}}%
515-
\terminal{\# elif } constant-expression new-line \opt{group}
515+
\terminal{\# elif \ \ } constant-expression new-line \opt{group}
516516
\end{ncsimplebnf}
517517
check whether the controlling constant expression evaluates to nonzero.
518518

@@ -585,10 +585,10 @@
585585

586586
\pnum
587587
Preprocessing directives of the forms
588-
\begin{ncsimplebnf}\obeyspaces
589-
\terminal{\# ifdef } identifier new-line \opt{group}\br
588+
\begin{ncsimplebnf}
589+
\terminal{\# ifdef \ \ } identifier new-line \opt{group}\br
590590
\indextext{\idxcode{\#ifdef}}%
591-
\terminal{\# ifndef } identifier new-line \opt{group}\br
591+
\terminal{\# ifndef \ } identifier new-line \opt{group}\br
592592
\indextext{\idxcode{\#ifndef}}%
593593
\terminal{\# elifdef } identifier new-line \opt{group}\br
594594
\indextext{\idxcode{\#elifdef}}%

0 commit comments

Comments
 (0)