Skip to content

Commit

Permalink
[lex.header] Index both implementation-defined behaviors
Browse files Browse the repository at this point in the history
The convenient English augmenting the set of characters that
have implementation-defined semantics for a h-char-sequence
does not lend itself to the `impldef` macro, so essentially
create two duplicate sentences.  Then the footnote does not
clearly apply to either sentence, so turn it into a regular
note.  Next, to make the notes flow consistently, switch
the order of note and normative text in the first paragraph
to lead with the normative text.  Finally, take this
opportunity to clarify the specific characters called out
using the Unicode nomenclature used throughout this clause.
  • Loading branch information
AlisdairM committed Oct 21, 2024
1 parent f6b7ef3 commit 2712ba4
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions source/lex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -660,31 +660,36 @@
\end{bnf}

\pnum
The sequences in both forms of \grammarterm{header-name}{s} are mapped in an
\impldef{mapping header name to header or external source file} manner to headers or to
external source file names as specified in~\ref{cpp.include}.
\begin{note}
Header name preprocessing tokens only appear within
a \tcode{\#include} preprocessing directive,
a \tcode{__has_include} preprocessing expression, or
after certain occurrences of an \tcode{import} token
(see~\ref{lex.pptoken}).
\end{note}
The sequences in both forms of \grammarterm{header-name}{s} are mapped in an
\impldef{mapping header name to header or external source file} manner to headers or to
external source file names as specified in~\ref{cpp.include}.

\pnum
The appearance of either of the characters \tcode{'} or \tcode{\textbackslash} or of
either of the character sequences \tcode{/*} or \tcode{//} in a
\grammarterm{q-char-sequence} or an \grammarterm{h-char-sequence}
is conditionally-supported with \impldef{meaning of \tcode{'}, \tcode{\textbackslash},
\tcode{/*}, or \tcode{//} in a \grammarterm{q-char-sequence} or an
\grammarterm{h-char-sequence}} semantics, as is the appearance of the character
\tcode{"} in an \grammarterm{h-char-sequence}.
\begin{footnote}
The appearance of either of the characters \unicode{0027}{apostrophe},
\unicode{005c}{reverse solidus}, or of either of the character sequences
\tcode{/*} or \tcode{//} in a \grammarterm{q-char-sequence} is
conditionally-supported with
\impldef{meaning in a \grammarterm{q-char-sequence} of \tcode{'},
\tcode{\textbackslash}, \tcode{/*}, or \tcode{//}} semantics.
The appearance of any of the characters \unicode{0022}{quotation mark},
\unicode{0027}{apostrophe}, \unicode{005c}{reverse solidus}, or of either of the
character sequences \tcode{/*} or \tcode{//} in a \grammarterm{h-char-sequence}
is conditionally-supported with
\impldef{meaning in a \grammarterm{h-char-sequence} of \tcode{""}, \tcode{'},
\tcode{\textbackslash}, \tcode{/*}, or \tcode{//}} semantics.
\begin{note}
Thus, a sequence of characters
that resembles an escape sequence can result in an error, be interpreted as the
character corresponding to the escape sequence, or have a completely different meaning,
depending on the implementation.
\end{footnote}
\end{note}
\indextext{header!name|)}

\rSec1[lex.ppnumber]{Preprocessing numbers}
Expand Down

0 comments on commit 2712ba4

Please sign in to comment.