Skip to content

Commit

Permalink
[cpp] Distinguish "preprocessing token" from "token" (#7482)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisdairM authored Dec 17, 2024
1 parent 7cbd07c commit 7fe908f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions source/preprocessor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
A \defn{preprocessing directive} consists of a sequence of preprocessing tokens
that satisfies the following constraints:
At the start of translation phase 4,
the first token in the sequence,
the first preprocessing token in the sequence,
referred to as a \defnadj{directive-introducing}{token},
begins with the first character in the source file
(optionally after whitespace containing no new-line characters) or
Expand Down Expand Up @@ -170,7 +170,7 @@
one of the two preceding forms.
\end{itemize}

The last token in the sequence is the first token within the sequence that
The last preprocessing token in the sequence is the first preprocessing token within the sequence that
is immediately followed by whitespace containing a new-line character.
\begin{footnote}
Thus,
Expand Down Expand Up @@ -446,7 +446,7 @@
\tcode{defined}
unary operator),
just as in normal text.
If the token
If the preprocessing token
\tcode{defined}
is generated as a result of this replacement process
or use of the
Expand Down Expand Up @@ -763,7 +763,7 @@
\pnum
A \grammarterm{pp-module} shall not
appear in a context where \tcode{module}
or (if it is the first token of the \grammarterm{pp-module}) \tcode{export}
or (if it is the first preprocessing token of the \grammarterm{pp-module}) \tcode{export}
is an identifier defined as an object-like macro.

\pnum
Expand Down Expand Up @@ -824,7 +824,7 @@
\pnum
A \grammarterm{pp-import} shall not
appear in a context where \tcode{import}
or (if it is the first token of the \grammarterm{pp-import}) \tcode{export}
or (if it is the first preprocessing token of the \grammarterm{pp-import}) \tcode{export}
is an identifier defined as an object-like macro.

\pnum
Expand Down Expand Up @@ -1209,7 +1209,7 @@
For each parameter in the replacement list that is neither
preceded by a \tcode{\#} or \tcode{\#\#} preprocessing token nor
followed by a \tcode{\#\#} preprocessing token, the preprocessing tokens
naming the parameter are replaced by a token sequence determined as follows:
naming the parameter are replaced by a preprocessing token sequence determined as follows:
\begin{itemize}
\item
If the parameter is of the form \grammarterm{va-opt-replacement},
Expand Down Expand Up @@ -1415,7 +1415,7 @@
\end{note}
If the result is not a valid preprocessing token,
the behavior is undefined.
The resulting token is available for further macro replacement.
The resulting preprocessing token is available for further macro replacement.
The order of evaluation of
\tcode{\#\#}
operators is unspecified.
Expand Down Expand Up @@ -1458,7 +1458,7 @@
"hello, world"
\end{codeblock}

Space around the \tcode{\#} and \tcode{\#\#} tokens in the macro definition
Space around the \tcode{\#} and \tcode{\#\#} preprocessing tokens in the macro definition
is optional.
\end{example}

Expand All @@ -1484,8 +1484,8 @@
"x ## y"
\end{codeblock}

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

Expand Down Expand Up @@ -1612,7 +1612,7 @@
i.e., it is one greater than
the number of new-line characters read or introduced
in translation phase 1\iref{lex.phases}
while processing the source file to the current token.
while processing the source file to the current preprocessing token.

\pnum
A preprocessing directive of the form
Expand Down

0 comments on commit 7fe908f

Please sign in to comment.