Skip to content

Commit b6346b8

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

File tree

4 files changed

+397
-397
lines changed

4 files changed

+397
-397
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
@@ -324,7 +324,7 @@
324324

325325
\begin{bnf}
326326
\nontermdef{named-universal-character}\br
327-
\terminal{\textbackslash N\{} n-char-sequence \terminal{\}}
327+
\literalterminal{\textbackslash N\{} n-char-sequence \literalterminal{\}}
328328
\end{bnf}
329329

330330
\begin{bnf}
@@ -340,17 +340,17 @@
340340

341341
\begin{bnf}
342342
\nontermdef{universal-character-name}\br
343-
\terminal{\textbackslash u} hex-quad\br
344-
\terminal{\textbackslash U} hex-quad hex-quad\br
345-
\terminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \terminal{\}}\br
343+
\literalterminal{\textbackslash u} hex-quad\br
344+
\literalterminal{\textbackslash U} hex-quad hex-quad\br
345+
\literalterminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \literalterminal{\}}\br
346346
named-universal-character
347347
\end{bnf}
348348

349349
\pnum
350350
A \grammarterm{universal-character-name}
351-
of the form \tcode{\textbackslash u} \grammarterm{hex-quad},
352-
\tcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or
353-
\tcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}}
351+
of the form \literaltcode{\textbackslash u} \grammarterm{hex-quad},
352+
\literaltcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or
353+
\literaltcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}}
354354
designates the character in the translation character set
355355
whose UCS scalar value is the hexadecimal number represented by
356356
the sequence of \grammarterm{hexadecimal-digit}s
@@ -613,15 +613,15 @@
613613
\item
614614
\indextext{literal!string!raw}%
615615
If the next character begins a sequence of characters that could be the prefix
616-
and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing
616+
and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing
617617
token shall be a raw string literal. Between the initial and final
618618
double quote characters of the raw string, any transformations performed in phase
619619
2 (line splicing) are reverted; this reversion
620620
shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
621621
parenthesis is identified. The raw string literal is defined as the shortest sequence
622622
of characters that matches the raw-string pattern
623623
\begin{ncbnf}
624-
\opt{encoding-prefix} \terminal{R} raw-string
624+
\opt{encoding-prefix} \literalterminal{R} raw-string
625625
\end{ncbnf}
626626

