|
185 | 185 | "`false`":"kw_false", |
186 | 186 | "`true`":"kw_true", |
187 | 187 | "`nullptr`":"kw_nullptr", |
| 188 | + "`binary-literal`":"binary_literal", |
| 189 | + "`floating-point-literal`":"floating_point_literal", |
| 190 | + "`character-literal`":"char_literal", |
| 191 | + "`string-literal`":"string_literal", |
| 192 | + "`integer-literal`":"integer_literal", |
| 193 | + "`decimal-literal`":"decimal_literal", |
| 194 | + "`octal-literal`":"octal_literal", |
| 195 | + "`hexadecimal-literal`":"hexadecimal_literal", |
| 196 | + "`raw-string`":"raw_string", |
| 197 | + "`user-defined-character-literal`":"user_defined_char_literal", |
| 198 | + "`user-defined-string-literal`":"user_defined_string_literal", |
| 199 | + "`user-defined-floating-point-literal`":"user_defined_floating_point_literal", |
| 200 | + "`user-defined-integer-literal`":"user_defined_integer_literal", |
188 | 201 | } |
189 | 202 |
|
190 | 203 | gram_tree = {} |
|
654 | 667 |
|
655 | 668 | gram_tree["static_assert-declaration"] = [ |
656 | 669 | ["`static_assert`", "`(`", "constant-expression", "`)`", "`;`"], |
657 | | - ["`static_assert`", "`(`", "constant-expression", "`,`", "string-literal", "`)`", "`;`"] |
| 670 | + ["`static_assert`", "`(`", "constant-expression", "`,`", "`string-literal`", "`)`", "`;`"] |
658 | 671 | ] |
659 | 672 |
|
660 | 673 | gram_tree["empty-declaration"] = [ |
|
1056 | 1069 | ] |
1057 | 1070 |
|
1058 | 1071 | gram_tree["asm-declaration"] = [ |
1059 | | - "attribute-specifier-seq[opt]", "`asm`", "`(`", "string-literal", "`)`", "`;`", |
| 1072 | + "attribute-specifier-seq[opt]", "`asm`", "`(`", "`string-literal`", "`)`", "`;`", |
1060 | 1073 | ] |
1061 | 1074 |
|
1062 | 1075 | gram_tree["linkage-specification"] = [ |
1063 | | - ["`extern`", "string-literal", "`{`", "declaration-seq[opt]", "`}`"], |
1064 | | - ["`extern`", "string-literal", "declaration"], |
| 1076 | + ["`extern`", "`string-literal`", "`{`", "declaration-seq[opt]", "`}`"], |
| 1077 | + ["`extern`", "`string-literal`", "declaration"], |
1065 | 1078 | ] |
1066 | 1079 |
|
1067 | 1080 | gram_tree["attribute-specifier-seq"] = [ |
1068 | | - "attribute-specifier", "attribute-specifier-seq[opt]", |
| 1081 | + "attribute-specifier", "attribute-specifier-seq[opt]", |
1069 | 1082 | ] |
1070 | 1083 |
|
1071 | 1084 | gram_tree["attribute-specifier"] = [ |
|
1310 | 1323 | ] |
1311 | 1324 |
|
1312 | 1325 | gram_tree["literal-operator-id"] = [ |
1313 | | - ["`operator`", "string-literal", "`identifier`"], |
1314 | | - ["`operator`", "user-defined-string-literal"], |
| 1326 | + ["`operator`", "`string-literal`", "`identifier`"], |
| 1327 | + ["`operator`", "`user-defined-string-literal`"], |
1315 | 1328 | ] |
1316 | 1329 |
|
1317 | 1330 | gram_tree["template-declaration"] = [ |
|
1562 | 1575 | ] |
1563 | 1576 |
|
1564 | 1577 | gram_tree["header-name-tokens"] = [ |
1565 | | - ["string-literal"], |
| 1578 | + ["`string-literal`"], |
1566 | 1579 | ["`<`", "h-pp-tokens", "`>`"], |
1567 | 1580 | ] |
1568 | 1581 |
|
|
1605 | 1618 | ["`export`"], |
1606 | 1619 | ["`identifier`"], |
1607 | 1620 | ["pp-number"], |
1608 | | - ["character-literal"], |
1609 | | - ["user-defined-character-literal"], |
1610 | | - ["string-literal"], |
1611 | | - ["user-defined-string-literal"], |
| 1621 | + ["`character-literal`"], |
| 1622 | + ["`user-defined-character-literal`"], |
| 1623 | + ["`string-literal`"], |
| 1624 | + ["`user-defined-string-literal`"], |
1612 | 1625 | ["preprocessing-op-or-punc"], |
1613 | 1626 | # each non-whitespace character that cannot be one of the above |
1614 | 1627 | ] |
|
1698 | 1711 | ] |
1699 | 1712 |
|
1700 | 1713 | gram_tree["literal"] = [ |
1701 | | - ["integer-literal"], |
1702 | | - ["character-literal"], |
1703 | | - ["floating-point-literal"], |
1704 | | - ["string-literal"], |
| 1714 | + ["`integer-literal`"], |
| 1715 | + ["`binary-literal`"], |
| 1716 | + ["`octal-literal`"], |
| 1717 | + ["`decimal-literal`"], |
| 1718 | + ["`hexadecimal-literal`"], |
| 1719 | + ["`character-literal`"], |
| 1720 | + ["`floating-point-literal`"], |
| 1721 | + ["`string-literal`"], |
1705 | 1722 | ["boolean-literal"], |
1706 | 1723 | ["pointer-literal"], |
1707 | 1724 | ["user-defined-literal"], |
1708 | 1725 | ] |
1709 | 1726 |
|
1710 | | -gram_tree["integer-literal"] = [ |
1711 | | - ["binary-literal", "integer-suffix[opt]"], |
1712 | | - ["octal-literal", "integer-suffix[opt]"], |
1713 | | - ["decimal-literal", "integer-suffix[opt]"], |
1714 | | - ["hexadecimal-literal", "integer-suffix[opt]"], |
1715 | | -] |
1716 | | - |
1717 | | -gram_tree["binary-literal"] = [ |
1718 | | - ["`0b`", "binary-digit"], |
1719 | | - ["`0B`", "`binary-digit`"], |
1720 | | - ["binary-literal", "`'`"], |
1721 | | - ["binary-literal", "`'`[opt]", "binary-digit"], |
1722 | | -] |
1723 | | - |
1724 | | -gram_tree["octal-literal"] = [ |
1725 | | - ["`0`"], |
1726 | | - ["octal-literal", "`'`[opt]", "octal-digit"], |
1727 | | -] |
1728 | | - |
1729 | | -gram_tree["decimal-literal"] = [ |
1730 | | - ["nonzero-digit"], |
1731 | | - ["decimal-literal", "`'`[opt]", "digit"], |
1732 | | -] |
1733 | | - |
1734 | | -gram_tree["hexadecimal-literal"] = [ |
1735 | | - "hexadecimal-prefix", "hexadecimal-digit-sequence", |
1736 | | -] |
1737 | | - |
1738 | 1727 | gram_tree["binary-digit"] = [ |
1739 | 1728 | ["`0`"], |
1740 | 1729 | ["`1`"], |
|
1810 | 1799 | ["`ll`"], ["`LL`"], |
1811 | 1800 | ] |
1812 | 1801 |
|
1813 | | -gram_tree["character-literal"] = [ |
1814 | | - "encoding-prefix[opt]", "`'`","c-char-sequence", "`'`", |
1815 | | -] |
1816 | | - |
1817 | 1802 | gram_tree["encoding-prefix"] = [ |
1818 | 1803 | ["`u8`"],["`u`"], ["`U`"], ["`L`"], |
1819 | 1804 | ] |
|
1851 | 1836 | ["hexadecimal-escape-sequence", "hexadecimal-digit"], |
1852 | 1837 | ] |
1853 | 1838 |
|
1854 | | -gram_tree["floating-point-literal"] = [ |
1855 | | - ["decimal-floating-point-literal"], |
1856 | | - ["hexadecimal-floating-point-literal"], |
1857 | | -] |
1858 | | - |
1859 | 1839 | gram_tree["decimal-floating-point-literal"] = [ |
1860 | 1840 | ["fractional-constant", "exponent-part[opt]", "floating-point-suffix[opt]"], |
1861 | 1841 | ["digit-sequence", "exponent-part[opt]", "floating-point-suffix[opt]"], |
|
1899 | 1879 | ["`f`"], ["`l`"], ["`F`"], ["`L`"], |
1900 | 1880 | ] |
1901 | 1881 |
|
1902 | | -gram_tree["string-literal"] = [ |
1903 | | - ["encoding-prefix[opt]", '`"`', "s-char-sequence[opt]", '`"`'], |
1904 | | - ["encoding-prefix[opt]", '`R`', "raw-string"], |
1905 | | -] |
1906 | | - |
1907 | 1882 | gram_tree["s-char-sequence"] = [ |
1908 | 1883 | ["s-char"], |
1909 | 1884 | ["s-char-sequence", "s-char"], |
|
1915 | 1890 | ["universal-character-name"], |
1916 | 1891 | ] |
1917 | 1892 |
|
1918 | | -gram_tree["raw-string"] = [ |
1919 | | - '`"`', "d-char-sequence[opt]", "`(`", "r-char-sequence[opt]" ,"`)`", "d-char-sequence[opt]", '`"`', |
1920 | | -] |
1921 | 1893 |
|
1922 | 1894 | gram_tree["r-char-sequence"] = [ |
1923 | 1895 | ["r-char"], |
|
1950 | 1922 | ] |
1951 | 1923 |
|
1952 | 1924 | gram_tree["user-defined-literal"] = [ |
1953 | | - ["user-defined-integer-literal"], |
1954 | | - ["user-defined-floating-point-literal"], |
1955 | | - ["user-defined-string-literal"], |
1956 | | - ["user-defined-character-literal"], |
1957 | | -] |
1958 | | - |
1959 | | -gram_tree["user-defined-integer-literal"] = [ |
1960 | | - ["decimal-literal", "ud-suffix"], |
1961 | | - ["octal-literal", "ud-suffix"], |
1962 | | - ["hexadecimal-literal", "ud-suffix"], |
1963 | | - ["binary-literal", "ud-suffix"], |
1964 | | -] |
1965 | | - |
1966 | | -gram_tree["user-defined-floating-point-literal"] = [ |
1967 | | - ["fractional-constant", "exponent-part[opt]", "ud-suffix"], |
1968 | | - ["digit-sequence", "exponent-part", "ud-suffix"], |
1969 | | - ["hexadecimal-prefix", "hexadecimal-fractional-constant", "binary-exponent-part", "ud-suffix"], |
1970 | | - ["hexadecimal-prefix", "hexadecimal-digit-sequence", "binary-exponent-part", "ud-suffix"], |
| 1925 | + ["`user-defined-integer-literal`"], |
| 1926 | + ["`user-defined-floating-point-literal`"], |
| 1927 | + ["`user-defined-string-literal`"], |
| 1928 | + ["`user-defined-character-literal`"], |
1971 | 1929 | ] |
1972 | 1930 |
|
1973 | | -gram_tree["user-defined-string-literal"] = [ |
1974 | | - "string-literal", "ud-suffix", |
1975 | | -] |
1976 | | - |
1977 | | -gram_tree["user-defined-character-literal"] = [ |
1978 | | - "character-literal", "ud-suffix", |
1979 | | -] |
1980 | 1931 |
|
1981 | 1932 | gram_tree["ud-suffix"] = [ |
1982 | 1933 | "`identifier`", |
|
0 commit comments