Skip to content

Commit af32b0f

Browse files
committed
Use cxxdraft-htmlgen macros to annotate non-C++ code and literal fragments.
1 parent acdcba3 commit af32b0f

File tree

4 files changed

+395
-395
lines changed

4 files changed

+395
-395
lines changed

source/exceptions.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@
135135
Any exception thrown while destroying
136136
\tcode{t2}
137137
will result in executing
138-
\tcode{handler 2};
138+
\noncxxtcode{handler 2};
139139
any exception thrown while destroying
140140
\tcode{t1}
141141
will result in executing
142-
\tcode{handler 1}.
142+
\noncxxtcode{handler 1}.
143143
\end{example}
144144

145145
\pnum

source/lex.tex

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327

328328
\begin{bnf}
329329
\nontermdef{named-universal-character}\br
330-
\terminal{\textbackslash N\{} n-char-sequence \terminal{\}}
330+
\literalterminal{\textbackslash N\{} n-char-sequence \literalterminal{\}}
331331
\end{bnf}
332332

333333
\begin{bnf}
@@ -343,17 +343,17 @@
343343

344344
\begin{bnf}
345345
\nontermdef{universal-character-name}\br
346-
\terminal{\textbackslash u} hex-quad\br
347-
\terminal{\textbackslash U} hex-quad hex-quad\br
348-
\terminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \terminal{\}}\br
346+
\literalterminal{\textbackslash u} hex-quad\br
347+
\literalterminal{\textbackslash U} hex-quad hex-quad\br
348+
\literalterminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \literalterminal{\}}\br
349349
named-universal-character
350350
\end{bnf}
351351

352352
\pnum
353353
A \grammarterm{universal-character-name}
354-
of the form \tcode{\textbackslash u} \grammarterm{hex-quad},
355-
\tcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or
356-
\tcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}}
354+
of the form \literaltcode{\textbackslash u} \grammarterm{hex-quad},
355+
\literaltcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or
356+
\literaltcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}}
357357
designates the character in the translation character set
358358
whose Unicode scalar value is the hexadecimal number represented by
359359
the sequence of \grammarterm{hexadecimal-digit}s
@@ -514,15 +514,15 @@
514514
\item
515515
\indextext{literal!string!raw}%
516516
If the next character begins a sequence of characters that could be the prefix
517-
and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing
517+
and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing
518518
token shall be a raw string literal. Between the initial and final
519519
double quote characters of the raw string, any transformations performed in phase
520520
2 (line splicing) are reverted; this reversion
521521
shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
522522
parenthesis is identified. The raw string literal is defined as the shortest sequence
523523
of characters that matches the raw-string pattern
524524
\begin{ncbnf}
525-
\opt{encoding-prefix} \terminal{R} raw-string
525+
\opt{encoding-prefix} \literalterminal{R} raw-string
526526
\end{ncbnf}
527527

