diff --git a/arangod/Aql/Ast.cpp b/arangod/Aql/Ast.cpp index 3231bb6e1c..3a40ea6fc7 100644 --- a/arangod/Aql/Ast.cpp +++ b/arangod/Aql/Ast.cpp @@ -586,6 +586,7 @@ AstNode* Ast::createNodeCollection(char const* name, AstNode* node = createNode(NODE_TYPE_COLLECTION); node->setStringValue(name, strlen(name)); + node->dataSourceType = AstNode::DataSourceType::Collection; _query->collections()->add(name, accessType); @@ -620,6 +621,7 @@ AstNode* Ast::createNodeView(char const* name) { AstNode* node = createNode(NODE_TYPE_VIEW); node->setStringValue(name, strlen(name)); + node->dataSourceType = AstNode::DataSourceType::View; auto* collections = _query->collections(); @@ -678,7 +680,11 @@ AstNode* Ast::createNodeReference(Variable const* variable) { } /// @brief create an AST parameter node -AstNode* Ast::createNodeParameter(char const* name, size_t length) { +AstNode* Ast::createNodeParameter( + char const* name, + size_t length, + AstNode::DataSourceType dataSourceType /* = AstNode::DataSourceType::Invalid */ +) { if (name == nullptr) { THROW_ARANGO_EXCEPTION(TRI_ERROR_OUT_OF_MEMORY); } @@ -686,6 +692,7 @@ AstNode* Ast::createNodeParameter(char const* name, size_t length) { AstNode* node = createNode(NODE_TYPE_PARAMETER); node->setStringValue(name, length); + node->dataSourceType = dataSourceType; // insert bind parameter name into list of found parameters _bindParameters.emplace(name); @@ -1402,6 +1409,7 @@ void Ast::injectBindParameters(BindParameters& parameters) { _query->registerError(TRI_ERROR_QUERY_BIND_PARAMETER_MISSING, param.c_str()); return nullptr; } + auto const& it = p.find(param); if (it == p.end()) { @@ -1416,74 +1424,107 @@ void Ast::injectBindParameters(BindParameters& parameters) { auto& value = (*it).second.first; TRI_ASSERT(!param.empty()); - if (param[0] == '@') { - // collection parameter - TRI_ASSERT(value.isString()); - // check if the collection was used in a data-modification query - bool isWriteCollection = false; + switch (node->getDataSourceType()) { + case AstNode::DataSourceType::Collection: { + // bound collection parameter + TRI_ASSERT(value.isString()); - for (auto const& it : _writeCollections) { - if (it->type == NODE_TYPE_PARAMETER && StringRef(param) == StringRef(it->getStringValue(), it->getStringLength())) { - isWriteCollection = true; - break; - } - } + // check if the collection was used in a data-modification query + bool isWriteCollection = false; - // turn node into a collection node - char const* name = nullptr; - VPackValueLength length; - char const* stringValue = value.getString(length); - - if (length > 0 && stringValue[0] >= '0' && stringValue[0] <= '9') { - // emergency translation of collection id to name - arangodb::CollectionNameResolver resolver(_query->vocbase()); - std::string collectionName = resolver.getCollectionNameCluster(basics::StringUtils::uint64(stringValue, length)); - if (collectionName.empty()) { - THROW_ARANGO_EXCEPTION_PARAMS(TRI_ERROR_ARANGO_COLLECTION_NOT_FOUND, - value.copyString().c_str()); - } - - name = _query->registerString(collectionName.c_str(), collectionName.size()); - } else { - // TODO: can we get away without registering the string value here? - name = _query->registerString(stringValue, static_cast(length)); - } - - TRI_ASSERT(name != nullptr); - - node = createNodeCollection(name, isWriteCollection - ? AccessMode::Type::WRITE - : AccessMode::Type::READ); - - if (isWriteCollection) { - // must update AST info now for all nodes that contained this - // parameter - for (size_t i = 0; i < _writeCollections.size(); ++i) { - if (_writeCollections[i]->type == NODE_TYPE_PARAMETER && - StringRef(param) == StringRef(_writeCollections[i]->getStringValue(), _writeCollections[i]->getStringLength())) { - _writeCollections[i] = node; - // no break here. replace all occurrences + for (auto const& it : _writeCollections) { + if (it->type == NODE_TYPE_PARAMETER && StringRef(param) == StringRef(it->getStringValue(), it->getStringLength())) { + isWriteCollection = true; + break; } } - } - } else { - node = nodeFromVPack(value, true); - if (node != nullptr) { - // already mark node as constant here - node->setFlag(DETERMINED_CONSTANT, VALUE_CONSTANT); - // mark node as simple - node->setFlag(DETERMINED_SIMPLE, VALUE_SIMPLE); - // mark node as executable on db-server - node->setFlag(DETERMINED_RUNONDBSERVER, VALUE_RUNONDBSERVER); - // mark node as non-throwing - node->setFlag(DETERMINED_THROWS); - // mark node as deterministic - node->setFlag(DETERMINED_NONDETERMINISTIC); + // turn node into a collection node + char const* name = nullptr; + VPackValueLength length; + char const* stringValue = value.getString(length); - // finally note that the node was created from a bind parameter - node->setFlag(FLAG_BIND_PARAMETER); + if (length > 0 && stringValue[0] >= '0' && stringValue[0] <= '9') { + // emergency translation of collection id to name + arangodb::CollectionNameResolver resolver(_query->vocbase()); + std::string collectionName = resolver.getCollectionNameCluster(basics::StringUtils::uint64(stringValue, length)); + if (collectionName.empty()) { + THROW_ARANGO_EXCEPTION_PARAMS(TRI_ERROR_ARANGO_COLLECTION_NOT_FOUND, + value.copyString().c_str()); + } + + name = _query->registerString(collectionName.c_str(), collectionName.size()); + } else { + // TODO: can we get away without registering the string value here? + name = _query->registerString(stringValue, static_cast(length)); + } + + TRI_ASSERT(name != nullptr); + + node = createNodeCollection(name, isWriteCollection + ? AccessMode::Type::WRITE + : AccessMode::Type::READ); + + if (isWriteCollection) { + // must update AST info now for all nodes that contained this + // parameter + for (size_t i = 0; i < _writeCollections.size(); ++i) { + if (_writeCollections[i]->type == NODE_TYPE_PARAMETER && + StringRef(param) == StringRef(_writeCollections[i]->getStringValue(), _writeCollections[i]->getStringLength())) { + _writeCollections[i] = node; + // no break here. replace all occurrences + } + } + } + } break; + case AstNode::DataSourceType::View: { + // bound view parameter + TRI_ASSERT(value.isString()); + + // turn node into a view node + char const* name = nullptr; + VPackValueLength length; + char const* stringValue = value.getString(length); + + if (length > 0 && stringValue[0] >= '0' && stringValue[0] <= '9') { + // emergency translation of collection id to name + arangodb::CollectionNameResolver resolver(_query->vocbase()); + std::string viewName = resolver.getViewNameCluster(basics::StringUtils::uint64(stringValue, length)); + if (viewName .empty()) { + THROW_ARANGO_EXCEPTION_PARAMS(TRI_ERROR_ARANGO_VIEW_NOT_FOUND, + value.copyString().c_str()); + } + + name = _query->registerString(viewName.c_str(), viewName.size()); + } else { + // TODO: can we get away without registering the string value here? + name = _query->registerString(stringValue, static_cast(length)); + } + + TRI_ASSERT(name != nullptr); + + node = createNodeView(name); + } break; + default: { + // regular bound parameter + node = nodeFromVPack(value, true); + + if (node != nullptr) { + // already mark node as constant here + node->setFlag(DETERMINED_CONSTANT, VALUE_CONSTANT); + // mark node as simple + node->setFlag(DETERMINED_SIMPLE, VALUE_SIMPLE); + // mark node as executable on db-server + node->setFlag(DETERMINED_RUNONDBSERVER, VALUE_RUNONDBSERVER); + // mark node as non-throwing + node->setFlag(DETERMINED_THROWS); + // mark node as deterministic + node->setFlag(DETERMINED_NONDETERMINISTIC); + + // finally note that the node was created from a bind parameter + node->setFlag(FLAG_BIND_PARAMETER); + } break; } } } else if (node->type == NODE_TYPE_BOUND_ATTRIBUTE_ACCESS) { @@ -3486,4 +3527,4 @@ AstNode* Ast::createNode(AstNodeType type) { // ----------------------------------------------------------------------------- // --SECTION-- END-OF-FILE -// ----------------------------------------------------------------------------- \ No newline at end of file +// ----------------------------------------------------------------------------- diff --git a/arangod/Aql/Ast.h b/arangod/Aql/Ast.h index 24c92f3a37..c8cf92d2cf 100644 --- a/arangod/Aql/Ast.h +++ b/arangod/Aql/Ast.h @@ -236,7 +236,11 @@ class Ast { AstNode* createNodeReference(Variable const*); /// @brief create an AST parameter node - AstNode* createNodeParameter(char const*, size_t); + AstNode* createNodeParameter( + char const* name, + size_t length, + AstNode::DataSourceType dataSourceType = AstNode::DataSourceType::Invalid + ); /// @brief create an AST quantifier node AstNode* createNodeQuantifier(int64_t); diff --git a/arangod/Aql/AstNode.cpp b/arangod/Aql/AstNode.cpp index a38b45248e..ad3fc5c90a 100644 --- a/arangod/Aql/AstNode.cpp +++ b/arangod/Aql/AstNode.cpp @@ -47,6 +47,13 @@ #include #include +namespace { + +arangodb::StringRef const VIEW_NODE_SUFFIX("\0v", 2); +arangodb::StringRef const COLLECTION_NODE_SUFFIX("\0c", 2); + +} + using namespace arangodb::aql; std::unordered_map const AstNode::Operators{ @@ -760,7 +767,7 @@ AstNode::AstNode(std::function registerNode, /// @brief destroy the node AstNode::~AstNode() { - if (computedValue != nullptr) { + if (computedValue != nullptr && !isDataSource()) { delete[] computedValue; } } diff --git a/arangod/Aql/AstNode.h b/arangod/Aql/AstNode.h index c15242db94..ef476a2743 100644 --- a/arangod/Aql/AstNode.h +++ b/arangod/Aql/AstNode.h @@ -199,6 +199,12 @@ static_assert(NODE_TYPE_ARRAY < NODE_TYPE_OBJECT, "incorrect node types order"); struct AstNode { friend class Ast; + enum class DataSourceType : uintptr_t { + Invalid = 0, + Collection, + View, + }; + static std::unordered_map const Operators; static std::unordered_map const TypeNames; static std::unordered_map const ValueTypeNames; @@ -369,6 +375,25 @@ struct AstNode { /// @brief whether or not a value node is of array type inline bool isObject() const { return (type == NODE_TYPE_OBJECT); } + inline bool isDataSource() const noexcept { + switch (type) { + case NODE_TYPE_COLLECTION: + case NODE_TYPE_VIEW: + return true; + case NODE_TYPE_PARAMETER: + return value.type == VALUE_TYPE_STRING + && value.length + && value.value._string + && '@' == value.value._string[0]; + default: + return false; + } + } + + inline DataSourceType getDataSourceType() const noexcept { + return dataSourceType; + } + /// @brief whether or not a value node is of type attribute access that /// refers to a variable reference AstNode const* getAttributeAccessForVariable(bool allowIndexedAccess) const { @@ -678,8 +703,13 @@ struct AstNode { AstNodeValue value; private: - /// @brief precomputed VPack value (used when executing expressions) - uint8_t mutable* computedValue; + union { + /// @brief precomputed VPack value (used when executing expressions) + uint8_t mutable* computedValue; + + /// @brief type of the data source + DataSourceType dataSourceType; + }; /// @brief the node's sub nodes std::vector members; diff --git a/arangod/Aql/grammar.cpp b/arangod/Aql/grammar.cpp index 5c2bface5f..0633848c2b 100644 --- a/arangod/Aql/grammar.cpp +++ b/arangod/Aql/grammar.cpp @@ -78,8 +78,9 @@ #include "Basics/conversions.h" #include "Basics/tri-strings.h" #include "VocBase/AccessMode.h" +#include -#line 83 "Aql/grammar.cpp" /* yacc.c:339 */ +#line 84 "Aql/grammar.cpp" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -145,47 +146,48 @@ extern int Aqldebug; T_INTEGER = 285, T_DOUBLE = 286, T_PARAMETER = 287, - T_ASSIGN = 288, - T_NOT = 289, - T_AND = 290, - T_OR = 291, - T_NIN = 292, - 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, - FUNCCALL = 325, - REFERENCE = 326, - INDEXED = 327, - EXPANSION = 328 + T_DATA_SOURCE_PARAMETER = 288, + T_ASSIGN = 289, + 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, + FUNCCALL = 326, + REFERENCE = 327, + INDEXED = 328, + EXPANSION = 329 }; #endif @@ -194,7 +196,7 @@ extern int Aqldebug; union YYSTYPE { -#line 20 "Aql/grammar.y" /* yacc.c:355 */ +#line 21 "Aql/grammar.y" /* yacc.c:355 */ arangodb::aql::AstNode* node; struct { @@ -204,7 +206,7 @@ union YYSTYPE bool boolval; int64_t intval; -#line 208 "Aql/grammar.cpp" /* yacc.c:355 */ +#line 210 "Aql/grammar.cpp" /* yacc.c:355 */ }; typedef union YYSTYPE YYSTYPE; @@ -233,7 +235,7 @@ int Aqlparse (arangodb::aql::Parser* parser); #endif /* !YY_AQL_AQL_GRAMMAR_HPP_INCLUDED */ /* Copy the second part of user declarations. */ -#line 30 "Aql/grammar.y" /* yacc.c:358 */ +#line 31 "Aql/grammar.y" /* yacc.c:358 */ using namespace arangodb::aql; @@ -375,7 +377,7 @@ static AstNode const* GetIntoExpression(AstNode const* node) { } -#line 379 "Aql/grammar.cpp" /* yacc.c:358 */ +#line 381 "Aql/grammar.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -619,21 +621,21 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 7 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1410 +#define YYLAST 1470 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 75 +#define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 94 +#define YYNNTS 95 /* YYNRULES -- Number of rules. */ -#define YYNRULES 223 +#define YYNRULES 226 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 383 +#define YYNSTATES 386 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 328 +#define YYMAXUTOK 329 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -646,7 +648,7 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 74, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 75, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -674,36 +676,36 @@ static const yytype_uint8 yytranslate[] = 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73 + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 343, 343, 346, 357, 361, 365, 372, 374, 374, - 385, 390, 395, 397, 400, 403, 406, 409, 415, 417, - 422, 424, 426, 428, 430, 432, 434, 436, 438, 440, - 442, 447, 453, 459, 461, 466, 471, 476, 484, 492, - 503, 511, 516, 518, 523, 530, 540, 540, 554, 563, - 574, 604, 671, 696, 729, 731, 736, 743, 746, 749, - 758, 772, 789, 789, 803, 803, 813, 813, 824, 827, - 833, 839, 842, 845, 848, 854, 859, 866, 874, 877, - 883, 893, 903, 911, 922, 927, 935, 946, 951, 954, - 960, 964, 960, 1016, 1019, 1022, 1028, 1028, 1038, 1044, - 1047, 1050, 1053, 1056, 1059, 1065, 1068, 1084, 1084, 1093, - 1093, 1103, 1106, 1109, 1115, 1118, 1121, 1124, 1127, 1130, - 1133, 1136, 1139, 1142, 1145, 1148, 1151, 1154, 1157, 1160, - 1166, 1172, 1179, 1182, 1185, 1188, 1191, 1194, 1197, 1200, - 1206, 1209, 1215, 1217, 1222, 1225, 1225, 1241, 1244, 1250, - 1253, 1259, 1259, 1268, 1270, 1275, 1278, 1284, 1287, 1301, - 1301, 1310, 1312, 1317, 1319, 1324, 1338, 1342, 1351, 1358, - 1361, 1367, 1370, 1376, 1379, 1382, 1388, 1391, 1397, 1400, - 1408, 1412, 1423, 1427, 1434, 1439, 1439, 1447, 1456, 1465, - 1468, 1471, 1477, 1480, 1486, 1518, 1521, 1524, 1531, 1541, - 1541, 1554, 1569, 1583, 1597, 1597, 1640, 1643, 1649, 1656, - 1666, 1669, 1672, 1675, 1678, 1684, 1687, 1690, 1700, 1703, - 1709, 1715, 1718, 1723 + 0, 347, 347, 350, 363, 367, 371, 378, 380, 380, + 391, 396, 401, 403, 406, 409, 412, 415, 421, 423, + 428, 430, 432, 434, 436, 438, 440, 442, 444, 446, + 448, 453, 459, 465, 467, 472, 477, 482, 490, 498, + 509, 517, 522, 524, 529, 536, 546, 546, 560, 569, + 580, 610, 677, 702, 735, 737, 742, 749, 752, 755, + 764, 778, 795, 795, 809, 809, 819, 819, 830, 833, + 839, 845, 848, 851, 854, 860, 865, 872, 880, 883, + 889, 899, 909, 917, 928, 933, 941, 952, 957, 960, + 966, 970, 966, 1022, 1025, 1028, 1034, 1034, 1044, 1050, + 1053, 1056, 1059, 1062, 1065, 1071, 1074, 1090, 1090, 1099, + 1099, 1109, 1112, 1115, 1121, 1124, 1127, 1130, 1133, 1136, + 1139, 1142, 1145, 1148, 1151, 1154, 1157, 1160, 1163, 1166, + 1172, 1178, 1185, 1188, 1191, 1194, 1197, 1200, 1203, 1206, + 1212, 1215, 1221, 1223, 1228, 1231, 1231, 1247, 1250, 1256, + 1259, 1265, 1265, 1274, 1276, 1281, 1284, 1290, 1293, 1307, + 1307, 1316, 1318, 1323, 1325, 1330, 1344, 1348, 1357, 1364, + 1367, 1373, 1376, 1382, 1385, 1388, 1394, 1397, 1403, 1406, + 1409, 1413, 1419, 1423, 1430, 1435, 1435, 1443, 1447, 1456, + 1459, 1462, 1468, 1471, 1477, 1509, 1512, 1515, 1522, 1532, + 1532, 1545, 1560, 1574, 1588, 1588, 1631, 1634, 1640, 1647, + 1657, 1660, 1663, 1666, 1669, 1675, 1678, 1681, 1687, 1690, + 1693, 1699, 1706, 1712, 1722, 1725, 1730 }; #endif @@ -723,14 +725,14 @@ static const char *const yytname[] = "\"UPDATE command\"", "\"REPLACE command\"", "\"UPSERT command\"", "\"null\"", "\"true\"", "\"false\"", "\"identifier\"", "\"quoted string\"", "\"integer number\"", "\"number\"", - "\"bind 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\"", + "\"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\"", "\"inbound modifier\"", "\"any modifier\"", "\"all modifier\"", "\"none modifier\"", "UMINUS", "UPLUS", "FUNCCALL", "REFERENCE", "INDEXED", "EXPANSION", "'.'", "$accept", "with_collection", @@ -758,7 +760,7 @@ static const char *const yytname[] = "graph_collection_list", "graph_subject", "$@14", "graph_direction", "graph_direction_steps", "reference", "$@15", "$@16", "simple_value", "numeric_value", "value_literal", "collection_name", "view_name", - "bind_parameter", "object_element_name", "variable_name", YY_NULLPTR + "bind_parameter", "bind_view", "object_element_name", "variable_name", YY_NULLPTR }; #endif @@ -774,16 +776,16 @@ static const yytype_uint16 yytoknum[] = 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 46 + 325, 326, 327, 328, 329, 46 }; # endif -#define YYPACT_NINF -335 +#define YYPACT_NINF -323 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-335))) + (!!((Yystate) == (-323))) -#define YYTABLE_NINF -222 +#define YYTABLE_NINF -225 #define yytable_value_is_error(Yytable_value) \ 0 @@ -792,45 +794,45 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 3, -335, -335, 34, 25, -335, 1283, -335, -335, -335, - -335, 9, -335, 24, 24, 1325, 298, 161, -335, 260, - 1325, 1325, 1325, 1325, -335, -335, -335, -335, -335, -335, - 97, -335, -335, -335, -335, 14, 33, 38, 48, 49, - 25, -335, -335, -335, -335, -6, -14, -335, 53, -335, - -335, -335, 17, -335, -335, -335, 1325, 1, 1325, 1325, - 1325, -335, -335, 1042, 31, -335, -335, -335, -335, -335, - -335, -335, -39, -335, -335, -335, -335, -335, 1042, 65, - -335, 99, 24, 123, 1325, 11, -335, -335, 713, 713, - -335, 540, -335, 584, 1325, 24, 99, 118, 123, -335, - 1166, 24, 24, 1325, -335, -335, -335, -335, 754, -335, - 55, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, - 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, - 1214, 1325, -335, -335, -335, 160, 121, -335, 1251, 92, - 1325, 164, 24, 129, -335, 134, -335, 158, 99, 137, - -335, 455, 260, 1349, 89, 99, 99, 1325, 99, 1325, - 99, 1042, 162, -335, 129, 99, -335, 99, 72, -335, - -335, -335, 625, 176, 1325, 13, -335, 1042, 1288, -335, - 141, 153, -335, 154, 1325, 151, 156, -335, 163, 1042, - 155, 159, 403, 1123, 1083, 403, 177, 177, 177, 177, - 81, 81, 81, 81, 177, 94, 94, -335, -335, -335, - 1325, 795, 133, 1325, 1325, 1325, 1325, 1325, 1325, 1325, - 1325, -335, 1288, -335, 837, 180, -335, -335, 1042, 24, - 134, -335, 24, 1325, -335, 1325, -335, -335, -335, -335, - -335, 23, 406, 416, -335, -335, -335, -335, -335, -335, - -335, 713, -335, 713, -335, 209, 1325, 24, -335, -335, - -335, -335, -335, 198, -335, 1325, 496, 1190, 24, 1042, - 175, -335, -335, 178, -335, 1325, 878, -335, 55, 1325, - -335, 1325, 1042, 1325, 403, 403, 177, 177, 81, 81, - 81, 81, 179, -335, -335, 239, -335, -335, 1042, -335, - 99, 99, 1325, 1042, 189, -335, 919, 93, -335, 190, - 99, 106, -335, 625, 229, 1325, 236, -335, -335, 1325, - 1042, 197, -335, 1042, 1042, 1042, -335, 1325, 242, -335, - -335, 671, 24, 1325, -335, -335, -335, -335, -335, -335, - 1325, 496, 1190, -335, 1325, 1042, 1325, 255, -335, -335, - 1325, -335, 496, 50, 960, 99, -335, 1325, 1042, 1001, - 1325, 203, 713, 99, -335, 210, 1325, -335, 496, 1325, - 1042, -335, 99, -335, 50, 496, 99, 1042, -335, -335, - 99, -335, -335 + 4, -323, -323, 26, 39, -323, 808, -323, -323, -323, + -323, -323, -18, -323, 8, 8, 1370, 1176, 139, -323, + 113, 1370, 1370, 1370, 1370, -323, -323, -323, -323, -323, + -323, 225, -323, -323, -323, -323, 6, 24, 29, 51, + 57, 39, -323, -323, -323, -323, -7, 28, -323, 65, + -323, -323, -323, -46, -323, -323, -323, 1370, 42, 1370, + 1370, 1370, -323, -323, 1007, 77, -323, -323, -323, -323, + -323, -323, -323, -27, -323, -323, -323, -323, -323, 1007, + 89, -323, 96, 8, 117, 1370, 84, -323, -323, 670, + 670, -323, 493, -323, 538, 1370, 8, 96, 160, 117, + -323, 1134, 8, 8, 1370, -323, -323, -323, -323, 712, + -323, 2, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, + 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, + 1370, 1256, 1370, -323, -323, -323, 239, 162, -323, 1294, + 97, 1370, 178, 8, 138, -323, 154, -323, 179, 96, + 165, -323, 406, 113, 1408, 176, 96, 96, 1370, 96, + 1370, 96, 1007, 189, -323, 138, 96, -323, 96, 186, + -323, -323, -323, 580, 208, 1370, -5, -323, 1007, 1332, + -323, 174, 187, -323, 203, 1370, 197, 205, -323, 207, + 1007, 211, 218, 151, 1090, 1049, 151, 204, 204, 204, + 204, 180, 180, 180, 180, 204, 193, 193, -323, -323, + -323, 1370, 754, 241, 1370, 1370, 1370, 1370, 1370, 1370, + 1370, 1370, -323, 1332, -323, 797, 226, -323, -323, 1007, + 8, 154, -323, 8, 1370, -323, 1370, -323, -323, -323, + -323, -323, 38, 98, -323, 341, -323, -323, -323, -323, + -323, -323, 670, -323, 670, -323, 257, 1370, 8, -323, + -323, -323, -323, -323, -323, -323, 283, -323, 1370, 448, + 1214, 8, 1007, 235, -323, -323, 240, -323, 1370, 839, + -323, 2, 1370, -323, 1370, 1007, 1370, 151, 151, 204, + 204, 180, 180, 180, 180, 242, -323, -323, 294, -323, + -323, 1007, -323, 96, 96, 1370, 1007, 245, -323, 881, + 188, -323, 246, 96, 130, -323, 580, 287, 1370, 295, + -323, -323, 1370, 1007, 254, -323, 1007, 1007, 1007, -323, + 1370, 302, -323, -323, 627, 8, 1370, -323, -323, -323, + -323, -323, -323, 1370, 448, 1214, -323, 1370, 1007, 1370, + 306, -323, -323, 1370, -323, 448, 95, 923, 96, -323, + 1370, 1007, 965, 1370, 250, 670, 96, -323, 258, 1370, + -323, 448, 1370, 1007, -323, 96, -323, 95, 448, 96, + 1007, -323, -323, 96, -323, -323 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -838,75 +840,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, 220, - 4, 9, 3, 0, 0, 0, 0, 46, 66, 0, - 0, 0, 0, 0, 90, 11, 19, 20, 22, 21, - 57, 23, 24, 25, 12, 26, 27, 28, 29, 30, - 0, 6, 223, 33, 34, 0, 41, 42, 0, 212, - 213, 214, 194, 210, 208, 209, 0, 0, 0, 0, - 199, 159, 151, 40, 0, 197, 99, 100, 101, 195, - 149, 150, 103, 211, 102, 196, 96, 77, 98, 0, - 64, 157, 0, 57, 0, 75, 206, 207, 0, 0, - 84, 0, 87, 0, 0, 0, 157, 157, 57, 5, - 0, 0, 0, 0, 113, 109, 111, 112, 0, 18, - 161, 153, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 8, 18, 0, 0, 10, 0, 1, 2, 222, + 221, 4, 9, 3, 0, 0, 0, 0, 46, 66, + 0, 0, 0, 0, 0, 90, 11, 19, 20, 22, + 21, 57, 23, 24, 25, 12, 26, 27, 28, 29, + 30, 0, 6, 226, 33, 34, 0, 41, 42, 0, + 212, 213, 214, 194, 210, 208, 209, 0, 0, 0, + 0, 199, 159, 151, 40, 0, 197, 99, 100, 101, + 195, 149, 150, 103, 211, 102, 196, 96, 77, 98, + 0, 64, 157, 0, 57, 0, 75, 206, 207, 0, + 0, 84, 0, 87, 0, 0, 0, 157, 157, 57, + 5, 0, 0, 0, 0, 113, 109, 111, 112, 0, + 18, 161, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 94, 93, 95, 0, 0, 107, 0, 0, - 0, 0, 0, 0, 48, 47, 54, 0, 157, 67, - 68, 71, 0, 0, 0, 157, 157, 0, 157, 0, - 157, 91, 58, 49, 62, 157, 52, 157, 0, 189, - 190, 191, 32, 192, 0, 0, 43, 44, 145, 198, - 0, 165, 222, 0, 0, 0, 162, 163, 0, 155, - 0, 154, 127, 115, 114, 128, 130, 131, 121, 122, - 123, 124, 125, 126, 129, 116, 117, 118, 119, 120, - 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, - 0, 106, 145, 169, 0, 204, 201, 202, 97, 0, - 65, 158, 0, 0, 50, 0, 72, 73, 70, 74, - 76, 194, 210, 220, 78, 215, 216, 217, 79, 80, - 81, 0, 82, 0, 85, 0, 0, 0, 53, 51, - 218, 219, 31, 191, 193, 0, 0, 0, 0, 144, - 0, 147, 18, 143, 200, 0, 0, 160, 0, 0, - 152, 0, 141, 0, 138, 139, 132, 133, 134, 135, - 136, 137, 0, 203, 170, 171, 45, 55, 56, 69, - 157, 157, 0, 59, 63, 60, 0, 0, 178, 184, - 157, 0, 179, 0, 192, 0, 0, 110, 146, 145, - 167, 0, 164, 166, 156, 140, 108, 0, 173, 83, - 86, 0, 0, 0, 188, 187, 185, 35, 180, 181, - 0, 0, 0, 148, 0, 172, 0, 176, 88, 89, - 0, 61, 0, 0, 0, 157, 192, 0, 168, 174, - 0, 0, 0, 157, 182, 186, 0, 36, 0, 0, - 177, 205, 157, 38, 0, 0, 157, 175, 92, 183, - 157, 37, 39 + 0, 0, 0, 94, 93, 95, 0, 0, 107, 0, + 0, 0, 0, 0, 0, 48, 47, 54, 0, 157, + 67, 68, 71, 0, 0, 0, 157, 157, 0, 157, + 0, 157, 91, 58, 49, 62, 157, 52, 157, 0, + 189, 190, 191, 32, 192, 0, 0, 43, 44, 145, + 198, 0, 165, 225, 0, 0, 0, 162, 163, 0, + 155, 0, 154, 127, 115, 114, 128, 130, 131, 121, + 122, 123, 124, 125, 126, 129, 116, 117, 118, 119, + 120, 0, 0, 104, 0, 0, 0, 0, 0, 0, + 0, 0, 106, 145, 169, 0, 204, 201, 202, 97, + 0, 65, 158, 0, 0, 50, 0, 72, 73, 70, + 74, 76, 194, 210, 78, 196, 215, 216, 79, 217, + 80, 81, 0, 82, 0, 85, 0, 0, 0, 53, + 51, 218, 219, 223, 31, 220, 191, 193, 0, 0, + 0, 0, 144, 0, 147, 18, 143, 200, 0, 0, + 160, 0, 0, 152, 0, 141, 0, 138, 139, 132, + 133, 134, 135, 136, 137, 0, 203, 170, 171, 45, + 55, 56, 69, 157, 157, 0, 59, 63, 60, 0, + 0, 178, 184, 157, 0, 179, 0, 192, 0, 0, + 110, 146, 145, 167, 0, 164, 166, 156, 140, 108, + 0, 173, 83, 86, 0, 0, 0, 188, 187, 185, + 35, 180, 181, 0, 0, 0, 148, 0, 172, 0, + 176, 88, 89, 0, 61, 0, 0, 0, 157, 192, + 0, 168, 174, 0, 0, 0, 157, 182, 186, 0, + 36, 0, 0, 177, 205, 157, 38, 0, 0, 157, + 175, 92, 183, 157, 37, 39 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -335, -1, -335, -335, -335, -335, -97, -335, -335, -335, - -335, -335, -335, -335, -335, -335, 165, 238, -335, -335, - -335, 127, 41, -81, -335, -335, -335, 240, -335, -335, - -335, -335, 42, -335, -335, -335, -80, -335, -335, -335, - -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, - 39, -335, -335, -335, -335, -335, -335, -335, 54, -41, - -335, -335, -335, -335, -335, -335, -335, -92, -140, -335, - -335, -335, 5, -335, -335, -335, -335, -334, -335, -249, - -335, -82, -266, -335, -335, -335, 35, -335, -11, 125, - -335, -4, -335, 7 + -323, -1, -323, -323, -323, -323, -89, -323, -323, -323, + -323, -323, -323, -323, -323, -323, 213, 286, -323, -323, + -323, 171, 85, -71, -323, -323, -323, 288, -323, -323, + -323, -323, 99, -323, -323, -323, -67, -323, -323, -323, + -323, -323, -323, -323, -323, -323, -323, -323, -323, -323, + 52, -323, -323, -323, -323, -323, -323, -323, 108, 10, + -323, -323, -323, -323, -323, -323, -323, -79, -112, -323, + -323, -323, 56, -323, -323, -323, -323, -262, -323, -322, + -323, -81, -266, -323, -323, -323, -98, -323, -19, 184, + -323, -4, -323, -323, -12 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 10, 11, 2, 4, 3, 5, 25, 6, 26, - 27, 43, 44, 28, 29, 46, 47, 81, 30, 82, - 31, 145, 146, 97, 304, 165, 257, 83, 142, 32, - 84, 149, 150, 238, 33, 34, 155, 35, 36, 90, - 37, 92, 38, 350, 39, 94, 255, 135, 77, 140, - 269, 64, 65, 222, 178, 66, 67, 68, 270, 271, - 272, 273, 69, 70, 111, 190, 191, 144, 71, 110, - 185, 186, 187, 225, 328, 347, 361, 309, 365, 310, - 353, 311, 174, 72, 109, 295, 85, 73, 74, 244, - 262, 75, 188, 147 + -1, 11, 12, 2, 4, 3, 5, 26, 6, 27, + 28, 44, 45, 29, 30, 47, 48, 82, 31, 83, + 32, 146, 147, 98, 307, 166, 258, 84, 143, 33, + 85, 150, 151, 239, 34, 35, 156, 36, 37, 91, + 38, 93, 39, 353, 40, 95, 256, 136, 78, 141, + 272, 65, 66, 223, 179, 67, 68, 69, 273, 274, + 275, 276, 70, 71, 112, 191, 192, 145, 72, 111, + 186, 187, 188, 226, 331, 350, 364, 312, 368, 313, + 356, 314, 175, 73, 110, 298, 86, 74, 75, 244, + 264, 76, 265, 189, 148 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -914,367 +916,379 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 12, 315, 148, 231, 163, 166, 100, 12, 86, 156, - 41, 158, 180, 160, -13, 87, 1, 167, 173, 364, - 45, 48, 138, -215, 231, 267, -215, -215, -215, -215, - -215, -215, -215, -14, 7, 139, 12, 8, -15, 99, - 379, 9, 102, -215, -215, -215, -215, -215, -16, -17, - 101, -215, 42, 8, 63, 78, 234, 9, 105, 88, - 89, 91, 93, 249, 250, 40, 252, 152, 254, 268, - -13, -105, -13, 258, -105, 259, 357, -105, 308, -215, - -105, -215, 9, 181, 182, 136, 103, 183, 137, -14, - 264, -14, 355, 141, -15, 104, -15, 106, 107, 108, - 260, 261, 162, 363, -16, -17, -16, -17, 175, 48, - 79, 95, 80, 169, 170, 171, 184, 245, 246, 376, - 226, 247, 334, 151, 9, 9, 380, 143, 125, 126, - 127, 128, 129, 161, 338, 227, 131, 95, 9, 172, - 86, 86, 177, 127, 128, 129, 164, 87, 87, 221, - 189, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 211, - 212, 300, 213, 301, 79, 318, 80, 224, 229, 228, - 125, 126, 127, 128, 129, 314, 239, 240, 61, 112, - 232, 233, 192, 235, 265, 256, 251, 214, 253, 274, - 215, 216, 217, 218, 219, 220, -221, 275, 329, 330, - -94, 277, 278, 266, 115, 281, 279, 280, 337, 120, - 121, 122, 123, 276, 125, 126, 127, 128, 129, 294, - 302, 264, 131, 317, 319, -94, 296, 326, -94, -94, - -94, -94, -94, -94, 327, 332, 336, 340, 342, 282, - 344, 346, 284, 285, 286, 287, 288, 289, 290, 291, - 356, 360, 312, 367, 305, 371, 374, 176, 96, 230, - 98, 373, 298, 297, 151, 316, 292, 299, 343, 248, - 378, 0, 372, 322, 381, 49, 50, 51, 382, 53, - 54, 55, 9, 0, 0, 303, 0, 0, 0, 0, - 0, 0, 0, 335, 306, 0, 313, 339, 0, 0, - 0, 0, 0, 0, 320, 0, 0, 76, 323, 0, - 324, 0, 325, 49, 50, 51, 52, 53, 54, 55, - 9, 0, 56, 0, 0, 0, 0, 312, 0, 351, - 0, 331, 0, 0, 57, 58, 59, 0, 312, 312, - 0, 0, 0, 0, 341, 60, 0, 61, 0, 62, - 0, 0, 0, 0, 312, 0, 345, 0, 0, 0, - 312, 312, 352, 0, 0, 0, 0, 0, 0, 354, - 0, 313, 0, 358, 0, 359, 0, 0, 0, 362, - 0, 0, 0, 0, 0, 0, 368, 0, 0, 370, - 0, 0, 0, 0, 0, 375, -216, 0, 377, -216, - -216, -216, -216, -216, -216, -216, -217, 0, 0, -217, - -217, -217, -217, -217, -217, -217, -216, -216, -216, -216, - -216, 0, 0, 0, -216, 0, -217, -217, -217, -217, - -217, 0, 0, 0, -217, 120, 121, 122, 123, 0, - 125, 126, 127, 128, 129, 0, 0, 0, 131, 0, - 0, 0, -216, 0, -216, 236, 237, 112, 0, 0, - 0, 0, -217, 0, -217, 0, 0, 0, 0, 0, - 49, 50, 51, 0, 53, 54, 55, 9, 0, 0, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 112, 0, - 131, 0, 0, 307, 0, 0, 0, 0, 0, 0, - 132, 133, 134, 0, 308, 0, 0, 0, 9, 0, - 0, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 0, - 0, 131, 153, 157, 154, 0, 0, 0, 0, 169, - 170, 263, 133, 134, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 0, 0, 131, 153, 159, 154, 0, - 0, 0, 0, 0, 0, 132, 133, 134, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 112, 0, 131, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, - 133, 134, 0, 0, 0, 0, 0, 0, 0, 0, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 0, 0, - 131, 0, 0, 112, 0, 0, 0, 0, 169, 170, - 263, 133, 134, 348, 349, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 0, 153, 131, 154, 0, 0, - 0, 0, 0, 0, 0, 0, 132, 133, 134, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 112, 0, 131, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 132, 133, - 134, 0, 0, 0, 0, 0, 0, 0, 0, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 112, 0, 131, - 0, 0, 179, 0, 0, 0, 0, 0, 0, 132, - 133, 134, 0, 0, 0, 0, 0, 0, 0, 0, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 283, 112, - 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 132, 133, 134, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 112, 0, 131, 0, 0, 0, 0, 0, 0, 293, - 0, 0, 132, 133, 134, 0, 0, 0, 0, 0, - 0, 0, 0, 113, 114, 115, 116, 117, 118, 119, + 13, 87, 46, 49, 318, 101, -13, 270, 13, -105, + 8, 42, -105, 149, 9, 10, 88, 1, 164, 167, + 174, 181, 358, 157, -14, 159, 7, 161, 168, -15, + 182, 183, 232, 366, 184, 139, 43, 13, -215, 41, + 100, -215, -215, -215, -215, -215, -215, -215, 140, 379, + 102, -16, 271, 232, 240, 241, 383, -17, -215, -215, + -215, -215, -215, -13, 185, -13, -215, 8, 64, 79, + 235, 9, 10, 89, 90, 92, 94, 250, 251, 360, + 253, -14, 255, -14, 163, 103, -15, 259, -15, 260, + 176, 49, 267, -105, 367, -215, -105, -215, -216, 104, + 106, -216, -216, -216, -216, -216, -216, -216, -16, 105, + -16, 107, 108, 109, -17, 382, -17, 142, -216, -216, + -216, -216, -216, 311, 144, 227, -216, 9, 10, 9, + 10, 96, 137, 87, 87, 138, 228, 152, 50, 51, + 52, 153, 54, 55, 56, 9, 10, 162, 88, 88, + 245, 249, 80, 173, 81, -216, 178, -216, 341, 170, + 171, 172, 9, 10, 190, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 212, 213, 303, 321, 304, 165, 317, + 222, 225, 230, 229, 121, 122, 123, 124, 62, 126, + 127, 128, 129, 130, 246, 247, 193, 132, 9, 10, + 252, 233, 254, 234, 261, 262, 113, 337, 299, 263, + 9, 10, 236, 257, 332, 333, 268, 269, 126, 127, + 128, 129, 130, 277, 340, 267, 132, 279, 80, 96, + 81, -224, 116, 128, 129, 130, 308, 121, 122, 123, + 124, 214, 126, 127, 128, 129, 130, 278, 280, 319, + 132, 282, 281, 285, 359, 315, 287, 288, 289, 290, + 291, 292, 293, 294, 283, 284, 297, 215, 305, 370, + 216, 217, 218, 219, 220, 221, 301, 376, 152, 126, + 127, 128, 129, 130, 320, -94, 381, 322, 375, 330, + 384, 329, 335, 339, 385, 343, 338, 345, 347, 306, + 342, 349, 363, 374, 231, 377, 177, 97, 300, 99, + 309, -94, 316, 354, -94, -94, -94, -94, -94, -94, + 323, 295, 346, 0, 326, 302, 327, 325, 328, 248, + 315, -217, 0, 0, -217, -217, -217, -217, -217, -217, + -217, 315, 315, 0, 0, 0, 0, 334, 0, 0, + 0, -217, -217, -217, -217, -217, 0, 315, 0, -217, + 344, 0, 0, 315, 315, 0, 0, 0, 0, 0, + 0, 0, 348, 0, 0, 0, 0, 0, 355, 0, + 0, 0, 0, 0, 0, 357, 0, 316, -217, 361, + -217, 362, 0, 0, 0, 365, 0, 0, 0, 0, + 0, 0, 371, 0, 0, 373, 237, 238, 113, 0, + 0, 378, 0, 0, 380, 0, 0, 0, 0, 0, + 0, 50, 51, 52, 0, 54, 55, 56, 9, 10, + 0, 0, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 113, 0, 132, 0, 0, 310, 0, 0, 0, 0, + 0, 0, 133, 134, 135, 0, 311, 0, 0, 0, + 9, 10, 0, 0, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 112, 0, 131, 0, 0, 0, 0, 0, 0, - 321, 0, 0, 132, 133, 134, 0, 333, 0, 0, - 0, 0, 0, 0, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 112, 0, 131, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 132, 133, 134, 0, 366, 0, - 0, 0, 0, 0, 0, 113, 114, 115, 116, 117, + 130, 131, 0, 0, 132, 154, 158, 155, 0, 0, + 0, 0, 170, 171, 266, 134, 135, 0, 0, 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, 129, 130, 131, 0, 0, 132, + 154, 160, 155, 0, 0, 0, 0, 0, 0, 133, + 134, 135, 0, 0, 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, 129, + 130, 131, 113, 0, 132, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 133, 134, 135, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 112, 0, 131, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 132, 133, 134, 0, 0, - 0, 0, 0, 0, 0, 0, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 112, 0, 131, 369, 0, 0, - 0, 0, 0, 0, 0, 0, 132, 133, 134, 0, - 0, 0, 0, 0, 0, 0, 0, 113, 114, 115, + 128, 129, 130, 131, 0, 0, 132, 0, 0, 113, + 0, 0, 0, 0, 170, 171, 266, 134, 135, 351, + 352, 0, 0, 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, 129, 130, + 131, 0, 154, 132, 155, 0, 0, 0, 0, 0, + 0, 0, 0, 133, 134, 135, 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, 129, 130, 131, 113, 0, 132, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 133, 134, 135, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 112, 0, 131, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 132, 133, 134, - 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, + 126, 127, 128, 129, 130, 131, 113, 0, 132, 0, + 0, 180, 0, 0, 0, 0, 0, 0, 133, 134, + 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 286, 113, + 132, 14, 15, 16, 17, 18, 19, 20, 0, 0, + 133, 134, 135, 0, 0, 0, 0, 0, 21, 22, + 23, 24, 25, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 113, 0, 132, 0, 0, 0, 0, 0, 0, + 296, 0, 0, 133, 134, 135, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 113, 0, 132, 0, 0, 0, 0, + 0, 0, 324, 0, 0, 133, 134, 135, 0, 336, + 0, 0, 0, 0, 0, 0, 0, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 113, 0, 132, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 133, 134, 135, + 0, 369, 0, 0, 0, 0, 0, 0, 0, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 112, 0, 0, 131, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 132, 133, - 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 0, 0, 0, 131, 0, - 0, 0, 168, 0, 0, 0, 0, 0, 132, 133, - 134, 49, 50, 51, 52, 53, 54, 55, 9, 0, - 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 57, 58, 59, 49, 50, 51, 52, 53, - 54, 55, 9, 60, 56, 61, 0, 62, 0, 169, - 170, 171, 0, 0, 0, 0, 57, 58, 59, 49, - 50, 51, 52, 53, 54, 55, 9, 60, 56, 61, - 0, 62, 0, 169, 170, 171, 0, 0, 0, 0, - 57, 58, 59, 0, 0, 0, 0, 210, 0, 0, - 0, 60, 0, 61, 0, 62, 49, 50, 51, 52, - 53, 54, 55, 9, 0, 56, 13, 14, 15, 16, - 17, 18, 19, 0, 0, 0, 0, 57, 58, 59, - 223, 0, 0, 20, 21, 22, 23, 24, 60, 0, - 61, 0, 62, 49, 50, 51, 52, 53, 54, 55, - 9, 0, 56, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 57, 58, 59, 0, 0, 0, - 0, 0, 0, 0, 0, 60, -142, 61, 0, 62, - 49, 50, 51, 52, 53, 54, 55, 9, 0, 56, + 125, 126, 127, 128, 129, 130, 131, 113, 0, 132, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, + 134, 135, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 113, + 0, 132, 372, 0, 0, 0, 0, 0, 0, 0, + 0, 133, 134, 135, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 113, 0, 132, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 133, 134, 135, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 114, 0, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 113, 0, 0, 132, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 133, 134, 135, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 0, 0, 0, 132, 0, 0, 0, + 169, 0, 0, 0, 0, 0, 133, 134, 135, 50, + 51, 52, 53, 54, 55, 56, 9, 10, 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 57, 58, 59, 49, 50, 51, 241, 242, 54, - 55, 243, 60, 56, 61, 0, 62, 0, 0, 0, - 0, 0, 0, 0, 0, 57, 58, 59, 0, 0, - 0, 0, 0, 0, 0, 0, 60, 0, 61, 0, - 62 + 0, 58, 59, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 61, 0, 62, 77, 63, 0, 170, 171, + 172, 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, 170, 171, + 172, 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, 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, -142, 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, 242, 243, 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 }; static const yytype_int16 yycheck[] = { - 4, 267, 83, 143, 96, 97, 12, 11, 19, 89, - 11, 91, 109, 93, 0, 19, 13, 98, 100, 353, - 13, 14, 61, 0, 164, 12, 3, 4, 5, 6, - 7, 8, 9, 0, 0, 74, 40, 28, 0, 40, - 374, 32, 56, 20, 21, 22, 23, 24, 0, 0, - 56, 28, 28, 28, 15, 16, 148, 32, 57, 20, - 21, 22, 23, 155, 156, 56, 158, 56, 160, 56, - 56, 54, 58, 165, 57, 167, 342, 54, 28, 56, - 57, 58, 32, 28, 29, 54, 33, 32, 57, 56, - 172, 58, 341, 28, 56, 56, 58, 58, 59, 60, - 28, 29, 95, 352, 56, 56, 58, 58, 101, 102, - 13, 14, 15, 63, 64, 65, 61, 28, 29, 368, - 28, 32, 29, 84, 32, 32, 375, 28, 47, 48, - 49, 50, 51, 94, 28, 139, 55, 14, 32, 100, - 151, 152, 103, 49, 50, 51, 28, 151, 152, 28, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 251, 12, 253, 13, 272, 15, 138, 14, 140, - 47, 48, 49, 50, 51, 267, 151, 152, 59, 12, - 56, 33, 153, 56, 18, 33, 157, 37, 159, 58, - 40, 41, 42, 43, 44, 45, 53, 53, 300, 301, - 12, 60, 56, 174, 37, 56, 53, 62, 310, 42, - 43, 44, 45, 184, 47, 48, 49, 50, 51, 49, - 21, 313, 55, 58, 56, 37, 229, 58, 40, 41, - 42, 43, 44, 45, 5, 56, 56, 18, 12, 210, - 53, 9, 213, 214, 215, 216, 217, 218, 219, 220, - 342, 6, 266, 355, 257, 62, 56, 102, 30, 142, - 30, 363, 233, 232, 235, 268, 222, 235, 319, 154, - 372, -1, 362, 278, 376, 25, 26, 27, 380, 29, - 30, 31, 32, -1, -1, 256, -1, -1, -1, -1, - -1, -1, -1, 307, 265, -1, 267, 311, -1, -1, - -1, -1, -1, -1, 275, -1, -1, 19, 279, -1, - 281, -1, 283, 25, 26, 27, 28, 29, 30, 31, - 32, -1, 34, -1, -1, -1, -1, 341, -1, 332, - -1, 302, -1, -1, 46, 47, 48, -1, 352, 353, - -1, -1, -1, -1, 315, 57, -1, 59, -1, 61, - -1, -1, -1, -1, 368, -1, 327, -1, -1, -1, - 374, 375, 333, -1, -1, -1, -1, -1, -1, 340, - -1, 342, -1, 344, -1, 346, -1, -1, -1, 350, - -1, -1, -1, -1, -1, -1, 357, -1, -1, 360, - -1, -1, -1, -1, -1, 366, 0, -1, 369, 3, - 4, 5, 6, 7, 8, 9, 0, -1, -1, 3, - 4, 5, 6, 7, 8, 9, 20, 21, 22, 23, - 24, -1, -1, -1, 28, -1, 20, 21, 22, 23, - 24, -1, -1, -1, 28, 42, 43, 44, 45, -1, - 47, 48, 49, 50, 51, -1, -1, -1, 55, -1, - -1, -1, 56, -1, 58, 10, 11, 12, -1, -1, - -1, -1, 56, -1, 58, -1, -1, -1, -1, -1, - 25, 26, 27, -1, 29, 30, 31, 32, -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, 17, -1, -1, -1, -1, -1, -1, - 65, 66, 67, -1, 28, -1, -1, -1, 32, -1, - -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, -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, 12, 13, 14, -1, - -1, -1, -1, -1, -1, 65, 66, 67, -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, -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, -1, 12, 55, 14, -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, -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, 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, + 4, 20, 14, 15, 270, 12, 0, 12, 12, 55, + 28, 12, 58, 84, 32, 33, 20, 13, 97, 98, + 101, 110, 344, 90, 0, 92, 0, 94, 99, 0, + 28, 29, 144, 355, 32, 62, 28, 41, 0, 57, + 41, 3, 4, 5, 6, 7, 8, 9, 75, 371, + 57, 0, 57, 165, 152, 153, 378, 0, 20, 21, + 22, 23, 24, 57, 62, 59, 28, 28, 16, 17, + 149, 32, 33, 21, 22, 23, 24, 156, 157, 345, + 159, 57, 161, 59, 96, 57, 57, 166, 59, 168, + 102, 103, 173, 55, 356, 57, 58, 59, 0, 34, + 58, 3, 4, 5, 6, 7, 8, 9, 57, 57, + 59, 59, 60, 61, 57, 377, 59, 28, 20, 21, + 22, 23, 24, 28, 28, 28, 28, 32, 33, 32, + 33, 14, 55, 152, 153, 58, 140, 85, 25, 26, + 27, 57, 29, 30, 31, 32, 33, 95, 152, 153, + 154, 155, 13, 101, 15, 57, 104, 59, 28, 64, + 65, 66, 32, 33, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 252, 275, 254, 28, 270, + 28, 139, 14, 141, 43, 44, 45, 46, 60, 48, + 49, 50, 51, 52, 28, 29, 154, 56, 32, 33, + 158, 57, 160, 34, 28, 29, 12, 29, 230, 33, + 32, 33, 57, 34, 303, 304, 18, 175, 48, 49, + 50, 51, 52, 59, 313, 316, 56, 185, 13, 14, + 15, 54, 38, 50, 51, 52, 258, 43, 44, 45, + 46, 12, 48, 49, 50, 51, 52, 54, 61, 271, + 56, 54, 57, 211, 345, 269, 214, 215, 216, 217, + 218, 219, 220, 221, 63, 57, 50, 38, 21, 358, + 41, 42, 43, 44, 45, 46, 234, 366, 236, 48, + 49, 50, 51, 52, 59, 12, 375, 57, 365, 5, + 379, 59, 57, 57, 383, 18, 310, 12, 54, 257, + 314, 9, 6, 63, 143, 57, 103, 31, 233, 31, + 268, 38, 270, 335, 41, 42, 43, 44, 45, 46, + 278, 223, 322, -1, 282, 236, 284, 281, 286, 155, + 344, 0, -1, -1, 3, 4, 5, 6, 7, 8, + 9, 355, 356, -1, -1, -1, -1, 305, -1, -1, + -1, 20, 21, 22, 23, 24, -1, 371, -1, 28, + 318, -1, -1, 377, 378, -1, -1, -1, -1, -1, + -1, -1, 330, -1, -1, -1, -1, -1, 336, -1, + -1, -1, -1, -1, -1, 343, -1, 345, 57, 347, + 59, 349, -1, -1, -1, 353, -1, -1, -1, -1, + -1, -1, 360, -1, -1, 363, 10, 11, 12, -1, + -1, 369, -1, -1, 372, -1, -1, -1, -1, -1, + -1, 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, -1, 17, -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, 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, + 52, 53, -1, -1, 56, 12, 13, 14, -1, -1, + -1, -1, 64, 65, 66, 67, 68, -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, -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, 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, + 50, 51, 52, 53, -1, -1, 56, -1, -1, 12, + -1, -1, -1, -1, 64, 65, 66, 67, 68, 22, + 23, -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, 12, 56, 14, -1, -1, -1, -1, -1, + -1, -1, -1, 66, 67, 68, -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, 12, -1, 55, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 65, 66, 67, - -1, -1, -1, -1, -1, -1, -1, -1, 35, -1, + 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, 37, 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, -1, -1, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, -1, -1, -1, 55, -1, - -1, -1, 16, -1, -1, -1, -1, -1, 65, 66, - 67, 25, 26, 27, 28, 29, 30, 31, 32, -1, - 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 46, 47, 48, 25, 26, 27, 28, 29, - 30, 31, 32, 57, 34, 59, -1, 61, -1, 63, - 64, 65, -1, -1, -1, -1, 46, 47, 48, 25, - 26, 27, 28, 29, 30, 31, 32, 57, 34, 59, - -1, 61, -1, 63, 64, 65, -1, -1, -1, -1, - 46, 47, 48, -1, -1, -1, -1, 53, -1, -1, - -1, 57, -1, 59, -1, 61, 25, 26, 27, 28, - 29, 30, 31, 32, -1, 34, 3, 4, 5, 6, - 7, 8, 9, -1, -1, -1, -1, 46, 47, 48, - 49, -1, -1, 20, 21, 22, 23, 24, 57, -1, - 59, -1, 61, 25, 26, 27, 28, 29, 30, 31, - 32, -1, 34, -1, -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, -1, 34, + 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, 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, + 16, -1, -1, -1, -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, 46, 47, 48, 25, 26, 27, 28, 29, 30, - 31, 32, 57, 34, 59, -1, 61, -1, -1, -1, - -1, -1, -1, -1, -1, 46, 47, 48, -1, -1, - -1, -1, -1, -1, -1, -1, 57, -1, 59, -1, - 61 + -1, 47, 48, 49, -1, -1, -1, -1, -1, -1, + -1, -1, 58, -1, 60, 19, 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, + -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, 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, 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 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 13, 78, 80, 79, 81, 83, 0, 28, 32, - 76, 77, 166, 3, 4, 5, 6, 7, 8, 9, - 20, 21, 22, 23, 24, 82, 84, 85, 88, 89, - 93, 95, 104, 109, 110, 112, 113, 115, 117, 119, - 56, 76, 28, 86, 87, 168, 90, 91, 168, 25, - 26, 27, 28, 29, 30, 31, 34, 46, 47, 48, - 57, 59, 61, 125, 126, 127, 130, 131, 132, 137, - 138, 143, 158, 162, 163, 166, 19, 123, 125, 13, - 15, 92, 94, 102, 105, 161, 163, 166, 125, 125, - 114, 125, 116, 125, 120, 14, 92, 98, 102, 76, - 12, 56, 56, 33, 125, 57, 125, 125, 125, 159, - 144, 139, 12, 35, 36, 37, 38, 39, 40, 41, + 0, 13, 79, 81, 80, 82, 84, 0, 28, 32, + 33, 77, 78, 167, 3, 4, 5, 6, 7, 8, + 9, 20, 21, 22, 23, 24, 83, 85, 86, 89, + 90, 94, 96, 105, 110, 111, 113, 114, 116, 118, + 120, 57, 77, 28, 87, 88, 170, 91, 92, 170, + 25, 26, 27, 28, 29, 30, 31, 35, 47, 48, + 49, 58, 60, 62, 126, 127, 128, 131, 132, 133, + 138, 139, 144, 159, 163, 164, 167, 19, 124, 126, + 13, 15, 93, 95, 103, 106, 162, 164, 167, 126, + 126, 115, 126, 117, 126, 121, 14, 93, 99, 103, + 77, 12, 57, 57, 34, 126, 58, 126, 126, 126, + 160, 145, 140, 12, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 55, 65, 66, 67, 122, 54, 57, 61, 74, - 124, 28, 103, 28, 142, 96, 97, 168, 98, 106, - 107, 125, 56, 12, 14, 111, 111, 13, 111, 13, - 111, 125, 168, 142, 28, 100, 142, 98, 16, 63, - 64, 65, 125, 156, 157, 168, 91, 125, 129, 58, - 81, 28, 29, 32, 61, 145, 146, 147, 167, 125, - 140, 141, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 53, 125, 125, 12, 37, 40, 41, 42, 43, 44, - 45, 28, 128, 49, 125, 148, 28, 166, 125, 14, - 96, 143, 56, 33, 142, 56, 10, 11, 108, 161, - 161, 28, 29, 32, 164, 28, 29, 32, 164, 142, - 142, 125, 142, 125, 142, 121, 33, 101, 142, 142, - 28, 29, 165, 65, 156, 18, 125, 12, 56, 125, - 133, 134, 135, 136, 58, 53, 125, 60, 56, 53, - 62, 56, 125, 53, 125, 125, 125, 125, 125, 125, - 125, 125, 133, 62, 49, 160, 168, 97, 125, 107, - 111, 111, 21, 125, 99, 168, 125, 17, 28, 152, - 154, 156, 166, 125, 156, 157, 168, 58, 81, 56, - 125, 62, 147, 125, 125, 125, 58, 5, 149, 142, - 142, 125, 56, 28, 29, 166, 56, 142, 28, 166, - 18, 125, 12, 134, 53, 125, 9, 150, 22, 23, - 118, 168, 125, 155, 125, 154, 156, 157, 125, 125, - 6, 151, 125, 154, 152, 153, 28, 142, 125, 56, - 125, 62, 111, 142, 56, 125, 154, 125, 142, 152, - 154, 142, 142 + 52, 53, 56, 66, 67, 68, 123, 55, 58, 62, + 75, 125, 28, 104, 28, 143, 97, 98, 170, 99, + 107, 108, 126, 57, 12, 14, 112, 112, 13, 112, + 13, 112, 126, 170, 143, 28, 101, 143, 99, 16, + 64, 65, 66, 126, 157, 158, 170, 92, 126, 130, + 59, 82, 28, 29, 32, 62, 146, 147, 148, 169, + 126, 141, 142, 126, 126, 126, 126, 126, 126, 126, + 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, + 126, 54, 126, 126, 12, 38, 41, 42, 43, 44, + 45, 46, 28, 129, 50, 126, 149, 28, 167, 126, + 14, 97, 144, 57, 34, 143, 57, 10, 11, 109, + 162, 162, 28, 29, 165, 167, 28, 29, 165, 167, + 143, 143, 126, 143, 126, 143, 122, 34, 102, 143, + 143, 28, 29, 33, 166, 168, 66, 157, 18, 126, + 12, 57, 126, 134, 135, 136, 137, 59, 54, 126, + 61, 57, 54, 63, 57, 126, 54, 126, 126, 126, + 126, 126, 126, 126, 126, 134, 63, 50, 161, 170, + 98, 126, 108, 112, 112, 21, 126, 100, 170, 126, + 17, 28, 153, 155, 157, 167, 126, 157, 158, 170, + 59, 82, 57, 126, 63, 148, 126, 126, 126, 59, + 5, 150, 143, 143, 126, 57, 28, 29, 167, 57, + 143, 28, 167, 18, 126, 12, 135, 54, 126, 9, + 151, 22, 23, 119, 170, 126, 156, 126, 155, 157, + 158, 126, 126, 6, 152, 126, 155, 153, 154, 28, + 143, 126, 57, 126, 63, 112, 143, 57, 126, 155, + 126, 143, 153, 155, 143, 143 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 75, 76, 76, 77, 77, 77, 78, 79, 78, - 80, 81, 82, 82, 82, 82, 82, 82, 83, 83, - 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, - 84, 85, 85, 85, 85, 86, 86, 86, 87, 87, - 88, 89, 90, 90, 91, 92, 94, 93, 95, 95, - 95, 95, 95, 95, 96, 96, 97, 98, 98, 98, - 99, 99, 101, 100, 103, 102, 105, 104, 106, 106, - 107, 108, 108, 108, 108, 109, 109, 110, 111, 111, - 112, 113, 114, 114, 115, 116, 116, 117, 118, 118, - 120, 121, 119, 122, 122, 122, 124, 123, 123, 125, - 125, 125, 125, 125, 125, 126, 126, 128, 127, 129, - 127, 130, 130, 130, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, - 132, 132, 133, 133, 134, 135, 134, 136, 136, 137, - 137, 139, 138, 140, 140, 141, 141, 142, 142, 144, - 143, 145, 145, 146, 146, 147, 147, 147, 147, 148, - 148, 149, 149, 150, 150, 150, 151, 151, 152, 152, - 152, 152, 153, 153, 154, 155, 154, 154, 154, 156, - 156, 156, 157, 157, 158, 158, 158, 158, 158, 159, - 158, 158, 158, 158, 160, 158, 161, 161, 162, 162, - 163, 163, 163, 163, 163, 164, 164, 164, 165, 165, - 166, 167, 167, 168 + 0, 76, 77, 77, 78, 78, 78, 79, 80, 79, + 81, 82, 83, 83, 83, 83, 83, 83, 84, 84, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 86, 86, 86, 86, 87, 87, 87, 88, 88, + 89, 90, 91, 91, 92, 93, 95, 94, 96, 96, + 96, 96, 96, 96, 97, 97, 98, 99, 99, 99, + 100, 100, 102, 101, 104, 103, 106, 105, 107, 107, + 108, 109, 109, 109, 109, 110, 110, 111, 112, 112, + 113, 114, 115, 115, 116, 117, 117, 118, 119, 119, + 121, 122, 120, 123, 123, 123, 125, 124, 124, 126, + 126, 126, 126, 126, 126, 127, 127, 129, 128, 130, + 128, 131, 131, 131, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, + 133, 133, 134, 134, 135, 136, 135, 137, 137, 138, + 138, 140, 139, 141, 141, 142, 142, 143, 143, 145, + 144, 146, 146, 147, 147, 148, 148, 148, 148, 149, + 149, 150, 150, 151, 151, 151, 152, 152, 153, 153, + 153, 153, 154, 154, 155, 156, 155, 155, 155, 157, + 157, 157, 158, 158, 159, 159, 159, 159, 159, 160, + 159, 159, 159, 159, 161, 159, 162, 162, 163, 163, + 164, 164, 164, 164, 164, 165, 165, 165, 166, 166, + 166, 167, 167, 168, 169, 169, 170 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1302,7 +1316,7 @@ static const yytype_uint8 yyr2[] = 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, 1, 1, 1, 1, 1, 1 }; @@ -2080,117 +2094,103 @@ yyreduce: switch (yyn) { case 2: -#line 343 "Aql/grammar.y" /* yacc.c:1646 */ +#line 347 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 2088 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2102 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 3: -#line 346 "Aql/grammar.y" /* yacc.c:1646 */ +#line 350 "Aql/grammar.y" /* yacc.c:1646 */ { char const* p = (yyvsp[0].node)->getStringValue(); size_t const len = (yyvsp[0].node)->getStringLength(); - if (len < 1 || *p != '@') { + + if (len < 2 || *p != '@') { parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), p, yylloc.first_line, yylloc.first_column); } + (yyval.node) = (yyvsp[0].node); } -#line 2101 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2117 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 4: -#line 357 "Aql/grammar.y" /* yacc.c:1646 */ +#line 363 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = static_cast(parser->peekStack()); node->addMember((yyvsp[0].node)); } -#line 2110 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2126 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 5: -#line 361 "Aql/grammar.y" /* yacc.c:1646 */ +#line 367 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = static_cast(parser->peekStack()); node->addMember((yyvsp[0].node)); } -#line 2119 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 6: -#line 365 "Aql/grammar.y" /* yacc.c:1646 */ - { - auto node = static_cast(parser->peekStack()); - node->addMember((yyvsp[0].node)); - } -#line 2128 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 7: -#line 372 "Aql/grammar.y" /* yacc.c:1646 */ - { - } #line 2135 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 8: -#line 374 "Aql/grammar.y" /* yacc.c:1646 */ + case 6: +#line 371 "Aql/grammar.y" /* yacc.c:1646 */ { - auto node = parser->ast()->createNodeArray(); - parser->pushStack(node); + auto node = static_cast(parser->peekStack()); + node->addMember((yyvsp[0].node)); } #line 2144 "Aql/grammar.cpp" /* yacc.c:1646 */ break; + case 7: +#line 378 "Aql/grammar.y" /* yacc.c:1646 */ + { + } +#line 2151 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 8: +#line 380 "Aql/grammar.y" /* yacc.c:1646 */ + { + auto node = parser->ast()->createNodeArray(); + parser->pushStack(node); + } +#line 2160 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + case 9: -#line 377 "Aql/grammar.y" /* yacc.c:1646 */ +#line 383 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = static_cast(parser->popStack()); auto withNode = parser->ast()->createNodeWithCollections(node); parser->ast()->addOperation(withNode); } -#line 2154 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2170 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 10: -#line 385 "Aql/grammar.y" /* yacc.c:1646 */ +#line 391 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2161 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2177 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 11: -#line 390 "Aql/grammar.y" /* yacc.c:1646 */ +#line 396 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2168 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2184 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 12: -#line 395 "Aql/grammar.y" /* yacc.c:1646 */ +#line 401 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2175 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 13: -#line 397 "Aql/grammar.y" /* yacc.c:1646 */ - { - parser->ast()->scopes()->endNested(); - } -#line 2183 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 14: -#line 400 "Aql/grammar.y" /* yacc.c:1646 */ - { - parser->ast()->scopes()->endNested(); - } #line 2191 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 15: + case 13: #line 403 "Aql/grammar.y" /* yacc.c:1646 */ { parser->ast()->scopes()->endNested(); @@ -2198,7 +2198,7 @@ yyreduce: #line 2199 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 16: + case 14: #line 406 "Aql/grammar.y" /* yacc.c:1646 */ { parser->ast()->scopes()->endNested(); @@ -2206,7 +2206,7 @@ yyreduce: #line 2207 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 17: + case 15: #line 409 "Aql/grammar.y" /* yacc.c:1646 */ { parser->ast()->scopes()->endNested(); @@ -2214,165 +2214,181 @@ yyreduce: #line 2215 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 18: + case 16: +#line 412 "Aql/grammar.y" /* yacc.c:1646 */ + { + parser->ast()->scopes()->endNested(); + } +#line 2223 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 17: #line 415 "Aql/grammar.y" /* yacc.c:1646 */ { + parser->ast()->scopes()->endNested(); } -#line 2222 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2231 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 18: +#line 421 "Aql/grammar.y" /* yacc.c:1646 */ + { + } +#line 2238 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 19: -#line 417 "Aql/grammar.y" /* yacc.c:1646 */ +#line 423 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2229 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2245 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 20: -#line 422 "Aql/grammar.y" /* yacc.c:1646 */ - { - } -#line 2236 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 21: -#line 424 "Aql/grammar.y" /* yacc.c:1646 */ - { - } -#line 2243 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 22: -#line 426 "Aql/grammar.y" /* yacc.c:1646 */ - { - } -#line 2250 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 23: #line 428 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2257 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2252 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 24: + case 21: #line 430 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2264 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2259 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 25: + case 22: #line 432 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2271 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2266 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 26: + case 23: #line 434 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2278 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2273 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 27: + case 24: #line 436 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2285 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2280 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 28: + case 25: #line 438 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2292 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2287 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 29: + case 26: #line 440 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2299 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2294 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 30: + case 27: #line 442 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2306 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2301 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 28: +#line 444 "Aql/grammar.y" /* yacc.c:1646 */ + { + } +#line 2308 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 29: +#line 446 "Aql/grammar.y" /* yacc.c:1646 */ + { + } +#line 2315 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 30: +#line 448 "Aql/grammar.y" /* yacc.c:1646 */ + { + } +#line 2322 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 31: -#line 447 "Aql/grammar.y" /* yacc.c:1646 */ +#line 453 "Aql/grammar.y" /* yacc.c:1646 */ { parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_FOR); auto node = parser->ast()->createNodeFor((yyvsp[-3].strval).value, (yyvsp[-3].strval).length, (yyvsp[0].node), true); parser->ast()->addOperation(node); } -#line 2317 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2333 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 32: -#line 453 "Aql/grammar.y" /* yacc.c:1646 */ +#line 459 "Aql/grammar.y" /* yacc.c:1646 */ { parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_FOR); auto node = parser->ast()->createNodeFor((yyvsp[-2].strval).value, (yyvsp[-2].strval).length, (yyvsp[0].node), true); parser->ast()->addOperation(node); } -#line 2328 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2344 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 33: -#line 459 "Aql/grammar.y" /* yacc.c:1646 */ +#line 465 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2335 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2351 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 34: -#line 461 "Aql/grammar.y" /* yacc.c:1646 */ +#line 467 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2342 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2358 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 35: -#line 466 "Aql/grammar.y" /* yacc.c:1646 */ +#line 472 "Aql/grammar.y" /* yacc.c:1646 */ { parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_FOR); auto node = parser->ast()->createNodeTraversal((yyvsp[-5].strval).value, (yyvsp[-5].strval).length, (yyvsp[-3].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2352 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2368 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 36: -#line 471 "Aql/grammar.y" /* yacc.c:1646 */ +#line 477 "Aql/grammar.y" /* yacc.c:1646 */ { parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_FOR); auto node = parser->ast()->createNodeTraversal((yyvsp[-7].strval).value, (yyvsp[-7].strval).length, (yyvsp[-5].strval).value, (yyvsp[-5].strval).length, (yyvsp[-3].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2362 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2378 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 37: -#line 476 "Aql/grammar.y" /* yacc.c:1646 */ +#line 482 "Aql/grammar.y" /* yacc.c:1646 */ { parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_FOR); auto node = parser->ast()->createNodeTraversal((yyvsp[-9].strval).value, (yyvsp[-9].strval).length, (yyvsp[-7].strval).value, (yyvsp[-7].strval).length, (yyvsp[-5].strval).value, (yyvsp[-5].strval).length, (yyvsp[-3].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2372 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2388 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 38: -#line 484 "Aql/grammar.y" /* yacc.c:1646 */ +#line 490 "Aql/grammar.y" /* yacc.c:1646 */ { 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); @@ -2381,11 +2397,11 @@ yyreduce: auto node = parser->ast()->createNodeShortestPath((yyvsp[-8].strval).value, (yyvsp[-8].strval).length, (yyvsp[-6].intval), (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2385 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2401 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 39: -#line 492 "Aql/grammar.y" /* yacc.c:1646 */ +#line 498 "Aql/grammar.y" /* yacc.c:1646 */ { 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); @@ -2394,51 +2410,51 @@ yyreduce: auto node = parser->ast()->createNodeShortestPath((yyvsp[-10].strval).value, (yyvsp[-10].strval).length, (yyvsp[-8].strval).value, (yyvsp[-8].strval).length, (yyvsp[-6].intval), (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2398 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2414 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 40: -#line 503 "Aql/grammar.y" /* yacc.c:1646 */ +#line 509 "Aql/grammar.y" /* yacc.c:1646 */ { // operand is a reference. can use it directly auto node = parser->ast()->createNodeFilter((yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2408 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2424 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 41: -#line 511 "Aql/grammar.y" /* yacc.c:1646 */ +#line 517 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2415 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2431 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 42: -#line 516 "Aql/grammar.y" /* yacc.c:1646 */ +#line 522 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2422 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 43: -#line 518 "Aql/grammar.y" /* yacc.c:1646 */ - { - } -#line 2429 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 44: -#line 523 "Aql/grammar.y" /* yacc.c:1646 */ - { - auto node = parser->ast()->createNodeLet((yyvsp[-2].strval).value, (yyvsp[-2].strval).length, (yyvsp[0].node), true); - parser->ast()->addOperation(node); - } #line 2438 "Aql/grammar.cpp" /* yacc.c:1646 */ break; + case 43: +#line 524 "Aql/grammar.y" /* yacc.c:1646 */ + { + } +#line 2445 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 44: +#line 529 "Aql/grammar.y" /* yacc.c:1646 */ + { + auto node = parser->ast()->createNodeLet((yyvsp[-2].strval).value, (yyvsp[-2].strval).length, (yyvsp[0].node), true); + parser->ast()->addOperation(node); + } +#line 2454 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + case 45: -#line 530 "Aql/grammar.y" /* yacc.c:1646 */ +#line 536 "Aql/grammar.y" /* yacc.c:1646 */ { 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); @@ -2446,20 +2462,20 @@ yyreduce: (yyval.strval) = (yyvsp[0].strval); } -#line 2450 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2466 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 46: -#line 540 "Aql/grammar.y" /* yacc.c:1646 */ +#line 546 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 2459 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2475 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 47: -#line 543 "Aql/grammar.y" /* yacc.c:1646 */ +#line 549 "Aql/grammar.y" /* yacc.c:1646 */ { auto list = static_cast(parser->popStack()); @@ -2468,11 +2484,11 @@ yyreduce: } (yyval.node) = list; } -#line 2472 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2488 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 48: -#line 554 "Aql/grammar.y" /* yacc.c:1646 */ +#line 560 "Aql/grammar.y" /* yacc.c:1646 */ { /* COLLECT WITH COUNT INTO var OPTIONS ... */ auto scopes = parser->ast()->scopes(); @@ -2482,11 +2498,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 2486 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2502 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 49: -#line 563 "Aql/grammar.y" /* yacc.c:1646 */ +#line 569 "Aql/grammar.y" /* yacc.c:1646 */ { /* COLLECT var = expr WITH COUNT INTO var OPTIONS ... */ auto scopes = parser->ast()->scopes(); @@ -2498,11 +2514,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 2502 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2518 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 50: -#line 574 "Aql/grammar.y" /* yacc.c:1646 */ +#line 580 "Aql/grammar.y" /* yacc.c:1646 */ { /* AGGREGATE var = expr OPTIONS ... */ auto scopes = parser->ast()->scopes(); @@ -2533,11 +2549,11 @@ yyreduce: auto node = parser->ast()->createNodeCollect(parser->ast()->createNodeArray(), (yyvsp[-2].node), into, intoExpression, nullptr, (yyvsp[-1].node)); parser->ast()->addOperation(node); } -#line 2537 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2553 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 51: -#line 604 "Aql/grammar.y" /* yacc.c:1646 */ +#line 610 "Aql/grammar.y" /* yacc.c:1646 */ { /* COLLECT var = expr AGGREGATE var = expr OPTIONS ... */ auto scopes = parser->ast()->scopes(); @@ -2605,11 +2621,11 @@ yyreduce: auto node = parser->ast()->createNodeCollect((yyvsp[-3].node), (yyvsp[-2].node), into, intoExpression, nullptr, (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2609 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2625 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 52: -#line 671 "Aql/grammar.y" /* yacc.c:1646 */ +#line 677 "Aql/grammar.y" /* yacc.c:1646 */ { /* COLLECT var = expr INTO var OPTIONS ... */ auto scopes = parser->ast()->scopes(); @@ -2635,11 +2651,11 @@ yyreduce: auto node = parser->ast()->createNodeCollect((yyvsp[-2].node), parser->ast()->createNodeArray(), into, intoExpression, nullptr, (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2639 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2655 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 53: -#line 696 "Aql/grammar.y" /* yacc.c:1646 */ +#line 702 "Aql/grammar.y" /* yacc.c:1646 */ { /* COLLECT var = expr INTO var KEEP ... OPTIONS ... */ auto scopes = parser->ast()->scopes(); @@ -2670,61 +2686,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 2674 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2690 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 54: -#line 729 "Aql/grammar.y" /* yacc.c:1646 */ +#line 735 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2681 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 55: -#line 731 "Aql/grammar.y" /* yacc.c:1646 */ - { - } -#line 2688 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 56: -#line 736 "Aql/grammar.y" /* yacc.c:1646 */ - { - auto node = parser->ast()->createNodeAssign((yyvsp[-2].strval).value, (yyvsp[-2].strval).length, (yyvsp[0].node)); - parser->pushArrayElement(node); - } #line 2697 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 57: -#line 743 "Aql/grammar.y" /* yacc.c:1646 */ + case 55: +#line 737 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = nullptr; } -#line 2705 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2704 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 58: -#line 746 "Aql/grammar.y" /* yacc.c:1646 */ + case 56: +#line 742 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); + auto node = parser->ast()->createNodeAssign((yyvsp[-2].strval).value, (yyvsp[-2].strval).length, (yyvsp[0].node)); + parser->pushArrayElement(node); } #line 2713 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 59: + case 57: #line 749 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = nullptr; + } +#line 2721 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 58: +#line 752 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); + } +#line 2729 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 59: +#line 755 "Aql/grammar.y" /* yacc.c:1646 */ { 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 2724 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2740 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 60: -#line 758 "Aql/grammar.y" /* yacc.c:1646 */ +#line 764 "Aql/grammar.y" /* yacc.c:1646 */ { 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); @@ -2739,11 +2755,11 @@ yyreduce: node->setFlag(FLAG_KEEP_VARIABLENAME); parser->pushArrayElement(node); } -#line 2743 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2759 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 61: -#line 772 "Aql/grammar.y" /* yacc.c:1646 */ +#line 778 "Aql/grammar.y" /* yacc.c:1646 */ { 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); @@ -2758,11 +2774,11 @@ yyreduce: node->setFlag(FLAG_KEEP_VARIABLENAME); parser->pushArrayElement(node); } -#line 2762 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2778 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 62: -#line 789 "Aql/grammar.y" /* yacc.c:1646 */ +#line 795 "Aql/grammar.y" /* yacc.c:1646 */ { 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); @@ -2771,158 +2787,158 @@ yyreduce: auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 2775 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2791 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 63: -#line 796 "Aql/grammar.y" /* yacc.c:1646 */ +#line 802 "Aql/grammar.y" /* yacc.c:1646 */ { auto list = static_cast(parser->popStack()); (yyval.node) = list; } -#line 2784 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2800 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 64: -#line 803 "Aql/grammar.y" /* yacc.c:1646 */ +#line 809 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 2793 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2809 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 65: -#line 806 "Aql/grammar.y" /* yacc.c:1646 */ +#line 812 "Aql/grammar.y" /* yacc.c:1646 */ { auto list = static_cast(parser->popStack()); (yyval.node) = list; } -#line 2802 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2818 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 66: -#line 813 "Aql/grammar.y" /* yacc.c:1646 */ +#line 819 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 2811 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2827 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 67: -#line 816 "Aql/grammar.y" /* yacc.c:1646 */ +#line 822 "Aql/grammar.y" /* yacc.c:1646 */ { auto list = static_cast(parser->popStack()); auto node = parser->ast()->createNodeSort(list); parser->ast()->addOperation(node); } -#line 2821 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 68: -#line 824 "Aql/grammar.y" /* yacc.c:1646 */ - { - parser->pushArrayElement((yyvsp[0].node)); - } -#line 2829 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 69: -#line 827 "Aql/grammar.y" /* yacc.c:1646 */ - { - parser->pushArrayElement((yyvsp[0].node)); - } #line 2837 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 70: -#line 833 "Aql/grammar.y" /* yacc.c:1646 */ + case 68: +#line 830 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeSortElement((yyvsp[-1].node), (yyvsp[0].node)); + parser->pushArrayElement((yyvsp[0].node)); } #line 2845 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 71: -#line 839 "Aql/grammar.y" /* yacc.c:1646 */ + case 69: +#line 833 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeValueBool(true); + parser->pushArrayElement((yyvsp[0].node)); } #line 2853 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 72: -#line 842 "Aql/grammar.y" /* yacc.c:1646 */ + case 70: +#line 839 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeValueBool(true); + (yyval.node) = parser->ast()->createNodeSortElement((yyvsp[-1].node), (yyvsp[0].node)); } #line 2861 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 73: + case 71: #line 845 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeValueBool(false); + (yyval.node) = parser->ast()->createNodeValueBool(true); } #line 2869 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 74: + case 72: #line 848 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[0].node); + (yyval.node) = parser->ast()->createNodeValueBool(true); } #line 2877 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 75: + case 73: +#line 851 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeValueBool(false); + } +#line 2885 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 74: #line 854 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 2893 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 75: +#line 860 "Aql/grammar.y" /* yacc.c:1646 */ { auto offset = parser->ast()->createNodeValueInt(0); auto node = parser->ast()->createNodeLimit(offset, (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2887 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2903 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 76: -#line 859 "Aql/grammar.y" /* yacc.c:1646 */ +#line 865 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = parser->ast()->createNodeLimit((yyvsp[-2].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2896 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2912 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 77: -#line 866 "Aql/grammar.y" /* yacc.c:1646 */ +#line 872 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = parser->ast()->createNodeReturn((yyvsp[0].node)); parser->ast()->addOperation(node); parser->ast()->scopes()->endNested(); } -#line 2906 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 78: -#line 874 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = (yyvsp[0].node); - } -#line 2914 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 79: -#line 877 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = (yyvsp[0].node); - } #line 2922 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 80: + case 78: +#line 880 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 2930 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 79: #line 883 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 2938 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 80: +#line 889 "Aql/grammar.y" /* yacc.c:1646 */ { if (! parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -2930,11 +2946,11 @@ yyreduce: auto node = parser->ast()->createNodeRemove((yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2934 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2950 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 81: -#line 893 "Aql/grammar.y" /* yacc.c:1646 */ +#line 899 "Aql/grammar.y" /* yacc.c:1646 */ { if (! parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -2942,11 +2958,11 @@ yyreduce: auto node = parser->ast()->createNodeInsert((yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2946 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2962 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 82: -#line 903 "Aql/grammar.y" /* yacc.c:1646 */ +#line 909 "Aql/grammar.y" /* yacc.c:1646 */ { if (! parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -2955,11 +2971,11 @@ yyreduce: AstNode* node = parser->ast()->createNodeUpdate(nullptr, (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2959 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2975 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 83: -#line 911 "Aql/grammar.y" /* yacc.c:1646 */ +#line 917 "Aql/grammar.y" /* yacc.c:1646 */ { if (! parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -2968,18 +2984,18 @@ yyreduce: AstNode* node = parser->ast()->createNodeUpdate((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2972 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2988 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 84: -#line 922 "Aql/grammar.y" /* yacc.c:1646 */ +#line 928 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 2979 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 2995 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 85: -#line 927 "Aql/grammar.y" /* yacc.c:1646 */ +#line 933 "Aql/grammar.y" /* yacc.c:1646 */ { if (! parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -2988,11 +3004,11 @@ yyreduce: AstNode* node = parser->ast()->createNodeReplace(nullptr, (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 2992 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3008 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 86: -#line 935 "Aql/grammar.y" /* yacc.c:1646 */ +#line 941 "Aql/grammar.y" /* yacc.c:1646 */ { if (! parser->configureWriteQuery((yyvsp[-1].node), (yyvsp[0].node))) { YYABORT; @@ -3001,44 +3017,44 @@ yyreduce: AstNode* node = parser->ast()->createNodeReplace((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); parser->ast()->addOperation(node); } -#line 3005 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3021 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 87: -#line 946 "Aql/grammar.y" /* yacc.c:1646 */ +#line 952 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 3012 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 88: -#line 951 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.intval) = static_cast(NODE_TYPE_UPDATE); - } -#line 3020 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 89: -#line 954 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.intval) = static_cast(NODE_TYPE_REPLACE); - } #line 3028 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 90: + case 88: +#line 957 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.intval) = static_cast(NODE_TYPE_UPDATE); + } +#line 3036 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 89: #line 960 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.intval) = static_cast(NODE_TYPE_REPLACE); + } +#line 3044 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 90: +#line 966 "Aql/grammar.y" /* yacc.c:1646 */ { // 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 3038 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3054 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 91: -#line 964 "Aql/grammar.y" /* yacc.c:1646 */ +#line 970 "Aql/grammar.y" /* yacc.c:1646 */ { AstNode* variableNode = static_cast(parser->popStack()); @@ -3078,11 +3094,11 @@ yyreduce: parser->pushStack(forNode); } -#line 3082 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3098 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 92: -#line 1002 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1008 "Aql/grammar.y" /* yacc.c:1646 */ { AstNode* forNode = static_cast(parser->popStack()); forNode->changeMember(1, (yyvsp[-1].node)); @@ -3094,35 +3110,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 3098 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 93: -#line 1016 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = parser->ast()->createNodeQuantifier(Quantifier::ALL); - } -#line 3106 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 94: -#line 1019 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = parser->ast()->createNodeQuantifier(Quantifier::ANY); - } #line 3114 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 95: + case 93: #line 1022 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeQuantifier(Quantifier::NONE); + (yyval.node) = parser->ast()->createNodeQuantifier(Quantifier::ALL); } #line 3122 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 96: + case 94: +#line 1025 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeQuantifier(Quantifier::ANY); + } +#line 3130 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 95: #line 1028 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeQuantifier(Quantifier::NONE); + } +#line 3138 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 96: +#line 1034 "Aql/grammar.y" /* yacc.c:1646 */ { auto const scopeType = parser->ast()->scopes()->type(); @@ -3131,42 +3147,26 @@ yyreduce: parser->registerParseError(TRI_ERROR_QUERY_PARSE, "cannot use DISTINCT modifier on top-level query element", yylloc.first_line, yylloc.first_column); } } -#line 3135 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 97: -#line 1035 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = parser->ast()->createNodeDistinct((yyvsp[0].node)); - } -#line 3143 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 98: -#line 1038 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = (yyvsp[0].node); - } #line 3151 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 99: -#line 1044 "Aql/grammar.y" /* yacc.c:1646 */ + case 97: +#line 1041 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[0].node); + (yyval.node) = parser->ast()->createNodeDistinct((yyvsp[0].node)); } #line 3159 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 100: -#line 1047 "Aql/grammar.y" /* yacc.c:1646 */ + case 98: +#line 1044 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); } #line 3167 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 101: + case 99: #line 1050 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); @@ -3174,7 +3174,7 @@ yyreduce: #line 3175 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 102: + case 100: #line 1053 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); @@ -3182,7 +3182,7 @@ yyreduce: #line 3183 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 103: + case 101: #line 1056 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); @@ -3190,24 +3190,40 @@ yyreduce: #line 3191 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 104: + case 102: #line 1059 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeRange((yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = (yyvsp[0].node); } #line 3199 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 105: -#line 1065 "Aql/grammar.y" /* yacc.c:1646 */ + case 103: +#line 1062 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.strval) = (yyvsp[0].strval); + (yyval.node) = (yyvsp[0].node); } #line 3207 "Aql/grammar.cpp" /* yacc.c:1646 */ break; + case 104: +#line 1065 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeRange((yyvsp[-2].node), (yyvsp[0].node)); + } +#line 3215 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 105: +#line 1071 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.strval) = (yyvsp[0].strval); + } +#line 3223 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + case 106: -#line 1068 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1074 "Aql/grammar.y" /* yacc.c:1646 */ { std::string temp((yyvsp[-2].strval).value, (yyvsp[-2].strval).length); temp.append("::"); @@ -3221,215 +3237,215 @@ yyreduce: (yyval.strval).value = p; (yyval.strval).length = temp.size(); } -#line 3225 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3241 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 107: -#line 1084 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1090 "Aql/grammar.y" /* yacc.c:1646 */ { parser->pushStack((yyvsp[-1].strval).value); auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 3236 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3252 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 108: -#line 1089 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1095 "Aql/grammar.y" /* yacc.c:1646 */ { auto list = static_cast(parser->popStack()); (yyval.node) = parser->ast()->createNodeFunctionCall(static_cast(parser->popStack()), list); } -#line 3245 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3261 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 109: -#line 1093 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1099 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 3254 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3270 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 110: -#line 1096 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1102 "Aql/grammar.y" /* yacc.c:1646 */ { auto list = static_cast(parser->popStack()); (yyval.node) = parser->ast()->createNodeFunctionCall(TRI_CHAR_LENGTH_PAIR("LIKE"), list); } -#line 3263 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 111: -#line 1103 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_PLUS, (yyvsp[0].node)); - } -#line 3271 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 112: -#line 1106 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_MINUS, (yyvsp[0].node)); - } #line 3279 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 113: + case 111: #line 1109 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_NOT, (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_PLUS, (yyvsp[0].node)); } #line 3287 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 114: -#line 1115 "Aql/grammar.y" /* yacc.c:1646 */ + case 112: +#line 1112 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_OR, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_MINUS, (yyvsp[0].node)); } #line 3295 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 115: -#line 1118 "Aql/grammar.y" /* yacc.c:1646 */ + case 113: +#line 1115 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_AND, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeUnaryOperator(NODE_TYPE_OPERATOR_UNARY_NOT, (yyvsp[0].node)); } #line 3303 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 116: + case 114: #line 1121 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_PLUS, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_OR, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3311 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 117: + case 115: #line 1124 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_MINUS, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_AND, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3319 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 118: + case 116: #line 1127 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_TIMES, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_PLUS, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3327 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 119: + case 117: #line 1130 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_DIV, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_MINUS, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3335 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 120: + case 118: #line 1133 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_MOD, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_TIMES, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3343 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 121: + case 119: #line 1136 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_EQ, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_DIV, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3351 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 122: + case 120: #line 1139 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_NE, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_MOD, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3359 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 123: + case 121: #line 1142 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_LT, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_EQ, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3367 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 124: + case 122: #line 1145 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_GT, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_NE, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3375 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 125: + case 123: #line 1148 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_LE, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_LT, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3383 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 126: + case 124: #line 1151 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_GE, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_GT, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3391 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 127: + case 125: #line 1154 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_IN, (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_LE, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3399 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 128: + case 126: #line 1157 "Aql/grammar.y" /* yacc.c:1646 */ { - (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_GE, (yyvsp[-2].node), (yyvsp[0].node)); } #line 3407 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 129: + case 127: #line 1160 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_IN, (yyvsp[-2].node), (yyvsp[0].node)); + } +#line 3415 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 128: +#line 1163 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeBinaryOperator(NODE_TYPE_OPERATOR_BINARY_NIN, (yyvsp[-2].node), (yyvsp[0].node)); + } +#line 3423 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 129: +#line 1166 "Aql/grammar.y" /* yacc.c:1646 */ { 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 3418 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3434 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 130: -#line 1166 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1172 "Aql/grammar.y" /* yacc.c:1646 */ { 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 3429 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3445 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 131: -#line 1172 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1178 "Aql/grammar.y" /* yacc.c:1646 */ { AstNode* arguments = parser->ast()->createNodeArray(2); arguments->addMember((yyvsp[-2].node)); @@ -3437,122 +3453,122 @@ 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 3441 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 132: -#line 1179 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_EQ, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); - } -#line 3449 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 133: -#line 1182 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NE, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); - } #line 3457 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 134: + case 132: #line 1185 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_LT, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_EQ, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } #line 3465 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 135: + case 133: #line 1188 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_GT, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NE, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } #line 3473 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 136: + case 134: #line 1191 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_LE, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_LT, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } #line 3481 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 137: + case 135: #line 1194 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_GE, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_GT, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } #line 3489 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 138: + case 136: #line 1197 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_IN, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_LE, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } #line 3497 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 139: + case 137: #line 1200 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NIN, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_GE, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } #line 3505 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 140: -#line 1206 "Aql/grammar.y" /* yacc.c:1646 */ + case 138: +#line 1203 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeTernaryOperator((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_IN, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } #line 3513 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 141: -#line 1209 "Aql/grammar.y" /* yacc.c:1646 */ + case 139: +#line 1206 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeTernaryOperator((yyvsp[-3].node), (yyvsp[-3].node), (yyvsp[0].node)); + (yyval.node) = parser->ast()->createNodeBinaryArrayOperator(NODE_TYPE_OPERATOR_BINARY_ARRAY_NIN, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-2].node)); } #line 3521 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 142: + case 140: +#line 1212 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeTernaryOperator((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); + } +#line 3529 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 141: #line 1215 "Aql/grammar.y" /* yacc.c:1646 */ { + (yyval.node) = parser->ast()->createNodeTernaryOperator((yyvsp[-3].node), (yyvsp[-3].node), (yyvsp[0].node)); } -#line 3528 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3537 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 142: +#line 1221 "Aql/grammar.y" /* yacc.c:1646 */ + { + } +#line 3544 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 143: -#line 1217 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1223 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 3535 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3551 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 144: -#line 1222 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1228 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); } -#line 3543 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3559 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 145: -#line 1225 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1231 "Aql/grammar.y" /* yacc.c:1646 */ { parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_SUBQUERY); parser->ast()->startSubQuery(); } -#line 3552 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3568 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 146: -#line 1228 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1234 "Aql/grammar.y" /* yacc.c:1646 */ { AstNode* node = parser->ast()->endSubQuery(); parser->ast()->scopes()->endCurrent(); @@ -3563,98 +3579,98 @@ yyreduce: (yyval.node) = parser->ast()->createNodeReference(variableName); } -#line 3567 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 147: -#line 1241 "Aql/grammar.y" /* yacc.c:1646 */ - { - parser->pushArrayElement((yyvsp[0].node)); - } -#line 3575 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 148: -#line 1244 "Aql/grammar.y" /* yacc.c:1646 */ - { - parser->pushArrayElement((yyvsp[0].node)); - } #line 3583 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 149: -#line 1250 "Aql/grammar.y" /* yacc.c:1646 */ + case 147: +#line 1247 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[0].node); + parser->pushArrayElement((yyvsp[0].node)); } #line 3591 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 150: -#line 1253 "Aql/grammar.y" /* yacc.c:1646 */ + case 148: +#line 1250 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[0].node); + parser->pushArrayElement((yyvsp[0].node)); } #line 3599 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 151: + case 149: +#line 1256 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 3607 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 150: #line 1259 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 3615 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 151: +#line 1265 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); } -#line 3608 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3624 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 152: -#line 1262 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1268 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = static_cast(parser->popStack()); } -#line 3616 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3632 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 153: -#line 1268 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1274 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 3623 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3639 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 154: -#line 1270 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1276 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 3630 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 155: -#line 1275 "Aql/grammar.y" /* yacc.c:1646 */ - { - parser->pushArrayElement((yyvsp[0].node)); - } -#line 3638 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 156: -#line 1278 "Aql/grammar.y" /* yacc.c:1646 */ - { - parser->pushArrayElement((yyvsp[0].node)); - } #line 3646 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 157: -#line 1284 "Aql/grammar.y" /* yacc.c:1646 */ + case 155: +#line 1281 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = nullptr; + parser->pushArrayElement((yyvsp[0].node)); } #line 3654 "Aql/grammar.cpp" /* yacc.c:1646 */ break; + case 156: +#line 1284 "Aql/grammar.y" /* yacc.c:1646 */ + { + parser->pushArrayElement((yyvsp[0].node)); + } +#line 3662 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 157: +#line 1290 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = nullptr; + } +#line 3670 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + case 158: -#line 1287 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1293 "Aql/grammar.y" /* yacc.c:1646 */ { if ((yyvsp[0].node) == nullptr) { ABORT_OOM @@ -3666,56 +3682,56 @@ yyreduce: (yyval.node) = (yyvsp[0].node); } -#line 3670 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3686 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 159: -#line 1301 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1307 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = parser->ast()->createNodeObject(); parser->pushStack(node); } -#line 3679 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3695 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 160: -#line 1304 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1310 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = static_cast(parser->popStack()); } -#line 3687 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3703 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 161: -#line 1310 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1316 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 3694 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3710 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 162: -#line 1312 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1318 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 3701 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3717 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 163: -#line 1317 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1323 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 3708 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3724 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 164: -#line 1319 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1325 "Aql/grammar.y" /* yacc.c:1646 */ { } -#line 3715 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3731 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 165: -#line 1324 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1330 "Aql/grammar.y" /* yacc.c:1646 */ { // attribute-name-only (comparable to JS enhanced object literals, e.g. { foo, bar }) auto ast = parser->ast(); @@ -3730,20 +3746,20 @@ yyreduce: auto node = ast->createNodeReference(variable); parser->pushObjectElement((yyvsp[0].strval).value, (yyvsp[0].strval).length, node); } -#line 3734 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3750 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 166: -#line 1338 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1344 "Aql/grammar.y" /* yacc.c:1646 */ { // attribute-name : attribute-value parser->pushObjectElement((yyvsp[-2].strval).value, (yyvsp[-2].strval).length, (yyvsp[0].node)); } -#line 3743 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3759 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 167: -#line 1342 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1348 "Aql/grammar.y" /* yacc.c:1646 */ { // bind-parameter : attribute-value if ((yyvsp[-2].strval).length < 1 || (yyvsp[-2].strval).value[0] == '@') { @@ -3753,245 +3769,230 @@ yyreduce: auto param = parser->ast()->createNodeParameter((yyvsp[-2].strval).value, (yyvsp[-2].strval).length); parser->pushObjectElement(param, (yyvsp[0].node)); } -#line 3757 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3773 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 168: -#line 1351 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1357 "Aql/grammar.y" /* yacc.c:1646 */ { // [ attribute-name-expression ] : attribute-value parser->pushObjectElement((yyvsp[-3].node), (yyvsp[0].node)); } -#line 3766 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 169: -#line 1358 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.intval) = 1; - } -#line 3774 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 170: -#line 1361 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.intval) = (yyvsp[-1].intval) + 1; - } #line 3782 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 171: -#line 1367 "Aql/grammar.y" /* yacc.c:1646 */ + case 169: +#line 1364 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = nullptr; + (yyval.intval) = 1; } #line 3790 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 172: -#line 1370 "Aql/grammar.y" /* yacc.c:1646 */ + case 170: +#line 1367 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[0].node); + (yyval.intval) = (yyvsp[-1].intval) + 1; } #line 3798 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 173: -#line 1376 "Aql/grammar.y" /* yacc.c:1646 */ + case 171: +#line 1373 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = nullptr; } #line 3806 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 174: -#line 1379 "Aql/grammar.y" /* yacc.c:1646 */ + case 172: +#line 1376 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeArrayLimit(nullptr, (yyvsp[0].node)); + (yyval.node) = (yyvsp[0].node); } #line 3814 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 175: + case 173: #line 1382 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeArrayLimit((yyvsp[-2].node), (yyvsp[0].node)); + (yyval.node) = nullptr; } #line 3822 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 176: -#line 1388 "Aql/grammar.y" /* yacc.c:1646 */ + case 174: +#line 1385 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = nullptr; + (yyval.node) = parser->ast()->createNodeArrayLimit(nullptr, (yyvsp[0].node)); } #line 3830 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 177: -#line 1391 "Aql/grammar.y" /* yacc.c:1646 */ + case 175: +#line 1388 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[0].node); + (yyval.node) = parser->ast()->createNodeArrayLimit((yyvsp[-2].node), (yyvsp[0].node)); } #line 3838 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 178: -#line 1397 "Aql/grammar.y" /* yacc.c:1646 */ + case 176: +#line 1394 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); + (yyval.node) = nullptr; } #line 3846 "Aql/grammar.cpp" /* yacc.c:1646 */ break; - case 179: -#line 1400 "Aql/grammar.y" /* yacc.c:1646 */ + case 177: +#line 1397 "Aql/grammar.y" /* yacc.c:1646 */ { - char const* p = (yyvsp[0].node)->getStringValue(); - size_t const len = (yyvsp[0].node)->getStringLength(); - if (len < 1 || *p != '@') { - parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), p, yylloc.first_line, yylloc.first_column); - } (yyval.node) = (yyvsp[0].node); } -#line 3859 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3854 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 178: +#line 1403 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); + } +#line 3862 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 179: +#line 1406 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 3870 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 180: -#line 1408 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1409 "Aql/grammar.y" /* yacc.c:1646 */ { auto tmp = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); (yyval.node) = parser->ast()->createNodeCollectionDirection((yyvsp[-1].intval), tmp); } -#line 3868 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3879 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 181: -#line 1412 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1413 "Aql/grammar.y" /* yacc.c:1646 */ { - char const* p = (yyvsp[0].node)->getStringValue(); - size_t const len = (yyvsp[0].node)->getStringLength(); - if (len < 1 || *p != '@') { - parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), p, yylloc.first_line, yylloc.first_column); - } (yyval.node) = parser->ast()->createNodeCollectionDirection((yyvsp[-1].intval), (yyvsp[0].node)); } -#line 3881 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3887 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 182: +#line 1419 "Aql/grammar.y" /* yacc.c:1646 */ + { + auto node = static_cast(parser->peekStack()); + node->addMember((yyvsp[0].node)); + } +#line 3896 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 183: #line 1423 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = static_cast(parser->peekStack()); node->addMember((yyvsp[0].node)); } -#line 3890 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 183: -#line 1427 "Aql/grammar.y" /* yacc.c:1646 */ - { - auto node = static_cast(parser->peekStack()); - node->addMember((yyvsp[0].node)); - } -#line 3899 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3905 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 184: -#line 1434 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1430 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = parser->ast()->createNodeArray(); node->addMember((yyvsp[0].node)); (yyval.node) = parser->ast()->createNodeCollectionList(node); } -#line 3909 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3915 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 185: -#line 1439 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1435 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = parser->ast()->createNodeArray(); parser->pushStack(node); node->addMember((yyvsp[-1].node)); } -#line 3919 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3925 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 186: -#line 1443 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1439 "Aql/grammar.y" /* yacc.c:1646 */ { auto node = static_cast(parser->popStack()); (yyval.node) = parser->ast()->createNodeCollectionList(node); } -#line 3928 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3934 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 187: -#line 1447 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1443 "Aql/grammar.y" /* yacc.c:1646 */ { // graph name - char const* p = (yyvsp[0].node)->getStringValue(); - size_t const len = (yyvsp[0].node)->getStringLength(); - if (len < 1 || *p == '@') { - parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), p, yylloc.first_line, yylloc.first_column); - } (yyval.node) = (yyvsp[0].node); } -#line 3942 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3943 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 188: -#line 1456 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1447 "Aql/grammar.y" /* yacc.c:1646 */ { // graph name (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 3951 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3952 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 189: -#line 1465 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1456 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.intval) = 2; } -#line 3959 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3960 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 190: -#line 1468 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1459 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.intval) = 1; } -#line 3967 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3968 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 191: -#line 1471 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1462 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.intval) = 0; } -#line 3975 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3976 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 192: -#line 1477 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1468 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = parser->ast()->createNodeDirection((yyvsp[0].intval), 1); } -#line 3983 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3984 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 193: -#line 1480 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1471 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = parser->ast()->createNodeDirection((yyvsp[0].intval), (yyvsp[-1].node)); } -#line 3991 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 3992 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 194: -#line 1486 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1477 "Aql/grammar.y" /* yacc.c:1646 */ { // variable or collection auto ast = parser->ast(); @@ -4024,27 +4025,27 @@ yyreduce: (yyval.node) = node; } -#line 4028 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4029 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 195: -#line 1518 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1509 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); } -#line 4036 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4037 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 196: -#line 1521 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1512 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); } -#line 4044 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4045 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 197: -#line 1524 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1515 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); @@ -4052,11 +4053,11 @@ yyreduce: ABORT_OOM } } -#line 4056 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4057 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 198: -#line 1531 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1522 "Aql/grammar.y" /* yacc.c:1646 */ { if ((yyvsp[-1].node)->type == NODE_TYPE_EXPANSION) { // create a dummy passthru node that reduces and evaluates the expansion first @@ -4067,20 +4068,20 @@ yyreduce: (yyval.node) = (yyvsp[-1].node); } } -#line 4071 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4072 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 199: -#line 1541 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1532 "Aql/grammar.y" /* yacc.c:1646 */ { parser->ast()->scopes()->start(arangodb::aql::AQL_SCOPE_SUBQUERY); parser->ast()->startSubQuery(); } -#line 4080 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4081 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 200: -#line 1544 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1535 "Aql/grammar.y" /* yacc.c:1646 */ { AstNode* node = parser->ast()->endSubQuery(); parser->ast()->scopes()->endCurrent(); @@ -4091,11 +4092,11 @@ yyreduce: (yyval.node) = parser->ast()->createNodeReference(variableName); } -#line 4095 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4096 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 201: -#line 1554 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1545 "Aql/grammar.y" /* yacc.c:1646 */ { // named variable access, e.g. variable.reference if ((yyvsp[-2].node)->type == NODE_TYPE_EXPANSION) { @@ -4111,11 +4112,11 @@ yyreduce: (yyval.node) = parser->ast()->createNodeAttributeAccess((yyvsp[-2].node), (yyvsp[0].strval).value, (yyvsp[0].strval).length); } } -#line 4115 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4116 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 202: -#line 1569 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1560 "Aql/grammar.y" /* yacc.c:1646 */ { // named variable access, e.g. variable.@reference if ((yyvsp[-2].node)->type == NODE_TYPE_EXPANSION) { @@ -4130,11 +4131,11 @@ yyreduce: (yyval.node) = parser->ast()->createNodeBoundAttributeAccess((yyvsp[-2].node), (yyvsp[0].node)); } } -#line 4134 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4135 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 203: -#line 1583 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1574 "Aql/grammar.y" /* yacc.c:1646 */ { // indexed variable access, e.g. variable[index] if ((yyvsp[-3].node)->type == NODE_TYPE_EXPANSION) { @@ -4149,11 +4150,11 @@ yyreduce: (yyval.node) = parser->ast()->createNodeIndexedAccess((yyvsp[-3].node), (yyvsp[-1].node)); } } -#line 4153 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4154 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 204: -#line 1597 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1588 "Aql/grammar.y" /* yacc.c:1646 */ { // variable expansion, e.g. variable[*], with optional FILTER, LIMIT and RETURN clauses if ((yyvsp[0].intval) > 1 && (yyvsp[-2].node)->type == NODE_TYPE_EXPANSION) { @@ -4177,11 +4178,11 @@ yyreduce: auto scopes = parser->ast()->scopes(); scopes->stackCurrentVariable(scopes->getVariable(nextName)); } -#line 4181 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4182 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 205: -#line 1619 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1610 "Aql/grammar.y" /* yacc.c:1646 */ { auto scopes = parser->ast()->scopes(); scopes->unstackCurrentVariable(); @@ -4200,27 +4201,27 @@ 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 4204 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4205 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 206: -#line 1640 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1631 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); } -#line 4212 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4213 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 207: -#line 1643 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1634 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); } -#line 4220 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4221 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 208: -#line 1649 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1640 "Aql/grammar.y" /* yacc.c:1646 */ { if ((yyvsp[0].node) == nullptr) { ABORT_OOM @@ -4228,11 +4229,11 @@ yyreduce: (yyval.node) = (yyvsp[0].node); } -#line 4232 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4233 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 209: -#line 1656 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1647 "Aql/grammar.y" /* yacc.c:1646 */ { if ((yyvsp[0].node) == nullptr) { ABORT_OOM @@ -4240,127 +4241,155 @@ yyreduce: (yyval.node) = (yyvsp[0].node); } -#line 4244 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4245 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 210: -#line 1666 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1657 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = parser->ast()->createNodeValueString((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 4252 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4253 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 211: -#line 1669 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1660 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = (yyvsp[0].node); } -#line 4260 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4261 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 212: -#line 1672 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1663 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = parser->ast()->createNodeValueNull(); } -#line 4268 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4269 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 213: -#line 1675 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1666 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = parser->ast()->createNodeValueBool(true); } -#line 4276 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4277 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 214: -#line 1678 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1669 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = parser->ast()->createNodeValueBool(false); } -#line 4284 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4285 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 215: -#line 1684 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1675 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = parser->ast()->createNodeCollection((yyvsp[0].strval).value, arangodb::AccessMode::Type::WRITE); } -#line 4292 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4293 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 216: -#line 1687 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1678 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.node) = parser->ast()->createNodeCollection((yyvsp[0].strval).value, arangodb::AccessMode::Type::WRITE); } -#line 4300 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4301 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 217: +#line 1681 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 4309 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 218: +#line 1687 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeView((yyvsp[0].strval).value); + } +#line 4317 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 219: #line 1690 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = parser->ast()->createNodeView((yyvsp[0].strval).value); + } +#line 4325 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 220: +#line 1693 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.node) = (yyvsp[0].node); + } +#line 4333 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 221: +#line 1699 "Aql/grammar.y" /* yacc.c:1646 */ { 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()->createNodeParameter((yyvsp[0].strval).value, (yyvsp[0].strval).length); + (yyval.node) = parser->ast()->createNodeParameter((yyvsp[0].strval).value, (yyvsp[0].strval).length, AstNode::DataSourceType::Collection); } -#line 4312 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 218: -#line 1700 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = parser->ast()->createNodeView((yyvsp[0].strval).value); - } -#line 4320 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 219: -#line 1703 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = parser->ast()->createNodeView((yyvsp[0].strval).value); - } -#line 4328 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 220: -#line 1709 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.node) = parser->ast()->createNodeParameter((yyvsp[0].strval).value, (yyvsp[0].strval).length); - } -#line 4336 "Aql/grammar.cpp" /* yacc.c:1646 */ - break; - - case 221: -#line 1715 "Aql/grammar.y" /* yacc.c:1646 */ - { - (yyval.strval) = (yyvsp[0].strval); - } -#line 4344 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4345 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 222: -#line 1718 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1706 "Aql/grammar.y" /* yacc.c:1646 */ { - (yyval.strval) = (yyvsp[0].strval); + (yyval.node) = parser->ast()->createNodeParameter((yyvsp[0].strval).value, (yyvsp[0].strval).length); } -#line 4352 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4353 "Aql/grammar.cpp" /* yacc.c:1646 */ break; case 223: -#line 1723 "Aql/grammar.y" /* yacc.c:1646 */ +#line 1712 "Aql/grammar.y" /* yacc.c:1646 */ + { + 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()->createNodeParameter((yyvsp[0].strval).value, (yyvsp[0].strval).length, AstNode::DataSourceType::View); + } +#line 4365 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 224: +#line 1722 "Aql/grammar.y" /* yacc.c:1646 */ { (yyval.strval) = (yyvsp[0].strval); } -#line 4360 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4373 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 225: +#line 1725 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.strval) = (yyvsp[0].strval); + } +#line 4381 "Aql/grammar.cpp" /* yacc.c:1646 */ + break; + + case 226: +#line 1730 "Aql/grammar.y" /* yacc.c:1646 */ + { + (yyval.strval) = (yyvsp[0].strval); + } +#line 4389 "Aql/grammar.cpp" /* yacc.c:1646 */ break; -#line 4364 "Aql/grammar.cpp" /* yacc.c:1646 */ +#line 4393 "Aql/grammar.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/arangod/Aql/grammar.h b/arangod/Aql/grammar.h index fed9081267..aa4627dbf1 100644 --- a/arangod/Aql/grammar.h +++ b/arangod/Aql/grammar.h @@ -76,47 +76,48 @@ extern int Aqldebug; T_INTEGER = 285, T_DOUBLE = 286, T_PARAMETER = 287, - T_ASSIGN = 288, - T_NOT = 289, - T_AND = 290, - T_OR = 291, - T_NIN = 292, - 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, - FUNCCALL = 325, - REFERENCE = 326, - INDEXED = 327, - EXPANSION = 328 + T_DATA_SOURCE_PARAMETER = 288, + T_ASSIGN = 289, + 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, + FUNCCALL = 326, + REFERENCE = 327, + INDEXED = 328, + EXPANSION = 329 }; #endif @@ -125,7 +126,7 @@ extern int Aqldebug; union YYSTYPE { -#line 20 "Aql/grammar.y" /* yacc.c:1909 */ +#line 21 "Aql/grammar.y" /* yacc.c:1909 */ arangodb::aql::AstNode* node; struct { @@ -135,7 +136,7 @@ union YYSTYPE bool boolval; int64_t intval; -#line 139 "Aql/grammar.hpp" /* yacc.c:1909 */ +#line 140 "Aql/grammar.hpp" /* yacc.c:1909 */ }; typedef union YYSTYPE YYSTYPE; diff --git a/arangod/Aql/grammar.hpp b/arangod/Aql/grammar.hpp index fed9081267..aa4627dbf1 100644 --- a/arangod/Aql/grammar.hpp +++ b/arangod/Aql/grammar.hpp @@ -76,47 +76,48 @@ extern int Aqldebug; T_INTEGER = 285, T_DOUBLE = 286, T_PARAMETER = 287, - T_ASSIGN = 288, - T_NOT = 289, - T_AND = 290, - T_OR = 291, - T_NIN = 292, - 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, - FUNCCALL = 325, - REFERENCE = 326, - INDEXED = 327, - EXPANSION = 328 + T_DATA_SOURCE_PARAMETER = 288, + T_ASSIGN = 289, + 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, + FUNCCALL = 326, + REFERENCE = 327, + INDEXED = 328, + EXPANSION = 329 }; #endif @@ -125,7 +126,7 @@ extern int Aqldebug; union YYSTYPE { -#line 20 "Aql/grammar.y" /* yacc.c:1909 */ +#line 21 "Aql/grammar.y" /* yacc.c:1909 */ arangodb::aql::AstNode* node; struct { @@ -135,7 +136,7 @@ union YYSTYPE bool boolval; int64_t intval; -#line 139 "Aql/grammar.hpp" /* yacc.c:1909 */ +#line 140 "Aql/grammar.hpp" /* yacc.c:1909 */ }; typedef union YYSTYPE YYSTYPE; diff --git a/arangod/Aql/grammar.y b/arangod/Aql/grammar.y index 590ed36faf..a47c6f61d1 100644 --- a/arangod/Aql/grammar.y +++ b/arangod/Aql/grammar.y @@ -15,6 +15,7 @@ #include "Basics/conversions.h" #include "Basics/tri-strings.h" #include "VocBase/AccessMode.h" +#include %} %union { @@ -205,6 +206,7 @@ static AstNode const* GetIntoExpression(AstNode const* node) { %token T_INTEGER "integer number" %token T_DOUBLE "number" %token T_PARAMETER "bind parameter" +%token T_DATA_SOURCE_PARAMETER "bind data source parameter" %token T_ASSIGN "assignment" @@ -282,6 +284,7 @@ static AstNode const* GetIntoExpression(AstNode const* node) { %type T_INTEGER %type T_DOUBLE %type T_PARAMETER; +%type T_DATA_SOURCE_PARAMETER; %type with_collection; %type sort_list; %type sort_element; @@ -328,6 +331,7 @@ static AstNode const* GetIntoExpression(AstNode const* node) { %type view_name; %type in_or_into_collection; %type bind_parameter; +%type bind_view; %type variable_name; %type numeric_value; %type update_or_replace; @@ -346,9 +350,11 @@ with_collection: | bind_parameter { char const* p = $1->getStringValue(); size_t const len = $1->getStringLength(); - if (len < 1 || *p != '@') { + + if (len < 2 || *p != '@') { parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), p, yylloc.first_line, yylloc.first_column); } + $$ = $1; } ; @@ -1398,11 +1404,6 @@ graph_collection: $$ = parser->ast()->createNodeValueString($1.value, $1.length); } | bind_parameter { - char const* p = $1->getStringValue(); - size_t const len = $1->getStringLength(); - if (len < 1 || *p != '@') { - parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), p, yylloc.first_line, yylloc.first_column); - } $$ = $1; } | graph_direction T_STRING { @@ -1410,11 +1411,6 @@ graph_collection: $$ = parser->ast()->createNodeCollectionDirection($1, tmp); } | graph_direction bind_parameter { - char const* p = $2->getStringValue(); - size_t const len = $2->getStringLength(); - if (len < 1 || *p != '@') { - parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), p, yylloc.first_line, yylloc.first_column); - } $$ = parser->ast()->createNodeCollectionDirection($1, $2); } ; @@ -1446,11 +1442,6 @@ graph_subject: } | T_GRAPH bind_parameter { // graph name - char const* p = $2->getStringValue(); - size_t const len = $2->getStringLength(); - if (len < 1 || *p == '@') { - parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), p, yylloc.first_line, yylloc.first_column); - } $$ = $2; } | T_GRAPH T_QUOTED_STRING { @@ -1687,12 +1678,8 @@ collection_name: | T_QUOTED_STRING { $$ = parser->ast()->createNodeCollection($1.value, arangodb::AccessMode::Type::WRITE); } - | T_PARAMETER { - if ($1.length < 2 || $1.value[0] != '@') { - parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), $1.value, yylloc.first_line, yylloc.first_column); - } - - $$ = parser->ast()->createNodeParameter($1.value, $1.length); + | bind_parameter { + $$ = $1; } ; @@ -1703,14 +1690,34 @@ view_name: | T_QUOTED_STRING { $$ = parser->ast()->createNodeView($1.value); } - ; // TODO: add parameter case + | bind_view { + $$ = $1; + } + ; bind_parameter: - T_PARAMETER { + T_DATA_SOURCE_PARAMETER { + if ($1.length < 2 || $1.value[0] != '@') { + parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), $1.value, yylloc.first_line, yylloc.first_column); + } + + $$ = parser->ast()->createNodeParameter($1.value, $1.length, AstNode::DataSourceType::Collection); + } + | T_PARAMETER { $$ = parser->ast()->createNodeParameter($1.value, $1.length); } ; +bind_view: + T_DATA_SOURCE_PARAMETER { + if ($1.length < 2 || $1.value[0] != '@') { + parser->registerParseError(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, TRI_errno_string(TRI_ERROR_QUERY_BIND_PARAMETER_TYPE), $1.value, yylloc.first_line, yylloc.first_column); + } + + $$ = parser->ast()->createNodeParameter($1.value, $1.length, AstNode::DataSourceType::View); + } + ; + object_element_name: T_STRING { $$ = $1; diff --git a/arangod/Aql/tokens.cpp b/arangod/Aql/tokens.cpp index 369d35a07e..968d9ec25f 100644 --- a/arangod/Aql/tokens.cpp +++ b/arangod/Aql/tokens.cpp @@ -555,8 +555,8 @@ static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); -#define YY_NUM_RULES 101 -#define YY_END_OF_BUFFER 102 +#define YY_NUM_RULES 102 +#define YY_END_OF_BUFFER 103 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -564,37 +564,37 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[263] = +static yyconst flex_int16_t yy_accept[269] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 102, 100, 87, 88, - 44, 74, 100, 51, 100, 79, 57, 58, 49, 47, - 56, 48, 100, 50, 84, 84, 54, 42, 43, 40, - 52, 100, 63, 63, 63, 63, 63, 63, 63, 63, + 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, - 100, 64, 59, 100, 60, 100, 68, 67, 68, 65, + 101, 64, 59, 101, 60, 101, 68, 67, 68, 65, 73, 72, 73, 73, 83, 82, 80, 83, 78, 77, - 75, 78, 91, 90, 94, 96, 95, 99, 98, 98, - 99, 87, 38, 36, 63, 45, 55, 92, 89, 0, + 75, 78, 92, 91, 95, 97, 96, 100, 99, 99, + 100, 88, 38, 36, 63, 45, 55, 93, 90, 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, 14, 63, 63, 63, 63, 63, 63, 63, 63, 63, 0, 46, 69, - 66, 71, 70, 81, 76, 91, 94, 93, 97, 85, - 0, 85, 86, 86, 63, 28, 13, 27, 10, 63, - 63, 63, 63, 63, 1, 63, 63, 63, 63, 2, - 63, 63, 63, 12, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 86, 86, - 63, 63, 11, 63, 63, 63, 63, 63, 63, 16, + 66, 71, 70, 81, 76, 92, 95, 94, 98, 85, + 0, 85, 86, 87, 0, 86, 63, 28, 13, 27, + 10, 63, 63, 63, 63, 63, 1, 63, 63, 63, + 63, 2, 63, 63, 63, 12, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 87, 87, 86, 86, 63, 63, 11, 63, 63, 63, - 30, 63, 29, 32, 63, 63, 63, 63, 63, 6, - 33, 63, 63, 31, 17, 63, 63, 63, 34, 63, - 23, 63, 63, 7, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 3, 63, 19, 63, 18, 63, - 4, 63, 20, 22, 63, 5, 63, 26, 63, 21, - 63, 63, 8, 25, 63, 9, 63, 63, 63, 63, - 24, 0 + 63, 63, 63, 16, 30, 63, 29, 32, 63, 63, + 63, 63, 63, 6, 33, 63, 63, 31, 17, 87, + 87, 63, 63, 63, 34, 63, 23, 63, 63, 7, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 3, 63, 19, 63, 18, 63, 4, 63, 20, 22, + 63, 5, 63, 26, 63, 21, 63, 63, 8, 25, + 63, 9, 63, 63, 63, 63, 24, 0 } ; static yyconst YY_CHAR yy_ec[256] = @@ -642,77 +642,81 @@ static yyconst YY_CHAR yy_meta[82] = 1 } ; -static yyconst flex_uint16_t yy_base[286] = +static yyconst flex_uint16_t yy_base[297] = { 0, 0, 0, 79, 80, 81, 84, 85, 86, 87, 88, - 420, 417, 93, 94, 83, 105, 419, 572, 412, 572, - 76, 572, 0, 572, 400, 572, 572, 572, 572, 572, - 572, 572, 378, 87, 84, 93, 369, 336, 79, 276, - 572, 88, 83, 0, 79, 94, 134, 79, 88, 127, - 119, 121, 86, 136, 108, 130, 138, 144, 572, 572, - 228, 572, 572, 173, 572, 168, 572, 572, 0, 572, - 572, 572, 0, 161, 572, 572, 572, 0, 572, 572, - 572, 0, 0, 572, 0, 572, 216, 572, 572, 572, - 136, 177, 572, 572, 0, 572, 572, 572, 572, 84, + 434, 430, 93, 94, 83, 105, 430, 587, 426, 587, + 76, 587, 0, 587, 419, 587, 587, 587, 587, 587, + 587, 587, 410, 87, 84, 93, 399, 396, 79, 393, + 587, 88, 83, 0, 79, 94, 134, 79, 88, 127, + 119, 121, 86, 136, 108, 130, 138, 144, 587, 587, + 362, 587, 587, 327, 587, 309, 587, 587, 0, 587, + 587, 587, 0, 220, 587, 587, 587, 0, 587, 587, + 587, 0, 0, 587, 0, 587, 280, 587, 587, 587, + 136, 245, 587, 587, 0, 587, 587, 587, 587, 84, - 192, 164, 572, 572, 572, 572, 572, 0, 156, 121, - 0, 152, 150, 170, 164, 167, 166, 170, 178, 179, - 175, 169, 194, 175, 188, 186, 191, 0, 185, 222, - 192, 192, 190, 225, 209, 203, 251, 118, 572, 572, - 572, 572, 572, 572, 572, 0, 0, 572, 572, 253, - 257, 259, 0, 89, 216, 0, 0, 0, 0, 236, - 251, 237, 243, 244, 0, 248, 251, 254, 252, 0, - 264, 262, 267, 0, 262, 274, 264, 268, 261, 267, - 266, 272, 288, 287, 273, 288, 0, 309, 73, 0, - 293, 304, 0, 301, 308, 309, 307, 298, 302, 0, + 192, 164, 587, 587, 587, 587, 587, 0, 189, 186, + 0, 149, 150, 170, 156, 155, 161, 165, 176, 178, + 174, 169, 193, 173, 188, 186, 191, 0, 185, 221, + 193, 192, 194, 225, 191, 202, 251, 180, 587, 587, + 587, 587, 587, 587, 587, 0, 0, 587, 587, 253, + 256, 258, 0, 0, 127, 121, 216, 0, 0, 0, + 0, 230, 222, 235, 237, 237, 0, 246, 248, 254, + 250, 0, 261, 259, 266, 0, 261, 272, 261, 265, + 259, 263, 265, 280, 287, 286, 271, 287, 0, 304, + 0, 118, 89, 0, 296, 300, 0, 299, 304, 305, + + 304, 294, 298, 0, 0, 298, 0, 0, 303, 300, + 321, 307, 306, 0, 0, 307, 310, 0, 0, 73, + 0, 321, 327, 318, 0, 317, 0, 321, 320, 0, + 323, 341, 344, 335, 350, 352, 341, 362, 346, 364, + 0, 364, 0, 357, 0, 364, 0, 354, 0, 0, + 354, 0, 358, 0, 374, 0, 361, 376, 0, 0, + 66, 0, 368, 381, 367, 380, 0, 587, 441, 448, + 455, 462, 469, 476, 483, 104, 487, 491, 493, 500, + 507, 514, 521, 528, 535, 539, 543, 547, 551, 555, + 559, 563, 567, 571, 575, 579 - 0, 302, 0, 0, 308, 304, 315, 310, 309, 0, - 0, 310, 313, 0, 0, 324, 329, 320, 0, 318, - 0, 325, 321, 0, 327, 344, 348, 339, 353, 358, - 346, 367, 351, 368, 0, 368, 0, 361, 0, 368, - 0, 358, 0, 0, 359, 0, 362, 0, 378, 0, - 365, 380, 0, 0, 66, 0, 371, 387, 371, 385, - 0, 572, 446, 453, 460, 467, 474, 481, 488, 104, - 492, 496, 498, 505, 512, 519, 526, 533, 540, 544, - 548, 552, 556, 560, 564 } ; -static yyconst flex_int16_t yy_def[286] = +static yyconst flex_int16_t yy_def[297] = { 0, - 262, 1, 263, 263, 264, 264, 265, 265, 266, 266, - 267, 267, 268, 268, 269, 269, 262, 262, 262, 262, - 262, 262, 270, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 271, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 262, 262, - 273, 262, 262, 262, 262, 262, 262, 262, 274, 262, - 262, 262, 275, 262, 262, 262, 262, 276, 262, 262, - 262, 277, 278, 262, 279, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 272, 262, 262, 262, 262, 262, + 268, 1, 269, 269, 270, 270, 271, 271, 272, 272, + 273, 273, 274, 274, 275, 275, 268, 268, 268, 268, + 268, 268, 276, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 277, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 268, 268, + 279, 268, 268, 268, 268, 268, 268, 268, 280, 268, + 268, 268, 281, 268, 268, 268, 268, 282, 268, 268, + 268, 283, 284, 268, 285, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 278, 268, 268, 268, 268, 268, - 262, 262, 262, 262, 262, 262, 262, 280, 271, 281, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 282, 273, 262, 262, - 262, 262, 262, 262, 262, 278, 279, 262, 262, 262, - 262, 262, 280, 283, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 284, 282, 283, 285, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 268, 268, 268, 268, 268, 268, 268, 286, 287, 288, + 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 289, 279, 268, 268, + 268, 268, 268, 268, 268, 284, 285, 268, 268, 268, + 268, 268, 286, 290, 291, 292, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 293, 289, + 290, 294, 292, 295, 278, 278, 278, 278, 278, 278, + + 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 278, 294, + 296, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 0, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268 - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 0, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262 } ; -static yyconst flex_uint16_t yy_nxt[654] = +static yyconst flex_uint16_t yy_nxt[669] = { 0, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, @@ -726,69 +730,70 @@ static yyconst flex_uint16_t yy_nxt[654] = 80, 81, 81, 77, 77, 86, 86, 93, 98, 100, 105, 150, 150, 99, 87, 87, 89, 90, 100, 95, - 102, 102, 109, 101, 112, 130, 91, 257, 116, 113, - 122, 114, 101, 117, 190, 115, 123, 118, 69, 69, + 102, 102, 109, 101, 112, 130, 91, 263, 116, 113, + 122, 114, 101, 117, 221, 115, 123, 118, 69, 69, 73, 70, 70, 73, 78, 78, 82, 82, 91, 110, - 190, 101, 112, 130, 91, 116, 113, 122, 114, 133, + 194, 101, 112, 130, 91, 116, 113, 122, 114, 133, 101, 117, 115, 123, 94, 118, 124, 106, 126, 119, - 125, 74, 128, 127, 74, 129, 91, 120, 131, 138, - 134, 135, 110, 121, 149, 132, 133, 136, 92, 100, - 262, 102, 102, 155, 124, 126, 156, 119, 125, 128, - 127, 159, 129, 101, 166, 120, 131, 134, 157, 135, + 125, 74, 128, 127, 74, 129, 91, 120, 131, 221, + 134, 135, 194, 121, 149, 132, 133, 136, 155, 100, + 157, 102, 102, 161, 124, 126, 158, 119, 125, 128, + 127, 162, 129, 101, 168, 120, 131, 134, 159, 135, - 121, 149, 132, 160, 151, 136, 151, 110, 161, 152, - 152, 155, 162, 156, 163, 164, 165, 158, 170, 159, - 167, 101, 166, 171, 173, 172, 157, 175, 176, 174, - 160, 180, 148, 181, 182, 161, 168, 169, 185, 162, - 143, 163, 164, 165, 158, 170, 186, 140, 167, 139, - 171, 173, 172, 183, 175, 176, 174, 191, 180, 177, - 181, 182, 178, 168, 169, 179, 185, 184, 187, 187, - 150, 150, 192, 186, 152, 152, 152, 152, 193, 138, - 194, 183, 101, 199, 191, 195, 177, 196, 197, 178, - 198, 200, 179, 201, 184, 202, 203, 107, 204, 192, + 121, 149, 132, 163, 151, 136, 151, 164, 157, 152, + 152, 161, 165, 158, 166, 167, 172, 160, 162, 169, + 187, 101, 168, 173, 175, 174, 159, 177, 178, 176, + 163, 138, 182, 183, 164, 170, 171, 110, 184, 165, + 155, 166, 167, 172, 160, 188, 92, 169, 187, 197, + 173, 175, 174, 185, 177, 178, 176, 195, 179, 182, + 183, 180, 170, 171, 181, 184, 196, 186, 189, 189, + 150, 150, 188, 152, 152, 152, 152, 197, 198, 199, + 200, 185, 101, 203, 195, 179, 201, 202, 180, 204, + 205, 181, 206, 196, 186, 207, 148, 208, 209, 143, - 205, 211, 187, 206, 207, 208, 193, 194, 209, 210, - 101, 199, 195, 212, 196, 197, 213, 198, 200, 214, - 215, 201, 216, 202, 203, 204, 187, 187, 205, 211, - 206, 207, 208, 217, 218, 209, 210, 219, 220, 221, - 227, 212, 222, 223, 213, 224, 214, 225, 215, 226, - 216, 228, 229, 230, 231, 232, 233, 104, 234, 235, - 187, 217, 218, 236, 237, 219, 220, 221, 227, 222, - 223, 238, 224, 239, 225, 240, 226, 241, 228, 229, - 230, 231, 242, 232, 233, 234, 235, 243, 103, 244, - 236, 237, 245, 97, 246, 247, 248, 250, 238, 249, + 210, 211, 189, 212, 213, 198, 199, 200, 214, 215, + 101, 203, 216, 201, 202, 217, 204, 218, 205, 219, + 206, 189, 189, 207, 208, 222, 209, 210, 211, 223, + 212, 213, 224, 225, 226, 214, 227, 215, 228, 229, + 216, 230, 231, 217, 218, 232, 233, 219, 234, 235, + 236, 237, 238, 222, 239, 189, 240, 223, 241, 242, + 224, 225, 226, 243, 227, 228, 229, 244, 230, 231, + 245, 246, 232, 247, 233, 234, 235, 236, 237, 248, + 238, 249, 239, 240, 250, 241, 242, 251, 140, 252, + 243, 253, 254, 256, 244, 255, 257, 258, 245, 246, - 251, 239, 252, 240, 241, 253, 254, 96, 255, 256, - 242, 258, 259, 92, 260, 243, 244, 261, 262, 84, - 245, 246, 84, 247, 248, 250, 249, 251, 262, 252, - 262, 262, 253, 262, 254, 255, 262, 256, 258, 262, - 259, 260, 262, 262, 262, 261, 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, 79, 79, 79, 83, 83, 83, 83, 83, 83, - 83, 85, 85, 85, 85, 85, 85, 85, 88, 88, - 88, 88, 88, 88, 88, 108, 108, 108, 108, 111, + 247, 259, 260, 139, 261, 262, 265, 248, 264, 249, + 266, 250, 267, 138, 107, 251, 252, 104, 103, 253, + 254, 256, 255, 257, 258, 97, 96, 92, 259, 268, + 260, 261, 84, 262, 265, 264, 84, 266, 268, 268, + 267, 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, 79, 79, 79, 83, + 83, 83, 83, 83, 83, 83, 85, 85, 85, 85, + 85, 85, 85, 88, 88, 88, 88, 88, 88, 88, + 108, 108, 108, 108, 111, 268, 111, 111, 137, 137, - 262, 111, 111, 137, 137, 141, 262, 141, 141, 141, - 141, 141, 142, 262, 142, 142, 142, 142, 142, 144, - 262, 144, 144, 144, 144, 144, 145, 262, 145, 145, - 145, 145, 145, 146, 262, 146, 146, 146, 146, 146, - 147, 262, 262, 147, 147, 147, 147, 153, 262, 153, - 153, 154, 262, 154, 154, 188, 262, 188, 188, 189, - 262, 189, 189, 187, 262, 187, 187, 190, 262, 190, - 190, 17, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 141, 268, 141, 141, 141, 141, 141, 142, 268, 142, + 142, 142, 142, 142, 144, 268, 144, 144, 144, 144, + 144, 145, 268, 145, 145, 145, 145, 145, 146, 268, + 146, 146, 146, 146, 146, 147, 268, 268, 147, 147, + 147, 147, 153, 268, 153, 153, 154, 268, 154, 154, + 156, 268, 156, 156, 190, 268, 190, 190, 191, 268, + 191, 191, 192, 268, 192, 192, 193, 268, 193, 193, + 189, 268, 189, 189, 220, 268, 220, 220, 194, 268, + 194, 194, 221, 268, 221, 221, 17, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262 + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268 } ; -static yyconst flex_int16_t yy_chk[654] = +static yyconst flex_int16_t yy_chk[669] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -801,79 +806,80 @@ static yyconst flex_int16_t yy_chk[654] = 1, 3, 4, 5, 15, 15, 6, 7, 8, 9, 10, 9, 10, 7, 8, 13, 14, 21, 34, 35, - 39, 100, 100, 34, 13, 14, 16, 16, 36, 270, - 36, 36, 42, 35, 43, 53, 15, 255, 45, 43, - 48, 43, 36, 46, 189, 43, 49, 46, 3, 4, + 39, 100, 100, 34, 13, 14, 16, 16, 36, 276, + 36, 36, 42, 35, 43, 53, 15, 261, 45, 43, + 48, 43, 36, 46, 220, 43, 49, 46, 3, 4, 5, 3, 4, 6, 7, 8, 9, 10, 16, 42, - 154, 35, 43, 53, 15, 45, 43, 48, 43, 55, + 193, 35, 43, 53, 15, 45, 43, 48, 43, 55, 36, 46, 43, 49, 21, 46, 50, 39, 51, 47, - 50, 5, 52, 51, 6, 52, 16, 47, 54, 138, - 56, 57, 110, 47, 91, 54, 55, 58, 92, 102, - 109, 102, 102, 112, 50, 51, 113, 47, 50, 52, - 51, 115, 52, 102, 122, 47, 54, 56, 114, 57, + 50, 5, 52, 51, 6, 52, 16, 47, 54, 192, + 56, 57, 156, 47, 91, 54, 55, 58, 155, 102, + 112, 102, 102, 115, 50, 51, 113, 47, 50, 52, + 51, 116, 52, 102, 122, 47, 54, 56, 114, 57, - 47, 91, 54, 116, 101, 58, 101, 109, 117, 101, - 101, 112, 118, 113, 119, 120, 121, 114, 124, 115, - 123, 102, 122, 125, 126, 125, 114, 127, 129, 126, - 116, 131, 87, 132, 133, 117, 123, 123, 135, 118, - 74, 119, 120, 121, 114, 124, 136, 66, 123, 64, - 125, 126, 125, 134, 127, 129, 126, 155, 131, 130, - 132, 133, 130, 123, 123, 130, 135, 134, 137, 137, - 150, 150, 160, 136, 151, 151, 152, 152, 161, 61, - 162, 134, 150, 168, 155, 163, 130, 164, 166, 130, - 167, 169, 130, 171, 134, 172, 173, 40, 175, 160, + 47, 91, 54, 117, 101, 58, 101, 118, 112, 101, + 101, 115, 119, 113, 120, 121, 124, 114, 116, 123, + 135, 102, 122, 125, 126, 125, 114, 127, 129, 126, + 117, 138, 131, 132, 118, 123, 123, 110, 133, 119, + 109, 120, 121, 124, 114, 136, 92, 123, 135, 163, + 125, 126, 125, 134, 127, 129, 126, 157, 130, 131, + 132, 130, 123, 123, 130, 133, 162, 134, 137, 137, + 150, 150, 136, 151, 151, 152, 152, 163, 164, 165, + 166, 134, 150, 170, 157, 130, 168, 169, 130, 171, + 173, 130, 174, 162, 134, 175, 87, 177, 178, 74, - 176, 182, 137, 177, 178, 179, 161, 162, 180, 181, - 150, 168, 163, 183, 164, 166, 184, 167, 169, 185, - 186, 171, 191, 172, 173, 175, 188, 188, 176, 182, - 177, 178, 179, 192, 194, 180, 181, 195, 196, 197, - 207, 183, 198, 199, 184, 202, 185, 205, 186, 206, - 191, 208, 209, 212, 213, 216, 217, 38, 218, 220, - 188, 192, 194, 222, 223, 195, 196, 197, 207, 198, - 199, 225, 202, 226, 205, 227, 206, 228, 208, 209, - 212, 213, 229, 216, 217, 218, 220, 230, 37, 231, - 222, 223, 232, 33, 233, 234, 236, 240, 225, 238, + 179, 180, 137, 181, 182, 164, 165, 166, 183, 184, + 150, 170, 185, 168, 169, 186, 171, 187, 173, 188, + 174, 190, 190, 175, 177, 195, 178, 179, 180, 196, + 181, 182, 198, 199, 200, 183, 201, 184, 202, 203, + 185, 206, 209, 186, 187, 210, 211, 188, 212, 213, + 216, 217, 222, 195, 223, 190, 224, 196, 226, 228, + 198, 199, 200, 229, 201, 202, 203, 231, 206, 209, + 232, 233, 210, 234, 211, 212, 213, 216, 217, 235, + 222, 236, 223, 224, 237, 226, 228, 238, 66, 239, + 229, 240, 242, 246, 231, 244, 248, 251, 232, 233, - 242, 226, 245, 227, 228, 247, 249, 25, 251, 252, - 229, 257, 258, 19, 259, 230, 231, 260, 17, 12, - 232, 233, 11, 234, 236, 240, 238, 242, 0, 245, - 0, 0, 247, 0, 249, 251, 0, 252, 257, 0, - 258, 259, 0, 0, 0, 260, 263, 263, 263, 263, - 263, 263, 263, 264, 264, 264, 264, 264, 264, 264, - 265, 265, 265, 265, 265, 265, 265, 266, 266, 266, - 266, 266, 266, 266, 267, 267, 267, 267, 267, 267, - 267, 268, 268, 268, 268, 268, 268, 268, 269, 269, - 269, 269, 269, 269, 269, 271, 271, 271, 271, 272, + 234, 253, 255, 64, 257, 258, 264, 235, 263, 236, + 265, 237, 266, 61, 40, 238, 239, 38, 37, 240, + 242, 246, 244, 248, 251, 33, 25, 19, 253, 17, + 255, 257, 12, 258, 264, 263, 11, 265, 0, 0, + 266, 269, 269, 269, 269, 269, 269, 269, 270, 270, + 270, 270, 270, 270, 270, 271, 271, 271, 271, 271, + 271, 271, 272, 272, 272, 272, 272, 272, 272, 273, + 273, 273, 273, 273, 273, 273, 274, 274, 274, 274, + 274, 274, 274, 275, 275, 275, 275, 275, 275, 275, + 277, 277, 277, 277, 278, 0, 278, 278, 279, 279, - 0, 272, 272, 273, 273, 274, 0, 274, 274, 274, - 274, 274, 275, 0, 275, 275, 275, 275, 275, 276, - 0, 276, 276, 276, 276, 276, 277, 0, 277, 277, - 277, 277, 277, 278, 0, 278, 278, 278, 278, 278, - 279, 0, 0, 279, 279, 279, 279, 280, 0, 280, - 280, 281, 0, 281, 281, 282, 0, 282, 282, 283, - 0, 283, 283, 284, 0, 284, 284, 285, 0, 285, - 285, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 280, 0, 280, 280, 280, 280, 280, 281, 0, 281, + 281, 281, 281, 281, 282, 0, 282, 282, 282, 282, + 282, 283, 0, 283, 283, 283, 283, 283, 284, 0, + 284, 284, 284, 284, 284, 285, 0, 0, 285, 285, + 285, 285, 286, 0, 286, 286, 287, 0, 287, 287, + 288, 0, 288, 288, 289, 0, 289, 289, 290, 0, + 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, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 262 + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268 } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[102] = +static yyconst 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, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, - 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, }; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -1381,13 +1387,13 @@ yy_match: 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 >= 263 ) + if ( yy_current_state >= 269 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; ++yy_cp; } - while ( yy_current_state != 262 ); + while ( yy_current_state != 268 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -2030,23 +2036,36 @@ case 86: YY_RULE_SETUP { /* bind parameters must start with a @ - if followed by another @, this is a collection name parameter */ + 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 /* --------------------------------------------------------------------------- - * whitespace etc. + * 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 88: -/* rule 88 can match eol */ +case 89: +/* rule 89 can match eol */ YY_RULE_SETUP { yycolumn = 0; @@ -2055,14 +2074,14 @@ YY_RULE_SETUP /* --------------------------------------------------------------------------- * comments * --------------------------------------------------------------------------- */ -case 89: +case 90: YY_RULE_SETUP { BEGIN(COMMENT_SINGLE); } YY_BREAK -case 90: -/* rule 90 can match eol */ +case 91: +/* rule 91 can match eol */ YY_RULE_SETUP { /* line numbers are counted elsewhere already */ @@ -2070,38 +2089,38 @@ YY_RULE_SETUP BEGIN(INITIAL); } YY_BREAK -case 91: +case 92: YY_RULE_SETUP { /* everything else */ } YY_BREAK -case 92: +case 93: YY_RULE_SETUP { BEGIN(COMMENT_MULTI); } YY_BREAK -case 93: +case 94: YY_RULE_SETUP { BEGIN(INITIAL); } YY_BREAK -case 94: +case 95: YY_RULE_SETUP { // eat comment in chunks } YY_BREAK -case 95: +case 96: YY_RULE_SETUP { // eat the lone star } YY_BREAK -case 96: -/* rule 96 can match eol */ +case 97: +/* rule 97 can match eol */ YY_RULE_SETUP { /* line numbers are counted elsewhere already */ @@ -2111,7 +2130,7 @@ YY_RULE_SETUP /* --------------------------------------------------------------------------- * special transformation for NOT IN to T_NIN * --------------------------------------------------------------------------- */ -case 97: +case 98: YY_RULE_SETUP { /* T_NOT + T_IN => T_NIN */ @@ -2119,14 +2138,14 @@ YY_RULE_SETUP return T_NIN; } YY_BREAK -case 98: -/* rule 98 can match eol */ +case 99: +/* rule 99 can match eol */ YY_RULE_SETUP { /* ignore whitespace */ } YY_BREAK -case 99: +case 100: YY_RULE_SETUP { /* found something different to T_IN */ @@ -2145,14 +2164,14 @@ case YY_STATE_EOF(NOT): return T_NOT; } YY_BREAK -case 100: +case 101: YY_RULE_SETUP { /* anything else is returned as it is */ return (int) yytext[0]; } YY_BREAK -case 101: +case 102: YY_RULE_SETUP ECHO; YY_BREAK @@ -2464,7 +2483,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) 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 >= 263 ) + if ( yy_current_state >= 269 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; @@ -2494,11 +2513,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) 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 >= 263 ) + if ( yy_current_state >= 269 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 262); + yy_is_jam = (yy_current_state == 268); (void)yyg; return yy_is_jam ? 0 : yy_current_state; diff --git a/arangod/Aql/tokens.ll b/arangod/Aql/tokens.ll index 2550c2325a..d10cc6bcc8 100644 --- a/arangod/Aql/tokens.ll +++ b/arangod/Aql/tokens.ll @@ -507,14 +507,26 @@ class Parser; * bind parameters * --------------------------------------------------------------------------- */ -@@?(_+[a-zA-Z0-9]+[a-zA-Z0-9_]*|[a-zA-Z0-9][a-zA-Z0-9_]*) { +@(_+[a-zA-Z0-9]+[a-zA-Z0-9_]*|[a-zA-Z0-9][a-zA-Z0-9_]*) { /* bind parameters must start with a @ - if followed by another @, this is a collection name parameter */ + 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; } + /* --------------------------------------------------------------------------- + * bind data source parameters + * --------------------------------------------------------------------------- */ + +@@(_+[a-zA-Z0-9]+[a-zA-Z0-9_]*|[a-zA-Z0-9][a-zA-Z0-9_]*) { + /* 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; +} + /* --------------------------------------------------------------------------- * whitespace etc. * --------------------------------------------------------------------------- */ diff --git a/arangod/RocksDBEngine/RocksDBRecoveryManager.cpp b/arangod/RocksDBEngine/RocksDBRecoveryManager.cpp index b308caaedf..63af34eb5b 100644 --- a/arangod/RocksDBEngine/RocksDBRecoveryManager.cpp +++ b/arangod/RocksDBEngine/RocksDBRecoveryManager.cpp @@ -385,8 +385,6 @@ class WBReader final : public rocksdb::WriteBatch::Handler { /// parse the WAL with the above handler parser class Result RocksDBRecoveryManager::parseRocksWAL() { - std::unique_ptr handler; - Result shutdownRv; Result res = basics::catchToResult([&]() -> Result { @@ -398,7 +396,7 @@ Result RocksDBRecoveryManager::parseRocksWAL() { } // Tell the WriteBatch reader the transaction markers to look for - handler = std::make_unique(engine->settingsManager()->counterSeqs()); + WBReader handler(engine->settingsManager()->counterSeqs()); auto minTick = std::min(engine->settingsManager()->earliestSeqNeeded(), engine->releasedTick()); @@ -413,8 +411,8 @@ Result RocksDBRecoveryManager::parseRocksWAL() { s = iterator->status(); if (s.ok()) { rocksdb::BatchResult batch = iterator->GetBatch(); - handler->currentSeqNum = batch.sequence; - s = batch.writeBatchPtr->Iterate(handler.get()); + handler.currentSeqNum = batch.sequence; + s = batch.writeBatchPtr->Iterate(&handler); } @@ -431,8 +429,8 @@ Result RocksDBRecoveryManager::parseRocksWAL() { if (rv.ok()) { LOG_TOPIC(TRACE, Logger::ENGINES) - << "finished WAL scan with " << handler->deltas.size(); - for (auto& pair : handler->deltas) { + << "finished WAL scan with " << handler.deltas.size(); + for (auto& pair : handler.deltas) { engine->settingsManager()->updateCounter(pair.first, pair.second); LOG_TOPIC(TRACE, Logger::ENGINES) << "WAL recovered " << pair.second.added() << " PUTs and " @@ -440,16 +438,16 @@ Result RocksDBRecoveryManager::parseRocksWAL() { } } } + + shutdownRv = handler.shutdownWBReader(); + return rv; }); - - shutdownRv = handler->shutdownWBReader(); - - if(res.ok()) { + if (res.ok()) { res = std::move(shutdownRv); } else { - if(shutdownRv.fail()){ + if (shutdownRv.fail()){ res.reset(res.errorNumber(), res.errorMessage() + " - " + shutdownRv.errorMessage()); } } diff --git a/arangod/Utils/CollectionNameResolver.cpp b/arangod/Utils/CollectionNameResolver.cpp index ccbbb02485..35a928b542 100644 --- a/arangod/Utils/CollectionNameResolver.cpp +++ b/arangod/Utils/CollectionNameResolver.cpp @@ -314,6 +314,18 @@ std::string CollectionNameResolver::localNameLookup(TRI_voc_cid_t cid) const { return name; } +std::string CollectionNameResolver::getViewNameCluster( + TRI_voc_cid_t cid +) const { + if (!ServerState::isClusterRole(_serverRole)) { + // This handles the case of a standalone server + return _vocbase->viewName(cid); + } + + // FIXME not supported + return StaticStrings::Empty; +} + bool CollectionNameResolver::visitCollections( std::function const& visitor, TRI_voc_cid_t cid ) const { @@ -344,4 +356,4 @@ bool CollectionNameResolver::visitCollections( // ----------------------------------------------------------------------------- // --SECTION-- END-OF-FILE -// ----------------------------------------------------------------------------- \ No newline at end of file +// ----------------------------------------------------------------------------- diff --git a/arangod/Utils/CollectionNameResolver.h b/arangod/Utils/CollectionNameResolver.h index 09fe601e4c..856a899c8e 100644 --- a/arangod/Utils/CollectionNameResolver.h +++ b/arangod/Utils/CollectionNameResolver.h @@ -120,10 +120,17 @@ class CollectionNameResolver { std::string getCollectionName(std::string const& nameOrId) const; + ////////////////////////////////////////////////////////////////////////////// + /// @brief look up a cluster-wide view name for a cluster-wide view id + ////////////////////////////////////////////////////////////////////////////// + + std::string getViewNameCluster(TRI_voc_cid_t cid) const; + ////////////////////////////////////////////////////////////////////////////// /// @brief invoke visitor on all collections that map to the specified 'cid' /// @return visitation was successful ////////////////////////////////////////////////////////////////////////////// + bool visitCollections( std::function const& visitor, TRI_voc_cid_t cid ) const; @@ -161,4 +168,4 @@ class CollectionNameResolver { }; } -#endif \ No newline at end of file +#endif diff --git a/arangod/VocBase/vocbase.cpp b/arangod/VocBase/vocbase.cpp index 442339d550..c9f2a926f2 100644 --- a/arangod/VocBase/vocbase.cpp +++ b/arangod/VocBase/vocbase.cpp @@ -961,6 +961,21 @@ std::string TRI_vocbase_t::collectionName(TRI_voc_cid_t id) { return (*it).second->name(); } +/// @brief gets a view name by a view id +/// the name is fetched under a lock to make this thread-safe. +/// returns empty string if the view does not exist. +std::string TRI_vocbase_t::viewName(TRI_voc_cid_t id) const { + RECURSIVE_READ_LOCKER(_viewsLock, _viewsLockWriteOwner); + + auto it = _viewsById.find(id); + + if (it == _viewsById.end()) { + return StaticStrings::Empty; + } + + return (*it).second->name(); +} + /// @brief looks up a collection by uuid LogicalCollection* TRI_vocbase_t::lookupCollectionByUuid(std::string const& uuid) const { // otherwise we'll look up the collection by name diff --git a/arangod/VocBase/vocbase.h b/arangod/VocBase/vocbase.h index 5787f1a33f..2796dcebfb 100644 --- a/arangod/VocBase/vocbase.h +++ b/arangod/VocBase/vocbase.h @@ -168,8 +168,8 @@ struct TRI_vocbase_t { std::unordered_map _collectionsByUuid; // collections by uuid - arangodb::basics::ReadWriteLock _viewsLock; // views management lock - std::atomic _viewsLockWriteOwner; // current thread owning '_viewsLock' write lock (workaround for non-recusrive ReadWriteLock) + mutable arangodb::basics::ReadWriteLock _viewsLock; // views management lock + mutable std::atomic _viewsLockWriteOwner; // current thread owning '_viewsLock' write lock (workaround for non-recusrive ReadWriteLock) std::unordered_map> _viewsByName; // views by name std::unordered_map> @@ -279,6 +279,11 @@ struct TRI_vocbase_t { /// returns empty string if the collection does not exist. std::string collectionName(TRI_voc_cid_t id); + /// @brief get a view name by a view id + /// the name is fetched under a lock to make this thread-safe. + /// returns empty string if the view does not exist. + std::string viewName(TRI_voc_cid_t id) const; + /// @brief looks up a collection by uuid arangodb::LogicalCollection* lookupCollectionByUuid(std::string const&) const; /// @brief looks up a collection by name, identifier (cid) or uuid @@ -424,4 +429,4 @@ void TRI_SanitizeObject(arangodb::velocypack::Slice const slice, void TRI_SanitizeObjectWithEdges(arangodb::velocypack::Slice const slice, arangodb::velocypack::Builder& builder); -#endif \ No newline at end of file +#endif diff --git a/lib/V8/v8-json.cpp b/lib/V8/v8-json.cpp index 601fe9814d..902fee0644 100644 --- a/lib/V8/v8-json.cpp +++ b/lib/V8/v8-json.cpp @@ -48,10 +48,11 @@ + #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 4 +#define YY_FLEX_SUBMINOR_VERSION 1 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -69,260 +70,49 @@ -#ifdef yy_create_buffer -#define tri_v8__create_buffer_ALREADY_DEFINED -#else -#define yy_create_buffer tri_v8__create_buffer -#endif - -#ifdef yy_delete_buffer -#define tri_v8__delete_buffer_ALREADY_DEFINED -#else -#define yy_delete_buffer tri_v8__delete_buffer -#endif - -#ifdef yy_scan_buffer -#define tri_v8__scan_buffer_ALREADY_DEFINED -#else -#define yy_scan_buffer tri_v8__scan_buffer -#endif - -#ifdef yy_scan_string -#define tri_v8__scan_string_ALREADY_DEFINED -#else -#define yy_scan_string tri_v8__scan_string -#endif - -#ifdef yy_scan_bytes -#define tri_v8__scan_bytes_ALREADY_DEFINED -#else -#define yy_scan_bytes tri_v8__scan_bytes -#endif - -#ifdef yy_init_buffer -#define tri_v8__init_buffer_ALREADY_DEFINED -#else -#define yy_init_buffer tri_v8__init_buffer -#endif - -#ifdef yy_flush_buffer -#define tri_v8__flush_buffer_ALREADY_DEFINED -#else -#define yy_flush_buffer tri_v8__flush_buffer -#endif - -#ifdef yy_load_buffer_state -#define tri_v8__load_buffer_state_ALREADY_DEFINED -#else -#define yy_load_buffer_state tri_v8__load_buffer_state -#endif - -#ifdef yy_switch_to_buffer -#define tri_v8__switch_to_buffer_ALREADY_DEFINED -#else -#define yy_switch_to_buffer tri_v8__switch_to_buffer -#endif - -#ifdef yypush_buffer_state -#define tri_v8_push_buffer_state_ALREADY_DEFINED -#else -#define yypush_buffer_state tri_v8_push_buffer_state -#endif - -#ifdef yypop_buffer_state -#define tri_v8_pop_buffer_state_ALREADY_DEFINED -#else -#define yypop_buffer_state tri_v8_pop_buffer_state -#endif - -#ifdef yyensure_buffer_stack -#define tri_v8_ensure_buffer_stack_ALREADY_DEFINED -#else -#define yyensure_buffer_stack tri_v8_ensure_buffer_stack -#endif - -#ifdef yylex -#define tri_v8_lex_ALREADY_DEFINED -#else -#define yylex tri_v8_lex -#endif - -#ifdef yyrestart -#define tri_v8_restart_ALREADY_DEFINED -#else -#define yyrestart tri_v8_restart -#endif - -#ifdef yylex_init -#define tri_v8_lex_init_ALREADY_DEFINED -#else -#define yylex_init tri_v8_lex_init -#endif - -#ifdef yylex_init_extra -#define tri_v8_lex_init_extra_ALREADY_DEFINED -#else -#define yylex_init_extra tri_v8_lex_init_extra -#endif - -#ifdef yylex_destroy -#define tri_v8_lex_destroy_ALREADY_DEFINED -#else -#define yylex_destroy tri_v8_lex_destroy -#endif - -#ifdef yyget_debug -#define tri_v8_get_debug_ALREADY_DEFINED -#else -#define yyget_debug tri_v8_get_debug -#endif - -#ifdef yyset_debug -#define tri_v8_set_debug_ALREADY_DEFINED -#else -#define yyset_debug tri_v8_set_debug -#endif - -#ifdef yyget_extra -#define tri_v8_get_extra_ALREADY_DEFINED -#else -#define yyget_extra tri_v8_get_extra -#endif - -#ifdef yyset_extra -#define tri_v8_set_extra_ALREADY_DEFINED -#else -#define yyset_extra tri_v8_set_extra -#endif - -#ifdef yyget_in -#define tri_v8_get_in_ALREADY_DEFINED -#else -#define yyget_in tri_v8_get_in -#endif - -#ifdef yyset_in -#define tri_v8_set_in_ALREADY_DEFINED -#else -#define yyset_in tri_v8_set_in -#endif - -#ifdef yyget_out -#define tri_v8_get_out_ALREADY_DEFINED -#else -#define yyget_out tri_v8_get_out -#endif - -#ifdef yyset_out -#define tri_v8_set_out_ALREADY_DEFINED -#else -#define yyset_out tri_v8_set_out -#endif - -#ifdef yyget_leng -#define tri_v8_get_leng_ALREADY_DEFINED -#else -#define yyget_leng tri_v8_get_leng -#endif - -#ifdef yyget_text -#define tri_v8_get_text_ALREADY_DEFINED -#else -#define yyget_text tri_v8_get_text -#endif - -#ifdef yyget_lineno -#define tri_v8_get_lineno_ALREADY_DEFINED -#else -#define yyget_lineno tri_v8_get_lineno -#endif - -#ifdef yyset_lineno -#define tri_v8_set_lineno_ALREADY_DEFINED -#else -#define yyset_lineno tri_v8_set_lineno -#endif - + -#ifdef yyget_column -#define tri_v8_get_column_ALREADY_DEFINED -#else -#define yyget_column tri_v8_get_column -#endif - -#ifdef yyset_column -#define tri_v8_set_column_ALREADY_DEFINED -#else -#define yyset_column tri_v8_set_column -#endif + + + + + + + -#ifdef yywrap -#define tri_v8_wrap_ALREADY_DEFINED -#else -#define yywrap tri_v8_wrap -#endif - - - - - - - - -#ifdef yyalloc -#define tri_v8_alloc_ALREADY_DEFINED -#else -#define yyalloc tri_v8_alloc -#endif - -#ifdef yyrealloc -#define tri_v8_realloc_ALREADY_DEFINED -#else -#define yyrealloc tri_v8_realloc -#endif - - -#ifdef yyfree -#define tri_v8_free_ALREADY_DEFINED -#else -#define yyfree tri_v8_free -#endif - - - @@ -399,16 +189,11 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) -#endif - #endif /* ! C99 */ #endif /* ! FLEXINT_H */ -/* begin standard C++ headers. */ /* TODO: this is always defined, so inline it */ #define yyconst const @@ -419,14 +204,22 @@ typedef unsigned int flex_uint32_t; #define yynoreturn #endif + + + + + /* 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. + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) @@ -446,6 +239,8 @@ typedef void* yyscan_t; + + @@ -473,7 +268,10 @@ typedef void* yyscan_t; - + + + + @@ -482,16 +280,28 @@ typedef void* yyscan_t; * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * + + + /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START + + + /* 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 tri_v8_restart(yyin ,yyscanner ) + + + #define YY_END_OF_BUFFER_CHAR 0 @@ -531,10 +341,16 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 + + + #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) + + + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -548,6 +364,9 @@ typedef size_t yy_size_t; YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) + + + #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) @@ -611,7 +430,7 @@ struct yy_buffer_state * 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 + * (via tri_v8_restart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 @@ -622,6 +441,7 @@ 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". @@ -631,6 +451,9 @@ struct yy_buffer_state #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. */ @@ -640,50 +463,63 @@ struct yy_buffer_state -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 ); + +void tri_v8_restart (FILE *input_file ,yyscan_t yyscanner ); +void tri_v8__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE tri_v8__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void tri_v8__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void tri_v8__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void tri_v8_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void tri_v8_pop_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) +static void tri_v8_ensure_buffer_stack (yyscan_t yyscanner ); +static void tri_v8__load_buffer_state (yyscan_t yyscanner ); +static void tri_v8__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t 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 ); + +#define YY_FLUSH_BUFFER tri_v8__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +YY_BUFFER_STATE tri_v8__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE tri_v8__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE tri_v8__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + + +void *tri_v8_alloc (yy_size_t ,yyscan_t yyscanner ); +void *tri_v8_realloc (void *,yy_size_t ,yyscan_t yyscanner ); +void tri_v8_free (void * ,yyscan_t yyscanner ); + + +#define yy_new_buffer tri_v8__create_buffer + -#define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ + tri_v8_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + tri_v8__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); \ + tri_v8_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + tri_v8__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) @@ -691,7 +527,10 @@ void yyfree ( void * , yyscan_t yyscanner ); #define tri_v8_wrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP -typedef flex_uint8_t YY_CHAR; + +typedef unsigned char YY_CHAR; + + typedef int yy_state_type; @@ -703,10 +542,10 @@ typedef int yy_state_type; -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 (yyconst char* msg ,yyscan_t yyscanner ); @@ -720,6 +559,9 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; + + + #define YY_NUM_RULES 15 #define YY_END_OF_BUFFER 16 /* This struct is not used in this scanner, @@ -729,7 +571,7 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[45] = +static yyconst flex_int16_t yy_accept[45] = { 0, 13, 13, 16, 14, 13, 13, 14, 14, 11, 6, 6, 12, 14, 14, 14, 9, 10, 7, 8, 13, @@ -738,7 +580,7 @@ static const flex_int16_t yy_accept[45] = 2, 3, 1, 0 } ; -static const YY_CHAR yy_ec[256] = +static yyconst 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, @@ -770,7 +612,7 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[37] = +static yyconst YY_CHAR yy_meta[37] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -778,7 +620,7 @@ static const YY_CHAR yy_meta[37] = 1, 1, 1, 1, 1, 1 } ; -static const flex_int16_t yy_base[47] = +static yyconst flex_uint16_t yy_base[47] = { 0, 0, 0, 114, 126, 35, 38, 42, 35, 126, 40, 41, 126, 35, 35, 39, 126, 126, 126, 126, 60, @@ -787,7 +629,7 @@ static const flex_int16_t yy_base[47] = 126, 126, 126, 126, 78, 75 } ; -static const flex_int16_t yy_def[47] = +static yyconst flex_int16_t yy_def[47] = { 0, 44, 1, 44, 44, 44, 44, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, @@ -796,7 +638,7 @@ static const flex_int16_t yy_def[47] = 44, 44, 44, 0, 44, 44 } ; -static const flex_int16_t yy_nxt[163] = +static yyconst flex_uint16_t yy_nxt[163] = { 0, 4, 5, 6, 5, 4, 7, 8, 9, 8, 4, 10, 11, 12, 4, 4, 13, 4, 14, 4, 4, @@ -818,7 +660,7 @@ static const flex_int16_t yy_nxt[163] = 44, 44 } ; -static const flex_int16_t yy_chk[163] = +static yyconst flex_int16_t yy_chk[163] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -942,7 +784,7 @@ struct yyguts_t -static int yy_init_globals ( yyscan_t yyscanner ); +static int yy_init_globals (yyscan_t yyscanner ); @@ -952,9 +794,9 @@ static int yy_init_globals ( yyscan_t yyscanner ); -int yylex_init (yyscan_t* scanner); +int tri_v8_lex_init (yyscan_t* scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int tri_v8_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); @@ -962,66 +804,66 @@ int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int tri_v8_lex_destroy (yyscan_t yyscanner ); -int yyget_debug ( yyscan_t yyscanner ); +int tri_v8_get_debug (yyscan_t yyscanner ); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void tri_v8_set_debug (int debug_flag ,yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE tri_v8_get_extra (yyscan_t yyscanner ); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void tri_v8_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *tri_v8_get_in (yyscan_t yyscanner ); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void tri_v8_set_in (FILE * _in_str ,yyscan_t yyscanner ); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *tri_v8_get_out (yyscan_t yyscanner ); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void tri_v8_set_out (FILE * _out_str ,yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + int tri_v8_get_leng (yyscan_t yyscanner ); -char *yyget_text ( yyscan_t yyscanner ); +char *tri_v8_get_text (yyscan_t yyscanner ); -int yyget_lineno ( yyscan_t yyscanner ); +int tri_v8_get_lineno (yyscan_t yyscanner ); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void tri_v8_set_lineno (int _line_number ,yyscan_t yyscanner ); -int yyget_column ( yyscan_t yyscanner ); +int tri_v8_get_column (yyscan_t yyscanner ); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void tri_v8_set_column (int _column_no ,yyscan_t yyscanner ); @@ -1032,30 +874,32 @@ void yyset_column ( int _column_no , yyscan_t yyscanner ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int tri_v8_wrap (yyscan_t yyscanner ); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int tri_v8_wrap (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 *,yyconst 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 (yyconst 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 @@ -1096,7 +940,7 @@ static int input ( yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1109,7 +953,7 @@ static int input ( yyscan_t yyscanner ); else \ { \ errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -1148,6 +992,8 @@ static int input ( yyscan_t yyscanner ); + + /* end tables serialization structures and prototypes */ @@ -1166,9 +1012,9 @@ static int input ( yyscan_t yyscanner ); -extern int yylex (yyscan_t yyscanner); +extern int tri_v8_lex (yyscan_t yyscanner); -#define YY_DECL int yylex (yyscan_t yyscanner) +#define YY_DECL int tri_v8_lex (yyscan_t yyscanner) #endif /* !YY_DECL */ @@ -1192,6 +1038,7 @@ extern int yylex (yyscan_t yyscanner); YY_USER_ACTION + /** The main scanner function which does all the work. */ YY_DECL @@ -1227,12 +1074,12 @@ YY_DECL yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); + tri_v8_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + tri_v8__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } - yy_load_buffer_state( yyscanner ); + tri_v8__load_buffer_state(yyscanner ); } { @@ -1269,9 +1116,9 @@ yy_match: { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 45 ) - yy_c = yy_meta[yy_c]; + yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; ++yy_cp; } while ( yy_current_state != 44 ); @@ -1419,7 +1266,7 @@ case YY_STATE_EOF(INITIAL): /* 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 + * tri_v8_lex(). 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 @@ -1480,7 +1327,7 @@ case YY_STATE_EOF(INITIAL): { yyg->yy_did_buffer_switch_on_eof = 0; - if ( yywrap( yyscanner ) ) + if ( tri_v8_wrap(yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -1534,7 +1381,8 @@ case YY_STATE_EOF(INITIAL): } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ -} /* end of yylex */ +} /* end of tri_v8_lex */ + @@ -1617,8 +1465,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) 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 ); + tri_v8_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); } else /* Can't grow it, we don't own it. */ @@ -1650,7 +1497,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); + tri_v8_restart(yyin ,yyscanner); } else @@ -1667,12 +1514,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) 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 ); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) tri_v8_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,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->yy_n_chars += number_to_move; @@ -1687,6 +1531,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* 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; @@ -1707,9 +1552,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 45 ) - yy_c = yy_meta[yy_c]; + yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; } return yy_current_state; @@ -1737,9 +1582,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 45 ) - yy_c = yy_meta[yy_c]; + yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; yy_is_jam = (yy_current_state == 44); (void)yyg; @@ -1776,7 +1621,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -1793,13 +1638,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ /* Reset buffer status. */ - yyrestart( yyin , yyscanner); + tri_v8_restart(yyin ,yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap( yyscanner ) ) + if ( tri_v8_wrap(yyscanner ) ) return 0; if ( ! yyg->yy_did_buffer_switch_on_eof ) @@ -1832,18 +1677,18 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * @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) + void tri_v8_restart (FILE * input_file , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); + tri_v8_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + tri_v8__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); + tri_v8__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + tri_v8__load_buffer_state(yyscanner ); } @@ -1851,16 +1696,16 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * @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) + void tri_v8__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); + * tri_v8_pop_buffer_state(); + * tri_v8_push_buffer_state(new_buffer); */ - yyensure_buffer_stack (yyscanner); + tri_v8_ensure_buffer_stack (yyscanner); if ( YY_CURRENT_BUFFER == new_buffer ) return; @@ -1873,18 +1718,18 @@ static int yy_get_next_buffer (yyscan_t yyscanner) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); + tri_v8__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 + * EOF (tri_v8_wrap()) processing, but the only time this flag + * is looked at is after tri_v8_wrap() 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) +static void tri_v8__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; @@ -1899,36 +1744,36 @@ 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 tri_v8__create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + b = (YY_BUFFER_STATE) tri_v8_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in tri_v8__create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = (yy_size_t)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 ); + b->yy_ch_buf = (char *) tri_v8_alloc(b->yy_buf_size + 2 ,yyscanner ); if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in tri_v8__create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file , yyscanner); + tri_v8__init_buffer(b,file ,yyscanner); return b; } /** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() + * @param b a buffer created with tri_v8__create_buffer() * @param yyscanner The scanner object. */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) + void tri_v8__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -1939,29 +1784,29 @@ static void yy_load_buffer_state (yyscan_t yyscanner) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); + tri_v8_free((void *) b->yy_ch_buf ,yyscanner ); - yyfree( (void *) b , yyscanner ); + tri_v8_free((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. + * such as during a tri_v8_restart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + static void tri_v8__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flush_buffer( b , yyscanner); + tri_v8__flush_buffer(b ,yyscanner); 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. + /* If b is the current buffer, then tri_v8__init_buffer was _probably_ + * called from tri_v8_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ @@ -1981,7 +1826,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @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) + void tri_v8__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) @@ -2002,7 +1847,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); + tri_v8__load_buffer_state(yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -2011,15 +1856,15 @@ static void yy_load_buffer_state (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) +void tri_v8_push_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); + tri_v8_ensure_buffer_stack(yyscanner); - /* This block is copied from yy_switch_to_buffer. */ + /* This block is copied from tri_v8__switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ @@ -2033,8 +1878,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) yyg->yy_buffer_stack_top++; YY_CURRENT_BUFFER_LVALUE = new_buffer; - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); + /* copied from tri_v8__switch_to_buffer. */ + tri_v8__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } @@ -2043,19 +1888,19 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state (yyscan_t yyscanner) +void tri_v8_pop_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); + tri_v8__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 ); + tri_v8__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } @@ -2064,9 +1909,9 @@ void yypop_buffer_state (yyscan_t yyscanner) /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (yyscan_t yyscanner) +static void tri_v8_ensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; + int num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { @@ -2076,11 +1921,11 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * 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 + yyg->yy_buffer_stack = (struct yy_buffer_state**)tri_v8_alloc (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()" ); + YY_FATAL_ERROR( "out of dynamic memory in tri_v8_ensure_buffer_stack()" ); memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); @@ -2096,12 +1941,12 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) 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 = (struct yy_buffer_state**)tri_v8_realloc (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()" ); + YY_FATAL_ERROR( "out of dynamic memory in tri_v8_ensure_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*)); @@ -2119,7 +1964,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @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 tri_v8__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; @@ -2129,11 +1974,11 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann /* They forgot to leave room for the EOB's. */ return NULL; - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + b = (YY_BUFFER_STATE) tri_v8_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in tri_v8__scan_buffer()" ); - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_size = 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; @@ -2143,7 +1988,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b , yyscanner ); + tri_v8__switch_to_buffer(b ,yyscanner ); return b; } @@ -2151,31 +1996,31 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann -/** Setup the input buffer state to scan a string. The next call to yylex() will +/** Setup the input buffer state to scan a string. The next call to tri_v8_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. + * tri_v8__scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE tri_v8__scan_string (yyconst char * yystr , yyscan_t yyscanner) { - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + return tri_v8__scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); } -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will +/** Setup the input buffer state to scan the given bytes. The next call to tri_v8_lex() 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 tri_v8__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; @@ -2184,18 +2029,18 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); + buf = (char *) tri_v8_alloc(n ,yyscanner ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in tri_v8__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer( buf, n , yyscanner); + b = tri_v8__scan_buffer(buf,n ,yyscanner); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in tri_v8__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -2219,11 +2064,11 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; - fprintf( stderr, "%s\n", msg ); + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2252,7 +2097,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +YY_EXTRA_TYPE tri_v8_get_extra (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyextra; @@ -2263,7 +2108,7 @@ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno (yyscan_t yyscanner) +int tri_v8_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -2280,7 +2125,7 @@ int yyget_lineno (yyscan_t yyscanner) /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column (yyscan_t yyscanner) +int tri_v8_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -2297,7 +2142,7 @@ int yyget_column (yyscan_t yyscanner) /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in (yyscan_t yyscanner) +FILE *tri_v8_get_in (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyin; @@ -2308,7 +2153,7 @@ FILE *yyget_in (yyscan_t yyscanner) /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out (yyscan_t yyscanner) +FILE *tri_v8_get_out (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyout; @@ -2319,7 +2164,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng (yyscan_t yyscanner) +int tri_v8_get_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; @@ -2330,7 +2175,7 @@ int yyget_leng (yyscan_t yyscanner) * @param yyscanner The scanner object. */ -char *yyget_text (yyscan_t yyscanner) +char *tri_v8_get_text (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yytext; @@ -2342,7 +2187,7 @@ char *yyget_text (yyscan_t yyscanner) * @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) +void tri_v8_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyextra = user_defined ; @@ -2354,14 +2199,14 @@ void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) * @param _line_number line number * @param yyscanner The scanner object. */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) +void tri_v8_set_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" ); + YY_FATAL_ERROR( "tri_v8_set_lineno called with no buffer" ); yylineno = _line_number; } @@ -2373,14 +2218,14 @@ void yyset_lineno (int _line_number , yyscan_t yyscanner) * @param _column_no column number * @param yyscanner The scanner object. */ -void yyset_column (int _column_no , yyscan_t yyscanner) +void tri_v8_set_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" ); + YY_FATAL_ERROR( "tri_v8_set_column called with no buffer" ); yycolumn = _column_no; } @@ -2393,9 +2238,9 @@ void yyset_column (int _column_no , yyscan_t yyscanner) * input buffer. * @param _in_str A readable stream. * @param yyscanner The scanner object. - * @see yy_switch_to_buffer + * @see tri_v8__switch_to_buffer */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) +void tri_v8_set_in (FILE * _in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyin = _in_str ; @@ -2403,7 +2248,7 @@ void yyset_in (FILE * _in_str , yyscan_t yyscanner) -void yyset_out (FILE * _out_str , yyscan_t yyscanner) +void tri_v8_set_out (FILE * _out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyout = _out_str ; @@ -2412,7 +2257,7 @@ void yyset_out (FILE * _out_str , yyscan_t yyscanner) -int yyget_debug (yyscan_t yyscanner) +int tri_v8_get_debug (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yy_flex_debug; @@ -2420,7 +2265,7 @@ int yyget_debug (yyscan_t yyscanner) -void yyset_debug (int _bdebug , yyscan_t yyscanner) +void tri_v8_set_debug (int _bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_flex_debug = _bdebug ; @@ -2433,18 +2278,20 @@ void yyset_debug (int _bdebug , yyscan_t yyscanner) /* User-visible API */ -/* yylex_init is special because it creates the scanner itself, so it is +/* tri_v8_lex_init is special because it creates the scanner itself, so it is * 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) + +int tri_v8_lex_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) tri_v8_alloc ( sizeof( struct yyguts_t ), NULL ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; @@ -2458,25 +2305,27 @@ int yylex_init(yyscan_t* ptr_yy_globals) } -/* yylex_init_extra has the same functionality as yylex_init, but follows the +/* tri_v8_lex_init_extra has the same functionality as tri_v8_lex_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 * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to yyalloc in + * The user defined value in the first argument will be available to tri_v8_alloc in * the yyextra field. */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) + +int tri_v8_lex_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); + tri_v8_set_extra (yy_user_defined, &dummy_yyguts); 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) tri_v8_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; @@ -2487,7 +2336,7 @@ int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) 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); + tri_v8_set_extra (yy_user_defined, *ptr_yy_globals); return yy_init_globals ( *ptr_yy_globals ); } @@ -2497,7 +2346,7 @@ 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. + * This function is called from tri_v8_lex_destroy(), so don't allocate here. */ @@ -2528,42 +2377,42 @@ static int yy_init_globals (yyscan_t yyscanner) #endif /* For future reference: Set errno on error, since we are called by - * yylex_init() + * tri_v8_lex_init() */ return 0; } -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) +/* tri_v8_lex_destroy is for both reentrant and non-reentrant scanners. */ +int tri_v8_lex_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 ); + tri_v8__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); + tri_v8_pop_buffer_state(yyscanner); } /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); + tri_v8_free(yyg->yy_buffer_stack ,yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); + tri_v8_free(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. */ + * tri_v8_lex() is called, initialization will occur. */ yy_init_globals( yyscanner); /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); + tri_v8_free ( yyscanner , yyscanner ); yyscanner = NULL; return 0; } @@ -2577,7 +2426,7 @@ int yylex_destroy (yyscan_t yyscanner) #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; @@ -2591,7 +2440,7 @@ static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscann #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { int n; for ( n = 0; s[n]; ++n ) @@ -2603,7 +2452,7 @@ static int yy_flex_strlen (const char * s , yyscan_t yyscanner) -void *yyalloc (yy_size_t size , yyscan_t yyscanner) +void *tri_v8_alloc (yy_size_t size , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; @@ -2612,7 +2461,7 @@ void *yyalloc (yy_size_t size , yyscan_t yyscanner) -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +void *tri_v8_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; @@ -2629,11 +2478,11 @@ void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -void yyfree (void * ptr , yyscan_t yyscanner) +void tri_v8_free (void * ptr , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + free( (char *) ptr ); /* see tri_v8_realloc() for (char *) cast */ } @@ -2646,6 +2495,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) + // ----------------------------------------------------------------------------- // --SECTION-- forward declarations // ----------------------------------------------------------------------------- @@ -2668,7 +2518,7 @@ static v8::Handle ParseArray (v8::Isolate* isolate, v8::Handle array = v8::Array::New(isolate); uint32_t pos = 0; - int c = yylex(scanner); + int c = tri_v8_lex(scanner); while (c != END_OF_FILE) { if (c == CLOSE_BRACKET) { @@ -2681,7 +2531,7 @@ static v8::Handle ParseArray (v8::Isolate* isolate, return v8::Undefined(isolate); } - c = yylex(scanner); + c = tri_v8_lex(scanner); } v8::Handle sub = ParseValue(isolate, scanner, c); @@ -2693,7 +2543,7 @@ static v8::Handle ParseArray (v8::Isolate* isolate, array->Set(pos++, sub); - c = yylex(scanner); + c = tri_v8_lex(scanner); } yyextra._message = "expecting an array element, got end-of-file"; @@ -2712,7 +2562,7 @@ static v8::Handle ParseObject (v8::Isolate* isolate, v8::Handle object = v8::Object::New(isolate); bool comma = false; - int c = yylex(scanner); + int c = tri_v8_lex(scanner); while (c != END_OF_FILE) { if (c == CLOSE_BRACE) { @@ -2725,7 +2575,7 @@ static v8::Handle ParseObject (v8::Isolate* isolate, return v8::Undefined(isolate); } - c = yylex(scanner); + c = tri_v8_lex(scanner); } else { comma = true; @@ -2757,7 +2607,7 @@ static v8::Handle ParseObject (v8::Isolate* isolate, } // followed by a colon - c = yylex(scanner); + c = tri_v8_lex(scanner); if (c != COLON) { yyextra._message = "expecting colon"; @@ -2765,7 +2615,7 @@ static v8::Handle ParseObject (v8::Isolate* isolate, } // followed by an object - c = yylex(scanner); + c = tri_v8_lex(scanner); v8::Handle sub = ParseValue(isolate, scanner, c); if (sub->IsUndefined()) { @@ -2775,7 +2625,7 @@ static v8::Handle ParseObject (v8::Isolate* isolate, object->ForceSet(attributeName, sub); - c = yylex(scanner); + c = tri_v8_lex(scanner); } yyextra._message = "expecting an object attribute name or element, got end-of-file"; @@ -2922,16 +2772,16 @@ v8::Handle TRI_FromJsonString (v8::Isolate* isolate, char const* text, char** error) { yyscan_t scanner; - yylex_init(&scanner); + tri_v8_lex_init(&scanner); struct yyguts_t* yyg = (struct yyguts_t*) scanner; - YY_BUFFER_STATE buf = yy_scan_string(text, scanner); + YY_BUFFER_STATE buf = tri_v8__scan_string(text,scanner); - int c = yylex(scanner); + int c = tri_v8_lex(scanner); v8::Handle value = ParseValue(isolate, scanner, c); if (!value->IsUndefined()) { - c = yylex(scanner); + c = tri_v8_lex(scanner); if (c != END_OF_FILE) { value = v8::Undefined(isolate); @@ -2947,8 +2797,8 @@ v8::Handle TRI_FromJsonString (v8::Isolate* isolate, } } - yy_delete_buffer(buf, scanner); - yylex_destroy(scanner); + tri_v8__delete_buffer(buf,scanner); + tri_v8_lex_destroy(scanner); return value; } diff --git a/tests/IResearch/IResearchQueryExists-test.cpp b/tests/IResearch/IResearchQueryExists-test.cpp index 474b75c484..8a39f2a3f7 100644 --- a/tests/IResearch/IResearchQueryExists-test.cpp +++ b/tests/IResearch/IResearchQueryExists-test.cpp @@ -867,14 +867,29 @@ TEST_CASE("IResearchQueryTestExists", "[iresearch][iresearch-query]") { CHECK((i == expected.size())); } - // bound view name is not supported + // test existent (bool) with bound view name { + std::vector expected = { + insertedDocs[1].slice(), + }; auto result = arangodb::tests::executeQuery( vocbase, "FOR d IN VIEW @@testView FILTER EXISTS(d.value, @type, 'bool') SORT BM25(d) ASC, TFIDF(d) DESC, d.seq RETURN d", - arangodb::velocypack::Parser::fromJson("{ \"type\" : \"type\", \"testView\": \"testView\" }") + arangodb::velocypack::Parser::fromJson("{ \"type\" : \"type\", \"@testView\": \"testView\" }") ); - REQUIRE(TRI_ERROR_QUERY_PARSE == result.code); + + REQUIRE(TRI_ERROR_NO_ERROR == result.code); + auto slice = result.result->slice(); + CHECK(slice.isArray()); + size_t i = 0; + + for (arangodb::velocypack::ArrayIterator itr(slice); itr.valid(); ++itr) { + auto const resolved = itr.value().resolveExternals(); + CHECK((i < expected.size())); + CHECK((0 == arangodb::basics::VelocyPackHelper::compare(expected[i++], resolved, true))); + } + + CHECK((i == expected.size())); } // test existent (bool) via [] @@ -1286,4 +1301,4 @@ TEST_CASE("IResearchQueryTestExists", "[iresearch][iresearch-query]") { // ----------------------------------------------------------------------------- // --SECTION-- END-OF-FILE -// ----------------------------------------------------------------------------- \ No newline at end of file +// ----------------------------------------------------------------------------- diff --git a/tests/IResearch/IResearchQueryJoin-test.cpp b/tests/IResearch/IResearchQueryJoin-test.cpp index a3de62aeb9..e468d02c1f 100644 --- a/tests/IResearch/IResearchQueryJoin-test.cpp +++ b/tests/IResearch/IResearchQueryJoin-test.cpp @@ -369,6 +369,211 @@ TEST_CASE("IResearchQueryTestJoinVolatileBlock", "[iresearch][iresearch-query]") // should not recreate iterator each loop iteration in case of deterministic/independent inner loop scope } +TEST_CASE("IResearchQueryTestJoinDuplicateDataSource", "[iresearch][iresearch-query]") { + IResearchQuerySetup s; + UNUSED(s); + + static std::vector const EMPTY; + + auto createJson = arangodb::velocypack::Parser::fromJson("{ \ + \"name\": \"testView\", \ + \"type\": \"arangosearch\" \ + }"); + + TRI_vocbase_t vocbase(TRI_vocbase_type_e::TRI_VOCBASE_TYPE_NORMAL, 1, "testVocbase"); + arangodb::LogicalCollection* logicalCollection1{}; + arangodb::LogicalCollection* logicalCollection2{}; + arangodb::LogicalCollection* logicalCollection3{}; + arangodb::LogicalCollection* logicalCollectionWithTheSameNameAsView{}; + + // add collection_1 + { + auto collectionJson = arangodb::velocypack::Parser::fromJson("{ \"name\": \"collection_1\" }"); + logicalCollection1 = vocbase.createCollection(collectionJson->slice()); + REQUIRE((nullptr != logicalCollection1)); + } + + // add collection_2 + { + auto collectionJson = arangodb::velocypack::Parser::fromJson("{ \"name\": \"collection_2\" }"); + logicalCollection2 = vocbase.createCollection(collectionJson->slice()); + REQUIRE((nullptr != logicalCollection2)); + } + + // add collection_3 + { + auto collectionJson = arangodb::velocypack::Parser::fromJson("{ \"name\": \"collection_3\" }"); + logicalCollection3 = vocbase.createCollection(collectionJson->slice()); + REQUIRE((nullptr != logicalCollection3)); + } + + // add logical collection with the same name as view + { + auto collectionJson = arangodb::velocypack::Parser::fromJson("{ \"name\": \"testView\" }"); + logicalCollectionWithTheSameNameAsView = vocbase.createCollection(collectionJson->slice()); + REQUIRE((nullptr != logicalCollectionWithTheSameNameAsView)); + } + + // add view + auto logicalView = vocbase.createView(createJson->slice(), 0); + REQUIRE((false == !logicalView)); + auto* view = dynamic_cast(logicalView->getImplementation()); + REQUIRE((false == !view)); + + // add link to collection + { + auto updateJson = arangodb::velocypack::Parser::fromJson( + "{ \"links\": {" + "\"collection_1\": { \"analyzers\": [ \"test_analyzer\", \"identity\" ], \"includeAllFields\": true, \"trackListPositions\": true }," + "\"collection_2\": { \"analyzers\": [ \"test_analyzer\", \"identity\" ], \"includeAllFields\": true }" + "}}" + ); + CHECK((view->updateProperties(updateJson->slice(), true, false).ok())); + + arangodb::velocypack::Builder builder; + + builder.openObject(); + view->getPropertiesVPack(builder, false); + builder.close(); + + auto slice = builder.slice(); + auto tmpSlice = slice.get("links"); + CHECK((true == tmpSlice.isObject() && 2 == tmpSlice.length())); + } + + std::deque insertedDocsView; + std::deque insertedDocsCollectionWithTheSameNameAsView; + + // populate view with the data + { + arangodb::OperationOptions opt; + TRI_voc_tick_t tick; + + arangodb::transaction::UserTransaction trx( + arangodb::transaction::StandaloneContext::Create(&vocbase), + EMPTY, EMPTY, EMPTY, + arangodb::transaction::Options() + ); + CHECK((trx.begin().ok())); + + // insert into collections + { + irs::utf8_path resource; + resource/=irs::string_ref(IResearch_test_resource_dir); + resource/=irs::string_ref("simple_sequential.json"); + + auto builder = arangodb::basics::VelocyPackHelper::velocyPackFromFile(resource.utf8()); + auto root = builder.slice(); + REQUIRE(root.isArray()); + + size_t i = 0; + + arangodb::LogicalCollection* collections[] { + logicalCollection1, logicalCollection2 + }; + + for (auto doc : arangodb::velocypack::ArrayIterator(root)) { + insertedDocsView.emplace_back(); + auto const res = collections[i % 2]->insert(&trx, doc, insertedDocsView.back(), opt, tick, false); + + insertedDocsCollectionWithTheSameNameAsView.emplace_back(); + logicalCollectionWithTheSameNameAsView->insert(&trx, doc, insertedDocsCollectionWithTheSameNameAsView.back(), opt, tick, false); + + CHECK(res.ok()); + ++i; + } + } + + // insert into collection_3 + std::deque insertedDocsCollection; + + { + irs::utf8_path resource; + resource/=irs::string_ref(IResearch_test_resource_dir); + resource/=irs::string_ref("simple_sequential_order.json"); + + auto builder = arangodb::basics::VelocyPackHelper::velocyPackFromFile(resource.utf8()); + auto root = builder.slice(); + REQUIRE(root.isArray()); + + for (auto doc : arangodb::velocypack::ArrayIterator(root)) { + insertedDocsCollection.emplace_back(); + auto const res = logicalCollection3->insert(&trx, doc, insertedDocsCollection.back(), opt, tick, false); + CHECK(res.ok()); + } + } + + CHECK((trx.commit().ok())); + view->sync(); + } + + // bind collection and view with the same name + { + std::string const query = "LET c=5 FOR x IN @@dataSource FILTER x.seq == c FOR d IN VIEW @@dataSource FILTER x.seq == d.seq RETURN x"; + auto const boundParameters = arangodb::velocypack::Parser::fromJson("{ \"@dataSource\" : \"testView\" }"); + + CHECK(arangodb::tests::assertRules( + vocbase, query, { + arangodb::aql::OptimizerRule::handleViewsRule_pass6, + }, + boundParameters + )); + + std::vector expectedDocs { + arangodb::velocypack::Slice(insertedDocsCollectionWithTheSameNameAsView[5].vpack()), + }; + + auto queryResult = arangodb::tests::executeQuery(vocbase, query, boundParameters); + REQUIRE(TRI_ERROR_NO_ERROR == queryResult.code); + + auto result = queryResult.result->slice(); + CHECK(result.isArray()); + + arangodb::velocypack::ArrayIterator resultIt(result); + REQUIRE(expectedDocs.size() == resultIt.size()); + + // Check documents + auto expectedDoc = expectedDocs.begin(); + for (;resultIt.valid(); resultIt.next(), ++expectedDoc) { + auto const actualDoc = resultIt.value(); + auto const resolved = actualDoc.resolveExternals(); + + CHECK((0 == arangodb::basics::VelocyPackHelper::compare(arangodb::velocypack::Slice(*expectedDoc), resolved, true))); + } + CHECK(expectedDoc == expectedDocs.end()); + } + + // bind collection and view with the same name + // + // FIXME + // will not return any results because of the: + // https://github.com/arangodb/backlog/issues/342 + { + std::string const query = "LET c=5 FOR x IN @@dataSource FILTER x.seq == c FOR d IN VIEW @@dataSource FILTER x.seq == d.seq RETURN d"; + auto const boundParameters = arangodb::velocypack::Parser::fromJson("{ \"@dataSource\" : \"testView\" }"); + + CHECK(arangodb::tests::assertRules( + vocbase, query, { + arangodb::aql::OptimizerRule::handleViewsRule_pass6, + }, + boundParameters + )); + + std::vector expectedDocs { + arangodb::velocypack::Slice(insertedDocsCollectionWithTheSameNameAsView[5].vpack()), + }; + + auto queryResult = arangodb::tests::executeQuery(vocbase, query, boundParameters); + REQUIRE(TRI_ERROR_NO_ERROR == queryResult.code); + + auto result = queryResult.result->slice(); + CHECK(result.isArray()); + + arangodb::velocypack::ArrayIterator resultIt(result); + REQUIRE(0 == resultIt.size()); + } +} + TEST_CASE("IResearchQueryTestJoin", "[iresearch][iresearch-query]") { IResearchQuerySetup s; UNUSED(s); @@ -1532,4 +1737,4 @@ TEST_CASE("IResearchQueryTestJoin", "[iresearch][iresearch-query]") { // ----------------------------------------------------------------------------- // --SECTION-- END-OF-FILE -// ----------------------------------------------------------------------------- \ No newline at end of file +// -----------------------------------------------------------------------------