Skip to content

Commit 85f84f6

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

File tree

5 files changed

+399
-399
lines changed

5 files changed

+399
-399
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
@@ -342,7 +342,7 @@
342342

343343
\begin{bnf}
344344
\nontermdef{named-universal-character}\br
345-
\terminal{\textbackslash N\{} n-char-sequence \terminal{\}}
345+
\literalterminal{\textbackslash N\{} n-char-sequence \literalterminal{\}}
346346
\end{bnf}
347347

348348
\begin{bnf}
@@ -358,17 +358,17 @@
358358

359359
\begin{bnf}
360360
\nontermdef{universal-character-name}\br
361-
\terminal{\textbackslash u} hex-quad\br
362-
\terminal{\textbackslash U} hex-quad hex-quad\br
363-
\terminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \terminal{\}}\br
361+
\literalterminal{\textbackslash u} hex-quad\br
362+
\literalterminal{\textbackslash U} hex-quad hex-quad\br
363+
\literalterminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \literalterminal{\}}\br
364364
named-universal-character
365365
\end{bnf}
366366

367367
\pnum
368368
A \grammarterm{universal-character-name}
369-
of the form \tcode{\textbackslash u} \grammarterm{hex-quad},
370-
\tcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or
371-
\tcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}}
369+
of the form \literaltcode{\textbackslash u} \grammarterm{hex-quad},
370+
\literaltcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or
371+
\literaltcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}}
372372
designates the character in the translation character set
373373
whose Unicode scalar value is the hexadecimal number represented by
374374
the sequence of \grammarterm{hexadecimal-digit}s
@@ -530,15 +530,15 @@
530530
\item
531531
\indextext{literal!string!raw}%
532532
If the next character begins a sequence of characters that could be the prefix
533-
and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing
533+
and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing
534534
token shall be a raw string literal. Between the initial and final
535535
double quote characters of the raw string, any transformations performed in phase
536536
2 (line splicing) are reverted; this reversion
537537
shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
538538
parenthesis is identified. The raw string literal is defined as the shortest sequence
539539
of characters that matches the raw-string pattern
540540
\begin{ncbnf}
541-
\opt{encoding-prefix} \terminal{R} raw-string
541+
\opt{encoding-prefix} \literalterminal{R} raw-string
542542
\end{ncbnf}
543543