528528
\item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
@@ -753,15 +753,15 @@
753753
\begin{bnf}
754754
\nontermdef{pp-number}\br
755755
digit\br
756-
\terminal{.} digit\br
756+
\literalterminal{.} digit\br
757757
pp-number identifier-continue\br
758-
pp-number \terminal{'} digit\br
759-
pp-number \terminal{'} nondigit\br
760-
pp-number \terminal{e} sign\br
761-
pp-number \terminal{E} sign\br
762-
pp-number \terminal{p} sign\br
763-
pp-number \terminal{P} sign\br
764-
pp-number \terminal{.}
758+
pp-number \literalterminal{'} digit\br
759+
pp-number \literalterminal{'} nondigit\br
760+
pp-number \literalterminal{e} sign\br
761+
pp-number \literalterminal{E} sign\br
762+
pp-number \literalterminal{p} sign\br
763+
pp-number \literalterminal{P} sign\br
764+
pp-number \literalterminal{.}
765765
\end{bnf}
766766

767767
\pnum
@@ -1101,19 +1101,19 @@
11011101
\nontermdef{binary-literal}\br
11021102
\terminal{0b} binary-digit\br
11031103
\terminal{0B} binary-digit\br
1104-
binary-literal \opt{\terminal{'}} binary-digit
1104+
binary-literal \opt{\literalterminal{'}} binary-digit
11051105
\end{bnf}
11061106

11071107
\begin{bnf}
11081108
\nontermdef{octal-literal}\br
11091109
\terminal{0}\br
1110-
octal-literal \opt{\terminal{'}} octal-digit
1110+
octal-literal \opt{\literalterminal{'}} octal-digit
11111111
\end{bnf}
11121112

11131113
\begin{bnf}
11141114
\nontermdef{decimal-literal}\br
11151115
nonzero-digit\br
1116-
decimal-literal \opt{\terminal{'}} digit
1116+
decimal-literal \opt{\literalterminal{'}} digit
11171117
\end{bnf}
11181118

11191119
\begin{bnf}
@@ -1144,14 +1144,14 @@
11441144
\begin{bnf}
11451145
\nontermdef{hexadecimal-digit-sequence}\br
11461146
hexadecimal-digit\br
1147-
hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit
1147+
hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit
11481148
\end{bnf}
11491149

11501150
\begin{bnf}
11511151
\nontermdef{hexadecimal-digit} \textnormal{one of}\br
1152-
\terminal{0 1 2 3 4 5 6 7 8 9}\br
1153-
\terminal{a b c d e f}\br
1154-
\terminal{A B C D E F}
1152+
\literalterminal{0 1 2 3 4 5 6 7 8 9}\br
1153+
\literalterminal{a b c d e f}\br
1154+
\literalterminal{A B C D E F}
11551155
\end{bnf}
11561156

11571157
\begin{bnf}
@@ -1166,17 +1166,17 @@
11661166

11671167
\begin{bnf}
11681168
\nontermdef{unsigned-suffix} \textnormal{one of}\br
1169-
\terminal{u U}
1169+
\literalterminal{u U}
11701170
\end{bnf}
11711171

11721172
\begin{bnf}
11731173
\nontermdef{long-suffix} \textnormal{one of}\br
1174-
\terminal{l L}
1174+
\literalterminal{l L}
11751175
\end{bnf}
11761176

11771177
\begin{bnf}
11781178
\nontermdef{long-long-suffix} \textnormal{one of}\br
1179-
\terminal{ll LL}
1179+
\literalterminal{ll LL}
11801180
\end{bnf}
11811181

11821182
\begin{bnf}
@@ -1215,7 +1215,7 @@
12151215

12161216
\pnum
12171217
The \grammarterm{hexadecimal-digit}s
1218-
\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F}
1218+
\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F}
12191219
have decimal values ten through fifteen.
12201220
\begin{example}
12211221
The number twelve can be written \tcode{12}, \tcode{014},
@@ -1259,7 +1259,7 @@
12591259
&
12601260
&
12611261
\tcode{unsigned long long int}\\\hline
1262-
\tcode{u} or \tcode{U} &
1262+
\literaltcode{u} or \literaltcode{U} &
12631263
\tcode{unsigned int} &
12641264
\tcode{unsigned int}\\
12651265
&
@@ -1268,7 +1268,7 @@
12681268
&
12691269
\tcode{unsigned long long int} &
12701270
\tcode{unsigned long long int}\\\hline
1271-
\tcode{l} or \tcode{L} &
1271+
\literaltcode{l} or \literaltcode{L} &
12721272
\tcode{long int} &
12731273
\tcode{long int}\\
12741274
&
@@ -1280,22 +1280,22 @@
12801280
&
12811281
&
12821282
\tcode{unsigned long long int}\\\hline
1283-
Both \tcode{u} or \tcode{U} &
1283+
Both \literaltcode{u} or \literaltcode{U} &
12841284
\tcode{unsigned long int} &
12851285
\tcode{unsigned long int}\\
1286-
and \tcode{l} or \tcode{L} &
1286+
and \literaltcode{l} or \literaltcode{L} &
12871287
\tcode{unsigned long long int} &
12881288
\tcode{unsigned long long int}\\\hline
1289-
\tcode{ll} or \tcode{LL} &
1289+
\literaltcode{ll} or \literaltcode{LL} &
12901290
\tcode{long long int} &
12911291
\tcode{long long int}\\
12921292
&
12931293
&
12941294
\tcode{unsigned long long int}\\\hline
1295-
Both \tcode{u} or \tcode{U} &
1295+
Both \literaltcode{u} or \literaltcode{U} &
12961296
\tcode{unsigned long long int} &
12971297
\tcode{unsigned long long int}\\
1298-
and \tcode{ll} or \tcode{LL} &
1298+
and \literaltcode{ll} or \literaltcode{LL} &
12991299
&
13001300
\\\hline
13011301
\tcode{z} or \tcode{Z} &
@@ -1337,12 +1337,12 @@
13371337
\indextext{literal!character}%
13381338
\begin{bnf}
13391339
\nontermdef{character-literal}\br
1340-
\opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'}
1340+
\opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'}
13411341
\end{bnf}
13421342

13431343
\begin{bnf}
13441344
\nontermdef{encoding-prefix} \textnormal{one of}\br
1345-
\terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L}
1345+
\literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L}
13461346
\end{bnf}
13471347

13481348
\begin{bnf}
@@ -1395,16 +1395,16 @@
13951395

13961396
\begin{bnf}
13971397
\nontermdef{octal-escape-sequence}\br
1398-
\terminal{\textbackslash} octal-digit\br
1399-
\terminal{\textbackslash} octal-digit octal-digit\br
1400-
\terminal{\textbackslash} octal-digit octal-digit octal-digit\br
1401-
\terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}\br
1398+
\literalterminal{\textbackslash} octal-digit\br
1399+
\literalterminal{\textbackslash} octal-digit octal-digit\br
1400+
\literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br
1401+
\literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}\br
14021402
\end{bnf}
14031403

14041404
\begin{bnf}
14051405
\nontermdef{hexadecimal-escape-sequence}\br
1406-
\terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1407-
\terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}}
1406+
\literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1407+
\literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}}
14081408
\end{bnf}
14091409

14101410
\begin{bnf}
@@ -1621,42 +1621,42 @@
16211621

16221622
\begin{bnf}
16231623
\nontermdef{fractional-constant}\br
1624-
\opt{digit-sequence} \terminal{.} digit-sequence\br
1625-
digit-sequence \terminal{.}
1624+
\opt{digit-sequence} \literalterminal{.} digit-sequence\br
1625+
digit-sequence \literalterminal{.}
16261626
\end{bnf}
16271627

16281628
\begin{bnf}
16291629
\nontermdef{hexadecimal-fractional-constant}\br
1630-
\opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br
1631-
hexadecimal-digit-sequence \terminal{.}
1630+
\opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br
1631+
hexadecimal-digit-sequence \literalterminal{.}
16321632
\end{bnf}
16331633

16341634
\begin{bnf}
16351635
\nontermdef{exponent-part}\br
1636-
\terminal{e} \opt{sign} digit-sequence\br
1637-
\terminal{E} \opt{sign} digit-sequence
1636+
\literalterminal{e} \opt{sign} digit-sequence\br
1637+
\literalterminal{E} \opt{sign} digit-sequence
16381638
\end{bnf}
16391639

16401640
\begin{bnf}
16411641
\nontermdef{binary-exponent-part}\br
1642-
\terminal{p} \opt{sign} digit-sequence\br
1643-
\terminal{P} \opt{sign} digit-sequence
1642+
\literalterminal{p} \opt{sign} digit-sequence\br
1643+
\literalterminal{P} \opt{sign} digit-sequence
16441644
\end{bnf}
16451645

16461646
\begin{bnf}
16471647
\nontermdef{sign} \textnormal{one of}\br
1648-
\terminal{+ -}
1648+
\literalterminal{+ -}
16491649
\end{bnf}
16501650

16511651
\begin{bnf}
16521652
\nontermdef{digit-sequence}\br
16531653
digit\br
1654-
digit-sequence \opt{\terminal{'}} digit
1654+
digit-sequence \opt{\literalterminal{'}} digit
16551655
\end{bnf}
16561656

16571657
\begin{bnf}
16581658
\nontermdef{floating-point-suffix} \textnormal{one of}\br
1659-
\terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16}
1659+
\literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16}
16601660
\end{bnf}
16611661

16621662
\pnum
@@ -1684,13 +1684,13 @@
16841684
\topline
16851685
\lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
16861686
none & \keyword{double} \\
1687-
\tcode{f} or \tcode{F} & \keyword {float} \\
1688-
\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\
1689-
\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\
1690-
\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\
1691-
\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\
1692-
\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\
1693-
\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\
1687+
\literaltcode{f} or \literaltcode{F} & \keyword {float} \\
1688+
\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\
1689+
\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\
1690+
\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\
1691+
\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\
1692+
\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\
1693+
\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\
16941694
\end{simpletypetable}
16951695

16961696
\pnum
@@ -1741,8 +1741,8 @@
17411741
\indextext{literal!string}%
17421742
\begin{bnf}
17431743
\nontermdef{string-literal}\br
1744-
\opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br
1745-
\opt{encoding-prefix} \terminal{R} raw-string
1744+
\opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br
1745+
\opt{encoding-prefix} \literalterminal{R} raw-string
17461746
\end{bnf}
17471747

17481748
\begin{bnf}
@@ -1766,7 +1766,7 @@
17661766

17671767
\begin{bnf}
17681768
\nontermdef{raw-string}\br
1769-
\terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"}
1769+
\literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"}
17701770
\end{bnf}
17711771

17721772
\begin{bnf}
@@ -1853,7 +1853,7 @@
18531853

18541854
\pnum
18551855
\indextext{literal!string!raw}%
1856-
A \grammarterm{string-literal} that has an \tcode{R}
1856+
A \grammarterm{string-literal} that has an \literaltcode{R}
18571857
\indextext{prefix!\idxcode{R}}%
18581858
in the prefix is a \defn{raw string literal}. The
18591859
\grammarterm{d-char-sequence} serves as a delimiter. The terminating

0 commit comments

Comments
 (0)