627627
\item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
@@ -851,15 +851,15 @@
851851
\begin{bnf}
852852
\nontermdef{pp-number}\br
853853
digit\br
854-
\terminal{.} digit\br
854+
\literalterminal{.} digit\br
855855
pp-number identifier-continue\br
856-
pp-number \terminal{'} digit\br
857-
pp-number \terminal{'} nondigit\br
858-
pp-number \terminal{e} sign\br
859-
pp-number \terminal{E} sign\br
860-
pp-number \terminal{p} sign\br
861-
pp-number \terminal{P} sign\br
862-
pp-number \terminal{.}
856+
pp-number \literalterminal{'} digit\br
857+
pp-number \literalterminal{'} nondigit\br
858+
pp-number \literalterminal{e} sign\br
859+
pp-number \literalterminal{E} sign\br
860+
pp-number \literalterminal{p} sign\br
861+
pp-number \literalterminal{P} sign\br
862+
pp-number \literalterminal{.}
863863
\end{bnf}
864864

865865
\pnum
@@ -1195,19 +1195,19 @@
11951195
\nontermdef{binary-literal}\br
11961196
\terminal{0b} binary-digit\br
11971197
\terminal{0B} binary-digit\br
1198-
binary-literal \opt{\terminal{'}} binary-digit
1198+
binary-literal \opt{\literalterminal{'}} binary-digit
11991199
\end{bnf}
12001200

12011201
\begin{bnf}
12021202
\nontermdef{octal-literal}\br
12031203
\terminal{0}\br
1204-
octal-literal \opt{\terminal{'}} octal-digit
1204+
octal-literal \opt{\literalterminal{'}} octal-digit
12051205
\end{bnf}
12061206

12071207
\begin{bnf}
12081208
\nontermdef{decimal-literal}\br
12091209
nonzero-digit\br
1210-
decimal-literal \opt{\terminal{'}} digit
1210+
decimal-literal \opt{\literalterminal{'}} digit
12111211
\end{bnf}
12121212

12131213
\begin{bnf}
@@ -1238,14 +1238,14 @@
12381238
\begin{bnf}
12391239
\nontermdef{hexadecimal-digit-sequence}\br
12401240
hexadecimal-digit\br
1241-
hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit
1241+
hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit
12421242
\end{bnf}
12431243

12441244
\begin{bnf}
12451245
\nontermdef{hexadecimal-digit} \textnormal{one of}\br
1246-
\terminal{0 1 2 3 4 5 6 7 8 9}\br
1247-
\terminal{a b c d e f}\br
1248-
\terminal{A B C D E F}
1246+
\literalterminal{0 1 2 3 4 5 6 7 8 9}\br
1247+
\literalterminal{a b c d e f}\br
1248+
\literalterminal{A B C D E F}
12491249
\end{bnf}
12501250

12511251
\begin{bnf}
@@ -1260,17 +1260,17 @@
12601260

12611261
\begin{bnf}
12621262
\nontermdef{unsigned-suffix} \textnormal{one of}\br
1263-
\terminal{u U}
1263+
\literalterminal{u U}
12641264
\end{bnf}
12651265

12661266
\begin{bnf}
12671267
\nontermdef{long-suffix} \textnormal{one of}\br
1268-
\terminal{l L}
1268+
\literalterminal{l L}
12691269
\end{bnf}
12701270

12711271
\begin{bnf}
12721272
\nontermdef{long-long-suffix} \textnormal{one of}\br
1273-
\terminal{ll LL}
1273+
\literalterminal{ll LL}
12741274
\end{bnf}
12751275

12761276
\begin{bnf}
@@ -1309,7 +1309,7 @@
13091309

13101310
\pnum
13111311
The \grammarterm{hexadecimal-digit}s
1312-
\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F}
1312+
\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F}
13131313
have decimal values ten through fifteen.
13141314
\begin{example}
13151315
The number twelve can be written \tcode{12}, \tcode{014},
@@ -1353,7 +1353,7 @@
13531353
&
13541354
&
13551355
\tcode{unsigned long long int}\\\hline
1356-
\tcode{u} or \tcode{U} &
1356+
\literaltcode{u} or \literaltcode{U} &
13571357
\tcode{unsigned int} &
13581358
\tcode{unsigned int}\\
13591359
&
@@ -1362,7 +1362,7 @@
13621362
&
13631363
\tcode{unsigned long long int} &
13641364
\tcode{unsigned long long int}\\\hline
1365-
\tcode{l} or \tcode{L} &
1365+
\literaltcode{l} or \literaltcode{L} &
13661366
\tcode{long int} &
13671367
\tcode{long int}\\
13681368
&
@@ -1374,22 +1374,22 @@
13741374
&
13751375
&
13761376
\tcode{unsigned long long int}\\\hline
1377-
Both \tcode{u} or \tcode{U} &
1377+
Both \literaltcode{u} or \literaltcode{U} &
13781378
\tcode{unsigned long int} &
13791379
\tcode{unsigned long int}\\
1380-
and \tcode{l} or \tcode{L} &
1380+
and \literaltcode{l} or \literaltcode{L} &
13811381
\tcode{unsigned long long int} &
13821382
\tcode{unsigned long long int}\\\hline
1383-
\tcode{ll} or \tcode{LL} &
1383+
\literaltcode{ll} or \literaltcode{LL} &
13841384
\tcode{long long int} &
13851385
\tcode{long long int}\\
13861386
&
13871387
&
13881388
\tcode{unsigned long long int}\\\hline
1389-
Both \tcode{u} or \tcode{U} &
1389+
Both \literaltcode{u} or \literaltcode{U} &
13901390
\tcode{unsigned long long int} &
13911391
\tcode{unsigned long long int}\\
1392-
and \tcode{ll} or \tcode{LL} &
1392+
and \literaltcode{ll} or \literaltcode{LL} &
13931393
&
13941394
\\\hline
13951395
\tcode{z} or \tcode{Z} &
@@ -1431,12 +1431,12 @@
14311431
\indextext{literal!character}%
14321432
\begin{bnf}
14331433
\nontermdef{character-literal}\br
1434-
\opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'}
1434+
\opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'}
14351435
\end{bnf}
14361436

14371437
\begin{bnf}
14381438
\nontermdef{encoding-prefix} \textnormal{one of}\br
1439-
\terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L}
1439+
\literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L}
14401440
\end{bnf}
14411441

14421442
\begin{bnf}
@@ -1489,17 +1489,17 @@
14891489

14901490
\begin{bnf}
14911491
\nontermdef{octal-escape-sequence}\br
1492-
\terminal{\textbackslash} octal-digit\br
1493-
\terminal{\textbackslash} octal-digit octal-digit\br
1494-
\terminal{\textbackslash} octal-digit octal-digit octal-digit\br
1495-
\terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}\br
1492+
\literalterminal{\textbackslash} octal-digit\br
1493+
\literalterminal{\textbackslash} octal-digit octal-digit\br
1494+
\literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br
1495+
\literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}\br
14961496
\end{bnf}
14971497

14981498
\begin{bnf}
14991499
\nontermdef{hexadecimal-escape-sequence}\br
1500-
\terminal{\textbackslash x} hexadecimal-digit\br
1500+
\literalterminal{\textbackslash x} hexadecimal-digit\br
15011501
hexadecimal-escape-sequence hexadecimal-digit\br
1502-
\terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}}
1502+
\literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}}
15031503
\end{bnf}
15041504

15051505
\begin{bnf}
@@ -1716,42 +1716,42 @@
17161716

17171717
\begin{bnf}
17181718
\nontermdef{fractional-constant}\br
1719-
\opt{digit-sequence} \terminal{.} digit-sequence\br
1720-
digit-sequence \terminal{.}
1719+
\opt{digit-sequence} \literalterminal{.} digit-sequence\br
1720+
digit-sequence \literalterminal{.}
17211721
\end{bnf}
17221722

17231723
\begin{bnf}
17241724
\nontermdef{hexadecimal-fractional-constant}\br
1725-
\opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br
1726-
hexadecimal-digit-sequence \terminal{.}
1725+
\opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br
1726+
hexadecimal-digit-sequence \literalterminal{.}
17271727
\end{bnf}
17281728

17291729
\begin{bnf}
17301730
\nontermdef{exponent-part}\br
1731-
\terminal{e} \opt{sign} digit-sequence\br
1732-
\terminal{E} \opt{sign} digit-sequence
1731+
\literalterminal{e} \opt{sign} digit-sequence\br
1732+
\literalterminal{E} \opt{sign} digit-sequence
17331733
\end{bnf}
17341734

17351735
\begin{bnf}
17361736
\nontermdef{binary-exponent-part}\br
1737-
\terminal{p} \opt{sign} digit-sequence\br
1738-
\terminal{P} \opt{sign} digit-sequence
1737+
\literalterminal{p} \opt{sign} digit-sequence\br
1738+
\literalterminal{P} \opt{sign} digit-sequence
17391739
\end{bnf}
17401740

17411741
\begin{bnf}
17421742
\nontermdef{sign} \textnormal{one of}\br
1743-
\terminal{+ -}
1743+
\literalterminal{+ -}
17441744
\end{bnf}
17451745

17461746
\begin{bnf}
17471747
\nontermdef{digit-sequence}\br
17481748
digit\br
1749-
digit-sequence \opt{\terminal{'}} digit
1749+
digit-sequence \opt{\literalterminal{'}} digit
17501750
\end{bnf}
17511751

17521752
\begin{bnf}
17531753
\nontermdef{floating-point-suffix} \textnormal{one of}\br
1754-
\terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16}
1754+
\literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16}
17551755
\end{bnf}
17561756

17571757
\pnum
@@ -1779,13 +1779,13 @@
17791779
\topline
17801780
\lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
17811781
none & \keyword{double} \\
1782-
\tcode{f} or \tcode{F} & \keyword {float} \\
1783-
\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\
1784-
\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\
1785-
\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\
1786-
\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\
1787-
\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\
1788-
\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\
1782+
\literaltcode{f} or \literaltcode{F} & \keyword {float} \\
1783+
\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\
1784+
\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\
1785+
\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\
1786+
\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\
1787+
\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\
1788+
\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\
17891789
\end{simpletypetable}
17901790

17911791
\pnum
@@ -1836,8 +1836,8 @@
18361836
\indextext{literal!string}%
18371837
\begin{bnf}
18381838
\nontermdef{string-literal}\br
1839-
\opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br
1840-
\opt{encoding-prefix} \terminal{R} raw-string
1839+
\opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br
1840+
\opt{encoding-prefix} \literalterminal{R} raw-string
18411841
\end{bnf}
18421842

18431843
\begin{bnf}
@@ -1861,7 +1861,7 @@
18611861

18621862
\begin{bnf}
18631863
\nontermdef{raw-string}\br
1864-
\terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"}
1864+
\literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"}
18651865
\end{bnf}
18661866

18671867
\begin{bnf}
@@ -1948,7 +1948,7 @@
19481948

19491949
\pnum
19501950
\indextext{literal!string!raw}%
1951-
A \grammarterm{string-literal} that has an \tcode{R}
1951+
A \grammarterm{string-literal} that has an \literaltcode{R}
19521952
\indextext{prefix!\idxcode{R}}%
19531953
in the prefix is a \defn{raw string literal}. The
19541954
\grammarterm{d-char-sequence} serves as a delimiter. The terminating

0 commit comments

Comments
 (0)