|
342 | 342 |
|
343 | 343 | \begin{bnf}
|
344 | 344 | \nontermdef{named-universal-character}\br
|
345 |
| - \terminal{\textbackslash N\{} n-char-sequence \terminal{\}} |
| 345 | + \literalterminal{\textbackslash N\{} n-char-sequence \literalterminal{\}} |
346 | 346 | \end{bnf}
|
347 | 347 |
|
348 | 348 | \begin{bnf}
|
|
358 | 358 |
|
359 | 359 | \begin{bnf}
|
360 | 360 | \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 |
364 | 364 | named-universal-character
|
365 | 365 | \end{bnf}
|
366 | 366 |
|
367 | 367 | \pnum
|
368 | 368 | 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}\}} |
372 | 372 | designates the character in the translation character set
|
373 | 373 | whose Unicode scalar value is the hexadecimal number represented by
|
374 | 374 | the sequence of \grammarterm{hexadecimal-digit}s
|
|
530 | 530 | \item
|
531 | 531 | \indextext{literal!string!raw}%
|
532 | 532 | 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 |
534 | 534 | token shall be a raw string literal. Between the initial and final
|
535 | 535 | double quote characters of the raw string, any transformations performed in phase
|
536 | 536 | 2 (line splicing) are reverted; this reversion
|
537 | 537 | shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
|
538 | 538 | parenthesis is identified. The raw string literal is defined as the shortest sequence
|
539 | 539 | of characters that matches the raw-string pattern
|
540 | 540 | \begin{ncbnf}
|
541 |
| -\opt{encoding-prefix} \terminal{R} raw-string |
| 541 | +\opt{encoding-prefix} \literalterminal{R} raw-string |
542 | 542 | \end{ncbnf}
|
543 | 543 |
|
544 | 544 | \item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
|
|
768 | 768 | \begin{bnf}
|
769 | 769 | \nontermdef{pp-number}\br
|
770 | 770 | digit\br
|
771 |
| - \terminal{.} digit\br |
| 771 | + \literalterminal{.} digit\br |
772 | 772 | 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{.} |
780 | 780 | \end{bnf}
|
781 | 781 |
|
782 | 782 | \pnum
|
|
1121 | 1121 | \nontermdef{binary-literal}\br
|
1122 | 1122 | \terminal{0b} binary-digit\br
|
1123 | 1123 | \terminal{0B} binary-digit\br
|
1124 |
| - binary-literal \opt{\terminal{'}} binary-digit |
| 1124 | + binary-literal \opt{\literalterminal{'}} binary-digit |
1125 | 1125 | \end{bnf}
|
1126 | 1126 |
|
1127 | 1127 | \begin{bnf}
|
1128 | 1128 | \nontermdef{octal-literal}\br
|
1129 | 1129 | \terminal{0}\br
|
1130 |
| - octal-literal \opt{\terminal{'}} octal-digit |
| 1130 | + octal-literal \opt{\literalterminal{'}} octal-digit |
1131 | 1131 | \end{bnf}
|
1132 | 1132 |
|
1133 | 1133 | \begin{bnf}
|
1134 | 1134 | \nontermdef{decimal-literal}\br
|
1135 | 1135 | nonzero-digit\br
|
1136 |
| - decimal-literal \opt{\terminal{'}} digit |
| 1136 | + decimal-literal \opt{\literalterminal{'}} digit |
1137 | 1137 | \end{bnf}
|
1138 | 1138 |
|
1139 | 1139 | \begin{bnf}
|
|
1164 | 1164 | \begin{bnf}
|
1165 | 1165 | \nontermdef{hexadecimal-digit-sequence}\br
|
1166 | 1166 | hexadecimal-digit\br
|
1167 |
| - hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit |
| 1167 | + hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit |
1168 | 1168 | \end{bnf}
|
1169 | 1169 |
|
1170 | 1170 | \begin{bnf}
|
1171 | 1171 | \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} |
1175 | 1175 | \end{bnf}
|
1176 | 1176 |
|
1177 | 1177 | \begin{bnf}
|
|
1186 | 1186 |
|
1187 | 1187 | \begin{bnf}
|
1188 | 1188 | \nontermdef{unsigned-suffix} \textnormal{one of}\br
|
1189 |
| - \terminal{u U} |
| 1189 | + \literalterminal{u U} |
1190 | 1190 | \end{bnf}
|
1191 | 1191 |
|
1192 | 1192 | \begin{bnf}
|
1193 | 1193 | \nontermdef{long-suffix} \textnormal{one of}\br
|
1194 |
| - \terminal{l L} |
| 1194 | + \literalterminal{l L} |
1195 | 1195 | \end{bnf}
|
1196 | 1196 |
|
1197 | 1197 | \begin{bnf}
|
1198 | 1198 | \nontermdef{long-long-suffix} \textnormal{one of}\br
|
1199 |
| - \terminal{ll LL} |
| 1199 | + \literalterminal{ll LL} |
1200 | 1200 | \end{bnf}
|
1201 | 1201 |
|
1202 | 1202 | \begin{bnf}
|
|
1235 | 1235 |
|
1236 | 1236 | \pnum
|
1237 | 1237 | 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} |
1239 | 1239 | have decimal values ten through fifteen.
|
1240 | 1240 | \begin{example}
|
1241 | 1241 | The number twelve can be written \tcode{12}, \tcode{014},
|
|
1279 | 1279 | &
|
1280 | 1280 | &
|
1281 | 1281 | \tcode{unsigned long long int}\\\hline
|
1282 |
| -\tcode{u} or \tcode{U} & |
| 1282 | +\literaltcode{u} or \literaltcode{U} & |
1283 | 1283 | \tcode{unsigned int} &
|
1284 | 1284 | \tcode{unsigned int}\\
|
1285 | 1285 | &
|
|
1288 | 1288 | &
|
1289 | 1289 | \tcode{unsigned long long int} &
|
1290 | 1290 | \tcode{unsigned long long int}\\\hline
|
1291 |
| -\tcode{l} or \tcode{L} & |
| 1291 | +\literaltcode{l} or \literaltcode{L} & |
1292 | 1292 | \tcode{long int} &
|
1293 | 1293 | \tcode{long int}\\
|
1294 | 1294 | &
|
|
1300 | 1300 | &
|
1301 | 1301 | &
|
1302 | 1302 | \tcode{unsigned long long int}\\\hline
|
1303 |
| -Both \tcode{u} or \tcode{U} & |
| 1303 | +Both \literaltcode{u} or \literaltcode{U} & |
1304 | 1304 | \tcode{unsigned long int} &
|
1305 | 1305 | \tcode{unsigned long int}\\
|
1306 |
| -and \tcode{l} or \tcode{L} & |
| 1306 | +and \literaltcode{l} or \literaltcode{L} & |
1307 | 1307 | \tcode{unsigned long long int} &
|
1308 | 1308 | \tcode{unsigned long long int}\\\hline
|
1309 |
| -\tcode{ll} or \tcode{LL} & |
| 1309 | +\literaltcode{ll} or \literaltcode{LL} & |
1310 | 1310 | \tcode{long long int} &
|
1311 | 1311 | \tcode{long long int}\\
|
1312 | 1312 | &
|
1313 | 1313 | &
|
1314 | 1314 | \tcode{unsigned long long int}\\\hline
|
1315 |
| -Both \tcode{u} or \tcode{U} & |
| 1315 | +Both \literaltcode{u} or \literaltcode{U} & |
1316 | 1316 | \tcode{unsigned long long int} &
|
1317 | 1317 | \tcode{unsigned long long int}\\
|
1318 |
| -and \tcode{ll} or \tcode{LL} & |
| 1318 | +and \literaltcode{ll} or \literaltcode{LL} & |
1319 | 1319 | &
|
1320 | 1320 | \\\hline
|
1321 | 1321 | \tcode{z} or \tcode{Z} &
|
|
1363 | 1363 | \indextext{literal!character}%
|
1364 | 1364 | \begin{bnf}
|
1365 | 1365 | \nontermdef{character-literal}\br
|
1366 |
| - \opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'} |
| 1366 | + \opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'} |
1367 | 1367 | \end{bnf}
|
1368 | 1368 |
|
1369 | 1369 | \begin{bnf}
|
1370 | 1370 | \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} |
1372 | 1372 | \end{bnf}
|
1373 | 1373 |
|
1374 | 1374 | \begin{bnf}
|
|
1421 | 1421 |
|
1422 | 1422 | \begin{bnf}
|
1423 | 1423 | \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 |
1428 | 1428 | \end{bnf}
|
1429 | 1429 |
|
1430 | 1430 | \begin{bnf}
|
1431 | 1431 | \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{\}} |
1434 | 1434 | \end{bnf}
|
1435 | 1435 |
|
1436 | 1436 | \begin{bnf}
|
|
1618 | 1618 |
|
1619 | 1619 | \begin{bnf}
|
1620 | 1620 | \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{.} |
1623 | 1623 | \end{bnf}
|
1624 | 1624 |
|
1625 | 1625 | \begin{bnf}
|
1626 | 1626 | \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{.} |
1629 | 1629 | \end{bnf}
|
1630 | 1630 |
|
1631 | 1631 | \begin{bnf}
|
1632 | 1632 | \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 |
1635 | 1635 | \end{bnf}
|
1636 | 1636 |
|
1637 | 1637 | \begin{bnf}
|
1638 | 1638 | \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 |
1641 | 1641 | \end{bnf}
|
1642 | 1642 |
|
1643 | 1643 | \begin{bnf}
|
1644 | 1644 | \nontermdef{sign} \textnormal{one of}\br
|
1645 |
| - \terminal{+ -} |
| 1645 | + \literalterminal{+ -} |
1646 | 1646 | \end{bnf}
|
1647 | 1647 |
|
1648 | 1648 | \begin{bnf}
|
1649 | 1649 | \nontermdef{digit-sequence}\br
|
1650 | 1650 | digit\br
|
1651 |
| - digit-sequence \opt{\terminal{'}} digit |
| 1651 | + digit-sequence \opt{\literalterminal{'}} digit |
1652 | 1652 | \end{bnf}
|
1653 | 1653 |
|
1654 | 1654 | \begin{bnf}
|
1655 | 1655 | \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} |
1657 | 1657 | \end{bnf}
|
1658 | 1658 |
|
1659 | 1659 | \pnum
|
|
1681 | 1681 | \topline
|
1682 | 1682 | \lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
|
1683 | 1683 | 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} \\ |
1691 | 1691 | \end{simpletypetable}
|
1692 | 1692 |
|
1693 | 1693 | \pnum
|
|
1738 | 1738 | \indextext{literal!string}%
|
1739 | 1739 | \begin{bnf}
|
1740 | 1740 | \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 |
1743 | 1743 | \end{bnf}
|
1744 | 1744 |
|
1745 | 1745 | \begin{bnf}
|
|
1763 | 1763 |
|
1764 | 1764 | \begin{bnf}
|
1765 | 1765 | \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{"} |
1767 | 1767 | \end{bnf}
|
1768 | 1768 |
|
1769 | 1769 | \begin{bnf}
|
|
1850 | 1850 |
|
1851 | 1851 | \pnum
|
1852 | 1852 | \indextext{literal!string!raw}%
|
1853 |
| -A \grammarterm{string-literal} that has an \tcode{R} |
| 1853 | +A \grammarterm{string-literal} that has an \literaltcode{R} |
1854 | 1854 | \indextext{prefix!\idxcode{R}}%
|
1855 | 1855 | in the prefix is a \defn{raw string literal}. The
|
1856 | 1856 | \grammarterm{d-char-sequence} serves as a delimiter. The terminating
|
|
0 commit comments