Skip to content

Commit c05c804

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

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
@@ -759,15 +759,15 @@
759759
\begin{bnf}
760760
\nontermdef{pp-number}\br
761761
digit\br
762-
\terminal{.} digit\br
762+
\literalterminal{.} digit\br
763763
pp-number identifier-continue\br
764-
pp-number \terminal{'} digit\br
765-
pp-number \terminal{'} nondigit\br
766-
pp-number \terminal{e} sign\br
767-
pp-number \terminal{E} sign\br
768-
pp-number \terminal{p} sign\br
769-
pp-number \terminal{P} sign\br
770-
pp-number \terminal{.}
764+
pp-number \literalterminal{'} digit\br
765+
pp-number \literalterminal{'} nondigit\br
766+
pp-number \literalterminal{e} sign\br
767+
pp-number \literalterminal{E} sign\br
768+
pp-number \literalterminal{p} sign\br
769+
pp-number \literalterminal{P} sign\br
770+
pp-number \literalterminal{.}
771771
\end{bnf}
772772

773773
\pnum
@@ -1111,19 +1111,19 @@
11111111
\nontermdef{binary-literal}\br
11121112
\terminal{0b} binary-digit\br
11131113
\terminal{0B} binary-digit\br
1114-
binary-literal \opt{\terminal{'}} binary-digit
1114+
binary-literal \opt{\literalterminal{'}} binary-digit
11151115
\end{bnf}
11161116

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

11231123
\begin{bnf}
11241124
\nontermdef{decimal-literal}\br
11251125
nonzero-digit\br
1126-
decimal-literal \opt{\terminal{'}} digit
1126+
decimal-literal \opt{\literalterminal{'}} digit
11271127
\end{bnf}
11281128

11291129
\begin{bnf}
@@ -1154,14 +1154,14 @@
11541154
\begin{bnf}
11551155
\nontermdef{hexadecimal-digit-sequence}\br
11561156
hexadecimal-digit\br
1157-
hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit
1157+
hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit
11581158
\end{bnf}
11591159

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

11671167
\begin{bnf}
@@ -1176,17 +1176,17 @@
11761176

11771177
\begin{bnf}
11781178
\nontermdef{unsigned-suffix} \textnormal{one of}\br
1179-
\terminal{u U}
1179+
\literalterminal{u U}
11801180
\end{bnf}
11811181

11821182
\begin{bnf}
11831183
\nontermdef{long-suffix} \textnormal{one of}\br
1184-
\terminal{l L}
1184+
\literalterminal{l L}
11851185
\end{bnf}
11861186

11871187
\begin{bnf}
11881188
\nontermdef{long-long-suffix} \textnormal{one of}\br
1189-
\terminal{ll LL}
1189+
\literalterminal{ll LL}
11901190
\end{bnf}
11911191

11921192
\begin{bnf}
@@ -1225,7 +1225,7 @@
12251225

12261226
\pnum
12271227
The \grammarterm{hexadecimal-digit}s
1228-
\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F}
1228+
\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F}
12291229
have decimal values ten through fifteen.
12301230
\begin{example}
12311231
The number twelve can be written \tcode{12}, \tcode{014},
@@ -1269,7 +1269,7 @@
12691269
&
12701270
&
12711271
\tcode{unsigned long long int}\\\hline
1272-
\tcode{u} or \tcode{U} &
1272+
\literaltcode{u} or \literaltcode{U} &
12731273
\tcode{unsigned int} &
12741274
\tcode{unsigned int}\\
12751275
&
@@ -1278,7 +1278,7 @@
12781278
&
12791279
\tcode{unsigned long long int} &
12801280
\tcode{unsigned long long int}\\\hline
1281-
\tcode{l} or \tcode{L} &
1281+
\literaltcode{l} or \literaltcode{L} &
12821282
\tcode{long int} &
12831283
\tcode{long int}\\
12841284
&
@@ -1290,22 +1290,22 @@
12901290
&
12911291
&
12921292
\tcode{unsigned long long int}\\\hline
1293-
Both \tcode{u} or \tcode{U} &
1293+
Both \literaltcode{u} or \literaltcode{U} &
12941294
\tcode{unsigned long int} &
12951295
\tcode{unsigned long int}\\
1296-
and \tcode{l} or \tcode{L} &
1296+
and \literaltcode{l} or \literaltcode{L} &
12971297
\tcode{unsigned long long int} &
12981298
\tcode{unsigned long long int}\\\hline
1299-
\tcode{ll} or \tcode{LL} &
1299+
\literaltcode{ll} or \literaltcode{LL} &
13001300
\tcode{long long int} &
13011301
\tcode{long long int}\\
13021302
&
13031303
&
13041304
\tcode{unsigned long long int}\\\hline
1305-
Both \tcode{u} or \tcode{U} &
1305+
Both \literaltcode{u} or \literaltcode{U} &
13061306
\tcode{unsigned long long int} &
13071307
\tcode{unsigned long long int}\\
1308-
and \tcode{ll} or \tcode{LL} &
1308+
and \literaltcode{ll} or \literaltcode{LL} &
13091309
&
13101310
\\\hline
13111311
\tcode{z} or \tcode{Z} &
@@ -1353,12 +1353,12 @@
13531353
\indextext{literal!character}%
13541354
\begin{bnf}
13551355
\nontermdef{character-literal}\br
1356-
\opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'}
1356+
\opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'}
13571357
\end{bnf}
13581358

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

13641364
\begin{bnf}
@@ -1411,16 +1411,16 @@
14111411

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

14201420
\begin{bnf}
14211421
\nontermdef{hexadecimal-escape-sequence}\br
1422-
\terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1423-
\terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}}
1422+
\literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1423+
\literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}}
14241424
\end{bnf}
14251425

14261426
\begin{bnf}
@@ -1608,42 +1608,42 @@
16081608

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

16151615
\begin{bnf}
16161616
\nontermdef{hexadecimal-fractional-constant}\br
1617-
\opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br
1618-
hexadecimal-digit-sequence \terminal{.}
1617+
\opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br
1618+
hexadecimal-digit-sequence \literalterminal{.}
16191619
\end{bnf}
16201620

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

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

16331633
\begin{bnf}
16341634
\nontermdef{sign} \textnormal{one of}\br
1635-
\terminal{+ -}
1635+
\literalterminal{+ -}
16361636
\end{bnf}
16371637

16381638
\begin{bnf}
16391639
\nontermdef{digit-sequence}\br
16401640
digit\br
1641-
digit-sequence \opt{\terminal{'}} digit
1641+
digit-sequence \opt{\literalterminal{'}} digit
16421642
\end{bnf}
16431643

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

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

16831683
\pnum
@@ -1728,8 +1728,8 @@
17281728
\indextext{literal!string}%
17291729
\begin{bnf}
17301730
\nontermdef{string-literal}\br
1731-
\opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br
1732-
\opt{encoding-prefix} \terminal{R} raw-string
1731+
\opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br
1732+
\opt{encoding-prefix} \literalterminal{R} raw-string
17331733
\end{bnf}
17341734

17351735
\begin{bnf}
@@ -1753,7 +1753,7 @@
17531753

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

17591759
\begin{bnf}
@@ -1840,7 +1840,7 @@
18401840

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

0 commit comments

Comments
 (0)