|
331 | 331 |
|
332 | 332 | \begin{bnf}
|
333 | 333 | \nontermdef{named-universal-character}\br
|
334 |
| - \terminal{\textbackslash N\{} n-char-sequence \terminal{\}} |
| 334 | + \literalterminal{\textbackslash N\{} n-char-sequence \literalterminal{\}} |
335 | 335 | \end{bnf}
|
336 | 336 |
|
337 | 337 | \begin{bnf}
|
|
347 | 347 |
|
348 | 348 | \begin{bnf}
|
349 | 349 | \nontermdef{universal-character-name}\br
|
350 |
| - \terminal{\textbackslash u} hex-quad\br |
351 |
| - \terminal{\textbackslash U} hex-quad hex-quad\br |
352 |
| - \terminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \terminal{\}}\br |
| 350 | + \literalterminal{\textbackslash u} hex-quad\br |
| 351 | + \literalterminal{\textbackslash U} hex-quad hex-quad\br |
| 352 | + \literalterminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \literalterminal{\}}\br |
353 | 353 | named-universal-character
|
354 | 354 | \end{bnf}
|
355 | 355 |
|
356 | 356 | \pnum
|
357 | 357 | A \grammarterm{universal-character-name}
|
358 |
| -of the form \tcode{\textbackslash u} \grammarterm{hex-quad}, |
359 |
| -\tcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or |
360 |
| -\tcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}} |
| 358 | +of the form \literaltcode{\textbackslash u} \grammarterm{hex-quad}, |
| 359 | +\literaltcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or |
| 360 | +\literaltcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}} |
361 | 361 | designates the character in the translation character set
|
362 | 362 | whose Unicode scalar value is the hexadecimal number represented by
|
363 | 363 | the sequence of \grammarterm{hexadecimal-digit}s
|
|
518 | 518 | \item
|
519 | 519 | \indextext{literal!string!raw}%
|
520 | 520 | If the next character begins a sequence of characters that could be the prefix
|
521 |
| -and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing |
| 521 | +and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing |
522 | 522 | token shall be a raw string literal. Between the initial and final
|
523 | 523 | double quote characters of the raw string, any transformations performed in phase
|
524 | 524 | 2 (line splicing) are reverted; this reversion
|
525 | 525 | shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
|
526 | 526 | parenthesis is identified. The raw string literal is defined as the shortest sequence
|
527 | 527 | of characters that matches the raw-string pattern
|
528 | 528 | \begin{ncbnf}
|
529 |
| -\opt{encoding-prefix} \terminal{R} raw-string |
| 529 | +\opt{encoding-prefix} \literalterminal{R} raw-string |
530 | 530 | \end{ncbnf}
|
531 | 531 |
|
532 | 532 | \item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
|
|
757 | 757 | \begin{bnf}
|
758 | 758 | \nontermdef{pp-number}\br
|
759 | 759 | digit\br
|
760 |
| - \terminal{.} digit\br |
| 760 | + \literalterminal{.} digit\br |
761 | 761 | pp-number identifier-continue\br
|
762 |
| - pp-number \terminal{'} digit\br |
763 |
| - pp-number \terminal{'} nondigit\br |
764 |
| - pp-number \terminal{e} sign\br |
765 |
| - pp-number \terminal{E} sign\br |
766 |
| - pp-number \terminal{p} sign\br |
767 |
| - pp-number \terminal{P} sign\br |
768 |
| - pp-number \terminal{.} |
| 762 | + pp-number \literalterminal{'} digit\br |
| 763 | + pp-number \literalterminal{'} nondigit\br |
| 764 | + pp-number \literalterminal{e} sign\br |
| 765 | + pp-number \literalterminal{E} sign\br |
| 766 | + pp-number \literalterminal{p} sign\br |
| 767 | + pp-number \literalterminal{P} sign\br |
| 768 | + pp-number \literalterminal{.} |
769 | 769 | \end{bnf}
|
770 | 770 |
|
771 | 771 | \pnum
|
|
1105 | 1105 | \nontermdef{binary-literal}\br
|
1106 | 1106 | \terminal{0b} binary-digit\br
|
1107 | 1107 | \terminal{0B} binary-digit\br
|
1108 |
| - binary-literal \opt{\terminal{'}} binary-digit |
| 1108 | + binary-literal \opt{\literalterminal{'}} binary-digit |
1109 | 1109 | \end{bnf}
|
1110 | 1110 |
|
1111 | 1111 | \begin{bnf}
|
1112 | 1112 | \nontermdef{octal-literal}\br
|
1113 | 1113 | \terminal{0}\br
|
1114 |
| - octal-literal \opt{\terminal{'}} octal-digit |
| 1114 | + octal-literal \opt{\literalterminal{'}} octal-digit |
1115 | 1115 | \end{bnf}
|
1116 | 1116 |
|
1117 | 1117 | \begin{bnf}
|
1118 | 1118 | \nontermdef{decimal-literal}\br
|
1119 | 1119 | nonzero-digit\br
|
1120 |
| - decimal-literal \opt{\terminal{'}} digit |
| 1120 | + decimal-literal \opt{\literalterminal{'}} digit |
1121 | 1121 | \end{bnf}
|
1122 | 1122 |
|
1123 | 1123 | \begin{bnf}
|
|
1148 | 1148 | \begin{bnf}
|
1149 | 1149 | \nontermdef{hexadecimal-digit-sequence}\br
|
1150 | 1150 | hexadecimal-digit\br
|
1151 |
| - hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit |
| 1151 | + hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit |
1152 | 1152 | \end{bnf}
|
1153 | 1153 |
|
1154 | 1154 | \begin{bnf}
|
1155 | 1155 | \nontermdef{hexadecimal-digit} \textnormal{one of}\br
|
1156 |
| - \terminal{0 1 2 3 4 5 6 7 8 9}\br |
1157 |
| - \terminal{a b c d e f}\br |
1158 |
| - \terminal{A B C D E F} |
| 1156 | + \literalterminal{0 1 2 3 4 5 6 7 8 9}\br |
| 1157 | + \literalterminal{a b c d e f}\br |
| 1158 | + \literalterminal{A B C D E F} |
1159 | 1159 | \end{bnf}
|
1160 | 1160 |
|
1161 | 1161 | \begin{bnf}
|
|
1170 | 1170 |
|
1171 | 1171 | \begin{bnf}
|
1172 | 1172 | \nontermdef{unsigned-suffix} \textnormal{one of}\br
|
1173 |
| - \terminal{u U} |
| 1173 | + \literalterminal{u U} |
1174 | 1174 | \end{bnf}
|
1175 | 1175 |
|
1176 | 1176 | \begin{bnf}
|
1177 | 1177 | \nontermdef{long-suffix} \textnormal{one of}\br
|
1178 |
| - \terminal{l L} |
| 1178 | + \literalterminal{l L} |
1179 | 1179 | \end{bnf}
|
1180 | 1180 |
|
1181 | 1181 | \begin{bnf}
|
1182 | 1182 | \nontermdef{long-long-suffix} \textnormal{one of}\br
|
1183 |
| - \terminal{ll LL} |
| 1183 | + \literalterminal{ll LL} |
1184 | 1184 | \end{bnf}
|
1185 | 1185 |
|
1186 | 1186 | \begin{bnf}
|
|
1219 | 1219 |
|
1220 | 1220 | \pnum
|
1221 | 1221 | The \grammarterm{hexadecimal-digit}s
|
1222 |
| -\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F} |
| 1222 | +\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F} |
1223 | 1223 | have decimal values ten through fifteen.
|
1224 | 1224 | \begin{example}
|
1225 | 1225 | The number twelve can be written \tcode{12}, \tcode{014},
|
|
1263 | 1263 | &
|
1264 | 1264 | &
|
1265 | 1265 | \tcode{unsigned long long int}\\\hline
|
1266 |
| -\tcode{u} or \tcode{U} & |
| 1266 | +\literaltcode{u} or \literaltcode{U} & |
1267 | 1267 | \tcode{unsigned int} &
|
1268 | 1268 | \tcode{unsigned int}\\
|
1269 | 1269 | &
|
|
1272 | 1272 | &
|
1273 | 1273 | \tcode{unsigned long long int} &
|
1274 | 1274 | \tcode{unsigned long long int}\\\hline
|
1275 |
| -\tcode{l} or \tcode{L} & |
| 1275 | +\literaltcode{l} or \literaltcode{L} & |
1276 | 1276 | \tcode{long int} &
|
1277 | 1277 | \tcode{long int}\\
|
1278 | 1278 | &
|
|
1284 | 1284 | &
|
1285 | 1285 | &
|
1286 | 1286 | \tcode{unsigned long long int}\\\hline
|
1287 |
| -Both \tcode{u} or \tcode{U} & |
| 1287 | +Both \literaltcode{u} or \literaltcode{U} & |
1288 | 1288 | \tcode{unsigned long int} &
|
1289 | 1289 | \tcode{unsigned long int}\\
|
1290 |
| -and \tcode{l} or \tcode{L} & |
| 1290 | +and \literaltcode{l} or \literaltcode{L} & |
1291 | 1291 | \tcode{unsigned long long int} &
|
1292 | 1292 | \tcode{unsigned long long int}\\\hline
|
1293 |
| -\tcode{ll} or \tcode{LL} & |
| 1293 | +\literaltcode{ll} or \literaltcode{LL} & |
1294 | 1294 | \tcode{long long int} &
|
1295 | 1295 | \tcode{long long int}\\
|
1296 | 1296 | &
|
1297 | 1297 | &
|
1298 | 1298 | \tcode{unsigned long long int}\\\hline
|
1299 |
| -Both \tcode{u} or \tcode{U} & |
| 1299 | +Both \literaltcode{u} or \literaltcode{U} & |
1300 | 1300 | \tcode{unsigned long long int} &
|
1301 | 1301 | \tcode{unsigned long long int}\\
|
1302 |
| -and \tcode{ll} or \tcode{LL} & |
| 1302 | +and \literaltcode{ll} or \literaltcode{LL} & |
1303 | 1303 | &
|
1304 | 1304 | \\\hline
|
1305 | 1305 | \tcode{z} or \tcode{Z} &
|
|
1347 | 1347 | \indextext{literal!character}%
|
1348 | 1348 | \begin{bnf}
|
1349 | 1349 | \nontermdef{character-literal}\br
|
1350 |
| - \opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'} |
| 1350 | + \opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'} |
1351 | 1351 | \end{bnf}
|
1352 | 1352 |
|
1353 | 1353 | \begin{bnf}
|
1354 | 1354 | \nontermdef{encoding-prefix} \textnormal{one of}\br
|
1355 |
| - \terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L} |
| 1355 | + \literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L} |
1356 | 1356 | \end{bnf}
|
1357 | 1357 |
|
1358 | 1358 | \begin{bnf}
|
|
1405 | 1405 |
|
1406 | 1406 | \begin{bnf}
|
1407 | 1407 | \nontermdef{octal-escape-sequence}\br
|
1408 |
| - \terminal{\textbackslash} octal-digit\br |
1409 |
| - \terminal{\textbackslash} octal-digit octal-digit\br |
1410 |
| - \terminal{\textbackslash} octal-digit octal-digit octal-digit\br |
1411 |
| - \terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}\br |
| 1408 | + \literalterminal{\textbackslash} octal-digit\br |
| 1409 | + \literalterminal{\textbackslash} octal-digit octal-digit\br |
| 1410 | + \literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br |
| 1411 | + \literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}\br |
1412 | 1412 | \end{bnf}
|
1413 | 1413 |
|
1414 | 1414 | \begin{bnf}
|
1415 | 1415 | \nontermdef{hexadecimal-escape-sequence}\br
|
1416 |
| - \terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br |
1417 |
| - \terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}} |
| 1416 | + \literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br |
| 1417 | + \literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}} |
1418 | 1418 | \end{bnf}
|
1419 | 1419 |
|
1420 | 1420 | \begin{bnf}
|
|
1602 | 1602 |
|
1603 | 1603 | \begin{bnf}
|
1604 | 1604 | \nontermdef{fractional-constant}\br
|
1605 |
| - \opt{digit-sequence} \terminal{.} digit-sequence\br |
1606 |
| - digit-sequence \terminal{.} |
| 1605 | + \opt{digit-sequence} \literalterminal{.} digit-sequence\br |
| 1606 | + digit-sequence \literalterminal{.} |
1607 | 1607 | \end{bnf}
|
1608 | 1608 |
|
1609 | 1609 | \begin{bnf}
|
1610 | 1610 | \nontermdef{hexadecimal-fractional-constant}\br
|
1611 |
| - \opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br |
1612 |
| - hexadecimal-digit-sequence \terminal{.} |
| 1611 | + \opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br |
| 1612 | + hexadecimal-digit-sequence \literalterminal{.} |
1613 | 1613 | \end{bnf}
|
1614 | 1614 |
|
1615 | 1615 | \begin{bnf}
|
1616 | 1616 | \nontermdef{exponent-part}\br
|
1617 |
| - \terminal{e} \opt{sign} digit-sequence\br |
1618 |
| - \terminal{E} \opt{sign} digit-sequence |
| 1617 | + \literalterminal{e} \opt{sign} digit-sequence\br |
| 1618 | + \literalterminal{E} \opt{sign} digit-sequence |
1619 | 1619 | \end{bnf}
|
1620 | 1620 |
|
1621 | 1621 | \begin{bnf}
|
1622 | 1622 | \nontermdef{binary-exponent-part}\br
|
1623 |
| - \terminal{p} \opt{sign} digit-sequence\br |
1624 |
| - \terminal{P} \opt{sign} digit-sequence |
| 1623 | + \literalterminal{p} \opt{sign} digit-sequence\br |
| 1624 | + \literalterminal{P} \opt{sign} digit-sequence |
1625 | 1625 | \end{bnf}
|
1626 | 1626 |
|
1627 | 1627 | \begin{bnf}
|
1628 | 1628 | \nontermdef{sign} \textnormal{one of}\br
|
1629 |
| - \terminal{+ -} |
| 1629 | + \literalterminal{+ -} |
1630 | 1630 | \end{bnf}
|
1631 | 1631 |
|
1632 | 1632 | \begin{bnf}
|
1633 | 1633 | \nontermdef{digit-sequence}\br
|
1634 | 1634 | digit\br
|
1635 |
| - digit-sequence \opt{\terminal{'}} digit |
| 1635 | + digit-sequence \opt{\literalterminal{'}} digit |
1636 | 1636 | \end{bnf}
|
1637 | 1637 |
|
1638 | 1638 | \begin{bnf}
|
1639 | 1639 | \nontermdef{floating-point-suffix} \textnormal{one of}\br
|
1640 |
| - \terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} |
| 1640 | + \literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} |
1641 | 1641 | \end{bnf}
|
1642 | 1642 |
|
1643 | 1643 | \pnum
|
|
1665 | 1665 | \topline
|
1666 | 1666 | \lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
|
1667 | 1667 | none & \keyword{double} \\
|
1668 |
| -\tcode{f} or \tcode{F} & \keyword {float} \\ |
1669 |
| -\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\ |
1670 |
| -\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\ |
1671 |
| -\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\ |
1672 |
| -\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\ |
1673 |
| -\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\ |
1674 |
| -\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\ |
| 1668 | +\literaltcode{f} or \literaltcode{F} & \keyword {float} \\ |
| 1669 | +\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\ |
| 1670 | +\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\ |
| 1671 | +\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\ |
| 1672 | +\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\ |
| 1673 | +\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\ |
| 1674 | +\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\ |
1675 | 1675 | \end{simpletypetable}
|
1676 | 1676 |
|
1677 | 1677 | \pnum
|
|
1722 | 1722 | \indextext{literal!string}%
|
1723 | 1723 | \begin{bnf}
|
1724 | 1724 | \nontermdef{string-literal}\br
|
1725 |
| - \opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br |
1726 |
| - \opt{encoding-prefix} \terminal{R} raw-string |
| 1725 | + \opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br |
| 1726 | + \opt{encoding-prefix} \literalterminal{R} raw-string |
1727 | 1727 | \end{bnf}
|
1728 | 1728 |
|
1729 | 1729 | \begin{bnf}
|
|
1747 | 1747 |
|
1748 | 1748 | \begin{bnf}
|
1749 | 1749 | \nontermdef{raw-string}\br
|
1750 |
| - \terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"} |
| 1750 | + \literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"} |
1751 | 1751 | \end{bnf}
|
1752 | 1752 |
|
1753 | 1753 | \begin{bnf}
|
|
1834 | 1834 |
|
1835 | 1835 | \pnum
|
1836 | 1836 | \indextext{literal!string!raw}%
|
1837 |
| -A \grammarterm{string-literal} that has an \tcode{R} |
| 1837 | +A \grammarterm{string-literal} that has an \literaltcode{R} |
1838 | 1838 | \indextext{prefix!\idxcode{R}}%
|
1839 | 1839 | in the prefix is a \defn{raw string literal}. The
|
1840 | 1840 | \grammarterm{d-char-sequence} serves as a delimiter. The terminating
|
|
0 commit comments