From 86a496b8a30f591b9551207cd1338b2bb6453d9c Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 27 Aug 2019 12:51:10 +0200 Subject: [PATCH] Bug fix/fix in not in workaround (#9813) --- arangod/Aql/grammar.cpp | 2237 ++++++++-------- arangod/Aql/grammar.h | 66 +- arangod/Aql/grammar.hpp | 66 +- arangod/Aql/grammar.y | 27 +- arangod/Aql/tokens.cpp | 4251 ++++++++++++++++++------------ arangod/Aql/tokens.ll | 34 +- tests/js/server/aql/aql-parse.js | 79 +- 7 files changed, 3836 insertions(+), 2924 deletions(-) diff --git a/arangod/Aql/grammar.cpp b/arangod/Aql/grammar.cpp index af42c0bcb2..b0499c5ad2 100644 --- a/arangod/Aql/grammar.cpp +++ b/arangod/Aql/grammar.cpp @@ -173,39 +173,39 @@ extern int Aqldebug; T_NOT = 290, T_AND = 291, T_OR = 292, - T_NIN = 293, - T_REGEX_MATCH = 294, - T_REGEX_NON_MATCH = 295, - T_EQ = 296, - T_NE = 297, - T_LT = 298, - T_GT = 299, - T_LE = 300, - T_GE = 301, - T_LIKE = 302, - T_PLUS = 303, - T_MINUS = 304, - T_TIMES = 305, - T_DIV = 306, - T_MOD = 307, - T_QUESTION = 308, - T_COLON = 309, - T_SCOPE = 310, - T_RANGE = 311, - T_COMMA = 312, - T_OPEN = 313, - T_CLOSE = 314, - T_OBJECT_OPEN = 315, - T_OBJECT_CLOSE = 316, - T_ARRAY_OPEN = 317, - T_ARRAY_CLOSE = 318, - T_OUTBOUND = 319, - T_INBOUND = 320, - T_ANY = 321, - T_ALL = 322, - T_NONE = 323, - UMINUS = 324, - UPLUS = 325, + T_REGEX_MATCH = 293, + T_REGEX_NON_MATCH = 294, + T_EQ = 295, + T_NE = 296, + T_LT = 297, + T_GT = 298, + T_LE = 299, + T_GE = 300, + T_LIKE = 301, + T_PLUS = 302, + T_MINUS = 303, + T_TIMES = 304, + T_DIV = 305, + T_MOD = 306, + T_QUESTION = 307, + T_COLON = 308, + T_SCOPE = 309, + T_RANGE = 310, + T_COMMA = 311, + T_OPEN = 312, + T_CLOSE = 313, + T_OBJECT_OPEN = 314, + T_OBJECT_CLOSE = 315, + T_ARRAY_OPEN = 316, + T_ARRAY_CLOSE = 317, + T_OUTBOUND = 318, + T_INBOUND = 319, + T_ANY = 320, + T_ALL = 321, + T_NONE = 322, + UMINUS = 323, + UPLUS = 324, + UNEGATION = 325, FUNCCALL = 326, REFERENCE = 327, INDEXED = 328, @@ -663,16 +663,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 7 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1452 +#define YYLAST 1443 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 100 /* YYNRULES -- Number of rules. */ -#define YYNRULES 231 +#define YYNRULES 233 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 379 +#define YYNSTATES 387 #define YYUNDEFTOK 2 #define YYMAXUTOK 329 @@ -725,30 +725,30 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 393, 393, 396, 409, 413, 417, 424, 426, 426, - 438, 443, 448, 450, 453, 456, 459, 462, 468, 470, - 475, 477, 479, 481, 483, 485, 487, 489, 491, 493, - 495, 500, 507, 514, 520, 527, 554, 578, 591, 614, - 637, 637, 695, 695, 718, 736, 758, 766, 771, 773, - 778, 785, 795, 795, 809, 818, 830, 854, 910, 929, - 956, 958, 963, 970, 973, 976, 985, 999, 1016, 1016, - 1030, 1030, 1040, 1040, 1051, 1054, 1060, 1066, 1069, 1072, - 1075, 1081, 1086, 1093, 1101, 1104, 1110, 1120, 1130, 1138, - 1149, 1154, 1162, 1173, 1178, 1181, 1187, 1191, 1187, 1243, - 1246, 1249, 1255, 1255, 1265, 1271, 1274, 1277, 1280, 1283, - 1286, 1292, 1295, 1311, 1311, 1320, 1320, 1330, 1333, 1336, - 1342, 1345, 1348, 1351, 1354, 1357, 1360, 1363, 1366, 1369, - 1372, 1375, 1378, 1381, 1384, 1387, 1393, 1399, 1406, 1409, - 1412, 1415, 1418, 1421, 1424, 1427, 1433, 1436, 1442, 1444, - 1449, 1452, 1452, 1468, 1471, 1477, 1480, 1486, 1486, 1495, - 1497, 1502, 1505, 1511, 1514, 1540, 1560, 1563, 1577, 1577, - 1586, 1588, 1593, 1595, 1600, 1614, 1618, 1627, 1634, 1637, - 1643, 1646, 1652, 1655, 1658, 1664, 1667, 1673, 1676, 1679, - 1683, 1689, 1693, 1700, 1706, 1706, 1715, 1719, 1728, 1731, - 1734, 1740, 1743, 1749, 1782, 1785, 1788, 1795, 1805, 1805, - 1818, 1833, 1847, 1861, 1861, 1904, 1907, 1913, 1920, 1930, - 1933, 1936, 1939, 1942, 1948, 1952, 1956, 1966, 1973, 1979, - 1982, 1987 + 0, 392, 392, 395, 408, 412, 416, 423, 425, 425, + 437, 442, 447, 449, 452, 455, 458, 461, 467, 469, + 474, 476, 478, 480, 482, 484, 486, 488, 490, 492, + 494, 499, 506, 513, 519, 526, 553, 577, 590, 613, + 636, 636, 694, 694, 717, 735, 757, 765, 770, 772, + 777, 784, 794, 794, 808, 817, 829, 853, 909, 928, + 955, 957, 962, 969, 972, 975, 984, 998, 1015, 1015, + 1029, 1029, 1039, 1039, 1050, 1053, 1059, 1065, 1068, 1071, + 1074, 1080, 1085, 1092, 1100, 1103, 1109, 1119, 1129, 1137, + 1148, 1153, 1161, 1172, 1177, 1180, 1186, 1190, 1186, 1242, + 1245, 1248, 1254, 1254, 1264, 1270, 1273, 1276, 1279, 1282, + 1285, 1291, 1294, 1310, 1310, 1319, 1319, 1329, 1332, 1335, + 1341, 1344, 1347, 1350, 1353, 1356, 1359, 1362, 1365, 1368, + 1371, 1374, 1377, 1380, 1383, 1386, 1392, 1398, 1405, 1408, + 1411, 1414, 1417, 1420, 1423, 1426, 1430, 1434, 1441, 1444, + 1450, 1452, 1457, 1460, 1460, 1476, 1479, 1485, 1488, 1494, + 1494, 1503, 1505, 1510, 1513, 1519, 1522, 1548, 1568, 1571, + 1585, 1585, 1594, 1596, 1601, 1603, 1608, 1622, 1626, 1635, + 1642, 1645, 1651, 1654, 1660, 1663, 1666, 1672, 1675, 1681, + 1684, 1687, 1691, 1697, 1701, 1708, 1714, 1714, 1723, 1727, + 1736, 1739, 1742, 1748, 1751, 1757, 1789, 1792, 1795, 1802, + 1812, 1812, 1825, 1840, 1854, 1868, 1868, 1911, 1914, 1920, + 1927, 1937, 1940, 1943, 1946, 1949, 1955, 1959, 1963, 1973, + 1980, 1986, 1989, 1994 }; #endif @@ -770,15 +770,15 @@ static const char *const yytname[] = "\"quoted string\"", "\"integer number\"", "\"number\"", "\"bind parameter\"", "\"bind data source parameter\"", "\"assignment\"", "\"not operator\"", "\"and operator\"", "\"or operator\"", - "\"not in operator\"", "\"~= operator\"", "\"~! operator\"", - "\"== operator\"", "\"!= operator\"", "\"< operator\"", "\"> operator\"", - "\"<= operator\"", "\">= operator\"", "\"like operator\"", - "\"+ operator\"", "\"- operator\"", "\"* operator\"", "\"/ operator\"", - "\"% operator\"", "\"?\"", "\":\"", "\"::\"", "\"..\"", "\",\"", "\"(\"", - "\")\"", "\"{\"", "\"}\"", "\"[\"", "\"]\"", "\"outbound modifier\"", + "\"~= operator\"", "\"~! operator\"", "\"== operator\"", + "\"!= operator\"", "\"< operator\"", "\"> operator\"", "\"<= operator\"", + "\">= operator\"", "\"like operator\"", "\"+ operator\"", + "\"- operator\"", "\"* operator\"", "\"/ operator\"", "\"% operator\"", + "\"?\"", "\":\"", "\"::\"", "\"..\"", "\",\"", "\"(\"", "\")\"", "\"{\"", + "\"}\"", "\"[\"", "\"]\"", "\"outbound modifier\"", "\"inbound modifier\"", "\"any modifier\"", "\"all modifier\"", - "\"none modifier\"", "UMINUS", "UPLUS", "FUNCCALL", "REFERENCE", - "INDEXED", "EXPANSION", "'.'", "$accept", "with_collection", + "\"none modifier\"", "UMINUS", "UPLUS", "UNEGATION", "FUNCCALL", + "REFERENCE", "INDEXED", "EXPANSION", "'.'", "$accept", "with_collection", "with_collection_list", "optional_with", "$@1", "queryStart", "query", "final_statement", "optional_statement_block_statements", "statement_block_statement", "more_output_variables", @@ -826,12 +826,12 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -348 +#define YYPACT_NINF -362 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-348))) + (!!((Yystate) == (-362))) -#define YYTABLE_NINF -230 +#define YYTABLE_NINF -232 #define yytable_value_is_error(Yytable_value) \ 0 @@ -840,44 +840,45 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 4, -348, -348, 9, 7, -348, 748, -348, -348, -348, - -348, -348, 111, -348, 6, 6, 1352, 1158, 69, -348, - 1352, 1352, 1352, 1352, 1352, -348, -348, -348, -348, -348, - -348, 159, -348, -348, -348, -348, 30, 38, 42, 78, - 79, 7, -348, -348, -25, 36, -348, -16, -348, 25, - -348, -348, -348, -9, -348, -348, -348, 1352, 14, 1352, - 1352, 1352, -348, -348, 1031, 19, -348, -348, -348, -348, - -348, -348, -348, -46, -348, -348, -348, -348, -348, 1031, - 58, -348, 66, 6, 88, 1352, 564, 610, 610, -348, - 435, -348, 480, 1352, 6, 66, 84, 88, -348, 6, - 1196, 6, 1352, -348, -348, -348, -348, 652, -348, 29, - 1352, 1352, 1352, 1352, 1352, 1352, 1352, 1352, 1352, 1352, - 1352, 1352, 1352, 1352, 1352, 1352, 1352, 1352, 1352, 1238, - 1352, -348, -348, -348, 323, 113, -348, 1276, 125, 1352, - 133, 6, 85, -348, 105, -348, 144, 66, 132, -348, - 348, 1352, 1390, 137, 66, 66, 1352, 66, 1352, 66, - 1031, 172, -348, 85, 66, -348, 66, -348, -348, -348, - -348, -348, -348, -348, 278, 48, 1352, -348, 1031, 1314, - -348, 153, 171, -348, 176, 1352, 170, 156, -348, 179, - 1031, 175, 183, 251, 1114, 1073, 251, 204, 204, 204, - 204, 100, 100, 100, 100, 204, 152, 152, -348, -348, - -348, 1352, 694, 59, 1352, 1352, 1352, 1352, 1352, 1352, - 1352, 1352, -348, 1314, -348, 737, 191, -348, -348, 1031, - 6, 105, -348, 6, 1352, -348, 1352, -348, -348, -348, - -348, -348, -348, 1031, 177, 47, 187, -348, -348, -348, - -348, -348, -348, -348, 610, -348, 610, -348, 222, 1352, - 6, -348, -348, 217, 497, 223, -348, 1352, 1352, 390, - 1031, 198, -348, -348, 201, -348, 1352, 779, -348, 29, - 1352, -348, 1352, 1031, 1352, 251, 251, 204, 204, 100, - 100, 100, 100, 202, -348, -348, 259, -348, -348, 1031, - -348, 66, 66, 1352, 1031, 209, -348, 1352, -348, 1352, - -348, 821, 863, 131, -348, 212, -348, 235, -348, -348, - -348, 1352, 1031, 218, -348, 1031, 1031, 1031, -348, 1352, - 264, -348, -348, 522, 6, 905, 947, 1352, 1352, -348, - -348, -348, -348, -348, -348, 1352, 1031, 1352, 268, -348, - -348, 1352, -348, 85, 1352, 390, 390, -21, 1031, 989, - 1352, 213, 610, -348, 1031, 66, 66, -348, 220, 1352, - 1031, -348, 66, -348, -348, -21, 1031, -348, -348 + -11, -362, -362, 11, 8, -362, 330, -362, -362, -362, + -362, -362, 130, -362, 1, 1, 1345, 223, 86, -362, + 1345, 1345, 1345, 1345, 1345, -362, -362, -362, -362, -362, + -362, 97, -362, -362, -362, -362, 9, 15, 21, 28, + 33, 8, -362, -362, -22, 26, -362, -10, -362, 22, + -362, -362, -362, 38, -362, -362, -362, 1345, 58, 1345, + 1345, 1345, -362, -362, 1069, 40, -362, -362, -362, -362, + -362, -362, -362, -43, -362, -362, -362, -362, -362, 1069, + 44, -362, 107, 1, 52, 1345, 613, 658, 658, -362, + 441, -362, 485, 1345, 1, 107, 108, 52, -362, 1, + 1193, 1, 1345, -362, -362, -362, -362, 699, -362, 29, + 1345, 1345, 129, 1345, 1345, 1345, 1345, 1345, 1345, 1345, + 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1234, + 1345, 110, 121, 122, 192, 115, -362, 1271, 76, 1345, + 146, 1, 111, -362, 125, -362, 149, 107, 133, -362, + 356, 1345, 1382, 41, 107, 107, 1345, 107, 1345, 107, + 1069, 165, -362, 111, 107, -362, 107, -362, -362, -362, + -362, -362, -362, -362, 526, 36, 1345, -362, 1069, 1308, + -362, 145, 153, -362, 159, 1345, 158, 163, -362, 177, + 1069, 143, 182, 1187, 1345, 1150, 1110, 0, 0, 0, + 0, 127, 127, 127, 127, 0, 247, 247, -362, -362, + -362, 1345, 740, 227, 228, 232, 234, 1345, 1345, 1345, + 1345, 1345, 1345, 1345, -362, 1308, -362, 782, 198, -362, + -362, 1069, 1, 125, -362, 1, 1345, -362, 1345, -362, + -362, -362, -362, -362, -362, 1069, 144, 187, 299, -362, + -362, -362, -362, -362, -362, -362, 658, -362, 658, -362, + 236, 1345, 1, -362, -362, 231, 460, 235, -362, 1345, + 1345, 397, 1069, 202, -362, -362, 206, -362, 1345, 823, + -362, 29, 1345, -362, 1345, 1187, 1069, 1345, 1345, 1345, + 1345, 1187, 0, 0, 127, 127, 127, 127, 207, -362, + -362, 261, -362, -362, 1069, -362, 107, 107, 1345, 1069, + 212, -362, 1345, -362, 1345, -362, 864, 905, 184, -362, + 230, -362, 152, -362, -362, -362, 1345, 1069, 226, -362, + 1069, 1069, 1069, 1187, 1187, 1187, -362, 1345, 279, -362, + -362, 572, 1, 946, 987, 1345, 1345, -362, -362, -362, + -362, -362, -362, 1345, 1069, 1345, 283, -362, -362, 1345, + -362, 111, 1345, 397, 397, 74, 1069, 1028, 1345, 238, + 658, -362, 1069, 107, 107, -362, 253, 1345, 1069, -362, + 107, -362, -362, 74, 1069, -362, -362 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -885,74 +886,75 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 7, 8, 18, 0, 0, 10, 0, 1, 2, 228, - 227, 4, 9, 3, 0, 0, 0, 0, 52, 72, + 7, 8, 18, 0, 0, 10, 0, 1, 2, 230, + 229, 4, 9, 3, 0, 0, 0, 0, 52, 72, 0, 0, 0, 0, 0, 96, 11, 19, 20, 22, 21, 63, 23, 24, 25, 12, 26, 27, 28, 29, - 30, 0, 6, 231, 33, 0, 31, 47, 48, 0, - 221, 222, 223, 203, 219, 217, 218, 0, 0, 0, - 0, 208, 168, 157, 46, 0, 206, 105, 106, 107, - 204, 155, 156, 109, 220, 108, 205, 102, 83, 104, - 0, 70, 166, 0, 63, 0, 81, 0, 0, 90, - 0, 93, 0, 0, 0, 166, 166, 63, 5, 0, - 0, 0, 0, 119, 115, 117, 118, 0, 18, 170, - 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 30, 0, 6, 233, 33, 0, 31, 47, 48, 0, + 223, 224, 225, 205, 221, 219, 220, 0, 0, 0, + 0, 210, 170, 159, 46, 0, 208, 105, 106, 107, + 206, 157, 158, 109, 222, 108, 207, 102, 83, 104, + 0, 70, 168, 0, 63, 0, 81, 0, 0, 90, + 0, 93, 0, 0, 0, 168, 168, 63, 5, 0, + 0, 0, 0, 119, 115, 117, 118, 0, 18, 172, + 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 99, 101, 0, 0, 113, 0, 0, 0, - 0, 0, 0, 54, 53, 60, 0, 166, 73, 74, - 77, 0, 0, 0, 166, 166, 0, 166, 0, 166, - 97, 64, 55, 68, 166, 58, 166, 32, 198, 199, - 200, 42, 44, 45, 40, 201, 0, 49, 50, 151, - 207, 0, 174, 230, 0, 0, 0, 171, 172, 0, - 161, 0, 160, 133, 121, 120, 134, 136, 137, 127, + 0, 0, 0, 54, 53, 60, 0, 168, 73, 74, + 77, 0, 0, 0, 168, 168, 0, 168, 0, 168, + 97, 64, 55, 68, 168, 58, 168, 32, 200, 201, + 202, 42, 44, 45, 40, 203, 0, 49, 50, 153, + 209, 0, 176, 232, 0, 0, 0, 173, 174, 0, + 163, 0, 162, 133, 0, 121, 120, 136, 137, 127, 128, 129, 130, 131, 132, 135, 122, 123, 124, 125, 126, 0, 0, 110, 0, 0, 0, 0, 0, 0, - 0, 0, 112, 151, 178, 0, 213, 210, 211, 103, - 0, 71, 167, 0, 0, 56, 0, 78, 79, 76, - 80, 215, 216, 82, 203, 219, 227, 84, 224, 225, - 226, 85, 86, 87, 0, 88, 0, 91, 0, 0, - 0, 59, 57, 34, 200, 163, 202, 0, 0, 0, - 150, 0, 153, 18, 149, 209, 0, 0, 169, 0, - 0, 158, 0, 147, 0, 144, 145, 138, 139, 140, - 141, 142, 143, 0, 212, 179, 180, 51, 61, 62, - 75, 166, 166, 0, 65, 69, 66, 0, 43, 0, - 41, 0, 0, 0, 187, 193, 37, 0, 188, 116, - 152, 151, 176, 0, 173, 175, 162, 146, 114, 0, - 182, 89, 92, 0, 0, 35, 164, 0, 0, 197, - 196, 194, 189, 190, 154, 0, 181, 0, 185, 94, - 95, 0, 67, 0, 0, 0, 0, 0, 177, 183, - 0, 0, 0, 36, 165, 166, 166, 191, 195, 0, - 186, 214, 166, 38, 39, 0, 184, 98, 192 + 0, 0, 0, 0, 112, 153, 180, 0, 215, 212, + 213, 103, 0, 71, 169, 0, 0, 56, 0, 78, + 79, 76, 80, 217, 218, 82, 205, 221, 229, 84, + 226, 227, 228, 85, 86, 87, 0, 88, 0, 91, + 0, 0, 0, 59, 57, 34, 202, 165, 204, 0, + 0, 0, 152, 0, 155, 18, 151, 211, 0, 0, + 171, 0, 0, 160, 0, 134, 149, 0, 0, 0, + 0, 144, 138, 139, 140, 141, 142, 143, 0, 214, + 181, 182, 51, 61, 62, 75, 168, 168, 0, 65, + 69, 66, 0, 43, 0, 41, 0, 0, 0, 189, + 195, 37, 0, 190, 116, 154, 153, 178, 0, 175, + 177, 164, 148, 146, 145, 147, 114, 0, 184, 89, + 92, 0, 0, 35, 166, 0, 0, 199, 198, 196, + 191, 192, 156, 0, 183, 0, 187, 94, 95, 0, + 67, 0, 0, 0, 0, 0, 179, 185, 0, 0, + 0, 36, 167, 168, 168, 193, 197, 0, 188, 216, + 168, 38, 39, 0, 186, 98, 194 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -348, -8, -348, -348, -348, -348, -102, -348, -348, -348, - -348, -348, -348, -348, -348, -348, -348, -348, -348, -348, - -348, -348, 180, 247, -348, -348, -348, 139, 49, -66, - -348, -348, -348, 253, -348, -348, -348, -348, 50, -348, - -348, -348, -87, -348, -348, -348, -348, -348, -348, -348, - -348, -348, -348, -348, -348, -348, 3, -348, -348, -348, - -348, -348, -348, -348, 65, -32, -348, -348, -348, -348, - -348, -348, -348, -348, -74, -127, -348, -348, -348, 26, - -348, -348, -348, -348, -347, -348, -180, -348, -98, -348, - -348, -348, -348, -348, -348, 143, 151, -4, -348, -1 + -362, 18, -362, -362, -362, -362, -102, -362, -362, -362, + -362, -362, -362, -362, -362, -362, -362, -362, -362, -362, + -362, -362, 209, 281, -362, -362, -362, 172, 81, -45, + -362, -362, -362, 293, -362, -362, -362, -362, 87, -362, + -362, -362, -87, -362, -362, -362, -362, -362, -362, -362, + -362, -362, -362, -362, -362, -362, 3, -362, -362, -362, + -362, -362, -362, -362, 101, 2, -362, -362, -362, -362, + -362, -362, -362, -362, -79, -132, -362, -362, -362, 48, + -362, -362, -362, -362, -361, -362, -281, -362, -93, -362, + -362, -362, -362, -362, -362, 180, 178, -4, -362, -1 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 11, 12, 2, 4, 3, 5, 26, 6, 27, - 44, 45, 308, 171, 172, 173, 28, 265, 263, 29, + 44, 45, 313, 171, 172, 173, 28, 267, 265, 29, 30, 47, 48, 82, 31, 83, 32, 144, 145, 96, - 305, 164, 260, 84, 141, 33, 85, 148, 149, 239, - 34, 35, 154, 36, 37, 89, 38, 91, 39, 351, - 40, 93, 258, 134, 78, 139, 270, 65, 66, 223, - 179, 67, 68, 69, 271, 272, 273, 274, 70, 71, - 110, 191, 192, 310, 143, 72, 109, 186, 187, 188, - 226, 330, 348, 361, 315, 368, 316, 357, 317, 176, - 73, 108, 296, 240, 74, 75, 247, 76, 189, 146 + 310, 164, 262, 84, 141, 33, 85, 148, 149, 241, + 34, 35, 154, 36, 37, 89, 38, 91, 39, 359, + 40, 93, 260, 134, 78, 139, 272, 65, 66, 225, + 179, 67, 68, 69, 273, 274, 275, 276, 70, 71, + 110, 191, 192, 315, 143, 72, 109, 186, 187, 188, + 228, 338, 356, 369, 320, 376, 321, 365, 322, 176, + 73, 108, 301, 242, 74, 75, 249, 76, 189, 146 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -960,302 +962,300 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 13, 155, 175, 157, 42, 159, 181, 314, 13, 7, - 367, 9, 10, 46, 49, 232, 137, 1, 147, 64, - 79, 162, 165, 86, 87, 88, 90, 92, 378, 138, - -13, 166, 99, 98, 43, 8, 232, 13, -14, 9, - 10, 101, -15, 168, 169, 170, -111, -225, 100, -111, - -225, -225, -225, -225, -225, -225, -225, 182, 183, 102, - 103, 184, 105, 106, 107, 267, 268, -225, -225, -225, - -225, -225, 104, 235, 135, -225, 266, 136, -16, -17, - 252, 253, 80, 255, 81, 257, 140, -13, 150, -13, - 261, 185, 262, 161, 142, -14, 160, -14, 167, -15, - 49, -15, 94, 174, -225, 178, -225, 124, 125, 126, - 127, 128, 163, 190, 193, 194, 195, 196, 197, 198, + 13, 155, 1, 157, 375, 159, 181, 175, 13, -13, + 234, 7, 111, 46, 49, -14, 162, 165, 137, 64, + 79, -15, 386, 86, 87, 88, 90, 92, -16, 43, + 42, 234, 138, -17, 99, 112, 8, 13, 100, 147, + 9, 10, 119, 120, 121, 122, 101, 124, 125, 126, + 127, 128, 166, 269, 270, 130, 102, 182, 183, 98, + 103, 184, 105, 106, 107, -13, 94, -13, 237, 250, + 251, -14, 140, -14, 252, 254, 255, -15, 257, -15, + 259, 268, 373, 374, -16, 263, -16, 264, 150, -17, + 185, -17, -111, 161, 135, -111, 160, 136, 167, 80, + 49, 81, 319, 174, 229, 178, 9, 10, 9, 10, + 80, 94, 81, 190, 193, 104, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 212, 213, 228, -16, -17, -16, -17, 8, - 225, 222, 229, 9, 10, 62, 242, 230, 124, 125, - 126, 127, 128, 227, 243, 193, 130, 9, 10, 254, - 339, 256, 233, 9, 10, 248, 249, 301, 41, 302, - 250, 320, 80, 94, 81, 365, 366, -224, 234, 269, - -224, -224, -224, -224, -224, -224, -224, -226, 277, 236, - -226, -226, -226, -226, -226, -226, -226, -224, -224, -224, - -224, -224, 126, 127, 128, -224, 259, -226, -226, -226, - -226, -226, 275, 279, 283, -226, 111, 285, 286, 287, - 288, 289, 290, 291, 292, -229, 363, 331, 332, 297, - 276, 278, -111, 280, -224, -111, -224, 299, 281, 150, - 282, 295, 114, 303, -226, 307, -226, 119, 120, 121, - 122, 309, 124, 125, 126, 127, 128, 319, 321, 306, - 130, 328, 304, 342, 329, 318, 334, 9, 10, 341, - 311, 312, 345, 347, 360, 372, 371, 375, 95, 322, - 231, 177, 298, 325, 97, 326, 300, 327, 293, 344, - 111, 373, 374, 241, 119, 120, 121, 122, 377, 124, - 125, 126, 127, 128, 251, 324, 333, 130, 0, 340, - 335, 0, 336, 343, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 346, 352, 130, 214, 0, 0, 0, 0, - 355, 356, 168, 169, 264, 132, 133, 0, 358, 0, - 359, 318, 318, 318, 362, 0, 0, 364, 237, 238, - 111, 215, 0, 370, 216, 217, 218, 219, 220, 221, - 0, 318, 376, 50, 51, 52, 0, 54, 55, 56, - 9, 10, 0, 0, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 111, 0, 130, 0, 313, 0, 0, 0, - 0, 0, 0, 0, 131, 132, 133, 0, 314, 0, - 0, 0, 9, 10, 0, 0, 112, 113, 114, 115, + 209, 210, 212, 213, 230, 142, 163, 168, 169, 170, + 227, 194, 231, 224, -226, 214, 244, -226, -226, -226, + -226, -226, -226, -226, 245, 193, 215, 216, 8, 256, + 232, 258, 9, 10, -226, -226, -226, -226, -226, 306, + 62, 307, -226, 325, 124, 125, 126, 127, 128, 271, + 350, 235, 130, 236, 9, 10, 41, -227, 279, 238, + -227, -227, -227, -227, -227, -227, -227, 285, -111, 261, + -226, -111, -226, 277, 217, 283, -231, -227, -227, -227, + -227, -227, 278, 347, 286, -227, 9, 10, 280, 281, + 291, 292, 293, 294, 295, 296, 297, 339, 340, 371, + 282, 302, 218, 219, 220, 221, 222, 223, 284, 304, + 288, 150, 77, -227, 289, -227, 290, 300, 50, 51, + 52, 53, 54, 55, 56, 9, 10, 308, 57, 312, + 324, 311, 326, 314, 309, 336, 337, 323, 342, 58, + 59, 60, 316, 317, 124, 125, 126, 127, 128, 353, + 61, 327, 62, 380, 63, 330, 349, 331, 355, 368, + 332, 333, 334, 335, 381, 382, 126, 127, 128, -228, + 379, 385, -228, -228, -228, -228, -228, -228, -228, 383, + 177, 341, 95, 233, 348, 343, 303, 344, 351, -228, + -228, -228, -228, -228, 97, 305, 298, -228, 352, 329, + 243, 253, 0, 14, 15, 16, 17, 18, 19, 20, + 354, 360, 0, 0, 0, 0, 0, 0, 363, 364, + 21, 22, 23, 24, 25, -228, 366, -228, 367, 323, + 323, 323, 370, 0, 0, 372, 239, 240, 111, 0, + 0, 378, 0, 0, 0, 0, 0, 0, 0, 323, + 384, 50, 51, 52, 0, 54, 55, 56, 9, 10, + 0, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 111, + 0, 130, 0, 318, 0, 0, 0, 0, 0, 0, + 0, 131, 132, 133, 0, 319, 0, 0, 0, 9, + 10, 0, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 0, 0, 130, 152, 156, 153, 0, 0, 0, 0, + 168, 169, 266, 132, 133, 0, 0, 0, 0, 0, + 0, 0, -100, 0, 0, 0, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 0, 0, 130, 152, 156, 153, - 0, 0, 0, 0, 168, 169, 264, 132, 133, 0, + 126, 127, 128, 129, 0, 214, 130, 152, 158, 153, + -100, -100, -100, -100, -100, -100, 131, 132, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 111, 0, + 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 131, 132, 133, 0, 0, 0, 0, 0, 0, 0, 0, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 0, - 0, 130, 152, 158, 153, 0, 0, 0, 0, 0, - 0, 131, 132, 133, 0, 0, 0, 0, 0, -100, - 0, 0, 0, 0, 0, 0, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 111, -100, 130, 0, -100, -100, - -100, -100, -100, -100, 349, 350, 131, 132, 133, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 111, 0, 130, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 131, 132, - 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 0, 0, - 130, 151, 152, 0, 153, 0, 0, 0, 0, 0, - 131, 132, 133, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 111, 0, 130, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 131, 132, 133, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 111, 0, 130, 0, - 0, 180, 0, 0, 0, 0, 0, 0, 131, 132, - 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 284, 111, - 130, 14, 15, 16, 17, 18, 19, 20, 0, 0, - 131, 132, 133, 0, 0, 0, 0, 0, 21, 22, - 23, 24, 25, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 111, 0, 130, 0, 0, 0, 0, 0, 0, - 294, 0, 0, 131, 132, 133, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 111, 0, 130, 0, 0, 0, 0, - 0, 0, 323, 0, 0, 131, 132, 133, 0, 337, + 0, 130, 0, 0, 111, 0, 0, 0, 0, 168, + 169, 266, 132, 133, 357, 358, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 111, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 132, 133, - 0, 338, 0, 0, 0, 0, 0, 0, 0, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 111, 0, 130, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, - 132, 133, 0, 353, 0, 0, 0, 0, 0, 0, - 0, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 111, - 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 131, 132, 133, 0, 354, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 0, 0, 130, 151, + 152, 0, 153, 0, 0, 0, 0, 0, 131, 132, + 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 111, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 132, 133, 0, 0, 0, 0, + 0, 0, 0, 0, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 111, 0, 130, 0, 0, 180, 0, 0, + 0, 0, 0, 0, 131, 132, 133, 0, 0, 0, 0, 0, 0, 0, 0, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 111, 0, 130, 369, 0, 0, 0, + 127, 128, 129, 287, 111, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 132, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 111, 0, 130, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 131, 132, 133, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, - 0, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 111, 0, 0, 130, + 0, 0, 0, 0, 299, 0, 0, 131, 132, 133, + 0, 0, 0, 0, 0, 0, 0, 0, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 111, 0, 130, 0, + 0, 0, 0, 0, 0, 328, 0, 0, 131, 132, + 133, 0, 345, 0, 0, 0, 0, 0, 0, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 111, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, - 132, 133, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 0, 0, 0, - 130, 0, 0, 0, 0, 0, 0, 77, 0, 0, - 131, 132, 133, 50, 51, 52, 53, 54, 55, 56, - 9, 10, 0, 57, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 59, 60, 0, 0, - 0, 0, 0, 0, 0, 0, 61, 0, 62, 0, - 63, 50, 51, 52, 53, 54, 55, 56, 9, 10, - 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 58, 59, 60, 0, 0, 0, 0, - 0, 0, 0, 0, 61, 0, 62, 0, 63, 0, - 168, 169, 170, 50, 51, 52, 53, 54, 55, 56, - 9, 10, 0, 57, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 59, 60, 0, 0, - 0, 0, 211, 0, 0, 0, 61, 0, 62, 0, - 63, 50, 51, 52, 53, 54, 55, 56, 9, 10, - 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 58, 59, 60, 224, 0, 0, 0, - 0, 0, 0, 0, 61, 0, 62, 0, 63, 50, + 132, 133, 0, 346, 0, 0, 0, 0, 0, 0, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 111, 0, + 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 131, 132, 133, 0, 361, 0, 0, 0, 0, 0, + 0, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 111, + 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 131, 132, 133, 0, 362, 0, 0, 0, 0, + 0, 0, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 111, 0, 130, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 131, 132, 133, 0, 0, 0, 0, 0, + 0, 0, 0, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 111, 0, 130, 377, 0, 0, 0, 0, 0, + 0, 0, 0, 131, 132, 133, 0, 0, 0, 0, + 0, 0, 0, 0, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 111, 0, 130, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 131, 132, 133, 0, 0, 0, + 0, 0, 0, 0, 0, 112, 113, 0, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 111, 0, 0, 130, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 131, 132, 133, 0, 0, + 0, 0, 0, 0, 0, 112, 0, 0, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 0, 0, 0, 130, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 131, 132, 133, 50, 51, + 52, 53, 54, 55, 56, 9, 10, 0, 57, 119, + 120, 121, 122, 0, 124, 125, 126, 127, 128, 58, + 59, 60, 130, 0, 0, 0, 0, 0, 0, 0, + 61, 0, 62, 0, 63, 0, 168, 169, 170, 50, 51, 52, 53, 54, 55, 56, 9, 10, 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 58, 59, 60, 0, 0, 0, 0, 0, 0, - 0, 0, 61, -148, 62, 0, 63, 50, 51, 52, - 53, 54, 55, 56, 9, 10, 0, 57, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, - 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, - 61, 0, 62, 0, 63, 50, 51, 52, 244, 245, - 55, 56, 9, 246, 0, 57, 0, 0, 0, 0, + 58, 59, 60, 0, 0, 0, 0, 211, 0, 0, + 0, 61, 0, 62, 0, 63, 50, 51, 52, 53, + 54, 55, 56, 9, 10, 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 59, 60, - 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, - 62, 0, 63 + 226, 0, 0, 0, 0, 0, 0, 0, 61, 0, + 62, 0, 63, 50, 51, 52, 53, 54, 55, 56, + 9, 10, 0, 57, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 58, 59, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 61, -150, 62, 0, 63, + 50, 51, 52, 53, 54, 55, 56, 9, 10, 0, + 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 58, 59, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 61, 0, 62, 0, 63, 50, 51, 52, + 246, 247, 55, 56, 9, 248, 0, 57, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 58, 59, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 61, + 0, 62, 0, 63 }; static const yytype_int16 yycheck[] = { - 4, 88, 100, 90, 12, 92, 108, 28, 12, 0, - 357, 32, 33, 14, 15, 142, 62, 13, 84, 16, - 17, 95, 96, 20, 21, 22, 23, 24, 375, 75, - 0, 97, 57, 41, 28, 28, 163, 41, 0, 32, - 33, 57, 0, 64, 65, 66, 55, 0, 12, 58, - 3, 4, 5, 6, 7, 8, 9, 28, 29, 34, - 57, 32, 59, 60, 61, 17, 18, 20, 21, 22, - 23, 24, 58, 147, 55, 28, 174, 58, 0, 0, - 154, 155, 13, 157, 15, 159, 28, 57, 85, 59, - 164, 62, 166, 94, 28, 57, 93, 59, 99, 57, - 101, 59, 14, 100, 57, 102, 59, 48, 49, 50, - 51, 52, 28, 110, 111, 112, 113, 114, 115, 116, + 4, 88, 13, 90, 365, 92, 108, 100, 12, 0, + 142, 0, 12, 14, 15, 0, 95, 96, 61, 16, + 17, 0, 383, 20, 21, 22, 23, 24, 0, 28, + 12, 163, 75, 0, 56, 35, 28, 41, 12, 84, + 32, 33, 42, 43, 44, 45, 56, 47, 48, 49, + 50, 51, 97, 17, 18, 55, 34, 28, 29, 41, + 57, 32, 59, 60, 61, 56, 14, 58, 147, 28, + 29, 56, 28, 58, 33, 154, 155, 56, 157, 58, + 159, 174, 363, 364, 56, 164, 58, 166, 85, 56, + 61, 58, 54, 94, 54, 57, 93, 57, 99, 13, + 101, 15, 28, 100, 28, 102, 32, 33, 32, 33, + 13, 14, 15, 110, 111, 57, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 138, 57, 57, 59, 59, 28, - 137, 28, 139, 32, 33, 60, 150, 14, 48, 49, - 50, 51, 52, 28, 151, 152, 56, 32, 33, 156, - 29, 158, 57, 32, 33, 28, 29, 254, 57, 256, - 33, 273, 13, 14, 15, 355, 356, 0, 34, 176, - 3, 4, 5, 6, 7, 8, 9, 0, 185, 57, - 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, - 23, 24, 50, 51, 52, 28, 34, 20, 21, 22, - 23, 24, 59, 57, 211, 28, 12, 214, 215, 216, - 217, 218, 219, 220, 221, 54, 353, 301, 302, 230, - 54, 61, 55, 54, 57, 58, 59, 234, 63, 236, - 57, 50, 38, 21, 57, 28, 59, 43, 44, 45, - 46, 28, 48, 49, 50, 51, 52, 59, 57, 260, - 56, 59, 259, 28, 5, 269, 57, 32, 33, 57, - 267, 268, 54, 9, 6, 362, 63, 57, 31, 276, - 141, 101, 233, 280, 31, 282, 236, 284, 223, 321, - 12, 365, 366, 150, 43, 44, 45, 46, 372, 48, - 49, 50, 51, 52, 153, 279, 303, 56, -1, 313, - 307, -1, 309, 317, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 329, 334, 56, 12, -1, -1, -1, -1, - 337, 338, 64, 65, 66, 67, 68, -1, 345, -1, - 347, 355, 356, 357, 351, -1, -1, 354, 10, 11, - 12, 38, -1, 360, 41, 42, 43, 44, 45, 46, - -1, 375, 369, 25, 26, 27, -1, 29, 30, 31, - 32, 33, -1, -1, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 12, -1, 56, -1, 16, -1, -1, -1, - -1, -1, -1, -1, 66, 67, 68, -1, 28, -1, - -1, -1, 32, 33, -1, -1, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, -1, -1, 56, 12, 13, 14, - -1, -1, -1, -1, 64, 65, 66, 67, 68, -1, + 127, 128, 129, 130, 138, 28, 28, 63, 64, 65, + 137, 12, 139, 28, 0, 35, 150, 3, 4, 5, + 6, 7, 8, 9, 151, 152, 35, 35, 28, 156, + 14, 158, 32, 33, 20, 21, 22, 23, 24, 256, + 59, 258, 28, 275, 47, 48, 49, 50, 51, 176, + 28, 56, 55, 34, 32, 33, 56, 0, 185, 56, + 3, 4, 5, 6, 7, 8, 9, 194, 54, 34, + 56, 57, 58, 58, 12, 62, 53, 20, 21, 22, + 23, 24, 53, 29, 211, 28, 32, 33, 60, 56, + 217, 218, 219, 220, 221, 222, 223, 306, 307, 361, + 53, 232, 40, 41, 42, 43, 44, 45, 56, 236, + 12, 238, 19, 56, 12, 58, 12, 49, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 21, 35, 28, + 58, 262, 56, 28, 261, 58, 5, 271, 56, 46, + 47, 48, 269, 270, 47, 48, 49, 50, 51, 53, + 57, 278, 59, 370, 61, 282, 56, 284, 9, 6, + 287, 288, 289, 290, 373, 374, 49, 50, 51, 0, + 62, 380, 3, 4, 5, 6, 7, 8, 9, 56, + 101, 308, 31, 141, 318, 312, 235, 314, 322, 20, + 21, 22, 23, 24, 31, 238, 225, 28, 326, 281, + 150, 153, -1, 3, 4, 5, 6, 7, 8, 9, + 337, 342, -1, -1, -1, -1, -1, -1, 345, 346, + 20, 21, 22, 23, 24, 56, 353, 58, 355, 363, + 364, 365, 359, -1, -1, 362, 10, 11, 12, -1, + -1, 368, -1, -1, -1, -1, -1, -1, -1, 383, + 377, 25, 26, 27, -1, 29, 30, 31, 32, 33, + -1, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 12, + -1, 55, -1, 16, -1, -1, -1, -1, -1, -1, + -1, 65, 66, 67, -1, 28, -1, -1, -1, 32, + 33, -1, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + -1, -1, 55, 12, 13, 14, -1, -1, -1, -1, + 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, + -1, -1, 12, -1, -1, -1, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, -1, 35, 55, 12, 13, 14, + 40, 41, 42, 43, 44, 45, 65, 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, - -1, 56, 12, 13, 14, -1, -1, -1, -1, -1, - -1, 66, 67, 68, -1, -1, -1, -1, -1, 12, - -1, -1, -1, -1, -1, -1, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 12, 38, 56, -1, 41, 42, - 43, 44, 45, 46, 22, 23, 66, 67, 68, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 36, 37, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 12, -1, + 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 65, 66, 67, -1, -1, -1, -1, -1, -1, -1, + -1, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, + -1, 55, -1, -1, 12, -1, -1, -1, -1, 63, + 64, 65, 66, 67, 22, 23, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 12, -1, 56, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, - 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, - 56, 57, 12, -1, 14, -1, -1, -1, -1, -1, - 66, 67, 68, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 12, -1, 56, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 66, 67, 68, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 12, -1, 56, -1, - -1, 59, -1, -1, -1, -1, -1, -1, 66, 67, - 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 12, - 56, 3, 4, 5, 6, 7, 8, 9, -1, -1, - 66, 67, 68, -1, -1, -1, -1, -1, 20, 21, - 22, 23, 24, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 12, -1, 56, -1, -1, -1, -1, -1, -1, - 63, -1, -1, 66, 67, 68, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 12, -1, 56, -1, -1, -1, -1, - -1, -1, 63, -1, -1, 66, 67, 68, -1, 28, - -1, -1, -1, -1, -1, -1, -1, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 12, -1, 56, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 66, 67, 68, - -1, 28, -1, -1, -1, -1, -1, -1, -1, 36, + 48, 49, 50, 51, 52, 12, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, 66, 67, + -1, -1, -1, -1, -1, -1, -1, -1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 12, -1, 56, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, - 67, 68, -1, 28, -1, -1, -1, -1, -1, -1, - -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 12, - -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 66, 67, 68, -1, 28, -1, -1, -1, -1, - -1, -1, -1, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 12, -1, 56, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 66, 67, 68, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 36, 37, 38, 39, 40, + 47, 48, 49, 50, 51, 52, -1, -1, 55, 56, + 12, -1, 14, -1, -1, -1, -1, -1, 65, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 12, -1, 55, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 65, 66, 67, -1, -1, -1, -1, + -1, -1, -1, -1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 12, -1, 56, 57, -1, -1, -1, - -1, -1, -1, -1, -1, 66, 67, 68, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 12, -1, 56, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 66, 67, 68, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, - -1, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 12, -1, -1, 56, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, - 67, 68, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, -1, -1, -1, - 56, -1, -1, -1, -1, -1, -1, 19, -1, -1, - 66, 67, 68, 25, 26, 27, 28, 29, 30, 31, - 32, 33, -1, 35, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 47, 48, 49, -1, -1, - -1, -1, -1, -1, -1, -1, 58, -1, 60, -1, - 62, 25, 26, 27, 28, 29, 30, 31, 32, 33, - -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 47, 48, 49, -1, -1, -1, -1, - -1, -1, -1, -1, 58, -1, 60, -1, 62, -1, - 64, 65, 66, 25, 26, 27, 28, 29, 30, 31, - 32, 33, -1, 35, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 47, 48, 49, -1, -1, - -1, -1, 54, -1, -1, -1, 58, -1, 60, -1, - 62, 25, 26, 27, 28, 29, 30, 31, 32, 33, - -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 47, 48, 49, 50, -1, -1, -1, - -1, -1, -1, -1, 58, -1, 60, -1, 62, 25, + 51, 52, 12, -1, 55, -1, -1, 58, -1, -1, + -1, -1, -1, -1, 65, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 12, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, 66, 67, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 12, -1, 55, -1, -1, + -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, + -1, -1, -1, -1, -1, -1, -1, -1, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 12, -1, 55, -1, + -1, -1, -1, -1, -1, 62, -1, -1, 65, 66, + 67, -1, 28, -1, -1, -1, -1, -1, -1, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 12, -1, 55, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, + 66, 67, -1, 28, -1, -1, -1, -1, -1, -1, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 12, -1, + 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 65, 66, 67, -1, 28, -1, -1, -1, -1, -1, + -1, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 12, + -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 65, 66, 67, -1, 28, -1, -1, -1, -1, + -1, -1, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 12, -1, 55, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 65, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 12, -1, 55, 56, -1, -1, -1, -1, -1, + -1, -1, -1, 65, 66, 67, -1, -1, -1, -1, + -1, -1, -1, -1, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 12, -1, 55, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 65, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, 35, 36, -1, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 12, -1, -1, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, 66, 67, -1, -1, + -1, -1, -1, -1, -1, 35, -1, -1, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, -1, -1, -1, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, 66, 67, 25, 26, + 27, 28, 29, 30, 31, 32, 33, -1, 35, 42, + 43, 44, 45, -1, 47, 48, 49, 50, 51, 46, + 47, 48, 55, -1, -1, -1, -1, -1, -1, -1, + 57, -1, 59, -1, 61, -1, 63, 64, 65, 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 47, 48, 49, -1, -1, -1, -1, -1, -1, - -1, -1, 58, 59, 60, -1, 62, 25, 26, 27, + 46, 47, 48, -1, -1, -1, -1, 53, -1, -1, + -1, 57, -1, 59, -1, 61, 25, 26, 27, 28, + 29, 30, 31, 32, 33, -1, 35, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 46, 47, 48, + 49, -1, -1, -1, -1, -1, -1, -1, 57, -1, + 59, -1, 61, 25, 26, 27, 28, 29, 30, 31, + 32, 33, -1, 35, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 46, 47, 48, -1, -1, -1, + -1, -1, -1, -1, -1, 57, 58, 59, -1, 61, + 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, + 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 46, 47, 48, -1, -1, -1, -1, -1, -1, + -1, -1, 57, -1, 59, -1, 61, 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, 35, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 47, - 48, 49, -1, -1, -1, -1, -1, -1, -1, -1, - 58, -1, 60, -1, 62, 25, 26, 27, 28, 29, - 30, 31, 32, 33, -1, 35, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 47, 48, 49, - -1, -1, -1, -1, -1, -1, -1, -1, 58, -1, - 60, -1, 62 + -1, -1, -1, -1, -1, -1, -1, -1, 46, 47, + 48, -1, -1, -1, -1, -1, -1, -1, -1, 57, + -1, 59, -1, 61 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1266,40 +1266,41 @@ static const yytype_uint8 yystos[] = 33, 77, 78, 173, 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, 23, 24, 83, 85, 92, 95, 96, 100, 102, 111, 116, 117, 119, 120, 122, 124, - 126, 57, 77, 28, 86, 87, 175, 97, 98, 175, - 25, 26, 27, 28, 29, 30, 31, 35, 47, 48, - 49, 58, 60, 62, 132, 133, 134, 137, 138, 139, + 126, 56, 77, 28, 86, 87, 175, 97, 98, 175, + 25, 26, 27, 28, 29, 30, 31, 35, 46, 47, + 48, 57, 59, 61, 132, 133, 134, 137, 138, 139, 144, 145, 151, 166, 170, 171, 173, 19, 130, 132, 13, 15, 99, 101, 109, 112, 132, 132, 132, 121, - 132, 123, 132, 127, 14, 99, 105, 109, 77, 57, - 12, 57, 34, 132, 58, 132, 132, 132, 167, 152, - 146, 12, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 56, 66, 67, 68, 129, 55, 58, 62, 75, 131, + 132, 123, 132, 127, 14, 99, 105, 109, 77, 56, + 12, 56, 34, 132, 57, 132, 132, 132, 167, 152, + 146, 12, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 55, 65, 66, 67, 129, 54, 57, 61, 75, 131, 28, 110, 28, 150, 103, 104, 175, 105, 113, 114, - 132, 57, 12, 14, 118, 118, 13, 118, 13, 118, - 132, 175, 150, 28, 107, 150, 105, 175, 64, 65, - 66, 89, 90, 91, 132, 164, 165, 98, 132, 136, - 59, 82, 28, 29, 32, 62, 153, 154, 155, 174, - 132, 147, 148, 132, 132, 132, 132, 132, 132, 132, + 132, 56, 12, 14, 118, 118, 13, 118, 13, 118, + 132, 175, 150, 28, 107, 150, 105, 175, 63, 64, + 65, 89, 90, 91, 132, 164, 165, 98, 132, 136, + 58, 82, 28, 29, 32, 61, 153, 154, 155, 174, + 132, 147, 148, 132, 12, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, - 132, 54, 132, 132, 12, 38, 41, 42, 43, 44, - 45, 46, 28, 135, 50, 132, 156, 28, 173, 132, - 14, 103, 151, 57, 34, 150, 57, 10, 11, 115, - 169, 171, 173, 132, 28, 29, 33, 172, 28, 29, - 33, 172, 150, 150, 132, 150, 132, 150, 128, 34, - 108, 150, 150, 94, 66, 93, 164, 17, 18, 132, - 132, 140, 141, 142, 143, 59, 54, 132, 61, 57, - 54, 63, 57, 132, 54, 132, 132, 132, 132, 132, - 132, 132, 132, 140, 63, 50, 168, 175, 104, 132, - 114, 118, 118, 21, 132, 106, 175, 28, 88, 28, - 149, 132, 132, 16, 28, 160, 162, 164, 173, 59, - 82, 57, 132, 63, 155, 132, 132, 132, 59, 5, - 157, 150, 150, 132, 57, 132, 132, 28, 28, 29, - 173, 57, 28, 173, 141, 54, 132, 9, 158, 22, - 23, 125, 175, 28, 28, 132, 132, 163, 132, 132, - 6, 159, 132, 151, 132, 162, 162, 160, 161, 57, - 132, 63, 118, 150, 150, 57, 132, 150, 160 + 132, 53, 132, 132, 35, 35, 35, 12, 40, 41, + 42, 43, 44, 45, 28, 135, 49, 132, 156, 28, + 173, 132, 14, 103, 151, 56, 34, 150, 56, 10, + 11, 115, 169, 171, 173, 132, 28, 29, 33, 172, + 28, 29, 33, 172, 150, 150, 132, 150, 132, 150, + 128, 34, 108, 150, 150, 94, 65, 93, 164, 17, + 18, 132, 132, 140, 141, 142, 143, 58, 53, 132, + 60, 56, 53, 62, 56, 132, 132, 53, 12, 12, + 12, 132, 132, 132, 132, 132, 132, 132, 140, 62, + 49, 168, 175, 104, 132, 114, 118, 118, 21, 132, + 106, 175, 28, 88, 28, 149, 132, 132, 16, 28, + 160, 162, 164, 173, 58, 82, 56, 132, 62, 155, + 132, 132, 132, 132, 132, 132, 58, 5, 157, 150, + 150, 132, 56, 132, 132, 28, 28, 29, 173, 56, + 28, 173, 141, 53, 132, 9, 158, 22, 23, 125, + 175, 28, 28, 132, 132, 163, 132, 132, 6, 159, + 132, 151, 132, 162, 162, 160, 161, 56, 132, 62, + 118, 150, 150, 56, 132, 150, 160 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1319,16 +1320,16 @@ static const yytype_uint8 yyr1[] = 132, 133, 133, 135, 134, 136, 134, 137, 137, 137, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 139, 139, 140, 140, - 141, 142, 141, 143, 143, 144, 144, 146, 145, 147, - 147, 148, 148, 149, 149, 149, 150, 150, 152, 151, - 153, 153, 154, 154, 155, 155, 155, 155, 156, 156, - 157, 157, 158, 158, 158, 159, 159, 160, 160, 160, - 160, 161, 161, 162, 163, 162, 162, 162, 164, 164, - 164, 165, 165, 166, 166, 166, 166, 166, 167, 166, - 166, 166, 166, 168, 166, 169, 169, 170, 170, 171, - 171, 171, 171, 171, 172, 172, 172, 173, 173, 174, - 174, 175 + 138, 138, 138, 138, 138, 138, 138, 138, 139, 139, + 140, 140, 141, 142, 141, 143, 143, 144, 144, 146, + 145, 147, 147, 148, 148, 149, 149, 149, 150, 150, + 152, 151, 153, 153, 154, 154, 155, 155, 155, 155, + 156, 156, 157, 157, 158, 158, 158, 159, 159, 160, + 160, 160, 160, 161, 161, 162, 163, 162, 162, 162, + 164, 164, 164, 165, 165, 166, 166, 166, 166, 166, + 167, 166, 166, 166, 166, 168, 166, 169, 169, 170, + 170, 171, 171, 171, 171, 171, 172, 172, 172, 173, + 173, 174, 174, 175 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1347,17 +1348,17 @@ static const yytype_uint8 yyr2[] = 1, 1, 0, 3, 1, 1, 1, 1, 1, 1, 3, 1, 3, 0, 5, 0, 5, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, - 4, 4, 4, 4, 4, 4, 5, 4, 0, 1, - 1, 0, 2, 1, 3, 1, 1, 0, 4, 0, - 1, 1, 3, 0, 2, 4, 0, 2, 0, 4, - 0, 1, 1, 3, 1, 3, 3, 5, 1, 2, - 0, 2, 0, 2, 4, 0, 2, 1, 1, 2, - 2, 1, 3, 1, 0, 4, 2, 2, 1, 1, - 1, 1, 2, 1, 1, 1, 1, 3, 0, 4, - 3, 3, 4, 0, 8, 1, 1, 1, 1, 1, + 3, 3, 3, 3, 4, 3, 3, 3, 4, 4, + 4, 4, 4, 4, 4, 5, 5, 5, 5, 4, + 0, 1, 1, 0, 2, 1, 3, 1, 1, 0, + 4, 0, 1, 1, 3, 0, 2, 4, 0, 2, + 0, 4, 0, 1, 1, 3, 1, 3, 3, 5, + 1, 2, 0, 2, 0, 2, 4, 0, 2, 1, + 1, 2, 2, 1, 3, 1, 0, 4, 2, 2, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, + 0, 4, 3, 3, 4, 0, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1 + 1, 1, 1, 1 }; @@ -2145,15 +2146,15 @@ yyreduce: switch (yyn) { case 2: -#line 393 "Aql/grammar.y" /* yacc.c:1652 */ +#line 392 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 2153 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2154 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 3: -#line 396 "Aql/grammar.y" /* yacc.c:1652 */ +#line 395 "Aql/grammar.y" /* yacc.c:1652 */ { char const* p = (yyvsp[0].node)->getStringValue(); size_t const len = (yyvsp[0].node)->getStringLength(); @@ -2164,217 +2165,217 @@ yyreduce: (yyval.node) = (yyvsp[0].node); } -#line 2168 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2169 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 4: -#line 409 "Aql/grammar.y" /* yacc.c:1652 */ +#line 408 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = static_cast(parser->peekStack()); node->addMember((yyvsp[0].node)); } -#line 2177 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2178 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 5: -#line 413 "Aql/grammar.y" /* yacc.c:1652 */ +#line 412 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = static_cast(parser->peekStack()); node->addMember((yyvsp[0].node)); } -#line 2186 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2187 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 6: -#line 417 "Aql/grammar.y" /* yacc.c:1652 */ +#line 416 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = static_cast(parser->peekStack()); node->addMember((yyvsp[0].node)); } -#line 2195 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2196 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 7: -#line 424 "Aql/grammar.y" /* yacc.c:1652 */ +#line 423 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2202 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2203 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 8: -#line 426 "Aql/grammar.y" /* yacc.c:1652 */ +#line 425 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 2211 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2212 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 9: -#line 429 "Aql/grammar.y" /* yacc.c:1652 */ +#line 428 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = static_cast(parser->popStack()); auto const& resolver = parser->query()->resolver(); auto withNode = parser->ast()->createNodeWithCollections(node, resolver); parser->ast()->addOperation(withNode); } -#line 2222 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2223 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 10: -#line 438 "Aql/grammar.y" /* yacc.c:1652 */ +#line 437 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2229 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2230 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 11: -#line 443 "Aql/grammar.y" /* yacc.c:1652 */ +#line 442 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2236 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2237 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 12: -#line 448 "Aql/grammar.y" /* yacc.c:1652 */ +#line 447 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2243 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2244 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 13: -#line 450 "Aql/grammar.y" /* yacc.c:1652 */ +#line 449 "Aql/grammar.y" /* yacc.c:1652 */ { parser->ast()->scopes()->endNested(); } -#line 2251 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2252 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 14: -#line 453 "Aql/grammar.y" /* yacc.c:1652 */ +#line 452 "Aql/grammar.y" /* yacc.c:1652 */ { parser->ast()->scopes()->endNested(); } -#line 2259 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2260 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 15: -#line 456 "Aql/grammar.y" /* yacc.c:1652 */ +#line 455 "Aql/grammar.y" /* yacc.c:1652 */ { parser->ast()->scopes()->endNested(); } -#line 2267 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2268 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 16: -#line 459 "Aql/grammar.y" /* yacc.c:1652 */ +#line 458 "Aql/grammar.y" /* yacc.c:1652 */ { parser->ast()->scopes()->endNested(); } -#line 2275 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2276 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 17: -#line 462 "Aql/grammar.y" /* yacc.c:1652 */ +#line 461 "Aql/grammar.y" /* yacc.c:1652 */ { parser->ast()->scopes()->endNested(); } -#line 2283 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2284 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 18: -#line 468 "Aql/grammar.y" /* yacc.c:1652 */ +#line 467 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2290 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2291 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 19: -#line 470 "Aql/grammar.y" /* yacc.c:1652 */ +#line 469 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2297 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2298 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 20: -#line 475 "Aql/grammar.y" /* yacc.c:1652 */ +#line 474 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2304 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2305 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 21: -#line 477 "Aql/grammar.y" /* yacc.c:1652 */ +#line 476 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2311 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2312 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 22: -#line 479 "Aql/grammar.y" /* yacc.c:1652 */ +#line 478 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2318 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2319 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 23: -#line 481 "Aql/grammar.y" /* yacc.c:1652 */ +#line 480 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2325 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2326 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 24: -#line 483 "Aql/grammar.y" /* yacc.c:1652 */ +#line 482 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2332 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2333 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 25: -#line 485 "Aql/grammar.y" /* yacc.c:1652 */ +#line 484 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2339 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2340 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 26: -#line 487 "Aql/grammar.y" /* yacc.c:1652 */ +#line 486 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2346 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2347 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 27: -#line 489 "Aql/grammar.y" /* yacc.c:1652 */ +#line 488 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2353 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2354 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 28: -#line 491 "Aql/grammar.y" /* yacc.c:1652 */ +#line 490 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2360 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2361 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 29: -#line 493 "Aql/grammar.y" /* yacc.c:1652 */ +#line 492 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2367 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2368 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 30: -#line 495 "Aql/grammar.y" /* yacc.c:1652 */ +#line 494 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2374 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2375 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 31: -#line 500 "Aql/grammar.y" /* yacc.c:1652 */ +#line 499 "Aql/grammar.y" /* yacc.c:1652 */ { auto wrapperNode = parser->ast()->createNodeArray(); parser->pushArray(wrapperNode); @@ -2382,28 +2383,28 @@ yyreduce: AstNode* node = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); parser->pushArrayElement(node); } -#line 2386 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2387 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 32: -#line 507 "Aql/grammar.y" /* yacc.c:1652 */ +#line 506 "Aql/grammar.y" /* yacc.c:1652 */ { AstNode* node = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); parser->pushArrayElement(node); } -#line 2395 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2396 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 33: -#line 514 "Aql/grammar.y" /* yacc.c:1652 */ +#line 513 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->popArray(); } -#line 2403 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2404 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 34: -#line 520 "Aql/grammar.y" /* yacc.c:1652 */ +#line 519 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = static_cast(parser->peekStack()); // Prune @@ -2411,11 +2412,11 @@ yyreduce: // Options node->addMember(parser->ast()->createNodeNop()); } -#line 2415 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2416 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 35: -#line 527 "Aql/grammar.y" /* yacc.c:1652 */ +#line 526 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = static_cast(parser->peekStack()); if (TRI_CaseEqualString((yyvsp[-1].strval).value, "PRUNE")) { @@ -2443,11 +2444,11 @@ yyreduce: parser->registerParseError(TRI_ERROR_QUERY_PARSE, "unexpected qualifier '%s', expecting 'PRUNE' or 'OPTIONS'", (yyvsp[-1].strval).value, yylloc.first_line, yylloc.first_column); } } -#line 2447 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2448 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 36: -#line 554 "Aql/grammar.y" /* yacc.c:1652 */ +#line 553 "Aql/grammar.y" /* yacc.c:1652 */ { /* prune and options */ auto node = static_cast(parser->peekStack()); @@ -2469,11 +2470,11 @@ yyreduce: node->addMember((yyvsp[0].node)); } -#line 2473 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2474 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 37: -#line 578 "Aql/grammar.y" /* yacc.c:1652 */ +#line 577 "Aql/grammar.y" /* yacc.c:1652 */ { auto infoNode = parser->ast()->createNodeArray(); // Direction @@ -2484,11 +2485,11 @@ yyreduce: infoNode->addMember((yyvsp[0].node)); (yyval.node) = infoNode; } -#line 2488 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2489 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 38: -#line 591 "Aql/grammar.y" /* yacc.c:1652 */ +#line 590 "Aql/grammar.y" /* yacc.c:1652 */ { if (!TRI_CaseEqualString((yyvsp[-3].strval).value, "TO")) { parser->registerParseError(TRI_ERROR_QUERY_PARSE, "unexpected qualifier '%s', expecting 'TO'", (yyvsp[-3].strval).value, yylloc.first_line, yylloc.first_column); @@ -2509,11 +2510,11 @@ yyreduce: infoNode->addMember(opts); (yyval.node) = infoNode; } -#line 2513 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2514 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 39: -#line 614 "Aql/grammar.y" /* yacc.c:1652 */ +#line 613 "Aql/grammar.y" /* yacc.c:1652 */ { if (!TRI_CaseEqualString((yyvsp[-3].strval).value, "TO")) { parser->registerParseError(TRI_ERROR_QUERY_PARSE, "unexpected qualifier '%s', expecting 'TO'", (yyvsp[-3].strval).value, yylloc.first_line, yylloc.first_column); @@ -2534,11 +2535,11 @@ yyreduce: infoNode->addMember(opts); (yyval.node) = infoNode; } -#line 2538 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2539 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 40: -#line 637 "Aql/grammar.y" /* yacc.c:1652 */ +#line 636 "Aql/grammar.y" /* yacc.c:1652 */ { // first open a new scope (after expression is evaluated) parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_FOR); @@ -2558,11 +2559,11 @@ yyreduce: parser->pushStack(variableNode); } -#line 2562 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2563 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 41: -#line 655 "Aql/grammar.y" /* yacc.c:1652 */ +#line 654 "Aql/grammar.y" /* yacc.c:1652 */ { // now we can handle the optional SEARCH condition and OPTIONS. AstNode* variableNode = static_cast(parser->popStack()); @@ -2603,11 +2604,11 @@ yyreduce: parser->ast()->addOperation(node); } -#line 2607 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2608 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 42: -#line 695 "Aql/grammar.y" /* yacc.c:1652 */ +#line 694 "Aql/grammar.y" /* yacc.c:1652 */ { // first open a new scope (after expression is evaluated) parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_FOR); @@ -2626,22 +2627,22 @@ yyreduce: parser->pushStack(graphInfoNode); // This stack push/pop magic is necessary to allow v, e, and p in the prune condition } -#line 2630 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2631 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 43: -#line 712 "Aql/grammar.y" /* yacc.c:1652 */ +#line 711 "Aql/grammar.y" /* yacc.c:1652 */ { auto graphInfoNode = static_cast(parser->popStack()); auto variablesNode = static_cast(parser->popStack()); auto node = parser->ast()->createNodeTraversal(variablesNode, graphInfoNode); parser->ast()->addOperation(node); } -#line 2641 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2642 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 44: -#line 718 "Aql/grammar.y" /* yacc.c:1652 */ +#line 717 "Aql/grammar.y" /* yacc.c:1652 */ { // first open a new scope (after expression is evaluated) parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_FOR); @@ -2660,11 +2661,11 @@ yyreduce: parser->ast()->addOperation(node); } -#line 2664 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2665 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 45: -#line 736 "Aql/grammar.y" /* yacc.c:1652 */ +#line 735 "Aql/grammar.y" /* yacc.c:1652 */ { // first open a new scope (after expression is evaluated) parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_FOR); @@ -2683,51 +2684,51 @@ yyreduce: parser->ast()->addOperation(node); } -#line 2687 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2688 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 46: -#line 758 "Aql/grammar.y" /* yacc.c:1652 */ +#line 757 "Aql/grammar.y" /* yacc.c:1652 */ { // operand is a reference. can use it directly auto node = parser->ast()->createNodeFilter((yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2697 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2698 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 47: -#line 766 "Aql/grammar.y" /* yacc.c:1652 */ +#line 765 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2704 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2705 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 48: -#line 771 "Aql/grammar.y" /* yacc.c:1652 */ +#line 770 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2711 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2712 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 49: -#line 773 "Aql/grammar.y" /* yacc.c:1652 */ +#line 772 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2718 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2719 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 50: -#line 778 "Aql/grammar.y" /* yacc.c:1652 */ +#line 777 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeLet((yyvsp[-2].strval).value, (yyvsp[-2].strval).length, (yyvsp[0].node), true); parser->ast()->addOperation(node); } -#line 2727 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2728 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 51: -#line 785 "Aql/grammar.y" /* yacc.c:1652 */ +#line 784 "Aql/grammar.y" /* yacc.c:1652 */ { if (!TRI_CaseEqualString((yyvsp[-2].strval).value, "COUNT")) { parser->registerParseError(TRI_ERROR_QUERY_PARSE, "unexpected qualifier '%s', expecting 'COUNT'", (yyvsp[-2].strval).value, yylloc.first_line, yylloc.first_column); @@ -2735,20 +2736,20 @@ yyreduce: (yyval.strval) = (yyvsp[0].strval); } -#line 2739 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2740 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 52: -#line 795 "Aql/grammar.y" /* yacc.c:1652 */ +#line 794 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 2748 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2749 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 53: -#line 798 "Aql/grammar.y" /* yacc.c:1652 */ +#line 797 "Aql/grammar.y" /* yacc.c:1652 */ { auto list = static_cast(parser->popStack()); @@ -2757,11 +2758,11 @@ yyreduce: } (yyval.node) = list; } -#line 2761 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2762 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 54: -#line 809 "Aql/grammar.y" /* yacc.c:1652 */ +#line 808 "Aql/grammar.y" /* yacc.c:1652 */ { /* COLLECT WITH COUNT INTO var OPTIONS ... */ auto scopes = parser->ast()->scopes(); @@ -2771,11 +2772,11 @@ yyreduce: auto node = parser->ast()->createNodeCollectCount(parser->ast()->createNodeArray(), (yyvsp[-1].strval).value, (yyvsp[-1].strval).length, (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2775 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2776 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 55: -#line 818 "Aql/grammar.y" /* yacc.c:1652 */ +#line 817 "Aql/grammar.y" /* yacc.c:1652 */ { /* COLLECT var = expr WITH COUNT INTO var OPTIONS ... */ auto scopes = parser->ast()->scopes(); @@ -2788,11 +2789,11 @@ yyreduce: auto node = parser->ast()->createNodeCollectCount((yyvsp[-2].node), (yyvsp[-1].strval).value, (yyvsp[-1].strval).length, (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2792 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2793 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 56: -#line 830 "Aql/grammar.y" /* yacc.c:1652 */ +#line 829 "Aql/grammar.y" /* yacc.c:1652 */ { /* AGGREGATE var = expr OPTIONS ... */ arangodb::HashSet variablesIntroduced; @@ -2817,11 +2818,11 @@ yyreduce: auto node = parser->ast()->createNodeCollect(parser->ast()->createNodeArray(), (yyvsp[-2].node), into, intoExpression, nullptr, (yyvsp[-1].node)); parser->ast()->addOperation(node); } -#line 2821 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2822 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 57: -#line 854 "Aql/grammar.y" /* yacc.c:1652 */ +#line 853 "Aql/grammar.y" /* yacc.c:1652 */ { /* COLLECT var = expr AGGREGATE var = expr OPTIONS ... */ arangodb::HashSet variablesIntroduced; @@ -2878,11 +2879,11 @@ yyreduce: auto node = parser->ast()->createNodeCollect((yyvsp[-3].node), (yyvsp[-2].node), into, intoExpression, nullptr, (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2882 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2883 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 58: -#line 910 "Aql/grammar.y" /* yacc.c:1652 */ +#line 909 "Aql/grammar.y" /* yacc.c:1652 */ { /* COLLECT var = expr INTO var OPTIONS ... */ arangodb::HashSet variablesIntroduced; @@ -2902,11 +2903,11 @@ yyreduce: auto node = parser->ast()->createNodeCollect((yyvsp[-2].node), parser->ast()->createNodeArray(), into, intoExpression, nullptr, (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2906 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2907 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 59: -#line 929 "Aql/grammar.y" /* yacc.c:1652 */ +#line 928 "Aql/grammar.y" /* yacc.c:1652 */ { /* COLLECT var = expr INTO var KEEP ... OPTIONS ... */ arangodb::HashSet variablesIntroduced; @@ -2931,61 +2932,61 @@ yyreduce: auto node = parser->ast()->createNodeCollect((yyvsp[-3].node), parser->ast()->createNodeArray(), into, intoExpression, (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2935 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2936 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 60: -#line 956 "Aql/grammar.y" /* yacc.c:1652 */ +#line 955 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2942 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2943 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 61: -#line 958 "Aql/grammar.y" /* yacc.c:1652 */ +#line 957 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 2949 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2950 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 62: -#line 963 "Aql/grammar.y" /* yacc.c:1652 */ +#line 962 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeAssign((yyvsp[-2].strval).value, (yyvsp[-2].strval).length, (yyvsp[0].node)); parser->pushArrayElement(node); } -#line 2958 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2959 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 63: -#line 970 "Aql/grammar.y" /* yacc.c:1652 */ +#line 969 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = nullptr; } -#line 2966 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2967 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 64: -#line 973 "Aql/grammar.y" /* yacc.c:1652 */ +#line 972 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 2974 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2975 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 65: -#line 976 "Aql/grammar.y" /* yacc.c:1652 */ +#line 975 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeArray(); node->addMember(parser->ast()->createNodeValueString((yyvsp[-2].strval).value, (yyvsp[-2].strval).length)); node->addMember((yyvsp[0].node)); (yyval.node) = node; } -#line 2985 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 2986 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 66: -#line 985 "Aql/grammar.y" /* yacc.c:1652 */ +#line 984 "Aql/grammar.y" /* yacc.c:1652 */ { if (! parser->ast()->scopes()->existsVariable((yyvsp[0].strval).value, (yyvsp[0].strval).length)) { parser->registerParseError(TRI_ERROR_QUERY_PARSE, "use of unknown variable '%s' for KEEP", (yyvsp[0].strval).value, yylloc.first_line, yylloc.first_column); @@ -3000,11 +3001,11 @@ yyreduce: node->setFlag(FLAG_KEEP_VARIABLENAME); parser->pushArrayElement(node); } -#line 3004 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3005 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 67: -#line 999 "Aql/grammar.y" /* yacc.c:1652 */ +#line 998 "Aql/grammar.y" /* yacc.c:1652 */ { if (! parser->ast()->scopes()->existsVariable((yyvsp[0].strval).value, (yyvsp[0].strval).length)) { parser->registerParseError(TRI_ERROR_QUERY_PARSE, "use of unknown variable '%s' for KEEP", (yyvsp[0].strval).value, yylloc.first_line, yylloc.first_column); @@ -3019,11 +3020,11 @@ yyreduce: node->setFlag(FLAG_KEEP_VARIABLENAME); parser->pushArrayElement(node); } -#line 3023 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3024 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 68: -#line 1016 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1015 "Aql/grammar.y" /* yacc.c:1652 */ { if (!TRI_CaseEqualString((yyvsp[0].strval).value, "KEEP")) { parser->registerParseError(TRI_ERROR_QUERY_PARSE, "unexpected qualifier '%s', expecting 'KEEP'", (yyvsp[0].strval).value, yylloc.first_line, yylloc.first_column); @@ -3032,158 +3033,158 @@ yyreduce: auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 3036 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3037 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 69: -#line 1023 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1022 "Aql/grammar.y" /* yacc.c:1652 */ { auto list = static_cast(parser->popStack()); (yyval.node) = list; } -#line 3045 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3046 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 70: -#line 1030 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1029 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 3054 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3055 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 71: -#line 1033 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1032 "Aql/grammar.y" /* yacc.c:1652 */ { auto list = static_cast(parser->popStack()); (yyval.node) = list; } -#line 3063 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3064 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 72: -#line 1040 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1039 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 3072 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3073 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 73: -#line 1043 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1042 "Aql/grammar.y" /* yacc.c:1652 */ { auto list = static_cast(parser->popStack()); auto node = parser->ast()->createNodeSort(list); parser->ast()->addOperation(node); } -#line 3082 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3083 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 74: -#line 1051 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1050 "Aql/grammar.y" /* yacc.c:1652 */ { parser->pushArrayElement((yyvsp[0].node)); } -#line 3090 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3091 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 75: -#line 1054 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1053 "Aql/grammar.y" /* yacc.c:1652 */ { parser->pushArrayElement((yyvsp[0].node)); } -#line 3098 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3099 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 76: -#line 1060 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1059 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeSortElement((yyvsp[-1].node), (yyvsp[0].node)); } -#line 3106 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3107 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 77: -#line 1066 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1065 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeValueBool(true); } -#line 3114 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3115 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 78: -#line 1069 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1068 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeValueBool(true); } -#line 3122 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3123 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 79: -#line 1072 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1071 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeValueBool(false); } -#line 3130 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3131 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 80: -#line 1075 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1074 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); } -#line 3138 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3139 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 81: -#line 1081 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1080 "Aql/grammar.y" /* yacc.c:1652 */ { auto offset = parser->ast()->createNodeValueInt(0); auto node = parser->ast()->createNodeLimit(offset, (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 3148 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3149 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 82: -#line 1086 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1085 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeLimit((yyvsp[-2].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 3157 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3158 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 83: -#line 1093 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1092 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeReturn((yyvsp[0].node)); parser->ast()->addOperation(node); parser->ast()->scopes()->endNested(); } -#line 3167 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3168 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 84: -#line 1101 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1100 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); } -#line 3175 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3176 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 85: -#line 1104 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1103 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); } -#line 3183 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3184 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 86: -#line 1110 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1109 "Aql/grammar.y" /* yacc.c:1652 */ { if (!parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -3191,11 +3192,11 @@ yyreduce: auto node = parser->ast()->createNodeRemove((yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 3195 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3196 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 87: -#line 1120 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1119 "Aql/grammar.y" /* yacc.c:1652 */ { if (!parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -3203,11 +3204,11 @@ yyreduce: auto node = parser->ast()->createNodeInsert((yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 3207 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3208 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 88: -#line 1130 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1129 "Aql/grammar.y" /* yacc.c:1652 */ { if (!parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -3216,11 +3217,11 @@ yyreduce: AstNode* node = parser->ast()->createNodeUpdate(nullptr, (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 3220 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3221 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 89: -#line 1138 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1137 "Aql/grammar.y" /* yacc.c:1652 */ { if (!parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -3229,18 +3230,18 @@ yyreduce: AstNode* node = parser->ast()->createNodeUpdate((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 3233 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3234 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 90: -#line 1149 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1148 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 3240 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3241 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 91: -#line 1154 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1153 "Aql/grammar.y" /* yacc.c:1652 */ { if (!parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -3249,11 +3250,11 @@ yyreduce: AstNode* node = parser->ast()->createNodeReplace(nullptr, (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 3253 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3254 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 92: -#line 1162 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1161 "Aql/grammar.y" /* yacc.c:1652 */ { if (!parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -3262,44 +3263,44 @@ yyreduce: AstNode* node = parser->ast()->createNodeReplace((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 3266 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3267 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 93: -#line 1173 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1172 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 3273 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3274 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 94: -#line 1178 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1177 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.intval) = static_cast(NODE_TYPE_UPDATE); } -#line 3281 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3282 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 95: -#line 1181 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1180 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.intval) = static_cast(NODE_TYPE_REPLACE); } -#line 3289 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3290 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 96: -#line 1187 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1186 "Aql/grammar.y" /* yacc.c:1652 */ { // reserve a variable named "$OLD", we might need it in the update expression // and in a later return thing parser->pushStack(parser->ast()->createNodeVariable(TRI_CHAR_LENGTH_PAIR(Variable::NAME_OLD), true)); } -#line 3299 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3300 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 97: -#line 1191 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1190 "Aql/grammar.y" /* yacc.c:1652 */ { AstNode* variableNode = static_cast(parser->popStack()); @@ -3339,11 +3340,11 @@ yyreduce: parser->pushStack(forNode); } -#line 3343 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3344 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 98: -#line 1229 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1228 "Aql/grammar.y" /* yacc.c:1652 */ { AstNode* forNode = static_cast(parser->popStack()); forNode->changeMember(1, (yyvsp[-1].node)); @@ -3355,35 +3356,35 @@ yyreduce: auto node = parser->ast()->createNodeUpsert(static_cast((yyvsp[-3].intval)), parser->ast()->createNodeReference(TRI_CHAR_LENGTH_PAIR(Variable::NAME_OLD)), (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 3359 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3360 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 99: -#line 1243 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1242 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeQuantifier(Quantifier::ALL); } -#line 3367 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3368 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 100: -#line 1246 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1245 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeQuantifier(Quantifier::ANY); } -#line 3375 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3376 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 101: -#line 1249 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1248 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeQuantifier(Quantifier::NONE); } -#line 3383 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3384 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 102: -#line 1255 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1254 "Aql/grammar.y" /* yacc.c:1652 */ { auto const scopeType = parser->ast()->scopes()->type(); @@ -3392,83 +3393,83 @@ yyreduce: parser->registerParseError(TRI_ERROR_QUERY_PARSE, "cannot use DISTINCT modifier on top-level query element", yylloc.first_line, yylloc.first_column); } } -#line 3396 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3397 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 103: -#line 1262 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1261 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeDistinct((yyvsp[0].node)); } -#line 3404 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3405 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 104: -#line 1265 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1264 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); } -#line 3412 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3413 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 105: -#line 1271 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1270 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); } -#line 3420 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3421 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 106: -#line 1274 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1273 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); } -#line 3428 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3429 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 107: -#line 1277 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1276 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); } -#line 3436 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3437 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 108: -#line 1280 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1279 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); } -#line 3444 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3445 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 109: -#line 1283 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1282 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); } -#line 3452 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3453 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 110: -#line 1286 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1285 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeRange((yyvsp[-2].node), (yyvsp[0].node)); } -#line 3460 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3461 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 111: -#line 1292 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1291 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.strval) = (yyvsp[0].strval); } -#line 3468 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3469 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 112: -#line 1295 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1294 "Aql/grammar.y" /* yacc.c:1652 */ { std::string temp((yyvsp[-2].strval).value, (yyvsp[-2].strval).length); temp.append("::"); @@ -3482,215 +3483,215 @@ yyreduce: (yyval.strval).value = p; (yyval.strval).length = temp.size(); } -#line 3486 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3487 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 113: -#line 1311 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1310 "Aql/grammar.y" /* yacc.c:1652 */ { parser->pushStack((yyvsp[-1].strval).value); auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 3497 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3498 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 114: -#line 1316 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1315 "Aql/grammar.y" /* yacc.c:1652 */ { auto list = static_cast(parser->popStack()); (yyval.node) = parser->ast()->createNodeFunctionCall(static_cast(parser->popStack()), list); } -#line 3506 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3507 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 115: -#line 1320 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1319 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 3515 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3516 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 116: -#line 1323 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1322 "Aql/grammar.y" /* yacc.c:1652 */ { auto list = static_cast(parser->popStack()); (yyval.node) = parser->ast()->createNodeFunctionCall(TRI_CHAR_LENGTH_PAIR("LIKE"), list); } -#line 3524 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3525 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 117: -#line 1330 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1329 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_PLUS, (yyvsp[0].node)); } -#line 3532 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3533 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 118: -#line 1333 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1332 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_MINUS, (yyvsp[0].node)); } -#line 3540 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3541 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 119: -#line 1336 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1335 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_NOT, (yyvsp[0].node)); } -#line 3548 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3549 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 120: -#line 1342 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1341 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_OR, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3556 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3557 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 121: -#line 1345 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1344 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_AND, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3564 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3565 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 122: -#line 1348 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1347 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_PLUS, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3572 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3573 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 123: -#line 1351 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1350 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_MINUS, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3580 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3581 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 124: -#line 1354 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1353 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_TIMES, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3588 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3589 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 125: -#line 1357 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1356 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_DIV, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3596 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3597 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 126: -#line 1360 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1359 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_MOD, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3604 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3605 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 127: -#line 1363 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1362 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_EQ, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3612 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3613 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 128: -#line 1366 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1365 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_NE, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3620 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3621 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 129: -#line 1369 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1368 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_LT, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3628 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3629 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 130: -#line 1372 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1371 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_GT, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3636 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3637 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 131: -#line 1375 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1374 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_LE, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3644 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3645 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 132: -#line 1378 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1377 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_GE, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3652 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3653 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 133: -#line 1381 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1380 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_IN, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3660 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3661 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 134: -#line 1384 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1383 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_NIN, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_NIN, (yyvsp[-3].node), (yyvsp[0].node)); } -#line 3668 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3669 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 135: -#line 1387 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1386 "Aql/grammar.y" /* yacc.c:1652 */ { AstNode* arguments = parser->ast()->createNodeArray(2); arguments->addMember((yyvsp[-2].node)); arguments->addMember((yyvsp[0].node)); (yyval.node) = parser->ast()->createNodeFunctionCall(TRI_CHAR_LENGTH_PAIR("LIKE"), arguments); } -#line 3679 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3680 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 136: -#line 1393 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1392 "Aql/grammar.y" /* yacc.c:1652 */ { AstNode* arguments = parser->ast()->createNodeArray(2); arguments->addMember((yyvsp[-2].node)); arguments->addMember((yyvsp[0].node)); (yyval.node) = parser->ast()->createNodeFunctionCall(TRI_CHAR_LENGTH_PAIR("REGEX_TEST"), arguments); } -#line 3690 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3691 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 137: -#line 1399 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1398 "Aql/grammar.y" /* yacc.c:1652 */ { AstNode* arguments = parser->ast()->createNodeArray(2); arguments->addMember((yyvsp[-2].node)); @@ -3698,122 +3699,141 @@ yyreduce: AstNode* node = parser->ast()->createNodeFunctionCall(TRI_CHAR_LENGTH_PAIR("REGEX_TEST"), arguments); (yyval.node) = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_NOT, node); } -#line 3702 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3703 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 138: -#line 1406 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1405 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_EQ, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } -#line 3710 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3711 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 139: -#line 1409 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1408 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NE, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } -#line 3718 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3719 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 140: -#line 1412 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1411 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_LT, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } -#line 3726 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3727 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 141: -#line 1415 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1414 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_GT, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } -#line 3734 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3735 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 142: -#line 1418 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1417 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_LE, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } -#line 3742 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3743 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 143: -#line 1421 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1420 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_GE, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } -#line 3750 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3751 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 144: -#line 1424 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1423 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_IN, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } -#line 3758 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3759 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 145: -#line 1427 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1426 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NIN, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); + auto quantifier = parser->ast()->createNodeQuantifier(Quantifier::ALL); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NIN, (yyvsp[-4].node), (yyvsp[0].node), quantifier); } -#line 3766 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3768 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 146: -#line 1433 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1430 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeTernaryOperator((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); + auto quantifier = parser->ast()->createNodeQuantifier(Quantifier::ANY); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NIN, (yyvsp[-4].node), (yyvsp[0].node), quantifier); } -#line 3774 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3777 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 147: -#line 1436 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1434 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeTernaryOperator((yyvsp[-3].node), (yyvsp[-3].node), (yyvsp[0].node)); + auto quantifier = parser->ast()->createNodeQuantifier(Quantifier::NONE); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NIN, (yyvsp[-4].node), (yyvsp[0].node), quantifier); } -#line 3782 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3786 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 148: -#line 1442 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1441 "Aql/grammar.y" /* yacc.c:1652 */ { + (yyval.node) = parser->ast()->createNodeTernaryOperator((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); } -#line 3789 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3794 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 149: #line 1444 "Aql/grammar.y" /* yacc.c:1652 */ { + (yyval.node) = parser->ast()->createNodeTernaryOperator((yyvsp[-3].node), (yyvsp[-3].node), (yyvsp[0].node)); } -#line 3796 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3802 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 150: -#line 1449 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1450 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = (yyvsp[0].node); } -#line 3804 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3809 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 151: #line 1452 "Aql/grammar.y" /* yacc.c:1652 */ { - parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_SUBQUERY); - parser->ast()->startSubQuery(); } -#line 3813 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3816 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 152: -#line 1455 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1457 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 3824 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 153: +#line 1460 "Aql/grammar.y" /* yacc.c:1652 */ + { + parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_SUBQUERY); + parser->ast()->startSubQuery(); + } +#line 3833 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 154: +#line 1463 "Aql/grammar.y" /* yacc.c:1652 */ { AstNode* node = parser->ast()->endSubQuery(); parser->ast()->scopes()->endCurrent(); @@ -3824,98 +3844,98 @@ yyreduce: (yyval.node) = parser->ast()->createNodeReference(variableName); } -#line 3828 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 153: -#line 1468 "Aql/grammar.y" /* yacc.c:1652 */ - { - parser->pushArrayElement((yyvsp[0].node)); - } -#line 3836 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 154: -#line 1471 "Aql/grammar.y" /* yacc.c:1652 */ - { - parser->pushArrayElement((yyvsp[0].node)); - } -#line 3844 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3848 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 155: -#line 1477 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1476 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = (yyvsp[0].node); + parser->pushArrayElement((yyvsp[0].node)); } -#line 3852 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3856 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 156: -#line 1480 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1479 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = (yyvsp[0].node); + parser->pushArrayElement((yyvsp[0].node)); } -#line 3860 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3864 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 157: -#line 1486 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1485 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 3872 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 158: +#line 1488 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 3880 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 159: +#line 1494 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeArray(); parser->pushArray(node); } -#line 3869 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 158: -#line 1489 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.node) = parser->popArray(); - } -#line 3877 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 159: -#line 1495 "Aql/grammar.y" /* yacc.c:1652 */ - { - } -#line 3884 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3889 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 160: #line 1497 "Aql/grammar.y" /* yacc.c:1652 */ { + (yyval.node) = parser->popArray(); } -#line 3891 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3897 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 161: -#line 1502 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1503 "Aql/grammar.y" /* yacc.c:1652 */ { - parser->pushArrayElement((yyvsp[0].node)); } -#line 3899 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3904 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 162: #line 1505 "Aql/grammar.y" /* yacc.c:1652 */ { - parser->pushArrayElement((yyvsp[0].node)); } -#line 3907 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3911 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 163: -#line 1511 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1510 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = nullptr; + parser->pushArrayElement((yyvsp[0].node)); } -#line 3915 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3919 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 164: -#line 1514 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1513 "Aql/grammar.y" /* yacc.c:1652 */ + { + parser->pushArrayElement((yyvsp[0].node)); + } +#line 3927 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 165: +#line 1519 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = nullptr; + } +#line 3935 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 166: +#line 1522 "Aql/grammar.y" /* yacc.c:1652 */ { if ((yyvsp[0].node) == nullptr) { ABORT_OOM @@ -3942,11 +3962,11 @@ yyreduce: (yyval.node) = node; } -#line 3946 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3966 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 165: -#line 1540 "Aql/grammar.y" /* yacc.c:1652 */ + case 167: +#line 1548 "Aql/grammar.y" /* yacc.c:1652 */ { if ((yyvsp[-2].node) == nullptr) { ABORT_OOM @@ -3964,19 +3984,19 @@ yyreduce: node->addMember((yyvsp[0].node)); (yyval.node) = node; } -#line 3968 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3988 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 166: -#line 1560 "Aql/grammar.y" /* yacc.c:1652 */ + case 168: +#line 1568 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = nullptr; } -#line 3976 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 3996 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 167: -#line 1563 "Aql/grammar.y" /* yacc.c:1652 */ + case 169: +#line 1571 "Aql/grammar.y" /* yacc.c:1652 */ { if ((yyvsp[0].node) == nullptr) { ABORT_OOM @@ -3988,56 +4008,56 @@ yyreduce: (yyval.node) = (yyvsp[0].node); } -#line 3992 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4012 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 168: -#line 1577 "Aql/grammar.y" /* yacc.c:1652 */ + case 170: +#line 1585 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = parser->ast()->createNodeObject(); parser->pushStack(node); } -#line 4001 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 169: -#line 1580 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.node) = static_cast(parser->popStack()); - } -#line 4009 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 170: -#line 1586 "Aql/grammar.y" /* yacc.c:1652 */ - { - } -#line 4016 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4021 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 171: #line 1588 "Aql/grammar.y" /* yacc.c:1652 */ { + (yyval.node) = static_cast(parser->popStack()); } -#line 4023 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4029 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 172: -#line 1593 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1594 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 4030 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4036 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 173: -#line 1595 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1596 "Aql/grammar.y" /* yacc.c:1652 */ { } -#line 4037 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4043 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 174: -#line 1600 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1601 "Aql/grammar.y" /* yacc.c:1652 */ + { + } +#line 4050 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 175: +#line 1603 "Aql/grammar.y" /* yacc.c:1652 */ + { + } +#line 4057 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 176: +#line 1608 "Aql/grammar.y" /* yacc.c:1652 */ { // attribute-name-only (comparable to JS enhanced object literals, e.g. { foo, bar }) auto ast = parser->ast(); @@ -4052,20 +4072,20 @@ yyreduce: auto node = ast->createNodeReference(variable); parser->pushObjectElement((yyvsp[0].strval).value, (yyvsp[0].strval).length, node); } -#line 4056 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4076 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 175: -#line 1614 "Aql/grammar.y" /* yacc.c:1652 */ + case 177: +#line 1622 "Aql/grammar.y" /* yacc.c:1652 */ { // attribute-name : attribute-value parser->pushObjectElement((yyvsp[-2].strval).value, (yyvsp[-2].strval).length, (yyvsp[0].node)); } -#line 4065 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4085 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 176: -#line 1618 "Aql/grammar.y" /* yacc.c:1652 */ + case 178: +#line 1626 "Aql/grammar.y" /* yacc.c:1652 */ { // bind-parameter : attribute-value if ((yyvsp[-2].strval).length < 1 || (yyvsp[-2].strval).value[0] == '@') { @@ -4075,166 +4095,146 @@ yyreduce: auto param = parser->ast()->createNodeParameter((yyvsp[-2].strval).value, (yyvsp[-2].strval).length); parser->pushObjectElement(param, (yyvsp[0].node)); } -#line 4079 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4099 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 177: -#line 1627 "Aql/grammar.y" /* yacc.c:1652 */ + case 179: +#line 1635 "Aql/grammar.y" /* yacc.c:1652 */ { // [ attribute-name-expression ] : attribute-value parser->pushObjectElement((yyvsp[-3].node), (yyvsp[0].node)); } -#line 4088 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 178: -#line 1634 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.intval) = 1; - } -#line 4096 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 179: -#line 1637 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.intval) = (yyvsp[-1].intval) + 1; - } -#line 4104 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4108 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 180: -#line 1643 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1642 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = nullptr; + (yyval.intval) = 1; } -#line 4112 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4116 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 181: -#line 1646 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1645 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = (yyvsp[0].node); + (yyval.intval) = (yyvsp[-1].intval) + 1; } -#line 4120 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4124 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 182: -#line 1652 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1651 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = nullptr; } -#line 4128 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4132 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 183: -#line 1655 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1654 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeArrayLimit(nullptr, (yyvsp[0].node)); + (yyval.node) = (yyvsp[0].node); } -#line 4136 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4140 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 184: -#line 1658 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.node) = parser->ast()->createNodeArrayLimit((yyvsp[-2].node), (yyvsp[0].node)); - } -#line 4144 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 185: -#line 1664 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1660 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = nullptr; } -#line 4152 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4148 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 185: +#line 1663 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = parser->ast()->createNodeArrayLimit(nullptr, (yyvsp[0].node)); + } +#line 4156 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 186: -#line 1667 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1666 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = (yyvsp[0].node); + (yyval.node) = parser->ast()->createNodeArrayLimit((yyvsp[-2].node), (yyvsp[0].node)); } -#line 4160 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4164 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 187: -#line 1673 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1672 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); + (yyval.node) = nullptr; } -#line 4168 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4172 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 188: -#line 1676 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1675 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); } -#line 4176 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4180 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 189: -#line 1679 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1681 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); + } +#line 4188 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 190: +#line 1684 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 4196 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 191: +#line 1687 "Aql/grammar.y" /* yacc.c:1652 */ { auto tmp = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); (yyval.node) = parser->ast()->createNodeCollectionDirection((yyvsp[-1].intval), tmp); } -#line 4185 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 190: -#line 1683 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.node) = parser->ast()->createNodeCollectionDirection((yyvsp[-1].intval), (yyvsp[0].node)); - } -#line 4193 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 191: -#line 1689 "Aql/grammar.y" /* yacc.c:1652 */ - { - auto node = static_cast(parser->peekStack()); - node->addMember((yyvsp[0].node)); - } -#line 4202 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4205 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 192: -#line 1693 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1691 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = parser->ast()->createNodeCollectionDirection((yyvsp[-1].intval), (yyvsp[0].node)); + } +#line 4213 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 193: +#line 1697 "Aql/grammar.y" /* yacc.c:1652 */ { auto node = static_cast(parser->peekStack()); node->addMember((yyvsp[0].node)); } -#line 4211 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 193: -#line 1700 "Aql/grammar.y" /* yacc.c:1652 */ - { - auto node = parser->ast()->createNodeArray(); - node->addMember((yyvsp[0].node)); - auto const& resolver = parser->query()->resolver(); - (yyval.node) = parser->ast()->createNodeCollectionList(node, resolver); - } #line 4222 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 194: -#line 1706 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1701 "Aql/grammar.y" /* yacc.c:1652 */ { - auto node = parser->ast()->createNodeArray(); - parser->pushStack(node); - node->addMember((yyvsp[-1].node)); - } -#line 4232 "Aql/grammar.cpp" /* yacc.c:1652 */ + auto node = static_cast(parser->peekStack()); + node->addMember((yyvsp[0].node)); + } +#line 4231 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 195: -#line 1710 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1708 "Aql/grammar.y" /* yacc.c:1652 */ { - auto node = static_cast(parser->popStack()); + auto node = parser->ast()->createNodeArray(); + node->addMember((yyvsp[0].node)); auto const& resolver = parser->query()->resolver(); (yyval.node) = parser->ast()->createNodeCollectionList(node, resolver); } @@ -4242,65 +4242,85 @@ yyreduce: break; case 196: -#line 1715 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1714 "Aql/grammar.y" /* yacc.c:1652 */ + { + auto node = parser->ast()->createNodeArray(); + parser->pushStack(node); + node->addMember((yyvsp[-1].node)); + } +#line 4252 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 197: +#line 1718 "Aql/grammar.y" /* yacc.c:1652 */ + { + auto node = static_cast(parser->popStack()); + auto const& resolver = parser->query()->resolver(); + (yyval.node) = parser->ast()->createNodeCollectionList(node, resolver); + } +#line 4262 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 198: +#line 1723 "Aql/grammar.y" /* yacc.c:1652 */ { // graph name (yyval.node) = (yyvsp[0].node); } -#line 4251 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4271 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 197: -#line 1719 "Aql/grammar.y" /* yacc.c:1652 */ + case 199: +#line 1727 "Aql/grammar.y" /* yacc.c:1652 */ { // graph name (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 4260 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 198: -#line 1728 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.intval) = 2; - } -#line 4268 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 199: -#line 1731 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.intval) = 1; - } -#line 4276 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4280 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 200: -#line 1734 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1736 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.intval) = 0; + (yyval.intval) = 2; } -#line 4284 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4288 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 201: -#line 1740 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1739 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeDirection((yyvsp[0].intval), 1); + (yyval.intval) = 1; } -#line 4292 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4296 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 202: -#line 1743 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1742 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeDirection((yyvsp[0].intval), (yyvsp[-1].node)); + (yyval.intval) = 0; } -#line 4300 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4304 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 203: -#line 1749 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1748 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = parser->ast()->createNodeDirection((yyvsp[0].intval), 1); + } +#line 4312 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 204: +#line 1751 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = parser->ast()->createNodeDirection((yyvsp[0].intval), (yyvsp[-1].node)); + } +#line 4320 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 205: +#line 1757 "Aql/grammar.y" /* yacc.c:1652 */ { // variable or collection or view auto ast = parser->ast(); @@ -4313,8 +4333,7 @@ yyreduce: // now try special variables if (ast->scopes()->canUseCurrentVariable() && strcmp((yyvsp[0].strval).value, "CURRENT") == 0) { variable = ast->scopes()->getCurrentVariable(); - } - else if (strcmp((yyvsp[0].strval).value, Variable::NAME_CURRENT) == 0) { + } else if (strcmp((yyvsp[0].strval).value, Variable::NAME_CURRENT) == 0) { variable = ast->scopes()->getCurrentVariable(); } } @@ -4334,27 +4353,27 @@ yyreduce: (yyval.node) = node; } -#line 4338 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 204: -#line 1782 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.node) = (yyvsp[0].node); - } -#line 4346 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 205: -#line 1785 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.node) = (yyvsp[0].node); - } -#line 4354 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4357 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 206: -#line 1788 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1789 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 4365 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 207: +#line 1792 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 4373 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 208: +#line 1795 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.node) = (yyvsp[0].node); @@ -4362,11 +4381,11 @@ yyreduce: ABORT_OOM } } -#line 4366 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4385 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 207: -#line 1795 "Aql/grammar.y" /* yacc.c:1652 */ + case 209: +#line 1802 "Aql/grammar.y" /* yacc.c:1652 */ { if ((yyvsp[-1].node)->type == NODE_TYPE_EXPANSION) { // create a dummy passthru node that reduces and evaluates the expansion first @@ -4377,20 +4396,20 @@ yyreduce: (yyval.node) = (yyvsp[-1].node); } } -#line 4381 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4400 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 208: -#line 1805 "Aql/grammar.y" /* yacc.c:1652 */ + case 210: +#line 1812 "Aql/grammar.y" /* yacc.c:1652 */ { parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_SUBQUERY); parser->ast()->startSubQuery(); } -#line 4390 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4409 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 209: -#line 1808 "Aql/grammar.y" /* yacc.c:1652 */ + case 211: +#line 1815 "Aql/grammar.y" /* yacc.c:1652 */ { AstNode* node = parser->ast()->endSubQuery(); parser->ast()->scopes()->endCurrent(); @@ -4401,11 +4420,11 @@ yyreduce: (yyval.node) = parser->ast()->createNodeReference(variableName); } -#line 4405 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4424 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 210: -#line 1818 "Aql/grammar.y" /* yacc.c:1652 */ + case 212: +#line 1825 "Aql/grammar.y" /* yacc.c:1652 */ { // named variable access, e.g. variable.reference if ((yyvsp[-2].node)->type == NODE_TYPE_EXPANSION) { @@ -4421,11 +4440,11 @@ yyreduce: (yyval.node) = parser->ast()->createNodeAttributeAccess((yyvsp[-2].node), (yyvsp[0].strval).value, (yyvsp[0].strval).length); } } -#line 4425 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4444 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 211: -#line 1833 "Aql/grammar.y" /* yacc.c:1652 */ + case 213: +#line 1840 "Aql/grammar.y" /* yacc.c:1652 */ { // named variable access, e.g. variable.@reference if ((yyvsp[-2].node)->type == NODE_TYPE_EXPANSION) { @@ -4440,11 +4459,11 @@ yyreduce: (yyval.node) = parser->ast()->createNodeBoundAttributeAccess((yyvsp[-2].node), (yyvsp[0].node)); } } -#line 4444 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4463 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 212: -#line 1847 "Aql/grammar.y" /* yacc.c:1652 */ + case 214: +#line 1854 "Aql/grammar.y" /* yacc.c:1652 */ { // indexed variable access, e.g. variable[index] if ((yyvsp[-3].node)->type == NODE_TYPE_EXPANSION) { @@ -4459,11 +4478,11 @@ yyreduce: (yyval.node) = parser->ast()->createNodeIndexedAccess((yyvsp[-3].node), (yyvsp[-1].node)); } } -#line 4463 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4482 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 213: -#line 1861 "Aql/grammar.y" /* yacc.c:1652 */ + case 215: +#line 1868 "Aql/grammar.y" /* yacc.c:1652 */ { // variable expansion, e.g. variable[*], with optional FILTER, LIMIT and RETURN clauses if ((yyvsp[0].intval) > 1 && (yyvsp[-2].node)->type == NODE_TYPE_EXPANSION) { @@ -4487,11 +4506,11 @@ yyreduce: auto scopes = parser->ast()->scopes(); scopes->stackCurrentVariable(scopes->getVariable(nextName)); } -#line 4491 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4510 "Aql/grammar.cpp" /* yacc.c:1652 */ break; - case 214: -#line 1883 "Aql/grammar.y" /* yacc.c:1652 */ + case 216: +#line 1890 "Aql/grammar.y" /* yacc.c:1652 */ { auto scopes = parser->ast()->scopes(); scopes->unstackCurrentVariable(); @@ -4510,38 +4529,26 @@ yyreduce: (yyval.node) = parser->ast()->createNodeExpansion((yyvsp[-5].intval), iterator, parser->ast()->createNodeReference(variable->name), (yyvsp[-3].node), (yyvsp[-2].node), (yyvsp[-1].node)); } } -#line 4514 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 215: -#line 1904 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.node) = (yyvsp[0].node); - } -#line 4522 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 216: -#line 1907 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.node) = (yyvsp[0].node); - } -#line 4530 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4533 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 217: -#line 1913 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1911 "Aql/grammar.y" /* yacc.c:1652 */ { - if ((yyvsp[0].node) == nullptr) { - ABORT_OOM - } - (yyval.node) = (yyvsp[0].node); } -#line 4542 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4541 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 218: +#line 1914 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 4549 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 219: #line 1920 "Aql/grammar.y" /* yacc.c:1652 */ { if ((yyvsp[0].node) == nullptr) { @@ -4550,81 +4557,81 @@ yyreduce: (yyval.node) = (yyvsp[0].node); } -#line 4554 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 219: -#line 1930 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); - } -#line 4562 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4561 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 220: -#line 1933 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1927 "Aql/grammar.y" /* yacc.c:1652 */ { + if ((yyvsp[0].node) == nullptr) { + ABORT_OOM + } + (yyval.node) = (yyvsp[0].node); } -#line 4570 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4573 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 221: -#line 1936 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1937 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeValueNull(); + (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 4578 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4581 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 222: -#line 1939 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1940 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeValueBool(true); + (yyval.node) = (yyvsp[0].node); } -#line 4586 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4589 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 223: -#line 1942 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1943 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.node) = parser->ast()->createNodeValueBool(false); + (yyval.node) = parser->ast()->createNodeValueNull(); } -#line 4594 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4597 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 224: -#line 1948 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1946 "Aql/grammar.y" /* yacc.c:1652 */ { - auto const& resolver = parser->query()->resolver(); - (yyval.node) = parser->ast()->createNodeCollection(resolver, (yyvsp[0].strval).value, (yyvsp[0].strval).length, arangodb::AccessMode::Type::WRITE); + (yyval.node) = parser->ast()->createNodeValueBool(true); } -#line 4603 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4605 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 225: -#line 1952 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1949 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.node) = parser->ast()->createNodeValueBool(false); + } +#line 4613 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 226: +#line 1955 "Aql/grammar.y" /* yacc.c:1652 */ { auto const& resolver = parser->query()->resolver(); (yyval.node) = parser->ast()->createNodeCollection(resolver, (yyvsp[0].strval).value, (yyvsp[0].strval).length, arangodb::AccessMode::Type::WRITE); } -#line 4612 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 226: -#line 1956 "Aql/grammar.y" /* yacc.c:1652 */ - { - if ((yyvsp[0].strval).length < 2 || (yyvsp[0].strval).value[0] != '@') { - parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), (yyvsp[0].strval).value, yylloc.first_line, yylloc.first_column); - } - - (yyval.node) = parser->ast()->createNodeParameterDatasource((yyvsp[0].strval).value, (yyvsp[0].strval).length); - } -#line 4624 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4622 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 227: -#line 1966 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1959 "Aql/grammar.y" /* yacc.c:1652 */ + { + auto const& resolver = parser->query()->resolver(); + (yyval.node) = parser->ast()->createNodeCollection(resolver, (yyvsp[0].strval).value, (yyvsp[0].strval).length, arangodb::AccessMode::Type::WRITE); + } +#line 4631 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 228: +#line 1963 "Aql/grammar.y" /* yacc.c:1652 */ { if ((yyvsp[0].strval).length < 2 || (yyvsp[0].strval).value[0] != '@') { parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), (yyvsp[0].strval).value, yylloc.first_line, yylloc.first_column); @@ -4632,43 +4639,55 @@ yyreduce: (yyval.node) = parser->ast()->createNodeParameterDatasource((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 4636 "Aql/grammar.cpp" /* yacc.c:1652 */ - break; - - case 228: -#line 1973 "Aql/grammar.y" /* yacc.c:1652 */ - { - (yyval.node) = parser->ast()->createNodeParameter((yyvsp[0].strval).value, (yyvsp[0].strval).length); - } -#line 4644 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4643 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 229: -#line 1979 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1973 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.strval) = (yyvsp[0].strval); + if ((yyvsp[0].strval).length < 2 || (yyvsp[0].strval).value[0] != '@') { + parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), (yyvsp[0].strval).value, yylloc.first_line, yylloc.first_column); + } + + (yyval.node) = parser->ast()->createNodeParameterDatasource((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 4652 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4655 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 230: -#line 1982 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1980 "Aql/grammar.y" /* yacc.c:1652 */ { - (yyval.strval) = (yyvsp[0].strval); + (yyval.node) = parser->ast()->createNodeParameter((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 4660 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4663 "Aql/grammar.cpp" /* yacc.c:1652 */ break; case 231: -#line 1987 "Aql/grammar.y" /* yacc.c:1652 */ +#line 1986 "Aql/grammar.y" /* yacc.c:1652 */ { (yyval.strval) = (yyvsp[0].strval); } -#line 4668 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4671 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 232: +#line 1989 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.strval) = (yyvsp[0].strval); + } +#line 4679 "Aql/grammar.cpp" /* yacc.c:1652 */ + break; + + case 233: +#line 1994 "Aql/grammar.y" /* yacc.c:1652 */ + { + (yyval.strval) = (yyvsp[0].strval); + } +#line 4687 "Aql/grammar.cpp" /* yacc.c:1652 */ break; -#line 4672 "Aql/grammar.cpp" /* yacc.c:1652 */ +#line 4691 "Aql/grammar.cpp" /* yacc.c:1652 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/arangod/Aql/grammar.h b/arangod/Aql/grammar.h index 4749cecf1e..22c8b8f251 100644 --- a/arangod/Aql/grammar.h +++ b/arangod/Aql/grammar.h @@ -85,39 +85,39 @@ extern int Aqldebug; T_NOT = 290, T_AND = 291, T_OR = 292, - T_NIN = 293, - T_REGEX_MATCH = 294, - T_REGEX_NON_MATCH = 295, - T_EQ = 296, - T_NE = 297, - T_LT = 298, - T_GT = 299, - T_LE = 300, - T_GE = 301, - T_LIKE = 302, - T_PLUS = 303, - T_MINUS = 304, - T_TIMES = 305, - T_DIV = 306, - T_MOD = 307, - T_QUESTION = 308, - T_COLON = 309, - T_SCOPE = 310, - T_RANGE = 311, - T_COMMA = 312, - T_OPEN = 313, - T_CLOSE = 314, - T_OBJECT_OPEN = 315, - T_OBJECT_CLOSE = 316, - T_ARRAY_OPEN = 317, - T_ARRAY_CLOSE = 318, - T_OUTBOUND = 319, - T_INBOUND = 320, - T_ANY = 321, - T_ALL = 322, - T_NONE = 323, - UMINUS = 324, - UPLUS = 325, + T_REGEX_MATCH = 293, + T_REGEX_NON_MATCH = 294, + T_EQ = 295, + T_NE = 296, + T_LT = 297, + T_GT = 298, + T_LE = 299, + T_GE = 300, + T_LIKE = 301, + T_PLUS = 302, + T_MINUS = 303, + T_TIMES = 304, + T_DIV = 305, + T_MOD = 306, + T_QUESTION = 307, + T_COLON = 308, + T_SCOPE = 309, + T_RANGE = 310, + T_COMMA = 311, + T_OPEN = 312, + T_CLOSE = 313, + T_OBJECT_OPEN = 314, + T_OBJECT_CLOSE = 315, + T_ARRAY_OPEN = 316, + T_ARRAY_CLOSE = 317, + T_OUTBOUND = 318, + T_INBOUND = 319, + T_ANY = 320, + T_ALL = 321, + T_NONE = 322, + UMINUS = 323, + UPLUS = 324, + UNEGATION = 325, FUNCCALL = 326, REFERENCE = 327, INDEXED = 328, diff --git a/arangod/Aql/grammar.hpp b/arangod/Aql/grammar.hpp index 4749cecf1e..22c8b8f251 100644 --- a/arangod/Aql/grammar.hpp +++ b/arangod/Aql/grammar.hpp @@ -85,39 +85,39 @@ extern int Aqldebug; T_NOT = 290, T_AND = 291, T_OR = 292, - T_NIN = 293, - T_REGEX_MATCH = 294, - T_REGEX_NON_MATCH = 295, - T_EQ = 296, - T_NE = 297, - T_LT = 298, - T_GT = 299, - T_LE = 300, - T_GE = 301, - T_LIKE = 302, - T_PLUS = 303, - T_MINUS = 304, - T_TIMES = 305, - T_DIV = 306, - T_MOD = 307, - T_QUESTION = 308, - T_COLON = 309, - T_SCOPE = 310, - T_RANGE = 311, - T_COMMA = 312, - T_OPEN = 313, - T_CLOSE = 314, - T_OBJECT_OPEN = 315, - T_OBJECT_CLOSE = 316, - T_ARRAY_OPEN = 317, - T_ARRAY_CLOSE = 318, - T_OUTBOUND = 319, - T_INBOUND = 320, - T_ANY = 321, - T_ALL = 322, - T_NONE = 323, - UMINUS = 324, - UPLUS = 325, + T_REGEX_MATCH = 293, + T_REGEX_NON_MATCH = 294, + T_EQ = 295, + T_NE = 296, + T_LT = 297, + T_GT = 298, + T_LE = 299, + T_GE = 300, + T_LIKE = 301, + T_PLUS = 302, + T_MINUS = 303, + T_TIMES = 304, + T_DIV = 305, + T_MOD = 306, + T_QUESTION = 307, + T_COLON = 308, + T_SCOPE = 309, + T_RANGE = 310, + T_COMMA = 311, + T_OPEN = 312, + T_CLOSE = 313, + T_OBJECT_OPEN = 314, + T_OBJECT_CLOSE = 315, + T_ARRAY_OPEN = 316, + T_ARRAY_CLOSE = 317, + T_OUTBOUND = 318, + T_INBOUND = 319, + T_ANY = 320, + T_ALL = 321, + T_NONE = 322, + UMINUS = 323, + UPLUS = 324, + UNEGATION = 325, FUNCCALL = 326, REFERENCE = 327, INDEXED = 328, diff --git a/arangod/Aql/grammar.y b/arangod/Aql/grammar.y index 0befa6f4d4..6617486943 100644 --- a/arangod/Aql/grammar.y +++ b/arangod/Aql/grammar.y @@ -256,7 +256,6 @@ static AstNode* TransformOutputVariables(Parser* parser, AstNode const* names) { %token T_NOT "not operator" %token T_AND "and operator" %token T_OR "or operator" -%token T_NIN "not in operator" %token T_REGEX_MATCH "~= operator" %token T_REGEX_NON_MATCH "~! operator" @@ -309,12 +308,12 @@ static AstNode* TransformOutputVariables(Parser* parser, AstNode const* names) { %left T_AND %nonassoc T_OUTBOUND T_INBOUND T_ANY T_ALL T_NONE %left T_EQ T_NE T_LIKE T_REGEX_MATCH T_REGEX_NON_MATCH -%left T_IN T_NIN +%left T_IN T_NOT %left T_LT T_GT T_LE T_GE %left T_RANGE %left T_PLUS T_MINUS %left T_TIMES T_DIV T_MOD -%right UMINUS UPLUS T_NOT +%right UMINUS UPLUS UNEGATION %left FUNCCALL %left REFERENCE %left INDEXED @@ -1333,7 +1332,7 @@ operator_unary: | T_MINUS expression %prec UMINUS { $$ = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_MINUS, $2); } - | T_NOT expression %prec T_NOT { + | T_NOT expression %prec UNEGATION { $$ = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_NOT, $2); } ; @@ -1381,8 +1380,8 @@ operator_binary: | expression T_IN expression { $$ = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_IN, $1, $3); } - | expression T_NIN expression { - $$ = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_NIN, $1, $3); + | expression T_NOT T_IN expression { + $$ = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_NIN, $1, $4); } | expression T_LIKE expression { AstNode* arguments = parser->ast()->createNodeArray(2); @@ -1424,8 +1423,17 @@ operator_binary: | expression quantifier T_IN expression { $$ = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_IN, $1, $4, $2); } - | expression quantifier T_NIN expression { - $$ = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NIN, $1, $4, $2); + | expression T_ALL T_NOT T_IN expression { + auto quantifier = parser->ast()->createNodeQuantifier(Quantifier::ALL); + $$ = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NIN, $1, $5, quantifier); + } + | expression T_ANY T_NOT T_IN expression { + auto quantifier = parser->ast()->createNodeQuantifier(Quantifier::ANY); + $$ = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NIN, $1, $5, quantifier); + } + | expression T_NONE T_NOT T_IN expression { + auto quantifier = parser->ast()->createNodeQuantifier(Quantifier::NONE); + $$ = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NIN, $1, $5, quantifier); } ; @@ -1758,8 +1766,7 @@ reference: // now try special variables if (ast->scopes()->canUseCurrentVariable() && strcmp($1.value, "CURRENT") == 0) { variable = ast->scopes()->getCurrentVariable(); - } - else if (strcmp($1.value, Variable::NAME_CURRENT) == 0) { + } else if (strcmp($1.value, Variable::NAME_CURRENT) == 0) { variable = ast->scopes()->getCurrentVariable(); } } diff --git a/arangod/Aql/tokens.cpp b/arangod/Aql/tokens.cpp index 95e7848ec5..e6c284c8c0 100644 --- a/arangod/Aql/tokens.cpp +++ b/arangod/Aql/tokens.cpp @@ -1,14 +1,25 @@ -#line 17 "Aql/tokens.ll" +#line 16 "Aql/tokens.ll" #include #if (_MSC_VER >= 1) // fix ret_val = EOB_ACT_LAST_MATCH later on, its generated, we can't control this. -#pragma warning(disable : 4267) +#pragma warning( disable : 4267) #endif -#define YY_INT_ALIGNED short int + + +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ + + + + + + + + + #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 @@ -17,247 +28,316 @@ #define FLEX_BETA #endif + + + + + + + + + + + + + #ifdef yy_create_buffer #define Aql_create_buffer_ALREADY_DEFINED #else #define yy_create_buffer Aql_create_buffer #endif + #ifdef yy_delete_buffer #define Aql_delete_buffer_ALREADY_DEFINED #else #define yy_delete_buffer Aql_delete_buffer #endif + #ifdef yy_scan_buffer #define Aql_scan_buffer_ALREADY_DEFINED #else #define yy_scan_buffer Aql_scan_buffer #endif + #ifdef yy_scan_string #define Aql_scan_string_ALREADY_DEFINED #else #define yy_scan_string Aql_scan_string #endif + #ifdef yy_scan_bytes #define Aql_scan_bytes_ALREADY_DEFINED #else #define yy_scan_bytes Aql_scan_bytes #endif + #ifdef yy_init_buffer #define Aql_init_buffer_ALREADY_DEFINED #else #define yy_init_buffer Aql_init_buffer #endif + #ifdef yy_flush_buffer #define Aql_flush_buffer_ALREADY_DEFINED #else #define yy_flush_buffer Aql_flush_buffer #endif + #ifdef yy_load_buffer_state #define Aql_load_buffer_state_ALREADY_DEFINED #else #define yy_load_buffer_state Aql_load_buffer_state #endif + #ifdef yy_switch_to_buffer #define Aql_switch_to_buffer_ALREADY_DEFINED #else #define yy_switch_to_buffer Aql_switch_to_buffer #endif + #ifdef yypush_buffer_state #define Aqlpush_buffer_state_ALREADY_DEFINED #else #define yypush_buffer_state Aqlpush_buffer_state #endif + #ifdef yypop_buffer_state #define Aqlpop_buffer_state_ALREADY_DEFINED #else #define yypop_buffer_state Aqlpop_buffer_state #endif + #ifdef yyensure_buffer_stack #define Aqlensure_buffer_stack_ALREADY_DEFINED #else #define yyensure_buffer_stack Aqlensure_buffer_stack #endif + #ifdef yylex #define Aqllex_ALREADY_DEFINED #else #define yylex Aqllex #endif + #ifdef yyrestart #define Aqlrestart_ALREADY_DEFINED #else #define yyrestart Aqlrestart #endif + #ifdef yylex_init #define Aqllex_init_ALREADY_DEFINED #else #define yylex_init Aqllex_init #endif + #ifdef yylex_init_extra #define Aqllex_init_extra_ALREADY_DEFINED #else #define yylex_init_extra Aqllex_init_extra #endif + #ifdef yylex_destroy #define Aqllex_destroy_ALREADY_DEFINED #else #define yylex_destroy Aqllex_destroy #endif + #ifdef yyget_debug #define Aqlget_debug_ALREADY_DEFINED #else #define yyget_debug Aqlget_debug #endif + #ifdef yyset_debug #define Aqlset_debug_ALREADY_DEFINED #else #define yyset_debug Aqlset_debug #endif + #ifdef yyget_extra #define Aqlget_extra_ALREADY_DEFINED #else #define yyget_extra Aqlget_extra #endif + #ifdef yyset_extra #define Aqlset_extra_ALREADY_DEFINED #else #define yyset_extra Aqlset_extra #endif + #ifdef yyget_in #define Aqlget_in_ALREADY_DEFINED #else #define yyget_in Aqlget_in #endif + #ifdef yyset_in #define Aqlset_in_ALREADY_DEFINED #else #define yyset_in Aqlset_in #endif + #ifdef yyget_out #define Aqlget_out_ALREADY_DEFINED #else #define yyget_out Aqlget_out #endif + #ifdef yyset_out #define Aqlset_out_ALREADY_DEFINED #else #define yyset_out Aqlset_out #endif + #ifdef yyget_leng #define Aqlget_leng_ALREADY_DEFINED #else #define yyget_leng Aqlget_leng #endif + #ifdef yyget_text #define Aqlget_text_ALREADY_DEFINED #else #define yyget_text Aqlget_text #endif + #ifdef yyget_lineno #define Aqlget_lineno_ALREADY_DEFINED #else #define yyget_lineno Aqlget_lineno #endif + #ifdef yyset_lineno #define Aqlset_lineno_ALREADY_DEFINED #else #define yyset_lineno Aqlset_lineno #endif + + #ifdef yyget_column #define Aqlget_column_ALREADY_DEFINED #else #define yyget_column Aqlget_column #endif + #ifdef yyset_column #define Aqlset_column_ALREADY_DEFINED #else #define yyset_column Aqlset_column #endif + + #ifdef yywrap #define Aqlwrap_ALREADY_DEFINED #else #define yywrap Aqlwrap #endif + + + + #ifdef yyget_lval #define Aqlget_lval_ALREADY_DEFINED #else #define yyget_lval Aqlget_lval #endif + #ifdef yyset_lval #define Aqlset_lval_ALREADY_DEFINED #else #define yyset_lval Aqlset_lval #endif + + + + #ifdef yyget_lloc #define Aqlget_lloc_ALREADY_DEFINED #else #define yyget_lloc Aqlget_lloc #endif + #ifdef yyset_lloc #define Aqlset_lloc_ALREADY_DEFINED #else #define yyset_lloc Aqlset_lloc #endif + + + #ifdef yyalloc #define Aqlalloc_ALREADY_DEFINED #else #define yyalloc Aqlalloc #endif + #ifdef yyrealloc #define Aqlrealloc_ALREADY_DEFINED #else #define yyrealloc Aqlrealloc #endif + #ifdef yyfree #define Aqlfree_ALREADY_DEFINED #else #define yyfree Aqlfree #endif + + + + + + + + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ -#include #include -#include #include +#include +#include /* end standard C headers. */ @@ -268,10 +348,10 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -288,47 +368,48 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ + /* begin standard C++ headers. */ /* TODO: this is always defined, so inline it */ @@ -343,10 +424,15 @@ typedef unsigned int flex_uint32_t; /* Returned upon end-of-file. */ #define YY_NULL 0 + /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) + + + + /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T @@ -354,6 +440,22 @@ typedef unsigned int flex_uint32_t; typedef void* yyscan_t; #endif + + + + + + + + + + + + + + + + /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r @@ -365,6 +467,18 @@ typedef void* yyscan_t; #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r + + + + + + + + + + + + /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. @@ -379,9 +493,10 @@ typedef void* yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin, yyscanner) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 + /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ @@ -395,13 +510,16 @@ typedef void* yyscan_t; #endif /* __ia64__ */ #endif + /* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + + #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state* YY_BUFFER_STATE; +typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T @@ -409,418 +527,552 @@ typedef struct yy_buffer_state* YY_BUFFER_STATE; typedef size_t yy_size_t; #endif + + + #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires - * access to the local variable yy_act. Since yyless() is a macro, it would break - * existing scanners that call yyless() from OUTSIDE yylex. - * One obvious solution it to make yy_act a global. I tried that, and saw - * a 5% performance hit in a non-yylineno scanner, because yy_act is - * normally declared as a register variable-- so it is not worth it. - */ -#define YY_LESS_LINENO(n) \ - do { \ - int yyl; \ - for (yyl = n; yyl < yyleng; ++yyl) \ - if (yytext[yyl] == '\n') --yylineno; \ - } while (0) -#define YY_LINENO_REWIND_TO(dst) \ - do { \ - const char* p; \ - for (p = yy_cp - 1; p >= (dst); --p) \ - if (*p == '\n') --yylineno; \ - } while (0) - + + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires + * access to the local variable yy_act. Since yyless() is a macro, it would break + * existing scanners that call yyless() from OUTSIDE yylex. + * One obvious solution it to make yy_act a global. I tried that, and saw + * a 5% performance hit in a non-yylineno scanner, because yy_act is + * normally declared as a register variable-- so it is not worth it. + */ + #define YY_LESS_LINENO(n) \ + do { \ + int yyl;\ + for ( yyl = n; yyl < yyleng; ++yyl )\ + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, yyg->yytext_ptr, yyscanner) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state { - FILE* yy_input_file; +struct yy_buffer_state + { + FILE *yy_input_file; - char* yy_ch_buf; /* input buffer */ - char* yy_buf_pos; /* current position in input buffer */ - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; - int yy_buffer_status; + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ + + + /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER \ - (yyg->yy_buffer_stack ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : NULL) +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart(FILE* input_file, yyscan_t yyscanner); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -YY_BUFFER_STATE yy_create_buffer(FILE* file, int size, yyscan_t yyscanner); -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner); -void yypop_buffer_state(yyscan_t yyscanner); -static void yyensure_buffer_stack(yyscan_t yyscanner); -static void yy_load_buffer_state(yyscan_t yyscanner); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE* file, yyscan_t yyscanner); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER, yyscanner) -YY_BUFFER_STATE yy_scan_buffer(char* base, yy_size_t size, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_string(const char* yy_str, yyscan_t yyscanner); -YY_BUFFER_STATE yy_scan_bytes(const char* bytes, int len, yyscan_t yyscanner); -void* yyalloc(yy_size_t, yyscan_t yyscanner); -void* yyrealloc(void*, yy_size_t, yyscan_t yyscanner); -void yyfree(void*, yyscan_t yyscanner); + +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); + + +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) + + +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); + + +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); + #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + /* Begin user sect3 */ -#define Aqlwrap(yyscanner) (/*CONSTCOND*/ 1) +#define Aqlwrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; + typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state(yyscan_t yyscanner); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner); -static int yy_get_next_buffer(yyscan_t yyscanner); -static void yynoreturn yy_fatal_error(const char* msg, yyscan_t yyscanner); + + + + + +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); + + + /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (int)(yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 102 -#define YY_END_OF_BUFFER 103 +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; +#define YY_NUM_RULES 99 +#define YY_END_OF_BUFFER 100 /* This struct is not used in this scanner, but its presence is necessary. */ -struct yy_trans_info { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[282] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 103, 101, 88, 89, 44, 74, 101, 51, 101, 79, 57, 58, 49, 47, 56, 48, 101, - 50, 84, 84, 54, 42, 43, 40, 52, 101, 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 61, 62, 101, 64, 59, 101, 60, 101, 68, - 67, 68, 65, 73, 72, 73, 73, 83, 82, 80, 83, 78, 77, 75, 78, 92, 91, - 95, 97, 96, 100, 99, 99, 100, 88, 38, 36, 63, 45, 55, 85, 93, 90, +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[275] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 100, 98, 88, 89, 44, 74, + 98, 51, 98, 79, 57, 58, 49, 47, 56, 48, + 98, 50, 84, 84, 54, 42, 43, 40, 52, 98, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 61, 62, 98, 64, + 59, 98, 60, 98, 68, 67, 68, 65, 73, 72, + 73, 73, 83, 82, 80, 83, 78, 77, 75, 78, + 92, 91, 95, 97, 96, 88, 38, 36, 63, 45, + 55, 85, 93, 90, 0, 0, 84, 53, 41, 37, - 0, 0, 84, 53, 41, 37, 35, 39, 86, 0, 0, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 15, 63, 63, 63, 63, 63, 14, 63, 63, 63, 63, - 63, 63, 63, 63, 0, 46, 69, 66, 71, 70, 81, 76, 92, 95, 94, 98, 85, - 0, 85, 86, 87, 0, 86, 63, 29, 13, 28, 10, 63, 63, 63, 63, 63, 1, - 63, 63, 63, 63, 63, 2, 63, 63, 63, 12, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 87, 87, 86, 86, 63, 63, 11, 63, 63, + 35, 39, 86, 0, 0, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 15, 63, 63, + 63, 63, 63, 14, 63, 63, 63, 63, 63, 63, + 63, 63, 0, 46, 69, 66, 71, 70, 81, 76, + 92, 95, 94, 85, 0, 85, 86, 87, 0, 86, + 63, 29, 13, 28, 10, 63, 63, 63, 63, 63, + 1, 63, 63, 63, 63, 63, 2, 63, 63, 63, + 12, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 87, 87, 86, 86, 63, 63, + 11, 63, 63, 63, 63, 63, 63, 16, 63, 31, - 63, 63, 63, 63, 16, 63, 31, 63, 30, 32, 63, 63, 63, 63, 63, 6, 33, - 63, 63, 17, 87, 87, 63, 63, 63, 34, 63, 23, 63, 63, 63, 7, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 3, 63, 19, 63, 63, 18, 63, 4, 63, - 20, 22, 63, 5, 63, 27, 63, 63, 21, 63, 63, 8, 63, 26, 63, 9, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 24, 63, 63, 25, 0}; + 63, 30, 32, 63, 63, 63, 63, 63, 6, 33, + 63, 63, 17, 87, 87, 63, 63, 63, 34, 63, + 23, 63, 63, 63, 7, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 3, 63, 19, 63, 63, + 18, 63, 4, 63, 20, 22, 63, 5, 63, 27, + 63, 63, 21, 63, 63, 8, 63, 26, 63, 9, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 24, + 63, 63, 25, 0 + } ; -static const YY_CHAR yy_ec[256] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 1, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 20, 1, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 35, 42, 43, 44, 45, 46, 47, 35, 48, 35, 49, 50, 51, 1, - 52, 53, 54, 55, 56, 57, +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 20, 1, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 35, 42, 43, 44, 45, 46, 47, 35, 48, 35, + 49, 50, 51, 1, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 35, 63, 64, 65, 66, 67, 68, 35, 69, 70, 71, 72, 73, 74, - 35, 75, 35, 76, 77, 78, 79, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 80, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 1, - 1, 1, 1, 1, 1, + 58, 59, 60, 61, 62, 35, 63, 64, 65, 66, + 67, 68, 35, 69, 70, 71, 72, 73, 74, 35, + 75, 35, 76, 77, 78, 79, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 80, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 81, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; -static const YY_CHAR yy_meta[82] = {0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, 5, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 7, 1, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1}; +static const YY_CHAR yy_meta[82] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 1, 1, 4, 4, 1, + 1, 1, 1, 1, 5, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, + 1, 7, 1, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, + 1 + } ; -static const flex_int16_t yy_base[310] = { - 0, 0, 0, 79, 80, 81, 84, 85, 86, 87, 88, 457, 456, 93, 94, - 83, 105, 458, 621, 453, 621, 76, 621, 0, 621, 446, 621, 621, 621, 621, - 621, 621, 621, 83, 92, 84, 94, 432, 427, 81, 397, 621, 91, 114, 0, - 80, 92, 132, 79, 102, 358, 129, 104, 128, 98, 142, 119, 128, 130, 621, - 621, 353, 621, 621, 323, 621, 317, 621, 621, 0, 621, 621, 621, 0, 283, - 621, 621, 621, 0, 621, 621, 621, 0, 0, 621, 0, 621, 337, 621, 621, - 621, 138, 343, 621, 621, 0, 621, 621, 171, 621, 621, +static const flex_int16_t yy_base[302] = + { 0, + 0, 0, 79, 80, 81, 84, 85, 86, 87, 88, + 449, 448, 93, 94, 449, 602, 446, 602, 63, 602, + 0, 602, 439, 602, 602, 602, 602, 602, 602, 602, + 82, 87, 86, 91, 426, 423, 64, 422, 602, 87, + 81, 0, 79, 92, 126, 86, 101, 390, 123, 119, + 126, 118, 123, 127, 129, 127, 602, 602, 388, 602, + 602, 362, 602, 358, 602, 602, 0, 602, 602, 602, + 0, 326, 602, 602, 602, 0, 602, 602, 602, 0, + 0, 602, 0, 602, 370, 382, 602, 602, 0, 602, + 602, 164, 602, 602, 96, 159, 183, 602, 602, 602, - 100, 192, 196, 621, 621, 621, 621, 621, 0, 249, 242, 0, 153, 142, 173, - 167, 144, 150, 155, 179, 180, 176, 193, 195, 181, 184, 195, 193, 197, 0, - 191, 208, 196, 198, 196, 213, 209, 253, 235, 621, 621, 621, 621, 621, 621, - 621, 0, 0, 621, 621, 256, 259, 263, 0, 0, 175, 131, 215, 0, 0, - 0, 0, 232, 257, 244, 246, 246, 0, 250, 252, 263, 255, 264, 0, 268, - 265, 270, 0, 265, 276, 266, 270, 263, 267, 266, 274, 285, 282, 287, 0, - 305, 0, 88, 75, 0, 300, 308, 0, 307, 312, + 602, 602, 0, 298, 236, 0, 143, 136, 158, 151, + 155, 161, 162, 171, 172, 168, 185, 185, 173, 173, + 182, 182, 186, 0, 180, 208, 187, 188, 189, 229, + 194, 241, 173, 602, 602, 602, 602, 602, 602, 602, + 0, 0, 602, 244, 248, 250, 0, 0, 106, 75, + 222, 0, 0, 0, 0, 233, 186, 227, 234, 234, + 0, 239, 241, 245, 242, 250, 0, 254, 251, 257, + 0, 252, 263, 252, 257, 250, 254, 256, 271, 280, + 280, 281, 0, 306, 0, 73, 71, 0, 287, 290, + 0, 292, 298, 301, 299, 285, 293, 0, 296, 0, - 313, 311, 301, 305, 0, 309, 0, 306, 0, 0, 311, 306, 327, 313, 312, - 0, 0, 315, 318, 0, 73, 0, 329, 334, 325, 0, 323, 0, 328, 324, - 333, 0, 335, 354, 357, 349, 363, 366, 354, 373, 357, 375, 0, 375, 0, - 362, 369, 0, 379, 0, 368, 0, 0, 370, 0, 372, 0, 387, 389, 0, - 376, 392, 0, 383, 0, 71, 0, 385, 389, 63, 397, 393, 392, 413, 407, - 398, 0, 411, 405, 0, 621, 475, 482, 489, 496, 503, 510, 517, 105, 521, - 525, 527, 534, 541, 548, 555, 562, 569, 573, 577, + 293, 0, 0, 299, 294, 307, 299, 299, 0, 0, + 300, 304, 0, 65, 0, 315, 321, 312, 0, 310, + 0, 314, 311, 323, 0, 324, 342, 346, 337, 351, + 353, 341, 360, 344, 361, 0, 361, 0, 349, 355, + 0, 361, 0, 352, 0, 0, 353, 0, 354, 0, + 369, 372, 0, 360, 375, 0, 364, 0, 59, 0, + 364, 369, 56, 387, 375, 379, 400, 395, 386, 0, + 399, 393, 0, 602, 463, 470, 477, 484, 491, 498, + 97, 502, 506, 508, 515, 522, 529, 536, 543, 550, + 554, 558, 562, 566, 570, 574, 578, 582, 586, 590, - 581, 585, 589, 593, 597, 601, 605, 609, 613}; + 594 + } ; -static const flex_int16_t yy_def[310] = { - 0, 281, 1, 282, 282, 283, 283, 284, 284, 285, 285, 286, 286, 287, 287, - 288, 288, 281, 281, 281, 281, 281, 281, 289, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 290, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 281, - 281, 292, 281, 281, 281, 281, 281, 281, 281, 293, 281, 281, 281, 294, 281, - 281, 281, 281, 295, 281, 281, 281, 296, 297, 281, 298, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 291, 281, 281, 281, 281, 281, +static const flex_int16_t yy_def[302] = + { 0, + 274, 1, 275, 275, 276, 276, 277, 277, 278, 278, + 279, 279, 280, 280, 274, 274, 274, 274, 274, 274, + 281, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 282, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 274, 274, 284, 274, + 274, 274, 274, 274, 274, 274, 285, 274, 274, 274, + 286, 274, 274, 274, 274, 287, 274, 274, 274, 288, + 289, 274, 290, 274, 274, 274, 274, 274, 283, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 281, 281, 281, 281, 281, 281, 281, 281, 299, 300, 301, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 302, 292, 281, 281, 281, 281, 281, 281, - 281, 297, 298, 281, 281, 281, 281, 281, 299, 303, 304, 305, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 306, - 302, 303, 307, 305, 308, 291, 291, 291, 291, 291, + 274, 274, 291, 292, 293, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 294, 284, 274, 274, 274, 274, 274, 274, 274, + 289, 290, 274, 274, 274, 274, 291, 295, 296, 297, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 298, 294, 295, 299, 297, 300, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 307, 309, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 0, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 299, 301, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 0, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 281, 281, 281, 281, 281, 281, 281, 281, 281}; + 274 + } ; -static const flex_int16_t yy_nxt[703] = { - 0, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 44, 47, 48, 44, 49, 44, 50, 51, 44, 52, 53, 44, 54, 55, 56, - 57, 44, 58, 44, 59, 18, 60, 61, 62, 43, 44, 45, 46, 44, 47, - 48, 44, 49, 50, 51, 44, 52, 53, 44, 54, 55, 56, 57, 44, 58, - 44, 63, 64, 65, 18, 18, 66, 68, 68, 72, 89, 90, 72, 76, 76, - 80, 80, 81, 81, 77, 77, 86, 86, 93, 97, 101, +static const flex_int16_t yy_nxt[684] = + { 0, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 42, + 45, 46, 42, 47, 42, 48, 49, 42, 50, 51, + 42, 52, 53, 54, 55, 42, 56, 42, 57, 16, + 58, 59, 60, 41, 42, 43, 44, 42, 45, 46, + 42, 47, 48, 49, 42, 50, 51, 42, 52, 53, + 54, 55, 42, 56, 42, 61, 62, 63, 16, 16, + 64, 66, 66, 70, 87, 100, 70, 74, 74, 78, + 78, 79, 79, 75, 75, 84, 84, 91, 93, 92, - 98, 98, 106, 99, 87, 87, 89, 90, 100, 101, 95, 103, 103, 102, 272, - 110, 91, 151, 151, 117, 123, 118, 269, 102, 222, 119, 195, 132, 69, 69, - 73, 70, 70, 73, 78, 78, 82, 82, 91, 222, 124, 102, 111, 128, 91, - 113, 117, 123, 129, 118, 114, 102, 115, 119, 94, 132, 116, 120, 126, 107, - 135, 74, 127, 137, 74, 121, 91, 124, 136, 130, 128, 122, 131, 113, 133, - 129, 150, 114, 159, 115, 163, 134, 195, 116, 158, 120, 126, 135, 98, 98, - 127, 137, 164, 121, 162, 136, 130, 165, 122, 131, + 92, 95, 89, 94, 85, 85, 95, 265, 97, 97, + 262, 104, 107, 144, 144, 96, 215, 108, 111, 109, + 96, 112, 188, 110, 215, 113, 188, 117, 67, 67, + 71, 68, 68, 71, 76, 76, 80, 80, 105, 118, + 107, 88, 101, 96, 108, 111, 109, 126, 96, 112, + 110, 114, 120, 113, 117, 127, 121, 149, 122, 115, + 131, 72, 128, 123, 72, 116, 118, 124, 129, 130, + 125, 145, 152, 145, 151, 126, 146, 146, 155, 114, + 120, 92, 92, 127, 121, 122, 153, 115, 131, 128, + 123, 156, 116, 96, 124, 129, 130, 125, 95, 152, - 102, 160, 133, 150, 152, 159, 152, 163, 134, 153, 153, 101, 158, 103, 103, - 166, 167, 168, 169, 164, 161, 170, 162, 173, 165, 102, 156, 174, 102, 160, - 175, 177, 176, 179, 180, 184, 178, 171, 172, 185, 186, 187, 166, 167, 168, - 181, 169, 161, 182, 170, 173, 183, 189, 102, 174, 188, 196, 175, 177, 176, - 179, 180, 184, 178, 171, 172, 185, 186, 197, 187, 190, 190, 181, 151, 151, - 182, 153, 153, 183, 189, 153, 153, 188, 196, 198, 102, 139, 199, 200, 201, - 202, 203, 204, 111, 205, 197, 206, 207, 208, 209, + 97, 97, 151, 157, 158, 154, 155, 159, 160, 161, + 162, 163, 96, 191, 153, 166, 167, 168, 156, 169, + 170, 96, 172, 173, 133, 171, 177, 164, 165, 178, + 157, 158, 154, 179, 159, 160, 161, 182, 162, 163, + 96, 191, 166, 167, 168, 174, 169, 170, 175, 172, + 173, 176, 171, 177, 164, 165, 178, 180, 183, 183, + 179, 144, 144, 189, 182, 146, 146, 146, 146, 190, + 192, 181, 174, 96, 197, 175, 193, 194, 176, 195, + 196, 198, 199, 200, 201, 180, 202, 105, 203, 204, + 189, 205, 183, 206, 207, 208, 190, 192, 181, 209, - 156, 210, 211, 217, 190, 212, 213, 214, 215, 216, 218, 219, 198, 102, 199, - 200, 201, 202, 203, 220, 204, 205, 190, 190, 206, 207, 208, 209, 210, 223, - 211, 217, 212, 213, 214, 215, 216, 224, 218, 219, 225, 226, 227, 228, 92, - 229, 230, 220, 231, 232, 233, 234, 235, 149, 236, 237, 190, 223, 238, 239, - 240, 241, 144, 242, 243, 224, 244, 245, 225, 226, 227, 228, 229, 230, 246, - 231, 232, 233, 234, 247, 235, 236, 237, 248, 249, 238, 239, 250, 240, 241, - 242, 243, 251, 244, 245, 252, 141, 253, 254, 140, + 210, 96, 197, 193, 194, 211, 195, 196, 198, 212, + 199, 200, 201, 213, 202, 203, 216, 204, 205, 217, + 206, 207, 208, 183, 183, 218, 209, 219, 210, 222, + 220, 221, 228, 211, 223, 224, 225, 212, 226, 227, + 229, 213, 230, 231, 216, 232, 233, 217, 234, 149, + 235, 236, 237, 218, 238, 219, 222, 183, 220, 221, + 228, 223, 224, 225, 239, 226, 227, 229, 240, 230, + 231, 241, 232, 242, 233, 243, 234, 235, 236, 237, + 244, 238, 245, 86, 246, 247, 143, 248, 249, 250, + 253, 239, 251, 252, 254, 240, 255, 256, 257, 241, - 255, 246, 256, 257, 139, 258, 247, 259, 260, 125, 261, 248, 249, 262, 250, - 263, 264, 265, 108, 266, 251, 267, 273, 252, 253, 268, 254, 255, 270, 271, - 256, 257, 258, 274, 259, 275, 260, 261, 276, 277, 262, 278, 263, 279, 264, - 265, 266, 280, 105, 267, 273, 104, 268, 96, 92, 270, 271, 281, 84, 84, - 274, 281, 275, 281, 281, 281, 276, 277, 278, 281, 281, 279, 281, 281, 280, - 67, 67, 67, 67, 67, 67, 67, 71, 71, 71, 71, 71, 71, 71, 75, - 75, 75, 75, 75, 75, 75, 79, 79, 79, 79, + 258, 242, 243, 259, 260, 138, 261, 263, 244, 264, + 245, 246, 266, 247, 248, 267, 249, 250, 253, 251, + 252, 254, 268, 255, 256, 269, 257, 270, 258, 271, + 259, 272, 260, 261, 263, 273, 264, 135, 134, 133, + 266, 119, 267, 102, 99, 98, 90, 86, 274, 268, + 82, 82, 274, 269, 274, 270, 271, 274, 274, 272, + 274, 274, 273, 65, 65, 65, 65, 65, 65, 65, + 69, 69, 69, 69, 69, 69, 69, 73, 73, 73, + 73, 73, 73, 73, 77, 77, 77, 77, 77, 77, + 77, 81, 81, 81, 81, 81, 81, 81, 83, 83, - 79, 79, 79, 83, 83, 83, 83, 83, 83, 83, 85, 85, 85, 85, 85, - 85, 85, 88, 88, 88, 88, 88, 88, 88, 109, 109, 109, 109, 112, 281, - 112, 112, 138, 138, 142, 281, 142, 142, 142, 142, 142, 143, 281, 143, 143, - 143, 143, 143, 145, 281, 145, 145, 145, 145, 145, 146, 281, 146, 146, 146, - 146, 146, 147, 281, 147, 147, 147, 147, 147, 148, 281, 281, 148, 148, 148, - 148, 154, 281, 154, 154, 155, 281, 155, 155, 157, 281, 157, 157, 191, 281, - 191, 191, 192, 281, 192, 192, 193, 281, 193, 193, + 83, 83, 83, 83, 83, 103, 103, 103, 103, 106, + 274, 106, 106, 132, 132, 136, 274, 136, 136, 136, + 136, 136, 137, 274, 137, 137, 137, 137, 137, 139, + 274, 139, 139, 139, 139, 139, 140, 274, 140, 140, + 140, 140, 140, 141, 274, 141, 141, 141, 141, 141, + 142, 274, 274, 142, 142, 142, 142, 147, 274, 147, + 147, 148, 274, 148, 148, 150, 274, 150, 150, 184, + 274, 184, 184, 185, 274, 185, 185, 186, 274, 186, + 186, 187, 274, 187, 187, 183, 274, 183, 183, 214, + 274, 214, 214, 188, 274, 188, 188, 215, 274, 215, - 194, 281, 194, 194, 190, 281, 190, 190, 221, 281, 221, 221, 195, 281, 195, - 195, 222, 281, 222, 222, 17, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + 215, 15, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274 + } ; - 281, 281}; +static const flex_int16_t yy_chk[684] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 4, 5, 19, 37, 6, 7, 8, 9, + 10, 9, 10, 7, 8, 13, 14, 31, 32, 31, -static const flex_int16_t yy_chk[703] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 4, 5, 15, 15, 6, 7, 8, - 9, 10, 9, 10, 7, 8, 13, 14, 21, 33, 35, + 31, 33, 281, 32, 13, 14, 34, 263, 34, 34, + 259, 40, 41, 95, 95, 33, 214, 41, 43, 41, + 34, 44, 187, 41, 186, 44, 150, 46, 3, 4, + 5, 3, 4, 6, 7, 8, 9, 10, 40, 47, + 41, 19, 37, 33, 41, 43, 41, 52, 34, 44, + 41, 45, 49, 44, 46, 53, 49, 149, 50, 45, + 56, 5, 53, 50, 6, 45, 47, 51, 54, 55, + 51, 96, 108, 96, 107, 52, 96, 96, 110, 45, + 49, 92, 92, 53, 49, 50, 109, 45, 56, 53, + 50, 111, 45, 92, 51, 54, 55, 51, 97, 108, - 33, 33, 39, 34, 13, 14, 16, 16, 34, 36, 289, 36, 36, 35, 270, - 42, 15, 101, 101, 45, 48, 46, 266, 36, 221, 46, 194, 54, 3, 4, - 5, 3, 4, 6, 7, 8, 9, 10, 16, 193, 49, 35, 42, 52, 15, - 43, 45, 48, 52, 46, 43, 36, 43, 46, 21, 54, 43, 47, 51, 39, - 56, 5, 51, 58, 6, 47, 16, 49, 57, 53, 52, 47, 53, 43, 55, - 52, 91, 43, 114, 43, 117, 55, 157, 43, 113, 47, 51, 56, 98, 98, - 51, 58, 118, 47, 116, 57, 53, 119, 47, 53, + 97, 97, 107, 112, 113, 109, 110, 114, 115, 116, + 117, 118, 97, 157, 109, 119, 120, 121, 111, 121, + 122, 92, 123, 125, 133, 122, 127, 118, 118, 128, + 112, 113, 109, 129, 114, 115, 116, 131, 117, 118, + 97, 157, 119, 120, 121, 126, 121, 122, 126, 123, + 125, 126, 122, 127, 118, 118, 128, 130, 132, 132, + 129, 144, 144, 151, 131, 145, 145, 146, 146, 156, + 158, 130, 126, 144, 164, 126, 159, 160, 126, 162, + 163, 165, 166, 168, 169, 130, 170, 105, 172, 173, + 151, 174, 132, 175, 176, 177, 156, 158, 130, 178, - 98, 115, 55, 91, 102, 114, 102, 117, 55, 102, 102, 103, 113, 103, 103, - 120, 121, 122, 123, 118, 115, 124, 116, 125, 119, 103, 156, 126, 98, 115, - 127, 128, 127, 129, 131, 133, 128, 124, 124, 134, 135, 136, 120, 121, 122, - 132, 123, 115, 132, 124, 125, 132, 137, 103, 126, 136, 158, 127, 128, 127, - 129, 131, 133, 128, 124, 124, 134, 135, 163, 136, 138, 138, 132, 151, 151, - 132, 152, 152, 132, 137, 153, 153, 136, 158, 164, 151, 139, 165, 166, 167, - 169, 170, 171, 111, 172, 163, 173, 175, 176, 177, + 179, 144, 164, 159, 160, 180, 162, 163, 165, 181, + 166, 168, 169, 182, 170, 172, 189, 173, 174, 190, + 175, 176, 177, 184, 184, 192, 178, 193, 179, 196, + 194, 195, 206, 180, 197, 199, 201, 181, 204, 205, + 207, 182, 208, 211, 189, 212, 216, 190, 217, 104, + 218, 220, 222, 192, 223, 193, 196, 184, 194, 195, + 206, 197, 199, 201, 224, 204, 205, 207, 226, 208, + 211, 227, 212, 228, 216, 229, 217, 218, 220, 222, + 230, 223, 231, 86, 232, 233, 85, 234, 235, 237, + 242, 224, 239, 240, 244, 226, 247, 249, 251, 227, - 110, 179, 180, 186, 138, 181, 182, 183, 184, 185, 187, 188, 164, 151, 165, - 166, 167, 169, 170, 189, 171, 172, 191, 191, 173, 175, 176, 177, 179, 196, - 180, 186, 181, 182, 183, 184, 185, 197, 187, 188, 199, 200, 201, 202, 92, - 203, 204, 189, 206, 208, 211, 212, 213, 87, 214, 215, 191, 196, 218, 219, - 223, 224, 74, 225, 227, 197, 229, 230, 199, 200, 201, 202, 203, 204, 231, - 206, 208, 211, 212, 233, 213, 214, 215, 234, 235, 218, 219, 236, 223, 224, - 225, 227, 237, 229, 230, 238, 66, 239, 240, 64, + 252, 228, 229, 254, 255, 72, 257, 261, 230, 262, + 231, 232, 264, 233, 234, 265, 235, 237, 242, 239, + 240, 244, 266, 247, 249, 267, 251, 268, 252, 269, + 254, 271, 255, 257, 261, 272, 262, 64, 62, 59, + 264, 48, 265, 38, 36, 35, 23, 17, 15, 266, + 12, 11, 0, 267, 0, 268, 269, 0, 0, 271, + 0, 0, 272, 275, 275, 275, 275, 275, 275, 275, + 276, 276, 276, 276, 276, 276, 276, 277, 277, 277, + 277, 277, 277, 277, 278, 278, 278, 278, 278, 278, + 278, 279, 279, 279, 279, 279, 279, 279, 280, 280, - 241, 231, 242, 244, 61, 246, 233, 247, 249, 50, 251, 234, 235, 254, 236, - 256, 258, 259, 40, 261, 237, 262, 271, 238, 239, 264, 240, 241, 268, 269, - 242, 244, 246, 272, 247, 273, 249, 251, 274, 275, 254, 276, 256, 278, 258, - 259, 261, 279, 38, 262, 271, 37, 264, 25, 19, 268, 269, 17, 12, 11, - 272, 0, 273, 0, 0, 0, 274, 275, 276, 0, 0, 278, 0, 0, 279, - 282, 282, 282, 282, 282, 282, 282, 283, 283, 283, 283, 283, 283, 283, 284, - 284, 284, 284, 284, 284, 284, 285, 285, 285, 285, + 280, 280, 280, 280, 280, 282, 282, 282, 282, 283, + 0, 283, 283, 284, 284, 285, 0, 285, 285, 285, + 285, 285, 286, 0, 286, 286, 286, 286, 286, 287, + 0, 287, 287, 287, 287, 287, 288, 0, 288, 288, + 288, 288, 288, 289, 0, 289, 289, 289, 289, 289, + 290, 0, 0, 290, 290, 290, 290, 291, 0, 291, + 291, 292, 0, 292, 292, 293, 0, 293, 293, 294, + 0, 294, 294, 295, 0, 295, 295, 296, 0, 296, + 296, 297, 0, 297, 297, 298, 0, 298, 298, 299, + 0, 299, 299, 300, 0, 300, 300, 301, 0, 301, - 285, 285, 285, 286, 286, 286, 286, 286, 286, 286, 287, 287, 287, 287, 287, - 287, 287, 288, 288, 288, 288, 288, 288, 288, 290, 290, 290, 290, 291, 0, - 291, 291, 292, 292, 293, 0, 293, 293, 293, 293, 293, 294, 0, 294, 294, - 294, 294, 294, 295, 0, 295, 295, 295, 295, 295, 296, 0, 296, 296, 296, - 296, 296, 297, 0, 297, 297, 297, 297, 297, 298, 0, 0, 298, 298, 298, - 298, 299, 0, 299, 299, 300, 0, 300, 300, 301, 0, 301, 301, 302, 0, - 302, 302, 303, 0, 303, 303, 304, 0, 304, 304, + 301, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274 + } ; - 305, 0, 305, 305, 306, 0, 306, 306, 307, 0, 307, 307, 308, 0, 308, - 308, 309, 0, 309, 309, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - - 281, 281}; /* Table of booleans, true if rule could match eol. */ -static const flex_int32_t yy_rule_can_match_eol[103] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, -}; +static const flex_int32_t yy_rule_can_match_eol[100] = + { 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, + }; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -830,6 +1082,12 @@ static const flex_int32_t yy_rule_can_match_eol[103] = { #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET + + + + + + #include "Basics/Common.h" #include "Basics/NumberUtils.h" #include "Basics/conversions.h" @@ -846,37 +1104,37 @@ namespace arangodb { namespace aql { class Query; class Parser; -} // namespace aql -} // namespace arangodb +} +} #include "Aql/AstNode.h" -#include "Aql/Parser.h" #include "Aql/grammar.h" +#include "Aql/Parser.h" #include #define YY_EXTRA_TYPE arangodb::aql::Parser* -#define YY_USER_ACTION \ - yylloc->first_line = static_cast(yylineno); \ - yylloc->first_column = static_cast(yycolumn); \ - yylloc->last_column = static_cast(yycolumn + yyleng - 1); \ - yycolumn += static_cast(yyleng); \ +#define YY_USER_ACTION \ + yylloc->first_line = static_cast(yylineno); \ + yylloc->first_column = static_cast(yycolumn); \ + yylloc->last_column = static_cast(yycolumn + yyleng - 1); \ + yycolumn += static_cast(yyleng); \ yyextra->increaseOffset(yyleng); #define YY_NO_INPUT 1 -#define YY_INPUT(resultBuffer, resultState, maxBytesToRead) \ - { \ - size_t length = \ - std::min(yyextra->remainingLength(), static_cast(maxBytesToRead)); \ - if (length > 0) { \ - yyextra->fillBuffer(resultBuffer, length); \ - resultState = length; \ - } else { \ - resultState = YY_NULL; \ - } \ - } +#define YY_INPUT(resultBuffer, resultState, maxBytesToRead) { \ + size_t length = std::min(yyextra->remainingLength(), static_cast(maxBytesToRead)); \ + if (length > 0) { \ + yyextra->fillBuffer(resultBuffer, length); \ + resultState = length; \ + } else { \ + resultState = YY_NULL; \ + } \ +} + + #define INITIAL 0 #define BACKTICK 1 @@ -885,7 +1143,9 @@ class Parser; #define DOUBLE_QUOTE 4 #define COMMENT_SINGLE 5 #define COMMENT_MULTI 6 -#define NOT 7 + + + #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way @@ -895,98 +1155,169 @@ class Parser; #include #endif + + #ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void* +#define YY_EXTRA_TYPE void * #endif + + + + /* Holds the entire state of the reentrant scanner. */ -struct yyguts_t { - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; +struct yyguts_t + { - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE* yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char* yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int* yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; - int yylineno_r; - int yy_flex_debug_r; + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; - char* yytext_r; - int yy_more_flag; - int yy_more_len; + int yylineno_r; + int yy_flex_debug_r; - YYSTYPE* yylval_r; - YYLTYPE* yylloc_r; -}; /* end struct yyguts_t */ -static int yy_init_globals(yyscan_t yyscanner); + char *yytext_r; + int yy_more_flag; + int yy_more_len; -/* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ -#define yylval yyg->yylval_r -#define yylloc yyg->yylloc_r -int yylex_init(yyscan_t* scanner); + YYSTYPE * yylval_r; + + + + YYLTYPE * yylloc_r; + + + }; /* end struct yyguts_t */ + + + + +static int yy_init_globals ( yyscan_t yyscanner ); + + + + + + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + + + # define yylloc yyg->yylloc_r + + + +int yylex_init (yyscan_t* scanner); + +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); + -int yylex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(yyscan_t yyscanner); -int yyget_debug(yyscan_t yyscanner); +int yylex_destroy ( yyscan_t yyscanner ); -void yyset_debug(int debug_flag, yyscan_t yyscanner); -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); +int yyget_debug ( yyscan_t yyscanner ); -FILE* yyget_in(yyscan_t yyscanner); -void yyset_in(FILE* _in_str, yyscan_t yyscanner); -FILE* yyget_out(yyscan_t yyscanner); +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); -void yyset_out(FILE* _out_str, yyscan_t yyscanner); -int yyget_leng(yyscan_t yyscanner); -char* yyget_text(yyscan_t yyscanner); +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); -int yyget_lineno(yyscan_t yyscanner); -void yyset_lineno(int _line_number, yyscan_t yyscanner); -int yyget_column(yyscan_t yyscanner); +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); -void yyset_column(int _column_no, yyscan_t yyscanner); -YYSTYPE* yyget_lval(yyscan_t yyscanner); -void yyset_lval(YYSTYPE* yylval_param, yyscan_t yyscanner); +FILE *yyget_in ( yyscan_t yyscanner ); -YYLTYPE* yyget_lloc(yyscan_t yyscanner); -void yyset_lloc(YYLTYPE* yylloc_param, yyscan_t yyscanner); + +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); + + + +FILE *yyget_out ( yyscan_t yyscanner ); + + + +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); + + + + int yyget_leng ( yyscan_t yyscanner ); + + + +char *yyget_text ( yyscan_t yyscanner ); + + + +int yyget_lineno ( yyscan_t yyscanner ); + + + +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); + + + + +int yyget_column ( yyscan_t yyscanner ); + + + + + +void yyset_column ( int _column_no , yyscan_t yyscanner ); + + + + +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); + + +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + + + + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + + /* Macros after this point can all be overridden by user definitions in * section 1. @@ -994,33 +1325,41 @@ void yyset_lloc(YYLTYPE* yylloc_param, yyscan_t yyscanner); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(yyscan_t yyscanner); +extern "C" int yywrap ( yyscan_t yyscanner ); #else -extern int yywrap(yyscan_t yyscanner); +extern int yywrap ( yyscan_t yyscanner ); #endif #endif #ifndef YY_NO_UNPUT - + #endif + #ifndef yytext_ptr -static void yy_flex_strncpy(char*, const char*, int, yyscan_t yyscanner); +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char*, yyscan_t yyscanner); +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner); +static int yyinput ( yyscan_t yyscanner ); #else -static int input(yyscan_t yyscanner); +static int input ( yyscan_t yyscanner ); #endif #endif + + + + + + + /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ @@ -1031,46 +1370,55 @@ static int input(yyscan_t yyscanner); #endif /* __ia64__ */ #endif + /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) { \ - } \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif + + /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - int n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif + + /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. @@ -1079,30 +1427,54 @@ static int input(yyscan_t yyscanner); #define yyterminate() return YY_NULL #endif + /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif + /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg, yyscanner) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif + + /* end tables serialization structures and prototypes */ + + /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(YYSTYPE* yylval_param, YYLTYPE* yylloc_param, yyscan_t yyscanner); -#define YY_DECL \ - int yylex(YYSTYPE* yylval_param, YYLTYPE* yylloc_param, yyscan_t yyscanner) + + + + + + + + + + + + + + + +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); + +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ + /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ @@ -1110,750 +1482,993 @@ extern int yylex(YYSTYPE* yylval_param, YYLTYPE* yylloc_param, yyscan_t yyscanne #define YY_USER_ACTION #endif + + /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP YY_USER_ACTION + + +#define YY_RULE_SETUP \ + YY_USER_ACTION + /** The main scanner function which does all the work. */ -YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; - yylloc = yylloc_param; - if (!yyg->yy_init) { - yyg->yy_init = 1; + + yylval = yylval_param; + + + + yylloc = yylloc_param; + + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!yyg->yy_start) yyg->yy_start = 1; /* first start state */ - if (!yyin) yyin = stdin; - if (!yyout) yyout = stdout; + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } + + yy_load_buffer_state( yyscanner ); + } + + { + + + /* --------------------------------------------------------------------------- + * language keywords + * --------------------------------------------------------------------------- */ + + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 275 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 274 ); + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + do{ yylineno++; + yycolumn=0; + }while(0) +; + } + + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +{ + return T_FOR; +} + YY_BREAK +case 2: +YY_RULE_SETUP +{ + return T_LET; +} + YY_BREAK +case 3: +YY_RULE_SETUP +{ + return T_FILTER; +} + YY_BREAK +case 4: +YY_RULE_SETUP +{ + return T_RETURN; +} + YY_BREAK +case 5: +YY_RULE_SETUP +{ + return T_COLLECT; +} + YY_BREAK +case 6: +YY_RULE_SETUP +{ + return T_SORT; +} + YY_BREAK +case 7: +YY_RULE_SETUP +{ + return T_LIMIT; +} + YY_BREAK +case 8: +YY_RULE_SETUP +{ + return T_DISTINCT; +} + YY_BREAK +case 9: +YY_RULE_SETUP +{ + return T_AGGREGATE; +} + YY_BREAK +case 10: +YY_RULE_SETUP +{ + return T_ASC; +} + YY_BREAK +case 11: +YY_RULE_SETUP +{ + return T_DESC; +} + YY_BREAK +case 12: +YY_RULE_SETUP +{ + return T_NOT; +} + YY_BREAK +case 13: +YY_RULE_SETUP +{ + return T_AND; +} + YY_BREAK +case 14: +YY_RULE_SETUP +{ + return T_OR; +} + YY_BREAK +case 15: +YY_RULE_SETUP +{ + return T_IN; +} + YY_BREAK +case 16: +YY_RULE_SETUP +{ + return T_INTO; +} + YY_BREAK +case 17: +YY_RULE_SETUP +{ + return T_WITH; +} + YY_BREAK +case 18: +YY_RULE_SETUP +{ + return T_REMOVE; +} + YY_BREAK +case 19: +YY_RULE_SETUP +{ + return T_INSERT; +} + YY_BREAK +case 20: +YY_RULE_SETUP +{ + return T_UPDATE; +} + YY_BREAK +case 21: +YY_RULE_SETUP +{ + return T_REPLACE; +} + YY_BREAK +case 22: +YY_RULE_SETUP +{ + return T_UPSERT; +} + YY_BREAK +case 23: +YY_RULE_SETUP +{ + return T_GRAPH; +} + YY_BREAK +case 24: +YY_RULE_SETUP +{ + return T_SHORTEST_PATH; +} + YY_BREAK +case 25: +YY_RULE_SETUP +{ + return T_K_SHORTEST_PATHS; +} + YY_BREAK +case 26: +YY_RULE_SETUP +{ + return T_OUTBOUND; +} + YY_BREAK +case 27: +YY_RULE_SETUP +{ + return T_INBOUND; +} + YY_BREAK +case 28: +YY_RULE_SETUP +{ + return T_ANY; +} + YY_BREAK +case 29: +YY_RULE_SETUP +{ + return T_ALL; +} + YY_BREAK +case 30: +YY_RULE_SETUP +{ + return T_NONE; +} + YY_BREAK +case 31: +YY_RULE_SETUP +{ + return T_LIKE; +} + YY_BREAK +/* --------------------------------------------------------------------------- + * predefined type literals + * --------------------------------------------------------------------------- */ +case 32: +YY_RULE_SETUP +{ + return T_NULL; +} + YY_BREAK +case 33: +YY_RULE_SETUP +{ + return T_TRUE; +} + YY_BREAK +case 34: +YY_RULE_SETUP +{ + return T_FALSE; +} + YY_BREAK +/* --------------------------------------------------------------------------- + * operators + * --------------------------------------------------------------------------- */ +case 35: +YY_RULE_SETUP +{ + return T_REGEX_MATCH; +} + YY_BREAK +case 36: +YY_RULE_SETUP +{ + return T_REGEX_NON_MATCH; +} + YY_BREAK +case 37: +YY_RULE_SETUP +{ + return T_EQ; +} + YY_BREAK +case 38: +YY_RULE_SETUP +{ + return T_NE; +} + YY_BREAK +case 39: +YY_RULE_SETUP +{ + return T_GE; +} + YY_BREAK +case 40: +YY_RULE_SETUP +{ + return T_GT; +} + YY_BREAK +case 41: +YY_RULE_SETUP +{ + return T_LE; +} + YY_BREAK +case 42: +YY_RULE_SETUP +{ + return T_LT; +} + YY_BREAK +case 43: +YY_RULE_SETUP +{ + return T_ASSIGN; +} + YY_BREAK +case 44: +YY_RULE_SETUP +{ + return T_NOT; +} + YY_BREAK +case 45: +YY_RULE_SETUP +{ + return T_AND; +} + YY_BREAK +case 46: +YY_RULE_SETUP +{ + return T_OR; +} + YY_BREAK +case 47: +YY_RULE_SETUP +{ + return T_PLUS; +} + YY_BREAK +case 48: +YY_RULE_SETUP +{ + return T_MINUS; +} + YY_BREAK +case 49: +YY_RULE_SETUP +{ + return T_TIMES; +} + YY_BREAK +case 50: +YY_RULE_SETUP +{ + return T_DIV; +} + YY_BREAK +case 51: +YY_RULE_SETUP +{ + return T_MOD; +} + YY_BREAK +case 52: +YY_RULE_SETUP +{ + return T_QUESTION; +} + YY_BREAK +case 53: +YY_RULE_SETUP +{ + return T_SCOPE; +} + YY_BREAK +case 54: +YY_RULE_SETUP +{ + return T_COLON; +} + YY_BREAK +case 55: +YY_RULE_SETUP +{ + return T_RANGE; +} + YY_BREAK +/* --------------------------------------------------------------------------- + * punctuation + * --------------------------------------------------------------------------- */ +case 56: +YY_RULE_SETUP +{ + return T_COMMA; +} + YY_BREAK +case 57: +YY_RULE_SETUP +{ + return T_OPEN; +} + YY_BREAK +case 58: +YY_RULE_SETUP +{ + return T_CLOSE; +} + YY_BREAK +case 59: +YY_RULE_SETUP +{ + return T_OBJECT_OPEN; +} + YY_BREAK +case 60: +YY_RULE_SETUP +{ + return T_OBJECT_CLOSE; +} + YY_BREAK +case 61: +YY_RULE_SETUP +{ + return T_ARRAY_OPEN; +} + YY_BREAK +case 62: +YY_RULE_SETUP +{ + return T_ARRAY_CLOSE; +} + YY_BREAK +/* --------------------------------------------------------------------------- + * identifiers + * --------------------------------------------------------------------------- */ +case 63: +YY_RULE_SETUP +{ + /* unquoted string */ + yylval->strval.value = yyextra->query()->registerString(yytext, yyleng); + yylval->strval.length = yyleng; + return T_STRING; +} + YY_BREAK +case 64: +YY_RULE_SETUP +{ + /* string enclosed in backticks */ + yyextra->marker(yyextra->queryStringStart() + yyextra->offset()); + BEGIN(BACKTICK); +} + YY_BREAK +case 65: +YY_RULE_SETUP +{ + /* end of backtick-enclosed string */ + BEGIN(INITIAL); + size_t outLength; + yylval->strval.value = yyextra->query()->registerEscapedString(yyextra->marker(), yyextra->offset() - (yyextra->marker() - yyextra->queryStringStart()) - 1, outLength); + yylval->strval.length = outLength; + return T_STRING; +} + YY_BREAK +case 66: +YY_RULE_SETUP +{ + /* character escaped by backslash */ +} + YY_BREAK +case 67: +/* rule 67 can match eol */ +YY_RULE_SETUP +{ + /* newline character inside backtick */ +} + YY_BREAK +case 68: +YY_RULE_SETUP +{ + /* any character (except newline) inside backtick */ +} + YY_BREAK +case 69: +YY_RULE_SETUP +{ + /* string enclosed in forwardticks */ + yyextra->marker(yyextra->queryStringStart() + yyextra->offset()); + BEGIN(FORWARDTICK); +} + YY_BREAK +case 70: +YY_RULE_SETUP +{ + /* end of forwardtick-enclosed string */ + BEGIN(INITIAL); + size_t outLength; + yylval->strval.value = yyextra->query()->registerEscapedString(yyextra->marker(), yyextra->offset() - (yyextra->marker() - yyextra->queryStringStart()) - 2, outLength); + yylval->strval.length = outLength; + return T_STRING; +} + YY_BREAK +case 71: +YY_RULE_SETUP +{ + /* character escaped by backslash */ +} + YY_BREAK +case 72: +/* rule 72 can match eol */ +YY_RULE_SETUP +{ + /* newline character inside forwardtick */ +} + YY_BREAK +case 73: +YY_RULE_SETUP +{ + /* any character (except newline) inside forwardtick */ +} + YY_BREAK +/* --------------------------------------------------------------------------- + * strings + * --------------------------------------------------------------------------- */ +case 74: +YY_RULE_SETUP +{ + yyextra->marker(yyextra->queryStringStart() + yyextra->offset()); + BEGIN(DOUBLE_QUOTE); +} + YY_BREAK +case 75: +YY_RULE_SETUP +{ + /* end of quote-enclosed string */ + BEGIN(INITIAL); + size_t outLength; + yylval->strval.value = yyextra->query()->registerEscapedString(yyextra->marker(), yyextra->offset() - (yyextra->marker() - yyextra->queryStringStart()) - 1, outLength); + yylval->strval.length = outLength; + return T_QUOTED_STRING; +} + YY_BREAK +case 76: +YY_RULE_SETUP +{ + /* character escaped by backslash */ +} + YY_BREAK +case 77: +/* rule 77 can match eol */ +YY_RULE_SETUP +{ + /* newline character inside quote */ +} + YY_BREAK +case 78: +YY_RULE_SETUP +{ + /* any character (except newline) inside quote */ +} + YY_BREAK +case 79: +YY_RULE_SETUP +{ + yyextra->marker(yyextra->queryStringStart() + yyextra->offset()); + BEGIN(SINGLE_QUOTE); +} + YY_BREAK +case 80: +YY_RULE_SETUP +{ + /* end of quote-enclosed string */ + BEGIN(INITIAL); + size_t outLength; + yylval->strval.value = yyextra->query()->registerEscapedString(yyextra->marker(), yyextra->offset() - (yyextra->marker() - yyextra->queryStringStart()) - 1, outLength); + yylval->strval.length = outLength; + return T_QUOTED_STRING; +} + YY_BREAK +case 81: +YY_RULE_SETUP +{ + /* character escaped by backslash */ +} + YY_BREAK +case 82: +/* rule 82 can match eol */ +YY_RULE_SETUP +{ + /* newline character inside quote */ +} + YY_BREAK +case 83: +YY_RULE_SETUP +{ + /* any character (except newline) inside quote */ +} + YY_BREAK +/* --------------------------------------------------------------------------- + * number literals + * --------------------------------------------------------------------------- */ +case 84: +YY_RULE_SETUP +{ + /* a numeric integer value */ + arangodb::aql::AstNode* node = nullptr; + auto parser = yyextra; + + bool valid; + int64_t value1 = arangodb::NumberUtils::atoi(yytext, yytext + yyleng, valid); + + if (valid) { + node = parser->ast()->createNodeValueInt(value1); + } else { + // TODO: use std::from_chars + double value2 = TRI_DoubleString(yytext); + + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + parser->registerWarning(TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, TRI_errno_string(TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE), yylloc->first_line, yylloc->first_column); + node = parser->ast()->createNodeValueNull(); + } else { + node = parser->ast()->createNodeValueDouble(value2); } - - yy_load_buffer_state(yyscanner); } - { - /* --------------------------------------------------------------------------- - * language keywords - * --------------------------------------------------------------------------- */ + yylval->node = node; - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; + return T_INTEGER; +} + YY_BREAK +case 85: +YY_RULE_SETUP +{ + /* a numeric double value */ - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; + arangodb::aql::AstNode* node = nullptr; + auto parser = yyextra; + // TODO: use std::from_chars + double value = TRI_DoubleString(yytext); - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + parser->registerWarning(TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, TRI_errno_string(TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE), yylloc->first_line, yylloc->first_column); + node = parser->ast()->createNodeValueNull(); + } else { + node = parser->ast()->createNodeValueDouble(value); + } - yy_current_state = yyg->yy_start; - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 282) yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_current_state != 281); - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; + yylval->node = node; - yy_find_action: - yy_act = yy_accept[yy_current_state]; + return T_DOUBLE; +} + YY_BREAK +/* --------------------------------------------------------------------------- + * bind parameters + * --------------------------------------------------------------------------- */ +case 86: +YY_RULE_SETUP +{ + /* bind parameters must start with a @ + if followed by another @, this is a collection name or a view name parameter */ + yylval->strval.value = yyextra->query()->registerString(yytext + 1, yyleng - 1); + yylval->strval.length = yyleng - 1; + return T_PARAMETER; +} + YY_BREAK +/* --------------------------------------------------------------------------- + * bind data source parameters + * --------------------------------------------------------------------------- */ +case 87: +YY_RULE_SETUP +{ + /* bind parameters must start with a @ + if followed by another @, this is a collection name or a view name parameter */ + yylval->strval.value = yyextra->query()->registerString(yytext + 1, yyleng - 1); + yylval->strval.length = yyleng - 1; + return T_DATA_SOURCE_PARAMETER; +} + YY_BREAK +/* --------------------------------------------------------------------------- + * whitespace etc. + * --------------------------------------------------------------------------- */ +case 88: +YY_RULE_SETUP +{ + /* whitespace is ignored */ +} + YY_BREAK +case 89: +/* rule 89 can match eol */ +YY_RULE_SETUP +{ + yycolumn = 0; +} + YY_BREAK +/* --------------------------------------------------------------------------- + * comments + * --------------------------------------------------------------------------- */ +case 90: +YY_RULE_SETUP +{ + BEGIN(COMMENT_SINGLE); +} + YY_BREAK +case 91: +/* rule 91 can match eol */ +YY_RULE_SETUP +{ + /* line numbers are counted elsewhere already */ + yycolumn = 0; + BEGIN(INITIAL); +} + YY_BREAK +case 92: +YY_RULE_SETUP +{ + /* everything else */ +} + YY_BREAK +case 93: +YY_RULE_SETUP +{ + BEGIN(COMMENT_MULTI); +} + YY_BREAK +case 94: +YY_RULE_SETUP +{ + BEGIN(INITIAL); +} + YY_BREAK +case 95: +YY_RULE_SETUP +{ + // eat comment in chunks +} + YY_BREAK +case 96: +YY_RULE_SETUP +{ + // eat the lone star +} + YY_BREAK +case 97: +/* rule 97 can match eol */ +YY_RULE_SETUP +{ + /* line numbers are counted elsewhere already */ + yycolumn = 0; +} + YY_BREAK +case 98: +YY_RULE_SETUP +{ + /* anything else is returned as it is */ + return (int) yytext[0]; +} + YY_BREAK +case 99: +YY_RULE_SETUP +ECHO; + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(BACKTICK): +case YY_STATE_EOF(FORWARDTICK): +case YY_STATE_EOF(SINGLE_QUOTE): +case YY_STATE_EOF(DOUBLE_QUOTE): +case YY_STATE_EOF(COMMENT_SINGLE): +case YY_STATE_EOF(COMMENT_MULTI): + yyterminate(); - YY_DO_BEFORE_ACTION; + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - if (yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act]) { - int yyl; - for (yyl = 0; yyl < yyleng; ++yyl) - if (yytext[yyl] == '\n') do { - yylineno++; - yycolumn = 0; - } while (0); - } + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET - do_action: /* This label is used only to access EOF actions. */ + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; - case 1: - YY_RULE_SETUP { return T_FOR; } - YY_BREAK - case 2: - YY_RULE_SETUP { return T_LET; } - YY_BREAK - case 3: - YY_RULE_SETUP { return T_FILTER; } - YY_BREAK - case 4: - YY_RULE_SETUP { return T_RETURN; } - YY_BREAK - case 5: - YY_RULE_SETUP { return T_COLLECT; } - YY_BREAK - case 6: - YY_RULE_SETUP { return T_SORT; } - YY_BREAK - case 7: - YY_RULE_SETUP { return T_LIMIT; } - YY_BREAK - case 8: - YY_RULE_SETUP { return T_DISTINCT; } - YY_BREAK - case 9: - YY_RULE_SETUP { return T_AGGREGATE; } - YY_BREAK - case 10: - YY_RULE_SETUP { return T_ASC; } - YY_BREAK - case 11: - YY_RULE_SETUP { return T_DESC; } - YY_BREAK - case 12: - YY_RULE_SETUP { BEGIN(NOT); } - YY_BREAK - case 13: - YY_RULE_SETUP { return T_AND; } - YY_BREAK - case 14: - YY_RULE_SETUP { return T_OR; } - YY_BREAK - case 15: - YY_RULE_SETUP { return T_IN; } - YY_BREAK - case 16: - YY_RULE_SETUP { return T_INTO; } - YY_BREAK - case 17: - YY_RULE_SETUP { return T_WITH; } - YY_BREAK - case 18: - YY_RULE_SETUP { return T_REMOVE; } - YY_BREAK - case 19: - YY_RULE_SETUP { return T_INSERT; } - YY_BREAK - case 20: - YY_RULE_SETUP { return T_UPDATE; } - YY_BREAK - case 21: - YY_RULE_SETUP { return T_REPLACE; } - YY_BREAK - case 22: - YY_RULE_SETUP { return T_UPSERT; } - YY_BREAK - case 23: - YY_RULE_SETUP { return T_GRAPH; } - YY_BREAK - case 24: - YY_RULE_SETUP { return T_SHORTEST_PATH; } - YY_BREAK - case 25: - YY_RULE_SETUP { return T_K_SHORTEST_PATHS; } - YY_BREAK - case 26: - YY_RULE_SETUP { return T_OUTBOUND; } - YY_BREAK - case 27: - YY_RULE_SETUP { return T_INBOUND; } - YY_BREAK - case 28: - YY_RULE_SETUP { return T_ANY; } - YY_BREAK - case 29: - YY_RULE_SETUP { return T_ALL; } - YY_BREAK - case 30: - YY_RULE_SETUP { return T_NONE; } - YY_BREAK - case 31: - YY_RULE_SETUP { return T_LIKE; } - YY_BREAK - /* --------------------------------------------------------------------------- - * predefined type literals - * --------------------------------------------------------------------------- */ - case 32: - YY_RULE_SETUP { return T_NULL; } - YY_BREAK - case 33: - YY_RULE_SETUP { return T_TRUE; } - YY_BREAK - case 34: - YY_RULE_SETUP { return T_FALSE; } - YY_BREAK - /* --------------------------------------------------------------------------- - * operators - * --------------------------------------------------------------------------- */ - case 35: - YY_RULE_SETUP { return T_REGEX_MATCH; } - YY_BREAK - case 36: - YY_RULE_SETUP { return T_REGEX_NON_MATCH; } - YY_BREAK - case 37: - YY_RULE_SETUP { return T_EQ; } - YY_BREAK - case 38: - YY_RULE_SETUP { return T_NE; } - YY_BREAK - case 39: - YY_RULE_SETUP { return T_GE; } - YY_BREAK - case 40: - YY_RULE_SETUP { return T_GT; } - YY_BREAK - case 41: - YY_RULE_SETUP { return T_LE; } - YY_BREAK - case 42: - YY_RULE_SETUP { return T_LT; } - YY_BREAK - case 43: - YY_RULE_SETUP { return T_ASSIGN; } - YY_BREAK - case 44: - YY_RULE_SETUP { return T_NOT; } - YY_BREAK - case 45: - YY_RULE_SETUP { return T_AND; } - YY_BREAK - case 46: - YY_RULE_SETUP { return T_OR; } - YY_BREAK - case 47: - YY_RULE_SETUP { return T_PLUS; } - YY_BREAK - case 48: - YY_RULE_SETUP { return T_MINUS; } - YY_BREAK - case 49: - YY_RULE_SETUP { return T_TIMES; } - YY_BREAK - case 50: - YY_RULE_SETUP { return T_DIV; } - YY_BREAK - case 51: - YY_RULE_SETUP { return T_MOD; } - YY_BREAK - case 52: - YY_RULE_SETUP { return T_QUESTION; } - YY_BREAK - case 53: - YY_RULE_SETUP { return T_SCOPE; } - YY_BREAK - case 54: - YY_RULE_SETUP { return T_COLON; } - YY_BREAK - case 55: - YY_RULE_SETUP { return T_RANGE; } - YY_BREAK - /* --------------------------------------------------------------------------- - * punctuation - * --------------------------------------------------------------------------- */ - case 56: - YY_RULE_SETUP { return T_COMMA; } - YY_BREAK - case 57: - YY_RULE_SETUP { return T_OPEN; } - YY_BREAK - case 58: - YY_RULE_SETUP { return T_CLOSE; } - YY_BREAK - case 59: - YY_RULE_SETUP { return T_OBJECT_OPEN; } - YY_BREAK - case 60: - YY_RULE_SETUP { return T_OBJECT_CLOSE; } - YY_BREAK - case 61: - YY_RULE_SETUP { return T_ARRAY_OPEN; } - YY_BREAK - case 62: - YY_RULE_SETUP { return T_ARRAY_CLOSE; } - YY_BREAK - /* --------------------------------------------------------------------------- - * identifiers - * --------------------------------------------------------------------------- */ - case 63: - YY_RULE_SETUP { - /* unquoted string */ - yylval->strval.value = yyextra->query()->registerString(yytext, yyleng); - yylval->strval.length = yyleng; - return T_STRING; - } - YY_BREAK - case 64: - YY_RULE_SETUP { - /* string enclosed in backticks */ - yyextra->marker(yyextra->queryStringStart() + yyextra->offset()); - BEGIN(BACKTICK); - } - YY_BREAK - case 65: - YY_RULE_SETUP { - /* end of backtick-enclosed string */ - BEGIN(INITIAL); - size_t outLength; - yylval->strval.value = yyextra->query()->registerEscapedString( - yyextra->marker(), - yyextra->offset() - (yyextra->marker() - yyextra->queryStringStart()) - 1, - outLength); - yylval->strval.length = outLength; - return T_STRING; - } - YY_BREAK - case 66: - YY_RULE_SETUP { /* character escaped by backslash */ - } - YY_BREAK - case 67: - /* rule 67 can match eol */ - YY_RULE_SETUP { /* newline character inside backtick */ - } - YY_BREAK - case 68: - YY_RULE_SETUP { /* any character (except newline) inside backtick */ - } - YY_BREAK - case 69: - YY_RULE_SETUP { - /* string enclosed in forwardticks */ - yyextra->marker(yyextra->queryStringStart() + yyextra->offset()); - BEGIN(FORWARDTICK); - } - YY_BREAK - case 70: - YY_RULE_SETUP { - /* end of forwardtick-enclosed string */ - BEGIN(INITIAL); - size_t outLength; - yylval->strval.value = yyextra->query()->registerEscapedString( - yyextra->marker(), - yyextra->offset() - (yyextra->marker() - yyextra->queryStringStart()) - 2, - outLength); - yylval->strval.length = outLength; - return T_STRING; - } - YY_BREAK - case 71: - YY_RULE_SETUP { /* character escaped by backslash */ - } - YY_BREAK - case 72: - /* rule 72 can match eol */ - YY_RULE_SETUP { /* newline character inside forwardtick */ - } - YY_BREAK - case 73: - YY_RULE_SETUP { - /* any character (except newline) inside forwardtick */ - } - YY_BREAK - /* --------------------------------------------------------------------------- - * strings - * --------------------------------------------------------------------------- */ - case 74: - YY_RULE_SETUP { - yyextra->marker(yyextra->queryStringStart() + yyextra->offset()); - BEGIN(DOUBLE_QUOTE); - } - YY_BREAK - case 75: - YY_RULE_SETUP { - /* end of quote-enclosed string */ - BEGIN(INITIAL); - size_t outLength; - yylval->strval.value = yyextra->query()->registerEscapedString( - yyextra->marker(), - yyextra->offset() - (yyextra->marker() - yyextra->queryStringStart()) - 1, - outLength); - yylval->strval.length = outLength; - return T_QUOTED_STRING; - } - YY_BREAK - case 76: - YY_RULE_SETUP { /* character escaped by backslash */ - } - YY_BREAK - case 77: - /* rule 77 can match eol */ - YY_RULE_SETUP { /* newline character inside quote */ - } - YY_BREAK - case 78: - YY_RULE_SETUP { /* any character (except newline) inside quote */ - } - YY_BREAK - case 79: - YY_RULE_SETUP { - yyextra->marker(yyextra->queryStringStart() + yyextra->offset()); - BEGIN(SINGLE_QUOTE); - } - YY_BREAK - case 80: - YY_RULE_SETUP { - /* end of quote-enclosed string */ - BEGIN(INITIAL); - size_t outLength; - yylval->strval.value = yyextra->query()->registerEscapedString( - yyextra->marker(), - yyextra->offset() - (yyextra->marker() - yyextra->queryStringStart()) - 1, - outLength); - yylval->strval.length = outLength; - return T_QUOTED_STRING; - } - YY_BREAK - case 81: - YY_RULE_SETUP { /* character escaped by backslash */ - } - YY_BREAK - case 82: - /* rule 82 can match eol */ - YY_RULE_SETUP { /* newline character inside quote */ - } - YY_BREAK - case 83: - YY_RULE_SETUP { /* any character (except newline) inside quote */ - } - YY_BREAK - /* --------------------------------------------------------------------------- - * number literals - * --------------------------------------------------------------------------- */ - case 84: - YY_RULE_SETUP { - /* a numeric integer value */ - arangodb::aql::AstNode* node = nullptr; - auto parser = yyextra; + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - bool valid; - int64_t value1 = - arangodb::NumberUtils::atoi(yytext, yytext + yyleng, valid); + yy_current_state = yy_get_previous_state( yyscanner ); - if (valid) { - node = parser->ast()->createNodeValueInt(value1); - } else { - // TODO: use std::from_chars - double value2 = TRI_DoubleString(yytext); + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ - if (TRI_errno() != TRI_ERROR_NO_ERROR) { - parser->registerWarning(TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, - TRI_errno_string(TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE), - yylloc->first_line, yylloc->first_column); - node = parser->ast()->createNodeValueNull(); - } else { - node = parser->ast()->createNodeValueDouble(value2); - } - } + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - yylval->node = node; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - return T_INTEGER; - } - YY_BREAK - case 85: - YY_RULE_SETUP { - /* a numeric double value */ + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } - arangodb::aql::AstNode* node = nullptr; - auto parser = yyextra; - // TODO: use std::from_chars - double value = TRI_DoubleString(yytext); + else + { + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + } + } - if (TRI_errno() != TRI_ERROR_NO_ERROR) { - parser->registerWarning(TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, - TRI_errno_string(TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE), - yylloc->first_line, yylloc->first_column); - node = parser->ast()->createNodeValueNull(); - } else { - node = parser->ast()->createNodeValueDouble(value); - } + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; - yylval->node = node; + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - return T_DOUBLE; - } - YY_BREAK - /* --------------------------------------------------------------------------- - * bind parameters - * --------------------------------------------------------------------------- */ - case 86: - YY_RULE_SETUP { - /* bind parameters must start with a @ - if followed by another @, this is a collection name or a view name parameter */ - yylval->strval.value = - yyextra->query()->registerString(yytext + 1, yyleng - 1); - yylval->strval.length = yyleng - 1; - return T_PARAMETER; - } - YY_BREAK - /* --------------------------------------------------------------------------- - * bind data source parameters - * --------------------------------------------------------------------------- */ - case 87: - YY_RULE_SETUP { - /* bind parameters must start with a @ - if followed by another @, this is a collection name or a view name parameter */ - yylval->strval.value = - yyextra->query()->registerString(yytext + 1, yyleng - 1); - yylval->strval.length = yyleng - 1; - return T_DATA_SOURCE_PARAMETER; - } - YY_BREAK - /* --------------------------------------------------------------------------- - * whitespace etc. - * --------------------------------------------------------------------------- */ - case 88: - YY_RULE_SETUP { /* whitespace is ignored */ - } - YY_BREAK - case 89: - /* rule 89 can match eol */ - YY_RULE_SETUP { yycolumn = 0; } - YY_BREAK - /* --------------------------------------------------------------------------- - * comments - * --------------------------------------------------------------------------- */ - case 90: - YY_RULE_SETUP { BEGIN(COMMENT_SINGLE); } - YY_BREAK - case 91: - /* rule 91 can match eol */ - YY_RULE_SETUP { - /* line numbers are counted elsewhere already */ - yycolumn = 0; - BEGIN(INITIAL); - } - YY_BREAK - case 92: - YY_RULE_SETUP { /* everything else */ - } - YY_BREAK - case 93: - YY_RULE_SETUP { BEGIN(COMMENT_MULTI); } - YY_BREAK - case 94: - YY_RULE_SETUP { BEGIN(INITIAL); } - YY_BREAK - case 95: - YY_RULE_SETUP { - // eat comment in chunks - } - YY_BREAK - case 96: - YY_RULE_SETUP { - // eat the lone star - } - YY_BREAK - case 97: - /* rule 97 can match eol */ - YY_RULE_SETUP { - /* line numbers are counted elsewhere already */ - yycolumn = 0; - } - YY_BREAK - /* --------------------------------------------------------------------------- - * special transformation for NOT IN to T_NIN - * --------------------------------------------------------------------------- */ - case 98: - YY_RULE_SETUP { - /* T_NOT + T_IN => T_NIN */ - BEGIN(INITIAL); - return T_NIN; - } - YY_BREAK - case 99: - /* rule 99 can match eol */ - YY_RULE_SETUP { /* ignore whitespace */ - } - YY_BREAK - case 100: - YY_RULE_SETUP { - /* found something different to T_IN */ - /* now push the character back into the input stream and return a T_NOT token */ - BEGIN(INITIAL); - yyless(0); - /* must decrement offset by one character as we're pushing the char back onto the stack */ - yyextra->decreaseOffset(1); - return T_NOT; - } - YY_BREAK - case YY_STATE_EOF(NOT): { - /* make sure that we still return a T_NOT when we reach the end of the input */ - BEGIN(INITIAL); - return T_NOT; - } - YY_BREAK - case 101: - YY_RULE_SETUP { - /* anything else is returned as it is */ - return (int)yytext[0]; - } - YY_BREAK - case 102: - YY_RULE_SETUP - ECHO; - YY_BREAK - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(BACKTICK): - case YY_STATE_EOF(FORWARDTICK): - case YY_STATE_EOF(SINGLE_QUOTE): - case YY_STATE_EOF(DOUBLE_QUOTE): - case YY_STATE_EOF(COMMENT_SINGLE): - case YY_STATE_EOF(COMMENT_MULTI): - yyterminate(); + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - yyg->yytext_ptr) - 1; + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } + yy_current_state = yy_get_previous_state( yyscanner ); - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if (yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) { /* This was really a NUL. */ - yy_state_type yy_next_state; + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - yy_current_state = yy_get_previous_state(yyscanner); + yy_current_state = yy_get_previous_state( yyscanner ); - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } - yy_next_state = yy_try_NUL_trans(yy_current_state, yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_END_OF_FILE: { - yyg->yy_did_buffer_switch_on_eof = 0; - - if (yywrap(yyscanner)) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!yyg->yy_did_buffer_switch_on_eof) YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state(yyscanner); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ + + + + /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: @@ -1861,308 +2476,356 @@ YY_DECL { * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - char* dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char* source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; - if (yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } - /* Try to read more data. */ + /* Try to read more data. */ - /* First move last chars to start of buffer. */ - number_to_move = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - for (i = 0; i < number_to_move; ++i) *(dest++) = *(source++); + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - else { - int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - int yy_c_buf_p_offset = (int)(yyg->yy_c_buf_p - b->yy_ch_buf); + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - if (b->yy_is_our_buffer) { - int new_size = b->yy_buf_size * 2; + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; - b->yy_ch_buf = (char*) - /* Include room in for 2 EOB chars. */ - yyrealloc((void*)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2), yyscanner); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; - if (num_to_read > YY_READ_BUF_SIZE) num_to_read = YY_READ_BUF_SIZE; + } - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read); + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); - if (yyg->yy_n_chars == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin, yyscanner); - } + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } - else - ret_val = EOB_ACT_CONTINUE_SCAN; + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = - (char*)yyrealloc((void*)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, - (yy_size_t)new_size, yyscanner); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } + else + ret_val = EOB_ACT_CONTINUE_SCAN; - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - return ret_val; + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } + /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(yyscan_t yyscanner) { - yy_state_type yy_current_state; - char* yy_cp; - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_current_state = yyg->yy_start; + yy_current_state = yyg->yy_start; - for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 282) yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 275 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } - return yy_current_state; + return yy_current_state; } + /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state, yyscan_t yyscanner) { - int yy_is_jam; - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char* yy_cp = yyg->yy_c_buf_p; + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 282) yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 281); + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 275 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 274); - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } + #ifndef YY_NO_UNPUT #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(yyscan_t yyscanner) + static int yyinput (yyscan_t yyscanner) #else -static int input(yyscan_t yyscanner) + static int input (yyscan_t yyscanner) #endif { - int c; - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - *yyg->yy_c_buf_p = yyg->yy_hold_char; + *yyg->yy_c_buf_p = yyg->yy_hold_char; - if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if (yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; - else { /* need more input */ - int offset = (int)(yyg->yy_c_buf_p - yyg->yytext_ptr); - ++yyg->yy_c_buf_p; + else + { /* need more input */ + int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + ++yyg->yy_c_buf_p; - switch (yy_get_next_buffer(yyscanner)) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ - /* Reset buffer status. */ - yyrestart(yyin, yyscanner); + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); - /*FALLTHROUGH*/ + /*FALLTHROUGH*/ - case EOB_ACT_END_OF_FILE: { - if (yywrap(yyscanner)) return 0; + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; - if (!yyg->yy_did_buffer_switch_on_eof) YY_NEW_FILE; + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char*)yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - if (c == '\n') do { - yylineno++; - yycolumn = 0; - } while (0); + if ( c == '\n' ) + + do{ yylineno++; + yycolumn=0; + }while(0) +; - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE* input_file, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; + void yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(yyscanner); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE, yyscanner); - } + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } - yy_init_buffer(YY_CURRENT_BUFFER, input_file, yyscanner); - yy_load_buffer_state(yyscanner); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } + /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(yyscanner); - if (YY_CURRENT_BUFFER == new_buffer) return; + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner); + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + +static void yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -2171,97 +2834,110 @@ static void yy_load_buffer_state(yyscan_t yyscanner) { * @param yyscanner The scanner object. * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE* file, int size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + b->yy_buf_size = size; - b->yy_buf_size = size; + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char*)yyalloc((yy_size_t)(b->yy_buf_size + 2), yyscanner); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + b->yy_is_our_buffer = 1; - b->yy_is_our_buffer = 1; + yy_init_buffer( b, file , yyscanner); - yy_init_buffer(b, file, yyscanner); - - return b; + return b; } + /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * @param yyscanner The scanner object. */ -void yy_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!b) return; + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) yyfree((void*)b->yy_ch_buf, yyscanner); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void*)b, yyscanner); + yyfree( (void *) b , yyscanner ); } + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE* file, yyscan_t yyscanner) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flush_buffer(b, yyscanner); + yy_flush_buffer( b , yyscanner); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; - errno = oerrno; + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ -void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - if (!b) return; + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) yy_load_buffer_state(yyscanner); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -2270,123 +2946,146 @@ void yy_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner) { * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) return; +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; - yyensure_buffer_stack(yyscanner); + yyensure_buffer_stack(yyscanner); - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } + /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) return; +void yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner); - yyg->yy_did_buffer_switch_on_eof = 1; - } + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } + /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(yyscan_t yyscanner) { - yy_size_t num_to_alloc; - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; +static void yyensure_buffer_stack (yyscan_t yyscanner) +{ + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!yyg->yy_buffer_stack) { - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = - (struct yy_buffer_state**)yyalloc(num_to_alloc * sizeof(struct yy_buffer_state*), - yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + if (!yyg->yy_buffer_stack) { - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = - (struct yy_buffer_state**)yyrealloc(yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*), - yyscanner); - if (!yyg->yy_buffer_stack) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, - grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } + + + + /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char* base, yy_size_t size, yyscan_t yyscanner) { - YY_BUFFER_STATE b; +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state), yyscanner); - if (!b) YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; + yy_switch_to_buffer( b , yyscanner ); - yy_switch_to_buffer(b, yyscanner); - - return b; + return b; } + + + /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan @@ -2395,216 +3094,311 @@ YY_BUFFER_STATE yy_scan_buffer(char* base, yy_size_t size, yyscan_t yyscanner) { * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char* yystr, yyscan_t yyscanner) { - return yy_scan_bytes(yystr, (int)strlen(yystr), yyscanner); +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +{ + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } -/** Setup the input buffer state to scan the given bytes. The next call to - * yylex() will scan from a @e copy of @a bytes. + + + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char* yybytes, int _yybytes_len, yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char* buf; - yy_size_t n; - int i; +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char*)yyalloc(n, yyscanner); - if (!buf) YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; - for (i = 0; i < _yybytes_len; ++i) buf[i] = yybytes[i]; + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - b = yy_scan_buffer(buf, n, yyscanner); - if (!b) YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + return b; } + + + + + + + + + + #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char* msg, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + + /* Accessor methods (get/set functions) to struct members. */ + /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - return yyextra; +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } + + /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; +int yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) return 0; - - return yylineno; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } + + + /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; +int yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) return 0; - - return yycolumn; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } + + + /** Get the input stream. * @param yyscanner The scanner object. */ -FILE* yyget_in(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - return yyin; +FILE *yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } + + /** Get the output stream. * @param yyscanner The scanner object. */ -FILE* yyget_out(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - return yyout; +FILE *yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } + + /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - return yyleng; +int yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } + /** Get the current token. * @param yyscanner The scanner object. */ -char* yyget_text(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - return yytext; +char *yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } + + /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined; +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } + + /** Set the current line number. * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno(int _line_number, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; +void yyset_lineno (int _line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) YY_FATAL_ERROR("yyset_lineno called with no buffer"); - - yylineno = _line_number; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; } + + + /** Set the current column. * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column(int _column_no, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; +void yyset_column (int _column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* column is only valid if an input buffer exists. */ - if (!YY_CURRENT_BUFFER) YY_FATAL_ERROR("yyset_column called with no buffer"); - - yycolumn = _column_no; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; } + + + + /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. * @param yyscanner The scanner object. * @see yy_switch_to_buffer */ -void yyset_in(FILE* _in_str, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str; +void yyset_in (FILE * _in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; } -void yyset_out(FILE* _out_str, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str; + + +void yyset_out (FILE * _out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; } -int yyget_debug(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; + + + +int yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void yyset_debug(int _bdebug, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug; + + +void yyset_debug (int _bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; } + /* Accessor methods for yylval and yylloc */ -YYSTYPE* yyget_lval(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - return yylval; + +YYSTYPE * yyget_lval (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void yyset_lval(YYSTYPE* yylval_param, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; + + +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } -YYLTYPE* yyget_lloc(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} -void yyset_lloc(YYLTYPE* yylloc_param, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; + + +YYLTYPE *yyget_lloc (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; } + + + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; +} + + + + /* User-visible API */ @@ -2612,25 +3406,27 @@ void yyset_lloc(YYLTYPE* yylloc_param, yyscan_t yyscanner) { * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } +int yylex_init(yyscan_t* ptr_yy_globals) +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), NULL); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } + /* yylex_init_extra has the same functionality as yylex_init, but follows the * convention of taking the scanner as the last argument. Note however, that * this is a *pointer* to a scanner, as it will be allocated by this call (and @@ -2638,141 +3434,186 @@ int yylex_init(yyscan_t* ptr_yy_globals) { * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals) { - struct yyguts_t dummy_yyguts; +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +{ + struct yyguts_t dummy_yyguts; - yyset_extra(yy_user_defined, &dummy_yyguts); + yyset_extra (yy_user_defined, &dummy_yyguts); - if (ptr_yy_globals == NULL) { - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t)yyalloc(sizeof(struct yyguts_t), &dummy_yyguts); + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - if (*ptr_yy_globals == NULL) { - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals, 0x00, sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - yyset_extra(yy_user_defined, *ptr_yy_globals); + yyset_extra (yy_user_defined, *ptr_yy_globals); - return yy_init_globals(*ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } -static int yy_init_globals(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + + + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + + + + - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } + /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; +int yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack, yyscanner); - yyg->yy_buffer_stack = NULL; + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack, yyscanner); - yyg->yy_start_stack = NULL; - /* Reset the globals. This is important in a non-reentrant scanner so the next - * time yylex() is called, initialization will occur. */ - yy_init_globals(yyscanner); + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; - /* Destroy the main struct (reentrant only). */ - yyfree(yyscanner, yyscanner); - yyscanner = NULL; - return 0; + + + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; } + + /* * Internal utility routines. */ -#ifndef yytext_ptr -static void yy_flex_strncpy(char* s1, const char* s2, int n, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - int i; - for (i = 0; i < n; ++i) s1[i] = s2[i]; + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif + + #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char* s, yyscan_t yyscanner) { - int n; - for (n = 0; s[n]; ++n) - ; +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void* yyalloc(yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + + +void *yyalloc (yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void* yyrealloc(void* ptr, yy_size_t size, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void* ptr, yyscan_t yyscanner) { - struct yyguts_t* yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free((char*)ptr); /* see yyrealloc() for (char *) cast */ + + +void yyfree (void * ptr , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } + #define YYTABLES_NAME "yytables" + + + + + + + + diff --git a/arangod/Aql/tokens.ll b/arangod/Aql/tokens.ll index 273298893e..146114d425 100644 --- a/arangod/Aql/tokens.ll +++ b/arangod/Aql/tokens.ll @@ -11,7 +11,6 @@ %x DOUBLE_QUOTE %x COMMENT_SINGLE %x COMMENT_MULTI -%x NOT %top{ #include @@ -120,7 +119,7 @@ class Parser; } (?i:NOT) { - BEGIN(NOT); + return T_NOT; } (?i:AND) { @@ -583,37 +582,6 @@ class Parser; yycolumn = 0; } - /* --------------------------------------------------------------------------- - * special transformation for NOT IN to T_NIN - * --------------------------------------------------------------------------- */ - -(?i:IN) { - /* T_NOT + T_IN => T_NIN */ - BEGIN(INITIAL); - return T_NIN; -} - -[\r\t\n ] { - /* ignore whitespace */ -} - -. { - /* found something different to T_IN */ - /* now push the character back into the input stream and return a T_NOT token */ - BEGIN(INITIAL); - yyless(0); - /* must decrement offset by one character as we're pushing the char back onto the stack */ - yyextra->decreaseOffset(1); - return T_NOT; -} - -<> { - /* make sure that we still return a T_NOT when we reach the end of the input */ - BEGIN(INITIAL); - return T_NOT; -} - - . { /* anything else is returned as it is */ return (int) yytext[0]; diff --git a/tests/js/server/aql/aql-parse.js b/tests/js/server/aql/aql-parse.js index 5c32f14b65..8de1d92c32 100644 --- a/tests/js/server/aql/aql-parse.js +++ b/tests/js/server/aql/aql-parse.js @@ -1,5 +1,5 @@ /*jshint globalstrict:false, strict:false, maxlen: 7000 */ -/*global assertEqual, assertTrue, assertMatch, fail, AQL_EXECUTE */ +/*global assertEqual, assertTrue, assertMatch, fail, AQL_EXECUTE, AQL_PARSE */ //////////////////////////////////////////////////////////////////////////////// /// @brief tests for query language, PARSE function @@ -351,6 +351,83 @@ function ahuacatlParseTestSuite () { assertEqual(query[1][1], column); } }); + }, + + testPrecedenceOfNotIn : function() { + let result = AQL_PARSE("RETURN 3..4 NOT IN 1..2").ast; + + assertEqual("root", result[0].type); + result = result[0].subNodes; + + assertEqual("return", result[0].type); + result = result[0].subNodes; + + assertEqual("compare not in", result[0].type); + let sub = result[0].subNodes; + assertEqual("range", sub[0].type); + assertEqual("value", sub[0].subNodes[0].type); + assertEqual(3, sub[0].subNodes[0].value); + assertEqual("value", sub[0].subNodes[1].type); + assertEqual(4, sub[0].subNodes[1].value); + + assertEqual("range", sub[1].type); + assertEqual("value", sub[1].subNodes[0].type); + assertEqual(1, sub[1].subNodes[0].value); + assertEqual("value", sub[1].subNodes[1].type); + assertEqual(2, sub[1].subNodes[1].value); + + + result = AQL_PARSE("RETURN 3..(4 NOT IN 1)..2").ast; + + assertEqual("root", result[0].type); + result = result[0].subNodes; + + assertEqual("return", result[0].type); + result = result[0].subNodes; + + assertEqual("range", result[0].type); + sub = result[0].subNodes; + + assertEqual("range", sub[0].type); + assertEqual("value", sub[0].subNodes[0].type); + assertEqual(3, sub[0].subNodes[0].value); + assertEqual("compare not in", sub[0].subNodes[1].type); + assertEqual("value", sub[0].subNodes[1].subNodes[0].type); + assertEqual(4, sub[0].subNodes[1].subNodes[0].value); + assertEqual("value", sub[0].subNodes[1].subNodes[1].type); + assertEqual(1, sub[0].subNodes[1].subNodes[1].value); + assertEqual("value", sub[1].type); + assertEqual(2, sub[1].value); + }, + + testPrecedenceOfNestedNotIn : function() { + let result = AQL_PARSE("RETURN 3..4 NOT IN 1..2 NOT IN 7..8").ast; + + assertEqual("root", result[0].type); + result = result[0].subNodes; + + assertEqual("return", result[0].type); + result = result[0].subNodes; + + assertEqual("compare not in", result[0].type); + let sub = result[0].subNodes; + assertEqual("compare not in", sub[0].type); + assertEqual("range", sub[0].subNodes[0].type); + assertEqual("value", sub[0].subNodes[0].subNodes[0].type); + assertEqual(3, sub[0].subNodes[0].subNodes[0].value); + assertEqual("value", sub[0].subNodes[0].subNodes[1].type); + assertEqual(4, sub[0].subNodes[0].subNodes[1].value); + assertEqual("range", sub[0].subNodes[1].type); + assertEqual("value", sub[0].subNodes[1].subNodes[0].type); + assertEqual(1, sub[0].subNodes[1].subNodes[0].value); + assertEqual("value", sub[0].subNodes[1].subNodes[1].type); + assertEqual(2, sub[0].subNodes[1].subNodes[1].value); + + assertEqual("range", sub[1].type); + assertEqual("value", sub[1].subNodes[0].type); + assertEqual(7, sub[1].subNodes[0].value); + assertEqual("value", sub[1].subNodes[1].type); + assertEqual(8, sub[1].subNodes[1].value); } };