Skip to content

Commit ca59ff1

Browse files
committed
[cpp] Correctly identify preprocessor tokens vs, tokens
Most references to tokens in [cpp] correctly refer to preprocessing tokens that a materially different thng to a regular token. This commit addresses the last few places referring to a plain token where they should instead be referring to a preprocessing token. The remining usage of plain token where evaludating the predicate to directives is intentional, and trying to change to a preproccessing token would be an actual error.
1 parent ddff94a commit ca59ff1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

source/preprocessor.tex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
A \defn{preprocessing directive} consists of a sequence of preprocessing tokens
138138
that satisfies the following constraints:
139139
At the start of translation phase 4,
140-
the first token in the sequence,
140+
the first preprocessing token in the sequence,
141141
referred to as a \defnadj{directive-introducing}{token},
142142
begins with the first character in the source file
143143
(optionally after whitespace containing no new-line characters) or
@@ -172,7 +172,7 @@
172172
one of the two preceding forms.
173173
\end{itemize}
174174

175-
The last token in the sequence is the first token within the sequence that
175+
The last preprocessing token in the sequence is the first preprocessing token within the sequence that
176176
is immediately followed by whitespace containing a new-line character.
177177
\begin{footnote}
178178
Thus,
@@ -439,7 +439,7 @@
439439
\tcode{defined}
440440
unary operator),
441441
just as in normal text.
442-
If the token
442+
If the preprocessing token
443443
\tcode{defined}
444444
is generated as a result of this replacement process
445445
or use of the
@@ -756,7 +756,7 @@
756756
\pnum
757757
A \grammarterm{pp-module} shall not
758758
appear in a context where \tcode{module}
759-
or (if it is the first token of the \grammarterm{pp-module}) \tcode{export}
759+
or (if it is the first preprocessing token of the \grammarterm{pp-module}) \tcode{export}
760760
is an identifier defined as an object-like macro.
761761

762762
\pnum
@@ -817,7 +817,7 @@
817817
\pnum
818818
A \grammarterm{pp-import} shall not
819819
appear in a context where \tcode{import}
820-
or (if it is the first token of the \grammarterm{pp-import}) \tcode{export}
820+
or (if it is the first preprocessing token of the \grammarterm{pp-import}) \tcode{export}
821821
is an identifier defined as an object-like macro.
822822

823823
\pnum
@@ -1202,7 +1202,7 @@
12021202
For each parameter in the replacement list that is neither
12031203
preceded by a \tcode{\#} or \tcode{\#\#} preprocessing token nor
12041204
followed by a \tcode{\#\#} preprocessing token, the preprocessing tokens
1205-
naming the parameter are replaced by a token sequence determined as follows:
1205+
naming the parameter are replaced by a preprocessing token sequence determined as follows:
12061206
\begin{itemize}
12071207
\item
12081208
If the parameter is of the form \grammarterm{va-opt-replacement},
@@ -1408,7 +1408,7 @@
14081408
\end{note}
14091409
If the result is not a valid preprocessing token,
14101410
the behavior is undefined.
1411-
The resulting token is available for further macro replacement.
1411+
The resulting preprocessing token is available for further macro replacement.
14121412
The order of evaluation of
14131413
\tcode{\#\#}
14141414
operators is unspecified.
@@ -1451,7 +1451,7 @@
14511451
"hello, world"
14521452
\end{codeblock}
14531453

1454-
Space around the \tcode{\#} and \tcode{\#\#} tokens in the macro definition
1454+
Space around the \tcode{\#} and \tcode{\#\#} preprocessing tokens in the macro definition
14551455
is optional.
14561456
\end{example}
14571457

@@ -1477,8 +1477,8 @@
14771477
"x ## y"
14781478
\end{codeblock}
14791479

1480-
In other words, expanding \tcode{hash_hash} produces a new token,
1481-
consisting of two adjacent sharp signs, but this new token is not the
1480+
In other words, expanding \tcode{hash_hash} produces a new preprocessing token,
1481+
consisting of two adjacent sharp signs, but this new preprocessing token is not the
14821482
\tcode{\#\#} operator.
14831483
\end{example}
14841484

@@ -1603,7 +1603,7 @@
16031603
of the current source line is one greater than
16041604
the number of new-line characters read or introduced
16051605
in translation phase 1\iref{lex.phases}
1606-
while processing the source file to the current token.
1606+
while processing the source file to the current preprocessing token.
16071607

16081608
\pnum
16091609
A preprocessing directive of the form

0 commit comments

Comments
 (0)