Skip to content

Commit 8ce6170

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

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
@@ -752,15 +752,15 @@
752752
\begin{bnf}
753753
\nontermdef{pp-number}\br
754754
digit\br
755-
\terminal{.} digit\br
755+
\literalterminal{.} digit\br
756756
pp-number identifier-continue\br
757-
pp-number \terminal{'} digit\br
758-
pp-number \terminal{'} nondigit\br
759-
pp-number \terminal{e} sign\br
760-
pp-number \terminal{E} sign\br
761-
pp-number \terminal{p} sign\br
762-
pp-number \terminal{P} sign\br
763-
pp-number \terminal{.}
757+
pp-number \literalterminal{'} digit\br
758+
pp-number \literalterminal{'} nondigit\br
759+
pp-number \literalterminal{e} sign\br
760+
pp-number \literalterminal{E} sign\br
761+
pp-number \literalterminal{p} sign\br
762+
pp-number \literalterminal{P} sign\br
763+
pp-number \literalterminal{.}
764764
\end{bnf}
765765

766766
\pnum
@@ -1100,19 +1100,19 @@
11001100
\nontermdef{binary-literal}\br
11011101
\terminal{0b} binary-digit\br
11021102
\terminal{0B} binary-digit\br
1103-
binary-literal \opt{\terminal{'}} binary-digit
1103+
binary-literal \opt{\literalterminal{'}} binary-digit
11041104
\end{bnf}
11051105

11061106
\begin{bnf}
11071107
\nontermdef{octal-literal}\br
11081108
\terminal{0}\br
1109-
octal-literal \opt{\terminal{'}} octal-digit
1109+
octal-literal \opt{\literalterminal{'}} octal-digit
11101110
\end{bnf}
11111111

11121112
\begin{bnf}
11131113
\nontermdef{decimal-literal}\br
11141114
nonzero-digit\br
1115-
decimal-literal \opt{\terminal{'}} digit
1115+
decimal-literal \opt{\literalterminal{'}} digit
11161116
\end{bnf}
11171117

11181118
\begin{bnf}
@@ -1143,14 +1143,14 @@
11431143
\begin{bnf}
11441144
\nontermdef{hexadecimal-digit-sequence}\br
11451145
hexadecimal-digit\br
1146-
hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit
1146+
hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit
11471147
\end{bnf}
11481148

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

11561156
\begin{bnf}
@@ -1165,17 +1165,17 @@
11651165

11661166
\begin{bnf}
11671167
\nontermdef{unsigned-suffix} \textnormal{one of}\br
1168-
\terminal{u U}
1168+
\literalterminal{u U}
11691169
\end{bnf}
11701170

11711171
\begin{bnf}
11721172
\nontermdef{long-suffix} \textnormal{one of}\br
1173-
\terminal{l L}
1173+
\literalterminal{l L}
11741174
\end{bnf}
11751175

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

11811181
\begin{bnf}
@@ -1214,7 +1214,7 @@
12141214

12151215
\pnum
12161216
The \grammarterm{hexadecimal-digit}s
1217-
\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F}
1217+
\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F}
12181218
have decimal values ten through fifteen.
12191219
\begin{example}
12201220
The number twelve can be written \tcode{12}, \tcode{014},
@@ -1258,7 +1258,7 @@
12581258
&
12591259
&
12601260
\tcode{unsigned long long int}\\\hline
1261-
\tcode{u} or \tcode{U} &
1261+
\literaltcode{u} or \literaltcode{U} &
12621262
\tcode{unsigned int} &
12631263
\tcode{unsigned int}\\
12641264
&
@@ -1267,7 +1267,7 @@
12671267
&
12681268
\tcode{unsigned long long int} &
12691269
\tcode{unsigned long long int}\\\hline
1270-
\tcode{l} or \tcode{L} &
1270+
\literaltcode{l} or \literaltcode{L} &
12711271
\tcode{long int} &
12721272
\tcode{long int}\\
12731273
&
@@ -1279,22 +1279,22 @@
12791279
&
12801280
&
12811281
\tcode{unsigned long long int}\\\hline
1282-
Both \tcode{u} or \tcode{U} &
1282+
Both \literaltcode{u} or \literaltcode{U} &
12831283
\tcode{unsigned long int} &
12841284
\tcode{unsigned long int}\\
1285-
and \tcode{l} or \tcode{L} &
1285+
and \literaltcode{l} or \literaltcode{L} &
12861286
\tcode{unsigned long long int} &
12871287
\tcode{unsigned long long int}\\\hline
1288-
\tcode{ll} or \tcode{LL} &
1288+
\literaltcode{ll} or \literaltcode{LL} &
12891289
\tcode{long long int} &
12901290
\tcode{long long int}\\
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 long int} &
12961296
\tcode{unsigned long long int}\\
1297-
and \tcode{ll} or \tcode{LL} &
1297+
and \literaltcode{ll} or \literaltcode{LL} &
12981298
&
12991299
\\\hline
13001300
\tcode{z} or \tcode{Z} &
@@ -1336,12 +1336,12 @@
13361336
\indextext{literal!character}%
13371337
\begin{bnf}
13381338
\nontermdef{character-literal}\br
1339-
\opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'}
1339+
\opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'}
13401340
\end{bnf}
13411341

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

13471347
\begin{bnf}
@@ -1394,16 +1394,16 @@
13941394

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

14031403
\begin{bnf}
14041404
\nontermdef{hexadecimal-escape-sequence}\br
1405-
\terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1406-
\terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}}
1405+
\literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1406+
\literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}}
14071407
\end{bnf}
14081408

14091409
\begin{bnf}
@@ -1620,42 +1620,42 @@
16201620

16211621
\begin{bnf}
16221622
\nontermdef{fractional-constant}\br
1623-
\opt{digit-sequence} \terminal{.} digit-sequence\br
1624-
digit-sequence \terminal{.}
1623+
\opt{digit-sequence} \literalterminal{.} digit-sequence\br
1624+
digit-sequence \literalterminal{.}
16251625
\end{bnf}
16261626

16271627
\begin{bnf}
16281628
\nontermdef{hexadecimal-fractional-constant}\br
1629-
\opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br
1630-
hexadecimal-digit-sequence \terminal{.}
1629+
\opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br
1630+
hexadecimal-digit-sequence \literalterminal{.}
16311631
\end{bnf}
16321632

16331633
\begin{bnf}
16341634
\nontermdef{exponent-part}\br
1635-
\terminal{e} \opt{sign} digit-sequence\br
1636-
\terminal{E} \opt{sign} digit-sequence
1635+
\literalterminal{e} \opt{sign} digit-sequence\br
1636+
\literalterminal{E} \opt{sign} digit-sequence
16371637
\end{bnf}
16381638

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

16451645
\begin{bnf}
16461646
\nontermdef{sign} \textnormal{one of}\br
1647-
\terminal{+ -}
1647+
\literalterminal{+ -}
16481648
\end{bnf}
16491649

16501650
\begin{bnf}
16511651
\nontermdef{digit-sequence}\br
16521652
digit\br
1653-
digit-sequence \opt{\terminal{'}} digit
1653+
digit-sequence \opt{\literalterminal{'}} digit
16541654
\end{bnf}
16551655

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

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

16951695
\pnum
@@ -1740,8 +1740,8 @@
17401740
\indextext{literal!string}%
17411741
\begin{bnf}
17421742
\nontermdef{string-literal}\br
1743-
\opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br
1744-
\opt{encoding-prefix} \terminal{R} raw-string
1743+
\opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br
1744+
\opt{encoding-prefix} \literalterminal{R} raw-string
17451745
\end{bnf}
17461746

17471747
\begin{bnf}
@@ -1765,7 +1765,7 @@
17651765

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

17711771
\begin{bnf}
@@ -1852,7 +1852,7 @@
18521852

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

0 commit comments

Comments
 (0)