|
324 | 324 |
|
325 | 325 | \begin{bnf}
|
326 | 326 | \nontermdef{named-universal-character}\br
|
327 |
| - \terminal{\textbackslash N\{} n-char-sequence \terminal{\}} |
| 327 | + \literalterminal{\textbackslash N\{} n-char-sequence \literalterminal{\}} |
328 | 328 | \end{bnf}
|
329 | 329 |
|
330 | 330 | \begin{bnf}
|
|
340 | 340 |
|
341 | 341 | \begin{bnf}
|
342 | 342 | \nontermdef{universal-character-name}\br
|
343 |
| - \terminal{\textbackslash u} hex-quad\br |
344 |
| - \terminal{\textbackslash U} hex-quad hex-quad\br |
345 |
| - \terminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \terminal{\}}\br |
| 343 | + \literalterminal{\textbackslash u} hex-quad\br |
| 344 | + \literalterminal{\textbackslash U} hex-quad hex-quad\br |
| 345 | + \literalterminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \literalterminal{\}}\br |
346 | 346 | named-universal-character
|
347 | 347 | \end{bnf}
|
348 | 348 |
|
349 | 349 | \pnum
|
350 | 350 | A \grammarterm{universal-character-name}
|
351 |
| -of the form \tcode{\textbackslash u} \grammarterm{hex-quad}, |
352 |
| -\tcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or |
353 |
| -\tcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}} |
| 351 | +of the form \literaltcode{\textbackslash u} \grammarterm{hex-quad}, |
| 352 | +\literaltcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or |
| 353 | +\literaltcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}} |
354 | 354 | designates the character in the translation character set
|
355 | 355 | whose UCS scalar value is the hexadecimal number represented by
|
356 | 356 | the sequence of \grammarterm{hexadecimal-digit}s
|
|
613 | 613 | \item
|
614 | 614 | \indextext{literal!string!raw}%
|
615 | 615 | If the next character begins a sequence of characters that could be the prefix
|
616 |
| -and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing |
| 616 | +and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing |
617 | 617 | token shall be a raw string literal. Between the initial and final
|
618 | 618 | double quote characters of the raw string, any transformations performed in phase
|
619 | 619 | 2 (line splicing) are reverted; this reversion
|
620 | 620 | shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
|
621 | 621 | parenthesis is identified. The raw string literal is defined as the shortest sequence
|
622 | 622 | of characters that matches the raw-string pattern
|
623 | 623 | \begin{ncbnf}
|
624 |
| -\opt{encoding-prefix} \terminal{R} raw-string |
| 624 | +\opt{encoding-prefix} \literalterminal{R} raw-string |
625 | 625 | \end{ncbnf}
|
626 | 626 |
|
627 | 627 | \item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
|
|
851 | 851 | \begin{bnf}
|
852 | 852 | \nontermdef{pp-number}\br
|
853 | 853 | digit\br
|
854 |
| - \terminal{.} digit\br |
| 854 | + \literalterminal{.} digit\br |
855 | 855 | pp-number identifier-continue\br
|
856 |
| - pp-number \terminal{'} digit\br |
857 |
| - pp-number \terminal{'} nondigit\br |
858 |
| - pp-number \terminal{e} sign\br |
859 |
| - pp-number \terminal{E} sign\br |
860 |
| - pp-number \terminal{p} sign\br |
861 |
| - pp-number \terminal{P} sign\br |
862 |
| - pp-number \terminal{.} |
| 856 | + pp-number \literalterminal{'} digit\br |
| 857 | + pp-number \literalterminal{'} nondigit\br |
| 858 | + pp-number \literalterminal{e} sign\br |
| 859 | + pp-number \literalterminal{E} sign\br |
| 860 | + pp-number \literalterminal{p} sign\br |
| 861 | + pp-number \literalterminal{P} sign\br |
| 862 | + pp-number \literalterminal{.} |
863 | 863 | \end{bnf}
|
864 | 864 |
|
865 | 865 | \pnum
|
|
1195 | 1195 | \nontermdef{binary-literal}\br
|
1196 | 1196 | \terminal{0b} binary-digit\br
|
1197 | 1197 | \terminal{0B} binary-digit\br
|
1198 |
| - binary-literal \opt{\terminal{'}} binary-digit |
| 1198 | + binary-literal \opt{\literalterminal{'}} binary-digit |
1199 | 1199 | \end{bnf}
|
1200 | 1200 |
|
1201 | 1201 | \begin{bnf}
|
1202 | 1202 | \nontermdef{octal-literal}\br
|
1203 | 1203 | \terminal{0}\br
|
1204 |
| - octal-literal \opt{\terminal{'}} octal-digit |
| 1204 | + octal-literal \opt{\literalterminal{'}} octal-digit |
1205 | 1205 | \end{bnf}
|
1206 | 1206 |
|
1207 | 1207 | \begin{bnf}
|
1208 | 1208 | \nontermdef{decimal-literal}\br
|
1209 | 1209 | nonzero-digit\br
|
1210 |
| - decimal-literal \opt{\terminal{'}} digit |
| 1210 | + decimal-literal \opt{\literalterminal{'}} digit |
1211 | 1211 | \end{bnf}
|
1212 | 1212 |
|
1213 | 1213 | \begin{bnf}
|
|
1238 | 1238 | \begin{bnf}
|
1239 | 1239 | \nontermdef{hexadecimal-digit-sequence}\br
|
1240 | 1240 | hexadecimal-digit\br
|
1241 |
| - hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit |
| 1241 | + hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit |
1242 | 1242 | \end{bnf}
|
1243 | 1243 |
|
1244 | 1244 | \begin{bnf}
|
1245 | 1245 | \nontermdef{hexadecimal-digit} \textnormal{one of}\br
|
1246 |
| - \terminal{0 1 2 3 4 5 6 7 8 9}\br |
1247 |
| - \terminal{a b c d e f}\br |
1248 |
| - \terminal{A B C D E F} |
| 1246 | + \literalterminal{0 1 2 3 4 5 6 7 8 9}\br |
| 1247 | + \literalterminal{a b c d e f}\br |
| 1248 | + \literalterminal{A B C D E F} |
1249 | 1249 | \end{bnf}
|
1250 | 1250 |
|
1251 | 1251 | \begin{bnf}
|
|
1260 | 1260 |
|
1261 | 1261 | \begin{bnf}
|
1262 | 1262 | \nontermdef{unsigned-suffix} \textnormal{one of}\br
|
1263 |
| - \terminal{u U} |
| 1263 | + \literalterminal{u U} |
1264 | 1264 | \end{bnf}
|
1265 | 1265 |
|
1266 | 1266 | \begin{bnf}
|
1267 | 1267 | \nontermdef{long-suffix} \textnormal{one of}\br
|
1268 |
| - \terminal{l L} |
| 1268 | + \literalterminal{l L} |
1269 | 1269 | \end{bnf}
|
1270 | 1270 |
|
1271 | 1271 | \begin{bnf}
|
1272 | 1272 | \nontermdef{long-long-suffix} \textnormal{one of}\br
|
1273 |
| - \terminal{ll LL} |
| 1273 | + \literalterminal{ll LL} |
1274 | 1274 | \end{bnf}
|
1275 | 1275 |
|
1276 | 1276 | \begin{bnf}
|
|
1309 | 1309 |
|
1310 | 1310 | \pnum
|
1311 | 1311 | The \grammarterm{hexadecimal-digit}s
|
1312 |
| -\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F} |
| 1312 | +\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F} |
1313 | 1313 | have decimal values ten through fifteen.
|
1314 | 1314 | \begin{example}
|
1315 | 1315 | The number twelve can be written \tcode{12}, \tcode{014},
|
|
1353 | 1353 | &
|
1354 | 1354 | &
|
1355 | 1355 | \tcode{unsigned long long int}\\\hline
|
1356 |
| -\tcode{u} or \tcode{U} & |
| 1356 | +\literaltcode{u} or \literaltcode{U} & |
1357 | 1357 | \tcode{unsigned int} &
|
1358 | 1358 | \tcode{unsigned int}\\
|
1359 | 1359 | &
|
|
1362 | 1362 | &
|
1363 | 1363 | \tcode{unsigned long long int} &
|
1364 | 1364 | \tcode{unsigned long long int}\\\hline
|
1365 |
| -\tcode{l} or \tcode{L} & |
| 1365 | +\literaltcode{l} or \literaltcode{L} & |
1366 | 1366 | \tcode{long int} &
|
1367 | 1367 | \tcode{long int}\\
|
1368 | 1368 | &
|
|
1374 | 1374 | &
|
1375 | 1375 | &
|
1376 | 1376 | \tcode{unsigned long long int}\\\hline
|
1377 |
| -Both \tcode{u} or \tcode{U} & |
| 1377 | +Both \literaltcode{u} or \literaltcode{U} & |
1378 | 1378 | \tcode{unsigned long int} &
|
1379 | 1379 | \tcode{unsigned long int}\\
|
1380 |
| -and \tcode{l} or \tcode{L} & |
| 1380 | +and \literaltcode{l} or \literaltcode{L} & |
1381 | 1381 | \tcode{unsigned long long int} &
|
1382 | 1382 | \tcode{unsigned long long int}\\\hline
|
1383 |
| -\tcode{ll} or \tcode{LL} & |
| 1383 | +\literaltcode{ll} or \literaltcode{LL} & |
1384 | 1384 | \tcode{long long int} &
|
1385 | 1385 | \tcode{long long int}\\
|
1386 | 1386 | &
|
1387 | 1387 | &
|
1388 | 1388 | \tcode{unsigned long long int}\\\hline
|
1389 |
| -Both \tcode{u} or \tcode{U} & |
| 1389 | +Both \literaltcode{u} or \literaltcode{U} & |
1390 | 1390 | \tcode{unsigned long long int} &
|
1391 | 1391 | \tcode{unsigned long long int}\\
|
1392 |
| -and \tcode{ll} or \tcode{LL} & |
| 1392 | +and \literaltcode{ll} or \literaltcode{LL} & |
1393 | 1393 | &
|
1394 | 1394 | \\\hline
|
1395 | 1395 | \tcode{z} or \tcode{Z} &
|
|
1431 | 1431 | \indextext{literal!character}%
|
1432 | 1432 | \begin{bnf}
|
1433 | 1433 | \nontermdef{character-literal}\br
|
1434 |
| - \opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'} |
| 1434 | + \opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'} |
1435 | 1435 | \end{bnf}
|
1436 | 1436 |
|
1437 | 1437 | \begin{bnf}
|
1438 | 1438 | \nontermdef{encoding-prefix} \textnormal{one of}\br
|
1439 |
| - \terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L} |
| 1439 | + \literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L} |
1440 | 1440 | \end{bnf}
|
1441 | 1441 |
|
1442 | 1442 | \begin{bnf}
|
|
1489 | 1489 |
|
1490 | 1490 | \begin{bnf}
|
1491 | 1491 | \nontermdef{octal-escape-sequence}\br
|
1492 |
| - \terminal{\textbackslash} octal-digit\br |
1493 |
| - \terminal{\textbackslash} octal-digit octal-digit\br |
1494 |
| - \terminal{\textbackslash} octal-digit octal-digit octal-digit\br |
1495 |
| - \terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}\br |
| 1492 | + \literalterminal{\textbackslash} octal-digit\br |
| 1493 | + \literalterminal{\textbackslash} octal-digit octal-digit\br |
| 1494 | + \literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br |
| 1495 | + \literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}\br |
1496 | 1496 | \end{bnf}
|
1497 | 1497 |
|
1498 | 1498 | \begin{bnf}
|
1499 | 1499 | \nontermdef{hexadecimal-escape-sequence}\br
|
1500 |
| - \terminal{\textbackslash x} hexadecimal-digit\br |
| 1500 | + \literalterminal{\textbackslash x} hexadecimal-digit\br |
1501 | 1501 | hexadecimal-escape-sequence hexadecimal-digit\br
|
1502 |
| - \terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}} |
| 1502 | + \literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}} |
1503 | 1503 | \end{bnf}
|
1504 | 1504 |
|
1505 | 1505 | \begin{bnf}
|
|
1716 | 1716 |
|
1717 | 1717 | \begin{bnf}
|
1718 | 1718 | \nontermdef{fractional-constant}\br
|
1719 |
| - \opt{digit-sequence} \terminal{.} digit-sequence\br |
1720 |
| - digit-sequence \terminal{.} |
| 1719 | + \opt{digit-sequence} \literalterminal{.} digit-sequence\br |
| 1720 | + digit-sequence \literalterminal{.} |
1721 | 1721 | \end{bnf}
|
1722 | 1722 |
|
1723 | 1723 | \begin{bnf}
|
1724 | 1724 | \nontermdef{hexadecimal-fractional-constant}\br
|
1725 |
| - \opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br |
1726 |
| - hexadecimal-digit-sequence \terminal{.} |
| 1725 | + \opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br |
| 1726 | + hexadecimal-digit-sequence \literalterminal{.} |
1727 | 1727 | \end{bnf}
|
1728 | 1728 |
|
1729 | 1729 | \begin{bnf}
|
1730 | 1730 | \nontermdef{exponent-part}\br
|
1731 |
| - \terminal{e} \opt{sign} digit-sequence\br |
1732 |
| - \terminal{E} \opt{sign} digit-sequence |
| 1731 | + \literalterminal{e} \opt{sign} digit-sequence\br |
| 1732 | + \literalterminal{E} \opt{sign} digit-sequence |
1733 | 1733 | \end{bnf}
|
1734 | 1734 |
|
1735 | 1735 | \begin{bnf}
|
1736 | 1736 | \nontermdef{binary-exponent-part}\br
|
1737 |
| - \terminal{p} \opt{sign} digit-sequence\br |
1738 |
| - \terminal{P} \opt{sign} digit-sequence |
| 1737 | + \literalterminal{p} \opt{sign} digit-sequence\br |
| 1738 | + \literalterminal{P} \opt{sign} digit-sequence |
1739 | 1739 | \end{bnf}
|
1740 | 1740 |
|
1741 | 1741 | \begin{bnf}
|
1742 | 1742 | \nontermdef{sign} \textnormal{one of}\br
|
1743 |
| - \terminal{+ -} |
| 1743 | + \literalterminal{+ -} |
1744 | 1744 | \end{bnf}
|
1745 | 1745 |
|
1746 | 1746 | \begin{bnf}
|
1747 | 1747 | \nontermdef{digit-sequence}\br
|
1748 | 1748 | digit\br
|
1749 |
| - digit-sequence \opt{\terminal{'}} digit |
| 1749 | + digit-sequence \opt{\literalterminal{'}} digit |
1750 | 1750 | \end{bnf}
|
1751 | 1751 |
|
1752 | 1752 | \begin{bnf}
|
1753 | 1753 | \nontermdef{floating-point-suffix} \textnormal{one of}\br
|
1754 |
| - \terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} |
| 1754 | + \literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} |
1755 | 1755 | \end{bnf}
|
1756 | 1756 |
|
1757 | 1757 | \pnum
|
|
1779 | 1779 | \topline
|
1780 | 1780 | \lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
|
1781 | 1781 | none & \keyword{double} \\
|
1782 |
| -\tcode{f} or \tcode{F} & \keyword {float} \\ |
1783 |
| -\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\ |
1784 |
| -\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\ |
1785 |
| -\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\ |
1786 |
| -\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\ |
1787 |
| -\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\ |
1788 |
| -\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\ |
| 1782 | +\literaltcode{f} or \literaltcode{F} & \keyword {float} \\ |
| 1783 | +\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\ |
| 1784 | +\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\ |
| 1785 | +\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\ |
| 1786 | +\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\ |
| 1787 | +\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\ |
| 1788 | +\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\ |
1789 | 1789 | \end{simpletypetable}
|
1790 | 1790 |
|
1791 | 1791 | \pnum
|
|
1836 | 1836 | \indextext{literal!string}%
|
1837 | 1837 | \begin{bnf}
|
1838 | 1838 | \nontermdef{string-literal}\br
|
1839 |
| - \opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br |
1840 |
| - \opt{encoding-prefix} \terminal{R} raw-string |
| 1839 | + \opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br |
| 1840 | + \opt{encoding-prefix} \literalterminal{R} raw-string |
1841 | 1841 | \end{bnf}
|
1842 | 1842 |
|
1843 | 1843 | \begin{bnf}
|
|
1861 | 1861 |
|
1862 | 1862 | \begin{bnf}
|
1863 | 1863 | \nontermdef{raw-string}\br
|
1864 |
| - \terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"} |
| 1864 | + \literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"} |
1865 | 1865 | \end{bnf}
|
1866 | 1866 |
|
1867 | 1867 | \begin{bnf}
|
|
1948 | 1948 |
|
1949 | 1949 | \pnum
|
1950 | 1950 | \indextext{literal!string!raw}%
|
1951 |
| -A \grammarterm{string-literal} that has an \tcode{R} |
| 1951 | +A \grammarterm{string-literal} that has an \literaltcode{R} |
1952 | 1952 | \indextext{prefix!\idxcode{R}}%
|
1953 | 1953 | in the prefix is a \defn{raw string literal}. The
|
1954 | 1954 | \grammarterm{d-char-sequence} serves as a delimiter. The terminating
|
|
0 commit comments