544544
\item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
@@ -768,15 +768,15 @@
768768
\begin{bnf}
769769
\nontermdef{pp-number}\br
770770
digit\br
771-
\terminal{.} digit\br
771+
\literalterminal{.} digit\br
772772
pp-number identifier-continue\br
773-
pp-number \terminal{'} digit\br
774-
pp-number \terminal{'} nondigit\br
775-
pp-number \terminal{e} sign\br
776-
pp-number \terminal{E} sign\br
777-
pp-number \terminal{p} sign\br
778-
pp-number \terminal{P} sign\br
779-
pp-number \terminal{.}
773+
pp-number \literalterminal{'} digit\br
774+
pp-number \literalterminal{'} nondigit\br
775+
pp-number \literalterminal{e} sign\br
776+
pp-number \literalterminal{E} sign\br
777+
pp-number \literalterminal{p} sign\br
778+
pp-number \literalterminal{P} sign\br
779+
pp-number \literalterminal{.}
780780
\end{bnf}
781781

782782
\pnum
@@ -1121,19 +1121,19 @@
11211121
\nontermdef{binary-literal}\br
11221122
\terminal{0b} binary-digit\br
11231123
\terminal{0B} binary-digit\br
1124-
binary-literal \opt{\terminal{'}} binary-digit
1124+
binary-literal \opt{\literalterminal{'}} binary-digit
11251125
\end{bnf}
11261126

11271127
\begin{bnf}
11281128
\nontermdef{octal-literal}\br
11291129
\terminal{0}\br
1130-
octal-literal \opt{\terminal{'}} octal-digit
1130+
octal-literal \opt{\literalterminal{'}} octal-digit
11311131
\end{bnf}
11321132

11331133
\begin{bnf}
11341134
\nontermdef{decimal-literal}\br
11351135
nonzero-digit\br
1136-
decimal-literal \opt{\terminal{'}} digit
1136+
decimal-literal \opt{\literalterminal{'}} digit
11371137
\end{bnf}
11381138

11391139
\begin{bnf}
@@ -1164,14 +1164,14 @@
11641164
\begin{bnf}
11651165
\nontermdef{hexadecimal-digit-sequence}\br
11661166
hexadecimal-digit\br
1167-
hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit
1167+
hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit
11681168
\end{bnf}
11691169

11701170
\begin{bnf}
11711171
\nontermdef{hexadecimal-digit} \textnormal{one of}\br
1172-
\terminal{0 1 2 3 4 5 6 7 8 9}\br
1173-
\terminal{a b c d e f}\br
1174-
\terminal{A B C D E F}
1172+
\literalterminal{0 1 2 3 4 5 6 7 8 9}\br
1173+
\literalterminal{a b c d e f}\br
1174+
\literalterminal{A B C D E F}
11751175
\end{bnf}
11761176

11771177
\begin{bnf}
@@ -1186,17 +1186,17 @@
11861186

11871187
\begin{bnf}
11881188
\nontermdef{unsigned-suffix} \textnormal{one of}\br
1189-
\terminal{u U}
1189+
\literalterminal{u U}
11901190
\end{bnf}
11911191

11921192
\begin{bnf}
11931193
\nontermdef{long-suffix} \textnormal{one of}\br
1194-
\terminal{l L}
1194+
\literalterminal{l L}
11951195
\end{bnf}
11961196

11971197
\begin{bnf}
11981198
\nontermdef{long-long-suffix} \textnormal{one of}\br
1199-
\terminal{ll LL}
1199+
\literalterminal{ll LL}
12001200
\end{bnf}
12011201

12021202
\begin{bnf}
@@ -1235,7 +1235,7 @@
12351235

12361236
\pnum
12371237
The \grammarterm{hexadecimal-digit}s
1238-
\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F}
1238+
\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F}
12391239
have decimal values ten through fifteen.
12401240
\begin{example}
12411241
The number twelve can be written \tcode{12}, \tcode{014},
@@ -1279,7 +1279,7 @@
12791279
&
12801280
&
12811281
\tcode{unsigned long long int}\\\hline
1282-
\tcode{u} or \tcode{U} &
1282+
\literaltcode{u} or \literaltcode{U} &
12831283
\tcode{unsigned int} &
12841284
\tcode{unsigned int}\\
12851285
&
@@ -1288,7 +1288,7 @@
12881288
&
12891289
\tcode{unsigned long long int} &
12901290
\tcode{unsigned long long int}\\\hline
1291-
\tcode{l} or \tcode{L} &
1291+
\literaltcode{l} or \literaltcode{L} &
12921292
\tcode{long int} &
12931293
\tcode{long int}\\
12941294
&
@@ -1300,22 +1300,22 @@
13001300
&
13011301
&
13021302
\tcode{unsigned long long int}\\\hline
1303-
Both \tcode{u} or \tcode{U} &
1303+
Both \literaltcode{u} or \literaltcode{U} &
13041304
\tcode{unsigned long int} &
13051305
\tcode{unsigned long int}\\
1306-
and \tcode{l} or \tcode{L} &
1306+
and \literaltcode{l} or \literaltcode{L} &
13071307
\tcode{unsigned long long int} &
13081308
\tcode{unsigned long long int}\\\hline
1309-
\tcode{ll} or \tcode{LL} &
1309+
\literaltcode{ll} or \literaltcode{LL} &
13101310
\tcode{long long int} &
13111311
\tcode{long long int}\\
13121312
&
13131313
&
13141314
\tcode{unsigned long long int}\\\hline
1315-
Both \tcode{u} or \tcode{U} &
1315+
Both \literaltcode{u} or \literaltcode{U} &
13161316
\tcode{unsigned long long int} &
13171317
\tcode{unsigned long long int}\\
1318-
and \tcode{ll} or \tcode{LL} &
1318+
and \literaltcode{ll} or \literaltcode{LL} &
13191319
&
13201320
\\\hline
13211321
\tcode{z} or \tcode{Z} &
@@ -1363,12 +1363,12 @@
13631363
\indextext{literal!character}%
13641364
\begin{bnf}
13651365
\nontermdef{character-literal}\br
1366-
\opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'}
1366+
\opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'}
13671367
\end{bnf}
13681368

13691369
\begin{bnf}
13701370
\nontermdef{encoding-prefix} \textnormal{one of}\br
1371-
\terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L}
1371+
\literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L}
13721372
\end{bnf}
13731373

13741374
\begin{bnf}
@@ -1421,16 +1421,16 @@
14211421

14221422
\begin{bnf}
14231423
\nontermdef{octal-escape-sequence}\br
1424-
\terminal{\textbackslash} octal-digit\br
1425-
\terminal{\textbackslash} octal-digit octal-digit\br
1426-
\terminal{\textbackslash} octal-digit octal-digit octal-digit\br
1427-
\terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}\br
1424+
\literalterminal{\textbackslash} octal-digit\br
1425+
\literalterminal{\textbackslash} octal-digit octal-digit\br
1426+
\literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br
1427+
\literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}\br
14281428
\end{bnf}
14291429

14301430
\begin{bnf}
14311431
\nontermdef{hexadecimal-escape-sequence}\br
1432-
\terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1433-
\terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}}
1432+
\literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br
1433+
\literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}}
14341434
\end{bnf}
14351435

14361436
\begin{bnf}
@@ -1618,42 +1618,42 @@
16181618

16191619
\begin{bnf}
16201620
\nontermdef{fractional-constant}\br
1621-
\opt{digit-sequence} \terminal{.} digit-sequence\br
1622-
digit-sequence \terminal{.}
1621+
\opt{digit-sequence} \literalterminal{.} digit-sequence\br
1622+
digit-sequence \literalterminal{.}
16231623
\end{bnf}
16241624

16251625
\begin{bnf}
16261626
\nontermdef{hexadecimal-fractional-constant}\br
1627-
\opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br
1628-
hexadecimal-digit-sequence \terminal{.}
1627+
\opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br
1628+
hexadecimal-digit-sequence \literalterminal{.}
16291629
\end{bnf}
16301630

16311631
\begin{bnf}
16321632
\nontermdef{exponent-part}\br
1633-
\terminal{e} \opt{sign} digit-sequence\br
1634-
\terminal{E} \opt{sign} digit-sequence
1633+
\literalterminal{e} \opt{sign} digit-sequence\br
1634+
\literalterminal{E} \opt{sign} digit-sequence
16351635
\end{bnf}
16361636

16371637
\begin{bnf}
16381638
\nontermdef{binary-exponent-part}\br
1639-
\terminal{p} \opt{sign} digit-sequence\br
1640-
\terminal{P} \opt{sign} digit-sequence
1639+
\literalterminal{p} \opt{sign} digit-sequence\br
1640+
\literalterminal{P} \opt{sign} digit-sequence
16411641
\end{bnf}
16421642

16431643
\begin{bnf}
16441644
\nontermdef{sign} \textnormal{one of}\br
1645-
\terminal{+ -}
1645+
\literalterminal{+ -}
16461646
\end{bnf}
16471647

16481648
\begin{bnf}
16491649
\nontermdef{digit-sequence}\br
16501650
digit\br
1651-
digit-sequence \opt{\terminal{'}} digit
1651+
digit-sequence \opt{\literalterminal{'}} digit
16521652
\end{bnf}
16531653

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

16591659
\pnum
@@ -1681,13 +1681,13 @@
16811681
\topline
16821682
\lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
16831683
none & \keyword{double} \\
1684-
\tcode{f} or \tcode{F} & \keyword {float} \\
1685-
\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\
1686-
\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\
1687-
\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\
1688-
\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\
1689-
\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\
1690-
\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\
1684+
\literaltcode{f} or \literaltcode{F} & \keyword {float} \\
1685+
\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\
1686+
\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\
1687+
\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\
1688+
\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\
1689+
\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\
1690+
\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\
16911691
\end{simpletypetable}
16921692

16931693
\pnum
@@ -1738,8 +1738,8 @@
17381738
\indextext{literal!string}%
17391739
\begin{bnf}
17401740
\nontermdef{string-literal}\br
1741-
\opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br
1742-
\opt{encoding-prefix} \terminal{R} raw-string
1741+
\opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br
1742+
\opt{encoding-prefix} \literalterminal{R} raw-string
17431743
\end{bnf}
17441744

17451745
\begin{bnf}
@@ -1763,7 +1763,7 @@
17631763

17641764
\begin{bnf}
17651765
\nontermdef{raw-string}\br
1766-
\terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"}
1766+
\literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"}
17671767
\end{bnf}
17681768

17691769
\begin{bnf}
@@ -1850,7 +1850,7 @@
18501850

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

source/regex.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3803,7 +3803,7 @@
38033803

38043804
\begin{ncrebnf}
38053805
\renontermdef{ClassAtom}\br
3806-
\terminal{-}\br
3806+
\noncxxterminal{-}\br
38073807
ClassAtomNoDash\br
38083808
ClassAtomExClass\br
38093809
ClassAtomCollatingElement\br
@@ -3812,25 +3812,25 @@
38123812

38133813
\begin{ncrebnf}
38143814
\renontermdef{IdentityEscape}\br
3815-
SourceCharacter \textnormal{\textbf{but not}} \terminal{c}
3815+
SourceCharacter \textnormal{\textbf{but not}} \noncxxterminal{c}
38163816
\end{ncrebnf}
38173817

38183818
\pnum
38193819
The following new productions are then added:
38203820

38213821
\begin{ncrebnf}
38223822
\renontermdef{ClassAtomExClass}\br
3823-
\terminal{[:} ClassName \terminal{:]}
3823+
\noncxxterminal{[:} ClassName \noncxxterminal{:]}
38243824
\end{ncrebnf}
38253825

38263826
\begin{ncrebnf}
38273827
\renontermdef{ClassAtomCollatingElement}\br
3828-
\terminal{[.} ClassName \terminal{.]}
3828+
\noncxxterminal{[.} ClassName \noncxxterminal{.]}
38293829
\end{ncrebnf}
38303830

38313831
\begin{ncrebnf}
38323832
\renontermdef{ClassAtomEquivalence}\br
3833-
\terminal{[=} ClassName \terminal{=]}
3833+
\noncxxterminal{[=} ClassName \noncxxterminal{=]}
38343834
\end{ncrebnf}
38353835

38363836
\begin{ncrebnf}
@@ -3841,7 +3841,7 @@
38413841

38423842
\begin{ncrebnf}
38433843
\renontermdef{ClassNameCharacter}\br
3844-
SourceCharacter \textnormal{\textbf{but not one of}} \terminal{.} \textnormal{\textbf{or}} \terminal{=} \textnormal{\textbf{or}} \terminal{:}
3844+
SourceCharacter \textnormal{\textbf{but not one of}} \noncxxterminal{.} \textnormal{\textbf{or}} \noncxxterminal{=} \textnormal{\textbf{or}} \noncxxterminal{:}
38453845
\end{ncrebnf}
38463846

38473847
\pnum

0 commit comments

Comments
 (0)