Skip to content

Commit 04fdbd6

Browse files
committed
Use cxxdraft-htmlgen macros to annotate non-C++ code and literal fragments.
1 parent 6645a4b commit 04fdbd6

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
@@ -333,7 +333,7 @@
333333

334334
\begin{bnf}
335335
\nontermdef{named-universal-character}\br
336-
\terminal{\textbackslash N\{} n-char-sequence \terminal{\}}
336+
\literalterminal{\textbackslash N\{} n-char-sequence \literalterminal{\}}
337337
\end{bnf}
338338

339339
\begin{bnf}
@@ -349,17 +349,17 @@
349349

350350
\begin{bnf}
351351
\nontermdef{universal-character-name}\br
352-
\terminal{\textbackslash u} hex-quad\br
353-
\terminal{\textbackslash U} hex-quad hex-quad\br
354-
\terminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \terminal{\}}\br
352+
\literalterminal{\textbackslash u} hex-quad\br
353+
\literalterminal{\textbackslash U} hex-quad hex-quad\br
354+
\literalterminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \literalterminal{\}}\br
355355
named-universal-character
356356
\end{bnf}
357357

358358
\pnum
359359
A \grammarterm{universal-character-name}
360-
of the form \tcode{\textbackslash u} \grammarterm{hex-quad},
361-
\tcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or
362-
\tcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}}
360+
of the form \literaltcode{\textbackslash u} \grammarterm{hex-quad},
361+
\literaltcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or
362+
\literaltcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}}
363363
designates the character in the translation character set
364364
whose Unicode scalar value is the hexadecimal number represented by
365365
the sequence of \grammarterm{hexadecimal-digit}s
@@ -521,15 +521,15 @@
521521
\item
522522
\indextext{literal!string!raw}%
523523
If the next character begins a sequence of characters that could be the prefix
524-
and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing
524+
and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing
525525
token shall be a raw string literal. Between the initial and final
526526
double quote characters of the raw string, any transformations performed in phase
527527
2 (line splicing) are reverted; this reversion
528528
shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
529529
parenthesis is identified. The raw string literal is defined as the shortest sequence
530530
of characters that matches the raw-string pattern
531531
\begin{ncbnf}
532-
\opt{encoding-prefix} \terminal{R} raw-string
532+
\opt{encoding-prefix} \literalterminal{R} raw-string
533533
\end{ncbnf}
534534

