Skip to content

Commit 855183c

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

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
@@ -331,7 +331,7 @@
331331

332332
\begin{bnf}
333333
\nontermdef{named-universal-character}\br
334-
\terminal{\textbackslash N\{} n-char-sequence \terminal{\}}
334+
\literalterminal{\textbackslash N\{} n-char-sequence \literalterminal{\}}
335335
\end{bnf}
336336

337337
\begin{bnf}
@@ -347,17 +347,17 @@
347347

348348
\begin{bnf}
349349
\nontermdef{universal-character-name}\br
350-
\terminal{\textbackslash u} hex-quad\br
351-
\terminal{\textbackslash U} hex-quad hex-quad\br
352-
\terminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \terminal{\}}\br
350+
\literalterminal{\textbackslash u} hex-quad\br
351+
\literalterminal{\textbackslash U} hex-quad hex-quad\br
352+
\literalterminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \literalterminal{\}}\br
353353
named-universal-character
354354
\end{bnf}
355355

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

532532
\item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
@@ -757,15 +757,15 @@
757757
\begin{bnf}
758758
\nontermdef{pp-number}\br
759759
digit\br
760-
\terminal{.} digit\br
760+
\literalterminal{.} digit\br
761761
pp-number identifier-continue\br
762-
pp-number \terminal{'} digit\br
763-
pp-number \terminal{'} nondigit\br
764-
pp-number \terminal{e} sign\br
765-
pp-number \terminal{E} sign\br
766-
pp-number \terminal{p} sign\br
767-
pp-number \terminal{P} sign\br
768-
pp-number \terminal{.}
762+
pp-number \literalterminal{'} digit\br
763+
pp-number \literalterminal{'} nondigit\br
764+
pp-number \literalterminal{e} sign\br
765+
pp-number \literalterminal{E} sign\br
766+
pp-number \literalterminal{p} sign\br
767+
pp-number \literalterminal{P} sign\br
768+
pp-number \literalterminal{.}
769769
\end{bnf}
770770

771771
\pnum
@@ -1105,19 +1105,19 @@
11051105
\nontermdef{binary-literal}\br
11061106
\terminal{0b} binary-digit\br
11071107
\terminal{0B} binary-digit\br
1108-
binary-literal \opt{\terminal{'}} binary-digit
1108+
binary-literal \opt{\literalterminal{'}} binary-digit
11091109
\end{bnf}
11101110

11111111
\begin{bnf}
11121112
\nontermdef{octal-literal}\br
11131113
\terminal{0}\br
1114-
octal-literal \opt{\terminal{'}} octal-digit
1114+
octal-literal \opt{\literalterminal{'}} octal-digit
11151115
\end{bnf}
11161116

11171117
\begin{bnf}
11181118
\nontermdef{decimal-literal}\br
11191119
nonzero-digit\br
1120-
decimal-literal \opt{\terminal{'}} digit
1120+
decimal-literal \opt{\literalterminal{'}} digit
11211121
\end{bnf}
11221122

11231123
\begin{bnf}
@@ -1148,14 +1148,14 @@
11481148
\begin{bnf}
11491149
\nontermdef{hexadecimal-digit-sequence}\br
11501150
hexadecimal-digit\br
1151-
hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit
1151+
hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit
11521152
\end{bnf}
11531153

11541154
\begin{bnf}
11551155
\nontermdef{hexadecimal-digit} \textnormal{one of}\br
1156-
\terminal{0 1 2 3 4 5 6 7 8 9}\br
1157-
\terminal{a b c d e f}\br
1158-
\terminal{A B C D E F}
1156+
\literalterminal{0 1 2 3 4 5 6 7 8 9}\br
1157+
\literalterminal{a b c d e f}\br
1158+
\literalterminal{A B C D E F}
11591159
\end{bnf}
11601160

11611161
\begin{bnf}
@@ -1170,17 +1170,17 @@
11701170

11711171
\begin{bnf}
11721172
\nontermdef{unsigned-suffix} \textnormal{one of}\br
1173-
\terminal{u U}
1173+
\literalterminal{u U}
11741174
\end{bnf}
11751175

11761176
\begin{bnf}
11771177
\nontermdef{long-suffix} \textnormal{one of}\br
1178-
\terminal{l L}
1178+
\literalterminal{l L}
11791179
\end{bnf}
11801180

11811181
\begin{bnf}
11821182
\nontermdef{long-long-suffix} \textnormal{one of}\br
1183-
\terminal{ll LL}
1183+
\literalterminal{ll LL}
11841184
\end{bnf}
11851185

11861186
\begin{bnf}
@@ -1219,7 +1219,7 @@
12191219

12201220
\pnum
12211221
The \grammarterm{hexadecimal-digit}s
1222-
\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F}
1222+
\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F}
12231223
have decimal values ten through fifteen.
12241224
\begin{example}
12251225
The number twelve can be written \tcode{12}, \tcode{014},
@@ -1263,7 +1263,7 @@
12631263
&
12641264
&
12651265
\tcode{unsigned long long int}\\\hline
1266-
\tcode{u} or \tcode{U} &
1266+
\literaltcode{u} or \literaltcode{U} &
12671267
\tcode{unsigned int} &
12681268
\tcode{unsigned int}\\
12691269
&
@@ -1272,7 +1272,7 @@
12721272
&
12731273
\tcode{unsigned long long int} &
12741274
\tcode{unsigned long long int}\\\hline
1275-
\tcode{l} or \tcode{L} &
1275+
\literaltcode{l} or \literaltcode{L} &
12761276
\tcode{long int} &
12771277
\tcode{long int}\\
12781278
&
@@ -1284,22 +1284,22 @@
12841284
&
12851285
&
12861286
\tcode{unsigned long long int}\\\hline
1287-
Both \tcode{u} or \tcode{U} &
1287+
Both \literaltcode{u} or \literaltcode{U} &
12881288
\tcode{unsigned long int} &
12891289
\tcode{unsigned long int}\\
1290-
and \tcode{l} or \tcode{L} &
1290+
and \literaltcode{l} or \literaltcode{L} &
12911291
\tcode{unsigned long long int} &
12921292
\tcode{unsigned long long int}\\\hline
1293-
\tcode{ll} or \tcode{LL} &
1293+
\literaltcode{ll} or \literaltcode{LL} &
12941294
\tcode{long long int} &
12951295
\tcode{long long int}\\
12961296
&
12971297
&
12981298
\tcode{unsigned long long int}\\\hline
1299-
Both \tcode{u} or \tcode{U} &
1299+
Both \literaltcode{u} or \literaltcode{U} &
13001300
\tcode{unsigned long long int} &
13011301
\tcode{unsigned long long int}\\
1302-
and \tcode{ll} or \tcode{LL} &
1302+
and \literaltcode{ll} or \literaltcode{LL} &
13031303
&
13041304
\\\hline
13051305
\tcode{z} or \tcode{Z} &
@@ -1347,12 +1347,12 @@
13471347
\indextext{literal!character}%
13481348
\begin{bnf}
13491349
\nontermdef{character-literal}\br
1350-
\opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'}
1350+
\opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'}
13511351
\end{bnf}
13521352

13531353
\begin{bnf}
13541354
\nontermdef{encoding-prefix} \textnormal{one of}\br
1355-
\terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L}
1355+
\literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L}
13561356
\end{bnf}
13571357

13581358
\begin{bnf}
@@ -1405,16 +1405,16 @@
14051405

14061406
\begin{bnf}
14071407
\nontermdef{octal-escape-sequence}\br
1408-
\terminal{\textbackslash} octal-digit\br
1409-
\terminal{\textbackslash} octal-digit octal-digit\br
1410-
\terminal{\textbackslash} octal-digit octal-digit octal-digit\br
1411-
\terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}\br
1408+
\literalterminal{\textbackslash} octal-digit\br
1409+
\literalterminal{\textbackslash} octal-digit octal-digit\br
1410+
\literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br
1411+
\literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}\br
14121412
\end{bnf}
14131413

14141414
\begin{bnf}
14151415
\nontermdef{hexadecimal-escape-sequence}\br
1416-
\terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1417-
\terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}}
1416+
\literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1417+
\literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}}
14181418
\end{bnf}
14191419

14201420
\begin{bnf}
@@ -1602,42 +1602,42 @@
16021602

16031603
\begin{bnf}
16041604
\nontermdef{fractional-constant}\br
1605-
\opt{digit-sequence} \terminal{.} digit-sequence\br
1606-
digit-sequence \terminal{.}
1605+
\opt{digit-sequence} \literalterminal{.} digit-sequence\br
1606+
digit-sequence \literalterminal{.}
16071607
\end{bnf}
16081608

16091609
\begin{bnf}
16101610
\nontermdef{hexadecimal-fractional-constant}\br
1611-
\opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br
1612-
hexadecimal-digit-sequence \terminal{.}
1611+
\opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br
1612+
hexadecimal-digit-sequence \literalterminal{.}
16131613
\end{bnf}
16141614

16151615
\begin{bnf}
16161616
\nontermdef{exponent-part}\br
1617-
\terminal{e} \opt{sign} digit-sequence\br
1618-
\terminal{E} \opt{sign} digit-sequence
1617+
\literalterminal{e} \opt{sign} digit-sequence\br
1618+
\literalterminal{E} \opt{sign} digit-sequence
16191619
\end{bnf}
16201620

16211621
\begin{bnf}
16221622
\nontermdef{binary-exponent-part}\br
1623-
\terminal{p} \opt{sign} digit-sequence\br
1624-
\terminal{P} \opt{sign} digit-sequence
1623+
\literalterminal{p} \opt{sign} digit-sequence\br
1624+
\literalterminal{P} \opt{sign} digit-sequence
16251625
\end{bnf}
16261626

16271627
\begin{bnf}
16281628
\nontermdef{sign} \textnormal{one of}\br
1629-
\terminal{+ -}
1629+
\literalterminal{+ -}
16301630
\end{bnf}
16311631

16321632
\begin{bnf}
16331633
\nontermdef{digit-sequence}\br
16341634
digit\br
1635-
digit-sequence \opt{\terminal{'}} digit
1635+
digit-sequence \opt{\literalterminal{'}} digit
16361636
\end{bnf}
16371637

16381638
\begin{bnf}
16391639
\nontermdef{floating-point-suffix} \textnormal{one of}\br
1640-
\terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16}
1640+
\literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16}
16411641
\end{bnf}
16421642

16431643
\pnum
@@ -1665,13 +1665,13 @@
16651665
\topline
16661666
\lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
16671667
none & \keyword{double} \\
1668-
\tcode{f} or \tcode{F} & \keyword {float} \\
1669-
\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\
1670-
\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\
1671-
\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\
1672-
\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\
1673-
\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\
1674-
\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\
1668+
\literaltcode{f} or \literaltcode{F} & \keyword {float} \\
1669+
\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\
1670+
\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\
1671+
\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\
1672+
\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\
1673+
\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\
1674+
\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\
16751675
\end{simpletypetable}
16761676

16771677
\pnum
@@ -1722,8 +1722,8 @@
17221722
\indextext{literal!string}%
17231723
\begin{bnf}
17241724
\nontermdef{string-literal}\br
1725-
\opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br
1726-
\opt{encoding-prefix} \terminal{R} raw-string
1725+
\opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br
1726+
\opt{encoding-prefix} \literalterminal{R} raw-string
17271727
\end{bnf}
17281728

17291729
\begin{bnf}
@@ -1747,7 +1747,7 @@
17471747

17481748
\begin{bnf}
17491749
\nontermdef{raw-string}\br
1750-
\terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"}
1750+
\literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"}
17511751
\end{bnf}
17521752

17531753
\begin{bnf}
@@ -1834,7 +1834,7 @@
18341834

18351835
\pnum
18361836
\indextext{literal!string!raw}%
1837-
A \grammarterm{string-literal} that has an \tcode{R}
1837+
A \grammarterm{string-literal} that has an \literaltcode{R}
18381838
\indextext{prefix!\idxcode{R}}%
18391839
in the prefix is a \defn{raw string literal}. The
18401840
\grammarterm{d-char-sequence} serves as a delimiter. The terminating

0 commit comments

Comments
 (0)