|
327 | 327 |
|
328 | 328 | \begin{bnf}
|
329 | 329 | \nontermdef{named-universal-character}\br
|
330 |
| - \terminal{\textbackslash N\{} n-char-sequence \terminal{\}} |
| 330 | + \literalterminal{\textbackslash N\{} n-char-sequence \literalterminal{\}} |
331 | 331 | \end{bnf}
|
332 | 332 |
|
333 | 333 | \begin{bnf}
|
|
343 | 343 |
|
344 | 344 | \begin{bnf}
|
345 | 345 | \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 |
349 | 349 | named-universal-character
|
350 | 350 | \end{bnf}
|
351 | 351 |
|
352 | 352 | \pnum
|
353 | 353 | 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}\}} |
357 | 357 | designates the character in the translation character set
|
358 | 358 | whose Unicode scalar value is the hexadecimal number represented by
|
359 | 359 | the sequence of \grammarterm{hexadecimal-digit}s
|
|
514 | 514 | \item
|
515 | 515 | \indextext{literal!string!raw}%
|
516 | 516 | 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 |
518 | 518 | token shall be a raw string literal. Between the initial and final
|
519 | 519 | double quote characters of the raw string, any transformations performed in phase
|
520 | 520 | 2 (line splicing) are reverted; this reversion
|
521 | 521 | shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
|
522 | 522 | parenthesis is identified. The raw string literal is defined as the shortest sequence
|
523 | 523 | of characters that matches the raw-string pattern
|
524 | 524 | \begin{ncbnf}
|
525 |
| -\opt{encoding-prefix} \terminal{R} raw-string |
| 525 | +\opt{encoding-prefix} \literalterminal{R} raw-string |
526 | 526 | \end{ncbnf}
|
527 | 527 |
|
528 | 528 | \item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
|
|
752 | 752 | \begin{bnf}
|
753 | 753 | \nontermdef{pp-number}\br
|
754 | 754 | digit\br
|
755 |
| - \terminal{.} digit\br |
| 755 | + \literalterminal{.} digit\br |
756 | 756 | 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{.} |
764 | 764 | \end{bnf}
|
765 | 765 |
|
766 | 766 | \pnum
|
|
1100 | 1100 | \nontermdef{binary-literal}\br
|
1101 | 1101 | \terminal{0b} binary-digit\br
|
1102 | 1102 | \terminal{0B} binary-digit\br
|
1103 |
| - binary-literal \opt{\terminal{'}} binary-digit |
| 1103 | + binary-literal \opt{\literalterminal{'}} binary-digit |
1104 | 1104 | \end{bnf}
|
1105 | 1105 |
|
1106 | 1106 | \begin{bnf}
|
1107 | 1107 | \nontermdef{octal-literal}\br
|
1108 | 1108 | \terminal{0}\br
|
1109 |
| - octal-literal \opt{\terminal{'}} octal-digit |
| 1109 | + octal-literal \opt{\literalterminal{'}} octal-digit |
1110 | 1110 | \end{bnf}
|
1111 | 1111 |
|
1112 | 1112 | \begin{bnf}
|
1113 | 1113 | \nontermdef{decimal-literal}\br
|
1114 | 1114 | nonzero-digit\br
|
1115 |
| - decimal-literal \opt{\terminal{'}} digit |
| 1115 | + decimal-literal \opt{\literalterminal{'}} digit |
1116 | 1116 | \end{bnf}
|
1117 | 1117 |
|
1118 | 1118 | \begin{bnf}
|
|
1143 | 1143 | \begin{bnf}
|
1144 | 1144 | \nontermdef{hexadecimal-digit-sequence}\br
|
1145 | 1145 | hexadecimal-digit\br
|
1146 |
| - hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit |
| 1146 | + hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit |
1147 | 1147 | \end{bnf}
|
1148 | 1148 |
|
1149 | 1149 | \begin{bnf}
|
1150 | 1150 | \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} |
1154 | 1154 | \end{bnf}
|
1155 | 1155 |
|
1156 | 1156 | \begin{bnf}
|
|
1165 | 1165 |
|
1166 | 1166 | \begin{bnf}
|
1167 | 1167 | \nontermdef{unsigned-suffix} \textnormal{one of}\br
|
1168 |
| - \terminal{u U} |
| 1168 | + \literalterminal{u U} |
1169 | 1169 | \end{bnf}
|
1170 | 1170 |
|
1171 | 1171 | \begin{bnf}
|
1172 | 1172 | \nontermdef{long-suffix} \textnormal{one of}\br
|
1173 |
| - \terminal{l L} |
| 1173 | + \literalterminal{l L} |
1174 | 1174 | \end{bnf}
|
1175 | 1175 |
|
1176 | 1176 | \begin{bnf}
|
1177 | 1177 | \nontermdef{long-long-suffix} \textnormal{one of}\br
|
1178 |
| - \terminal{ll LL} |
| 1178 | + \literalterminal{ll LL} |
1179 | 1179 | \end{bnf}
|
1180 | 1180 |
|
1181 | 1181 | \begin{bnf}
|
|
1214 | 1214 |
|
1215 | 1215 | \pnum
|
1216 | 1216 | 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} |
1218 | 1218 | have decimal values ten through fifteen.
|
1219 | 1219 | \begin{example}
|
1220 | 1220 | The number twelve can be written \tcode{12}, \tcode{014},
|
|
1258 | 1258 | &
|
1259 | 1259 | &
|
1260 | 1260 | \tcode{unsigned long long int}\\\hline
|
1261 |
| -\tcode{u} or \tcode{U} & |
| 1261 | +\literaltcode{u} or \literaltcode{U} & |
1262 | 1262 | \tcode{unsigned int} &
|
1263 | 1263 | \tcode{unsigned int}\\
|
1264 | 1264 | &
|
|
1267 | 1267 | &
|
1268 | 1268 | \tcode{unsigned long long int} &
|
1269 | 1269 | \tcode{unsigned long long int}\\\hline
|
1270 |
| -\tcode{l} or \tcode{L} & |
| 1270 | +\literaltcode{l} or \literaltcode{L} & |
1271 | 1271 | \tcode{long int} &
|
1272 | 1272 | \tcode{long int}\\
|
1273 | 1273 | &
|
|
1279 | 1279 | &
|
1280 | 1280 | &
|
1281 | 1281 | \tcode{unsigned long long int}\\\hline
|
1282 |
| -Both \tcode{u} or \tcode{U} & |
| 1282 | +Both \literaltcode{u} or \literaltcode{U} & |
1283 | 1283 | \tcode{unsigned long int} &
|
1284 | 1284 | \tcode{unsigned long int}\\
|
1285 |
| -and \tcode{l} or \tcode{L} & |
| 1285 | +and \literaltcode{l} or \literaltcode{L} & |
1286 | 1286 | \tcode{unsigned long long int} &
|
1287 | 1287 | \tcode{unsigned long long int}\\\hline
|
1288 |
| -\tcode{ll} or \tcode{LL} & |
| 1288 | +\literaltcode{ll} or \literaltcode{LL} & |
1289 | 1289 | \tcode{long long int} &
|
1290 | 1290 | \tcode{long long int}\\
|
1291 | 1291 | &
|
1292 | 1292 | &
|
1293 | 1293 | \tcode{unsigned long long int}\\\hline
|
1294 |
| -Both \tcode{u} or \tcode{U} & |
| 1294 | +Both \literaltcode{u} or \literaltcode{U} & |
1295 | 1295 | \tcode{unsigned long long int} &
|
1296 | 1296 | \tcode{unsigned long long int}\\
|
1297 |
| -and \tcode{ll} or \tcode{LL} & |
| 1297 | +and \literaltcode{ll} or \literaltcode{LL} & |
1298 | 1298 | &
|
1299 | 1299 | \\\hline
|
1300 | 1300 | \tcode{z} or \tcode{Z} &
|
|
1336 | 1336 | \indextext{literal!character}%
|
1337 | 1337 | \begin{bnf}
|
1338 | 1338 | \nontermdef{character-literal}\br
|
1339 |
| - \opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'} |
| 1339 | + \opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'} |
1340 | 1340 | \end{bnf}
|
1341 | 1341 |
|
1342 | 1342 | \begin{bnf}
|
1343 | 1343 | \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} |
1345 | 1345 | \end{bnf}
|
1346 | 1346 |
|
1347 | 1347 | \begin{bnf}
|
|
1394 | 1394 |
|
1395 | 1395 | \begin{bnf}
|
1396 | 1396 | \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 |
1401 | 1401 | \end{bnf}
|
1402 | 1402 |
|
1403 | 1403 | \begin{bnf}
|
1404 | 1404 | \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{\}} |
1407 | 1407 | \end{bnf}
|
1408 | 1408 |
|
1409 | 1409 | \begin{bnf}
|
|
1620 | 1620 |
|
1621 | 1621 | \begin{bnf}
|
1622 | 1622 | \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{.} |
1625 | 1625 | \end{bnf}
|
1626 | 1626 |
|
1627 | 1627 | \begin{bnf}
|
1628 | 1628 | \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{.} |
1631 | 1631 | \end{bnf}
|
1632 | 1632 |
|
1633 | 1633 | \begin{bnf}
|
1634 | 1634 | \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 |
1637 | 1637 | \end{bnf}
|
1638 | 1638 |
|
1639 | 1639 | \begin{bnf}
|
1640 | 1640 | \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 |
1643 | 1643 | \end{bnf}
|
1644 | 1644 |
|
1645 | 1645 | \begin{bnf}
|
1646 | 1646 | \nontermdef{sign} \textnormal{one of}\br
|
1647 |
| - \terminal{+ -} |
| 1647 | + \literalterminal{+ -} |
1648 | 1648 | \end{bnf}
|
1649 | 1649 |
|
1650 | 1650 | \begin{bnf}
|
1651 | 1651 | \nontermdef{digit-sequence}\br
|
1652 | 1652 | digit\br
|
1653 |
| - digit-sequence \opt{\terminal{'}} digit |
| 1653 | + digit-sequence \opt{\literalterminal{'}} digit |
1654 | 1654 | \end{bnf}
|
1655 | 1655 |
|
1656 | 1656 | \begin{bnf}
|
1657 | 1657 | \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} |
1659 | 1659 | \end{bnf}
|
1660 | 1660 |
|
1661 | 1661 | \pnum
|
|
1683 | 1683 | \topline
|
1684 | 1684 | \lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
|
1685 | 1685 | 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} \\ |
1693 | 1693 | \end{simpletypetable}
|
1694 | 1694 |
|
1695 | 1695 | \pnum
|
|
1740 | 1740 | \indextext{literal!string}%
|
1741 | 1741 | \begin{bnf}
|
1742 | 1742 | \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 |
1745 | 1745 | \end{bnf}
|
1746 | 1746 |
|
1747 | 1747 | \begin{bnf}
|
|
1765 | 1765 |
|
1766 | 1766 | \begin{bnf}
|
1767 | 1767 | \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{"} |
1769 | 1769 | \end{bnf}
|
1770 | 1770 |
|
1771 | 1771 | \begin{bnf}
|
|
1852 | 1852 |
|
1853 | 1853 | \pnum
|
1854 | 1854 | \indextext{literal!string!raw}%
|
1855 |
| -A \grammarterm{string-literal} that has an \tcode{R} |
| 1855 | +A \grammarterm{string-literal} that has an \literaltcode{R} |
1856 | 1856 | \indextext{prefix!\idxcode{R}}%
|
1857 | 1857 | in the prefix is a \defn{raw string literal}. The
|
1858 | 1858 | \grammarterm{d-char-sequence} serves as a delimiter. The terminating
|
|
0 commit comments