Skip to content

Commit dd3c5c7

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

File tree

3 files changed

+319
-319
lines changed

3 files changed

+319
-319
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: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -566,15 +566,15 @@
566566
\item
567567
\indextext{literal!string!raw}%
568568
If the next character begins a sequence of characters that could be the prefix
569-
and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing
569+
and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing
570570
token shall be a raw string literal. Between the initial and final
571571
double quote characters of the raw string, any transformations performed in phase
572572
2 (line splicing) are reverted; this reversion
573573
shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
574574
parenthesis is identified. The raw string literal is defined as the shortest sequence
575575
of characters that matches the raw-string pattern
576576
\begin{ncbnf}
577-
\opt{encoding-prefix} \terminal{R} raw-string
577+
\opt{encoding-prefix} \literalterminal{R} raw-string
578578
\end{ncbnf}
579579

580580
\item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
@@ -692,15 +692,15 @@
692692
\begin{bnf}
693693
\nontermdef{pp-number}\br
694694
digit\br
695-
\terminal{.} digit\br
695+
\literalterminal{.} digit\br
696696
pp-number identifier-continue\br
697-
pp-number \terminal{'} digit\br
698-
pp-number \terminal{'} nondigit\br
699-
pp-number \terminal{e} sign\br
700-
pp-number \terminal{E} sign\br
701-
pp-number \terminal{p} sign\br
702-
pp-number \terminal{P} sign\br
703-
pp-number \terminal{.}
697+
pp-number \literalterminal{'} digit\br
698+
pp-number \literalterminal{'} nondigit\br
699+
pp-number \literalterminal{e} sign\br
700+
pp-number \literalterminal{E} sign\br
701+
pp-number \literalterminal{p} sign\br
702+
pp-number \literalterminal{P} sign\br
703+
pp-number \literalterminal{.}
704704
\end{bnf}
705705

706706
\pnum
@@ -1121,19 +1121,19 @@
11211121
\nontermdef{binary-literal}\br
11221122
\terminal{0b} binary-digit\br
11231123
\terminal{0B} binary-digit\br
1124-
binary-literal \opt{\terminal{'}} binary-digit
1124+
binary-literal \opt{\literalterminal{'}} binary-digit
11251125
\end{bnf}
11261126

11271127
\begin{bnf}
11281128
\nontermdef{octal-literal}\br
11291129
\terminal{0}\br
1130-
octal-literal \opt{\terminal{'}} octal-digit
1130+
octal-literal \opt{\literalterminal{'}} octal-digit
11311131
\end{bnf}
11321132

11331133
\begin{bnf}
11341134
\nontermdef{decimal-literal}\br
11351135
nonzero-digit\br
1136-
decimal-literal \opt{\terminal{'}} digit
1136+
decimal-literal \opt{\literalterminal{'}} digit
11371137
\end{bnf}
11381138

11391139
\begin{bnf}
@@ -1164,14 +1164,14 @@
11641164
\begin{bnf}
11651165
\nontermdef{hexadecimal-digit-sequence}\br
11661166
hexadecimal-digit\br
1167-
hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit
1167+
hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit
11681168
\end{bnf}
11691169

11701170
\begin{bnf}
11711171
\nontermdef{hexadecimal-digit} \textnormal{one of}\br
1172-
\terminal{0 1 2 3 4 5 6 7 8 9}\br
1173-
\terminal{a b c d e f}\br
1174-
\terminal{A B C D E F}
1172+
\literalterminal{0 1 2 3 4 5 6 7 8 9}\br
1173+
\literalterminal{a b c d e f}\br
1174+
\literalterminal{A B C D E F}
11751175
\end{bnf}
11761176

11771177
\begin{bnf}
@@ -1186,17 +1186,17 @@
11861186

11871187
\begin{bnf}
11881188
\nontermdef{unsigned-suffix} \textnormal{one of}\br
1189-
\terminal{u U}
1189+
\literalterminal{u U}
11901190
\end{bnf}
11911191

11921192
\begin{bnf}
11931193
\nontermdef{long-suffix} \textnormal{one of}\br
1194-
\terminal{l L}
1194+
\literalterminal{l L}
11951195
\end{bnf}
11961196

11971197
\begin{bnf}
11981198
\nontermdef{long-long-suffix} \textnormal{one of}\br
1199-
\terminal{ll LL}
1199+
\literalterminal{ll LL}
12001200
\end{bnf}
12011201

12021202
\begin{bnf}
@@ -1235,7 +1235,7 @@
12351235

12361236
\pnum
12371237
The \grammarterm{hexadecimal-digit}s
1238-
\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F}
1238+
\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F}
12391239
have decimal values ten through fifteen.
12401240
\begin{example}
12411241
The number twelve can be written \tcode{12}, \tcode{014},
@@ -1279,7 +1279,7 @@
12791279
&
12801280
&
12811281
\tcode{unsigned long long int}\\\hline
1282-
\tcode{u} or \tcode{U} &
1282+
\literaltcode{u} or \literaltcode{U} &
12831283
\tcode{unsigned int} &
12841284
\tcode{unsigned int}\\
12851285
&
@@ -1288,7 +1288,7 @@
12881288
&
12891289
\tcode{unsigned long long int} &
12901290
\tcode{unsigned long long int}\\\hline
1291-
\tcode{l} or \tcode{L} &
1291+
\literaltcode{l} or \literaltcode{L} &
12921292
\tcode{long int} &
12931293
\tcode{long int}\\
12941294
&
@@ -1300,22 +1300,22 @@
13001300
&
13011301
&
13021302
\tcode{unsigned long long int}\\\hline
1303-
Both \tcode{u} or \tcode{U} &
1303+
Both \literaltcode{u} or \literaltcode{U} &
13041304
\tcode{unsigned long int} &
13051305
\tcode{unsigned long int}\\
1306-
and \tcode{l} or \tcode{L} &
1306+
and \literaltcode{l} or \literaltcode{L} &
13071307
\tcode{unsigned long long int} &
13081308
\tcode{unsigned long long int}\\\hline
1309-
\tcode{ll} or \tcode{LL} &
1309+
\literaltcode{ll} or \literaltcode{LL} &
13101310
\tcode{long long int} &
13111311
\tcode{long long int}\\
13121312
&
13131313
&
13141314
\tcode{unsigned long long int}\\\hline
1315-
Both \tcode{u} or \tcode{U} &
1315+
Both \literaltcode{u} or \literaltcode{U} &
13161316
\tcode{unsigned long long int} &
13171317
\tcode{unsigned long long int}\\
1318-
and \tcode{ll} or \tcode{LL} &
1318+
and \literaltcode{ll} or \literaltcode{LL} &
13191319
&
13201320
\\\hline
13211321
\tcode{z} or \tcode{Z} &
@@ -1363,12 +1363,12 @@
13631363
\indextext{literal!character}%
13641364
\begin{bnf}
13651365
\nontermdef{character-literal}\br
1366-
\opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'}
1366+
\opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'}
13671367
\end{bnf}
13681368

13691369
\begin{bnf}
13701370
\nontermdef{encoding-prefix} \textnormal{one of}\br
1371-
\terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L}
1371+
\literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L}
13721372
\end{bnf}
13731373

13741374
\begin{bnf}
@@ -1419,16 +1419,16 @@
14191419

14201420
\begin{bnf}
14211421
\nontermdef{octal-escape-sequence}\br
1422-
\terminal{\textbackslash} octal-digit\br
1423-
\terminal{\textbackslash} octal-digit octal-digit\br
1424-
\terminal{\textbackslash} octal-digit octal-digit octal-digit\br
1425-
\terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}
1422+
\literalterminal{\textbackslash} octal-digit\br
1423+
\literalterminal{\textbackslash} octal-digit octal-digit\br
1424+
\literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br
1425+
\literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}
14261426
\end{bnf}
14271427

14281428
\begin{bnf}
14291429
\nontermdef{hexadecimal-escape-sequence}\br
1430-
\terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1431-
\terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}}
1430+
\literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1431+
\literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}}
14321432
\end{bnf}
14331433

14341434
\begin{bnf}
@@ -1616,42 +1616,42 @@
16161616

16171617
\begin{bnf}
16181618
\nontermdef{fractional-constant}\br
1619-
\opt{digit-sequence} \terminal{.} digit-sequence\br
1620-
digit-sequence \terminal{.}
1619+
\opt{digit-sequence} \literalterminal{.} digit-sequence\br
1620+
digit-sequence \literalterminal{.}
16211621
\end{bnf}
16221622

16231623
\begin{bnf}
16241624
\nontermdef{hexadecimal-fractional-constant}\br
1625-
\opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br
1626-
hexadecimal-digit-sequence \terminal{.}
1625+
\opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br
1626+
hexadecimal-digit-sequence \literalterminal{.}
16271627
\end{bnf}
16281628

16291629
\begin{bnf}
16301630
\nontermdef{exponent-part}\br
1631-
\terminal{e} \opt{sign} digit-sequence\br
1632-
\terminal{E} \opt{sign} digit-sequence
1631+
\literalterminal{e} \opt{sign} digit-sequence\br
1632+
\literalterminal{E} \opt{sign} digit-sequence
16331633
\end{bnf}
16341634

16351635
\begin{bnf}
16361636
\nontermdef{binary-exponent-part}\br
1637-
\terminal{p} \opt{sign} digit-sequence\br
1638-
\terminal{P} \opt{sign} digit-sequence
1637+
\literalterminal{p} \opt{sign} digit-sequence\br
1638+
\literalterminal{P} \opt{sign} digit-sequence
16391639
\end{bnf}
16401640

16411641
\begin{bnf}
16421642
\nontermdef{sign} \textnormal{one of}\br
1643-
\terminal{+ -}
1643+
\literalterminal{+ -}
16441644
\end{bnf}
16451645

16461646
\begin{bnf}
16471647
\nontermdef{digit-sequence}\br
16481648
digit\br
1649-
digit-sequence \opt{\terminal{'}} digit
1649+
digit-sequence \opt{\literalterminal{'}} digit
16501650
\end{bnf}
16511651

16521652
\begin{bnf}
16531653
\nontermdef{floating-point-suffix} \textnormal{one of}\br
1654-
\terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16}
1654+
\literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16}
16551655
\end{bnf}
16561656

16571657
\pnum
@@ -1679,13 +1679,13 @@
16791679
\topline
16801680
\lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
16811681
none & \keyword{double} \\
1682-
\tcode{f} or \tcode{F} & \keyword {float} \\
1683-
\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\
1684-
\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\
1685-
\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\
1686-
\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\
1687-
\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\
1688-
\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\
1682+
\literaltcode{f} or \literaltcode{F} & \keyword {float} \\
1683+
\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\
1684+
\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\
1685+
\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\
1686+
\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\
1687+
\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\
1688+
\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\
16891689
\end{simpletypetable}
16901690

16911691
\pnum
@@ -1736,8 +1736,8 @@
17361736
\indextext{literal!string}%
17371737
\begin{bnf}
17381738
\nontermdef{string-literal}\br
1739-
\opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br
1740-
\opt{encoding-prefix} \terminal{R} raw-string
1739+
\opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br
1740+
\opt{encoding-prefix} \literalterminal{R} raw-string
17411741
\end{bnf}
17421742

17431743
\begin{bnf}
@@ -1760,7 +1760,7 @@
17601760

17611761
\begin{bnf}
17621762
\nontermdef{raw-string}\br
1763-
\terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"}
1763+
\literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"}
17641764
\end{bnf}
17651765

17661766
\begin{bnf}
@@ -1845,7 +1845,7 @@
18451845

18461846
\pnum
18471847
\indextext{literal!string!raw}%
1848-
A \grammarterm{string-literal} that has an \tcode{R}
1848+
A \grammarterm{string-literal} that has an \literaltcode{R}
18491849
\indextext{prefix!\idxcode{R}}%
18501850
in the prefix is a \defn{raw string literal}. The
18511851
\grammarterm{d-char-sequence} serves as a delimiter. The terminating

0 commit comments

Comments
 (0)