Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cpp] Correctly identify preprocessor tokens vs, tokens #7482

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions source/preprocessor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,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 @@ -172,7 +172,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 @@ -439,7 +439,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 @@ -756,7 +756,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 @@ -817,7 +817,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 @@ -1202,7 +1202,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 @@ -1408,7 +1408,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 @@ -1451,7 +1451,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 @@ -1477,8 +1477,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 @@ -1603,7 +1603,7 @@
of the current source line 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
Loading