Skip to content
Draft
Show file tree
Hide file tree
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
19 changes: 11 additions & 8 deletions source/lex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@
parenthesis is identified. The raw string literal is defined as the shortest sequence
of characters that matches the raw-string pattern
\begin{ncbnf}
\opt{encoding-prefix} \terminal{R} raw-string
\opt{encoding-prefix} raw-string
\end{ncbnf}

\item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
Expand Down Expand Up @@ -1799,8 +1799,13 @@
\indextext{literal!string}%
\begin{bnf}
\nontermdef{string-literal}\br
\opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br
\opt{encoding-prefix} \terminal{R} raw-string
\opt{encoding-prefix} plain-string-literal\br
\opt{encoding-prefix} raw-string
\end{bnf}

\begin{bnf}
\nontermdef{plain-string-literal}\br
\terminal{"} \opt{s-char-sequence} \terminal{"}
\end{bnf}

\begin{bnf}
Expand All @@ -1823,7 +1828,7 @@

\begin{bnf}
\nontermdef{raw-string}\br
\terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"}
\terminal{R} \terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"}
\end{bnf}

\begin{bnf}
Expand Down Expand Up @@ -2110,12 +2115,10 @@

\begin{bnf}
\nontermdef{unevaluated-string}\br
string-literal
plain-string-literal\br
raw-string
\end{bnf}

\pnum
An \grammarterm{unevaluated-string} shall have no \grammarterm{encoding-prefix}.

\pnum
Each \grammarterm{universal-character-name} and each \grammarterm{simple-escape-sequence} in an \grammarterm{unevaluated-string} is
replaced by the member of the translation character set it denotes.
Expand Down
12 changes: 3 additions & 9 deletions source/preprocessor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1805,7 +1805,7 @@
token in the replacement list.

\pnum
A \defn{character string literal} is a \grammarterm{string-literal} with no prefix.
A \defn{character string literal} is a \grammarterm{plain-string-literal}.
If, in the replacement list, a parameter is immediately
preceded by a
\tcode{\#}
Expand Down Expand Up @@ -2070,12 +2070,6 @@
\indextext{preprocessing directive!line control}%
\indextext{\idxcode{\#line}|see{preprocessing directive, line control}}

\pnum
The \grammarterm{string-literal} of a
\tcode{\#line}
directive, if present,
shall be a character string literal.

\pnum
The
\defn{line number}
Expand All @@ -2102,11 +2096,11 @@
\pnum
A preprocessing directive of the form
\begin{ncsimplebnf}
\terminal{\# line} digit-sequence \terminal{"} \opt{s-char-sequence} \terminal{"} new-line
\terminal{\# line} digit-sequence plain-string-literal new-line
\end{ncsimplebnf}
sets the presumed line number similarly and changes the
presumed name of the source file to be the contents
of the character string literal.
of the \grammarterm{plain-string-literal}.

\pnum
A preprocessing directive of the form
Expand Down