535535
\item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
@@ -760,15 +760,15 @@
760760
\begin{bnf}
761761
\nontermdef{pp-number}\br
762762
digit\br
763-
\terminal{.} digit\br
763+
\literalterminal{.} digit\br
764764
pp-number identifier-continue\br
765-
pp-number \terminal{'} digit\br
766-
pp-number \terminal{'} nondigit\br
767-
pp-number \terminal{e} sign\br
768-
pp-number \terminal{E} sign\br
769-
pp-number \terminal{p} sign\br
770-
pp-number \terminal{P} sign\br
771-
pp-number \terminal{.}
765+
pp-number \literalterminal{'} digit\br
766+
pp-number \literalterminal{'} nondigit\br
767+
pp-number \literalterminal{e} sign\br
768+
pp-number \literalterminal{E} sign\br
769+
pp-number \literalterminal{p} sign\br
770+
pp-number \literalterminal{P} sign\br
771+
pp-number \literalterminal{.}
772772
\end{bnf}
773773

774774
\pnum
@@ -1112,19 +1112,19 @@
11121112
\nontermdef{binary-literal}\br
11131113
\terminal{0b} binary-digit\br
11141114
\terminal{0B} binary-digit\br
1115-
binary-literal \opt{\terminal{'}} binary-digit
1115+
binary-literal \opt{\literalterminal{'}} binary-digit
11161116
\end{bnf}
11171117

11181118
\begin{bnf}
11191119
\nontermdef{octal-literal}\br
11201120
\terminal{0}\br
1121-
octal-literal \opt{\terminal{'}} octal-digit
1121+
octal-literal \opt{\literalterminal{'}} octal-digit
11221122
\end{bnf}
11231123

11241124
\begin{bnf}
11251125
\nontermdef{decimal-literal}\br
11261126
nonzero-digit\br
1127-
decimal-literal \opt{\terminal{'}} digit
1127+
decimal-literal \opt{\literalterminal{'}} digit
11281128
\end{bnf}
11291129

11301130
\begin{bnf}
@@ -1155,14 +1155,14 @@
11551155
\begin{bnf}
11561156
\nontermdef{hexadecimal-digit-sequence}\br
11571157
hexadecimal-digit\br
1158-
hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit
1158+
hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit
11591159
\end{bnf}
11601160

11611161
\begin{bnf}
11621162
\nontermdef{hexadecimal-digit} \textnormal{one of}\br
1163-
\terminal{0 1 2 3 4 5 6 7 8 9}\br
1164-
\terminal{a b c d e f}\br
1165-
\terminal{A B C D E F}
1163+
\literalterminal{0 1 2 3 4 5 6 7 8 9}\br
1164+
\literalterminal{a b c d e f}\br
1165+
\literalterminal{A B C D E F}
11661166
\end{bnf}
11671167

11681168
\begin{bnf}
@@ -1177,17 +1177,17 @@
11771177

11781178
\begin{bnf}
11791179
\nontermdef{unsigned-suffix} \textnormal{one of}\br
1180-
\terminal{u U}
1180+
\literalterminal{u U}
11811181
\end{bnf}
11821182

11831183
\begin{bnf}
11841184
\nontermdef{long-suffix} \textnormal{one of}\br
1185-
\terminal{l L}
1185+
\literalterminal{l L}
11861186
\end{bnf}
11871187

11881188
\begin{bnf}
11891189
\nontermdef{long-long-suffix} \textnormal{one of}\br
1190-
\terminal{ll LL}
1190+
\literalterminal{ll LL}
11911191
\end{bnf}
11921192

11931193
\begin{bnf}
@@ -1226,7 +1226,7 @@
12261226

12271227
\pnum
12281228
The \grammarterm{hexadecimal-digit}s
1229-
\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F}
1229+
\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F}
12301230
have decimal values ten through fifteen.
12311231
\begin{example}
12321232
The number twelve can be written \tcode{12}, \tcode{014},
@@ -1270,7 +1270,7 @@
12701270
&
12711271
&
12721272
\tcode{unsigned long long int}\\\hline
1273-
\tcode{u} or \tcode{U} &
1273+
\literaltcode{u} or \literaltcode{U} &
12741274
\tcode{unsigned int} &
12751275
\tcode{unsigned int}\\
12761276
&
@@ -1279,7 +1279,7 @@
12791279
&
12801280
\tcode{unsigned long long int} &
12811281
\tcode{unsigned long long int}\\\hline
1282-
\tcode{l} or \tcode{L} &
1282+
\literaltcode{l} or \literaltcode{L} &
12831283
\tcode{long int} &
12841284
\tcode{long int}\\
12851285
&
@@ -1291,22 +1291,22 @@
12911291
&
12921292
&
12931293
\tcode{unsigned long long int}\\\hline
1294-
Both \tcode{u} or \tcode{U} &
1294+
Both \literaltcode{u} or \literaltcode{U} &
12951295
\tcode{unsigned long int} &
12961296
\tcode{unsigned long int}\\
1297-
and \tcode{l} or \tcode{L} &
1297+
and \literaltcode{l} or \literaltcode{L} &
12981298
\tcode{unsigned long long int} &
12991299
\tcode{unsigned long long int}\\\hline
1300-
\tcode{ll} or \tcode{LL} &
1300+
\literaltcode{ll} or \literaltcode{LL} &
13011301
\tcode{long long int} &
13021302
\tcode{long long int}\\
13031303
&
13041304
&
13051305
\tcode{unsigned long long int}\\\hline
1306-
Both \tcode{u} or \tcode{U} &
1306+
Both \literaltcode{u} or \literaltcode{U} &
13071307
\tcode{unsigned long long int} &
13081308
\tcode{unsigned long long int}\\
1309-
and \tcode{ll} or \tcode{LL} &
1309+
and \literaltcode{ll} or \literaltcode{LL} &
13101310
&
13111311
\\\hline
13121312
\tcode{z} or \tcode{Z} &
@@ -1354,12 +1354,12 @@
13541354
\indextext{literal!character}%
13551355
\begin{bnf}
13561356
\nontermdef{character-literal}\br
1357-
\opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'}
1357+
\opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'}
13581358
\end{bnf}
13591359

13601360
\begin{bnf}
13611361
\nontermdef{encoding-prefix} \textnormal{one of}\br
1362-
\terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L}
1362+
\literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L}
13631363
\end{bnf}
13641364

13651365
\begin{bnf}
@@ -1412,16 +1412,16 @@
14121412

14131413
\begin{bnf}
14141414
\nontermdef{octal-escape-sequence}\br
1415-
\terminal{\textbackslash} octal-digit\br
1416-
\terminal{\textbackslash} octal-digit octal-digit\br
1417-
\terminal{\textbackslash} octal-digit octal-digit octal-digit\br
1418-
\terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}\br
1415+
\literalterminal{\textbackslash} octal-digit\br
1416+
\literalterminal{\textbackslash} octal-digit octal-digit\br
1417+
\literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br
1418+
\literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}\br
14191419
\end{bnf}
14201420

14211421
\begin{bnf}
14221422
\nontermdef{hexadecimal-escape-sequence}\br
1423-
\terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1424-
\terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}}
1423+
\literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1424+
\literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}}
14251425
\end{bnf}
14261426

14271427
\begin{bnf}
@@ -1609,42 +1609,42 @@
16091609

16101610
\begin{bnf}
16111611
\nontermdef{fractional-constant}\br
1612-
\opt{digit-sequence} \terminal{.} digit-sequence\br
1613-
digit-sequence \terminal{.}
1612+
\opt{digit-sequence} \literalterminal{.} digit-sequence\br
1613+
digit-sequence \literalterminal{.}
16141614
\end{bnf}
16151615

16161616
\begin{bnf}
16171617
\nontermdef{hexadecimal-fractional-constant}\br
1618-
\opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br
1619-
hexadecimal-digit-sequence \terminal{.}
1618+
\opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br
1619+
hexadecimal-digit-sequence \literalterminal{.}
16201620
\end{bnf}
16211621

16221622
\begin{bnf}
16231623
\nontermdef{exponent-part}\br
1624-
\terminal{e} \opt{sign} digit-sequence\br
1625-
\terminal{E} \opt{sign} digit-sequence
1624+
\literalterminal{e} \opt{sign} digit-sequence\br
1625+
\literalterminal{E} \opt{sign} digit-sequence
16261626
\end{bnf}
16271627

16281628
\begin{bnf}
16291629
\nontermdef{binary-exponent-part}\br
1630-
\terminal{p} \opt{sign} digit-sequence\br
1631-
\terminal{P} \opt{sign} digit-sequence
1630+
\literalterminal{p} \opt{sign} digit-sequence\br
1631+
\literalterminal{P} \opt{sign} digit-sequence
16321632
\end{bnf}
16331633

16341634
\begin{bnf}
16351635
\nontermdef{sign} \textnormal{one of}\br
1636-
\terminal{+ -}
1636+
\literalterminal{+ -}
16371637
\end{bnf}
16381638

16391639
\begin{bnf}
16401640
\nontermdef{digit-sequence}\br
16411641
digit\br
1642-
digit-sequence \opt{\terminal{'}} digit
1642+
digit-sequence \opt{\literalterminal{'}} digit
16431643
\end{bnf}
16441644

16451645
\begin{bnf}
16461646
\nontermdef{floating-point-suffix} \textnormal{one of}\br
1647-
\terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16}
1647+
\literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16}
16481648
\end{bnf}
16491649

16501650
\pnum
@@ -1672,13 +1672,13 @@
16721672
\topline
16731673
\lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
16741674
none & \keyword{double} \\
1675-
\tcode{f} or \tcode{F} & \keyword {float} \\
1676-
\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\
1677-
\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\
1678-
\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\
1679-
\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\
1680-
\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\
1681-
\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\
1675+
\literaltcode{f} or \literaltcode{F} & \keyword {float} \\
1676+
\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\
1677+
\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\
1678+
\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\
1679+
\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\
1680+
\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\
1681+
\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\
16821682
\end{simpletypetable}
16831683

16841684
\pnum
@@ -1729,8 +1729,8 @@
17291729
\indextext{literal!string}%
17301730
\begin{bnf}
17311731
\nontermdef{string-literal}\br
1732-
\opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br
1733-
\opt{encoding-prefix} \terminal{R} raw-string
1732+
\opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br
1733+
\opt{encoding-prefix} \literalterminal{R} raw-string
17341734
\end{bnf}
17351735

17361736
\begin{bnf}
@@ -1754,7 +1754,7 @@
17541754

17551755
\begin{bnf}
17561756
\nontermdef{raw-string}\br
1757-
\terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"}
1757+
\literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"}
17581758
\end{bnf}
17591759

17601760
\begin{bnf}
@@ -1841,7 +1841,7 @@
18411841

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

0 commit comments

Comments
 (0)