From 0eff0753e86cf865bf384fd2a0fcefc371f058cf Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Fri, 20 Jun 2014 14:57:04 +0200 Subject: [PATCH 1/8] Started improving the layout of FluentAQL Documentation in general graph module --- .../General-Graphs/FluentAQLInterface.mdpp | 4 + .../js/modules/org/arangodb/general-graph.js | 811 ++++++++++++++++-- .../modules/org/arangodb/general-graph.js | 164 ++-- 3 files changed, 820 insertions(+), 159 deletions(-) diff --git a/Documentation/Books/Users/General-Graphs/FluentAQLInterface.mdpp b/Documentation/Books/Users/General-Graphs/FluentAQLInterface.mdpp index f78258c28b..332cac605d 100644 --- a/Documentation/Books/Users/General-Graphs/FluentAQLInterface.mdpp +++ b/Documentation/Books/Users/General-Graphs/FluentAQLInterface.mdpp @@ -8,6 +8,10 @@ As an example you can start with a set of vertices, select their direct neighbor The result of this query will be the set of outgoing edges. For each part of the query it is possible to further refine the resulting set of elements by giving examples for them. +!SECTION Definition of examples + +@startDocuBlock JSF_general_graph_example_description + !SECTION Starting Points This section describes the entry points for the fluent interface. diff --git a/js/apps/system/aardvark/frontend/js/modules/org/arangodb/general-graph.js b/js/apps/system/aardvark/frontend/js/modules/org/arangodb/general-graph.js index 3b74bfe7ea..8e183d32c8 100644 --- a/js/apps/system/aardvark/frontend/js/modules/org/arangodb/general-graph.js +++ b/js/apps/system/aardvark/frontend/js/modules/org/arangodb/general-graph.js @@ -178,6 +178,22 @@ var wrapCollection = function(col) { return wrapper; }; +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_example_description +/// +/// For many of the following functions *examples* can be passed in as a parameter. +/// *Examples* are used to filter the result set for objects that match the conditions. +/// These *examples* can have the following values: +/// +/// * Empty, there is no matching executed all found results are valid. +/// * A string, only the result having this value as it's *_id* is returned. +/// * An example object, defining a set of attributes. +/// Only results having these attributes are matched. +/// * A list containing example objects and/or strings. +/// All results matching at least one of the elements in the list are returned. +/// +/// @endDocuBlock +//////////////////////////////////////////////////////////////////////////////// var transformExample = function(example) { if (example === undefined) { @@ -396,16 +412,16 @@ AQLGenerator.prototype._edges = function(edgeExample, options) { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_edges -/// Select all edges for the vertices selected before. +/// `graph_query.edges(examples)` +/// *Select all edges for the vertices selected before.* /// -/// `graph-query.edges(examples)` /// /// Creates an AQL statement to select all edges for each of the vertices selected /// in the step before. /// This will include *inbound* as well as *outbound* edges. /// The resulting set of edges can be filtered by defining one or more *examples*. /// -/// *examples* can have the following values: +/// * *examples*: See #definition_of_examples /// /// * Empty, there is no matching executed all edges are valid. /// * A string, only the edge having this value as it's id is returned. @@ -453,9 +469,9 @@ AQLGenerator.prototype.edges = function(example) { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_outEdges -/// Select all outbound edges for the vertices selected before. +/// `graph_query.outEdges(examples)` +/// *Select all outbound edges for the vertices selected before.* /// -/// `graph-query.outEdges(examples)` /// /// Creates an AQL statement to select all *outbound* edges for each of the vertices selected /// in the step before. @@ -887,6 +903,19 @@ AQLGenerator.prototype.pathEdges = function() { /// Only vertices having these attributes are matched. /// * A list containing example objects and/or strings. /// All vertices matching at least one of the elements in the list are returned. +/// Possible options and there defaults: +/// * String *direction* : The direction of the +/// edges. Possible values are *outbound*, *inbound* and *any* (default). +/// * String|Object|Array *edgeExamples* : A filter example +/// for the edges to the neighbors (see below). +/// * String|Array *edgeCollectionRestriction* : One or multiple +/// edge collections that should be considered. +/// * String|Array *vertexCollectionRestriction* : One or multiple +/// vertex collections that should be considered. +/// * Number *minDepth* : Defines the minimal +/// depth a path to a neighbor must have to be returned (default is 1). +/// * Number *maxDepth* : Defines the maximal +/// depth a path to a neighbor must have to be returned (default is 1). /// /// *Examples* /// @@ -1440,7 +1469,7 @@ var _list = function() { /// The list of edge definitions of a graph can be managed by the graph module itself. /// This function is the entry point for the management and will return the correct list. /// -/// @EXAMPLES +/// *Examples* /// /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitions} @@ -1472,7 +1501,7 @@ var _edgeDefinitions = function () { /// In order to add more edge definitions to the graph before creating /// this function can be used to add more definitions to the initial list. /// -/// @EXAMPLES +/// *Examples* /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitionsExtend} /// var graph = require("org/arangodb/general-graph"); @@ -1520,7 +1549,7 @@ var _extendEdgeDefinitions = function (edgeDefinition) { /// * *edge-definitions*: array - list of edge definition objects /// * *orphan-collections*: array - list of additonal vertex collection names /// -/// @EXAMPLES +/// *Examples* /// /// Create an empty graph, edge definitions can be added at runtime: /// @@ -1534,7 +1563,7 @@ var _extendEdgeDefinitions = function (edgeDefinition) { /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphCreateGraph2} /// var graph = require("org/arangodb/general-graph"); -/// g = graph._create("mygraph", [graph._undirectedRelationDefinition("relation", ["male", "female"])], ["sessions"]); +/// g = graph._create("mygraph", [graph._undirectedRelation("relation", ["male", "female"])], ["sessions"]); /// ~ graph._drop("mygraph"); /// @END_EXAMPLE_ARANGOSH_OUTPUT /// @@ -2059,7 +2088,7 @@ var Graph = function(graphName, edgeDefinitions, vertexCollections, edgeCollecti /// /// * *graph-name*: string - unique identifier of the graph /// -/// @EXAMPLES +/// *Examples* /// /// Load a graph: /// @@ -2162,7 +2191,7 @@ var checkIfMayBeDropped = function(colName, graphName, graphs) { /// * *graphName*: string - unique identifier of the graph /// * *dropCollections*: boolean (optional) - define if collections should be dropped (default: false) /// -/// @EXAMPLES +/// *Examples* /// /// Drop a graph: /// @@ -2520,22 +2549,18 @@ Graph.prototype._getVertexCollectionByName = function(name) { //////////////////////////////////////////////////////////////////////////////// -/// @startDocuBlock JSF_general_graph_common_neighbors +/// @startDocuBlock JSF_general_graph_neighbors /// -/// `general_graph._listCommonNeighbors(vertex1Example, vertex2Examples, -/// optionsVertex1, optionsVertex2)` -/// *The general_graph._listCommonNeighbors function returns all common neighbors -/// of the vertices defined by the examples.* +/// `general_graph._neighbors(vertexExample, options)` +/// *The general_graph._neighbors function returns all neighbors +/// of the vertices defined by the example.* /// /// The function accepts an id, an example, a list of examples or even an empty -/// example as parameter for vertex1Example and vertex2Example. +/// example as parameter for vertexExample. /// -/// * String|Object|Array *vertex1Example* : An example for the desired +/// * String|Object|Array *vertexExample* : An example for the desired /// vertices (see below). -/// * String|Object|Array *vertex2Example* : An example for the desired -/// vertices (see below). -/// * Object *optionsVertex1* : Optional options, see below: -/// * Object *optionsVertex2* : Optional options, see below: +/// * Object *options* : Optional options, see below: /// /// Possible options and there defaults: /// * String *direction* : The direction of the @@ -2560,7 +2585,64 @@ Graph.prototype._getVertexCollectionByName = function(name) { /// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that /// match one of the examples. /// -/// @EXAMPLES +/// *Examples* +/// +/// A route planner example, all neighbors of capitals. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleNeighbors1} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._neighbors({isCapital : true}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, all outbound neighbors of Hamburg. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleNeighbors2} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._neighbors('germanCity/Hamburg', {direction : 'outbound', maxDepth : 2}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// @endDocuBlock +// +//////////////////////////////////////////////////////////////////////////////// +Graph.prototype._neighbors = function(vertexExample, options) { + var AQLStmt = new AQLGenerator(this); + // If no direction is specified all edges are duplicated. + // => For initial requests a direction has to be set + if (!options) { + options = {}; + } + return AQLStmt.vertices(vertexExample).neighbors(options.neighborExamples, options) + .toArray(); +}; + + +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_common_neighbors +/// +/// `general_graph._commonNeighbors(vertex1Example, vertex2Examples, +/// optionsVertex1, optionsVertex2)` +/// *The general_graph._commonNeighbors function returns all common neighbors +/// of the vertices defined by the examples.* +/// +/// The function accepts an id, an example, a list of examples or even an empty +/// example as parameter for vertex1Example and vertex2Example. +/// +/// This function returns the intersection of *general_graph._neighbors(vertex1Example, optionsVertex1)* +/// and *general_graph._neighbors(vertex2Example, optionsVertex2)*. +/// For parameter documentation read the documentation *general_graph._neighbors*. +/// +/// Examples for vertexExample: +/// * {} : Returns all possible vertices for this graph. +/// * *idString* : Returns the vertex with the id *idString*. +/// * {*key* : *value*} : Returns the vertices that match this example. +/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that +/// match one of the examples. +/// +/// *Examples* /// /// A route planner example, all common neighbors of capitals. /// @@ -2568,25 +2650,28 @@ Graph.prototype._getVertexCollectionByName = function(name) { /// ~ var db = require("internal").db; /// var examples = require("org/arangodb/graph-examples/example-graph.js"); /// var g = examples.loadGraph("routeplanner"); -/// g._listCommonNeighbors({isCapital : true}, {isCapital : true}); +/// g._commonNeighbors({isCapital : true}, {isCapital : true}); /// @END_EXAMPLE_ARANGOSH_OUTPUT /// -/// A route planner example, all common outbound neighbors of munich with any other location +/// A route planner example, all common outbound neighbors of Hamburg with any other location /// which have a maximal depth of 2 : /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleCommonNeighbors2} /// ~ var db = require("internal").db; -/// var examples = require("org/arangodb/graph-examples/example-graph.js"); -/// var g = examples.loadGraph("routeplanner"); -/// |g._listCommonNeighbors('city/Munich', {}, {direction : 'outbound', maxDepth : 2}, -/// {direction : 'outbound', maxDepth : 2}); +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// | g._commonNeighbors( +/// | 'germanCity/Hamburg', +/// | {}, +/// | {direction : 'outbound', maxDepth : 2}, +/// {direction : 'outbound', maxDepth : 2}); /// @END_EXAMPLE_ARANGOSH_OUTPUT /// /// @endDocuBlock // //////////////////////////////////////////////////////////////////////////////// -Graph.prototype._listCommonNeighbors = function(vertex1Example, vertex2Example, optionsVertex1, optionsVertex2) { +Graph.prototype._commonNeighbors = function(vertex1Example, vertex2Example, optionsVertex1, optionsVertex2) { var ex1 = transformExample(vertex1Example); var ex2 = transformExample(vertex2Example); @@ -2610,11 +2695,11 @@ Graph.prototype._listCommonNeighbors = function(vertex1Example, vertex2Example, }; //////////////////////////////////////////////////////////////////////////////// -/// @startDocuBlock JSF_general_graph_amount_common_neighbors +/// @startDocuBlock JSF_general_graph_count_common_neighbors /// -/// `general_graph._amountCommonNeighbors(vertex1Example, vertex2Examples, +/// `general_graph._countCommonNeighbors(vertex1Example, vertex2Examples, /// optionsVertex1, optionsVertex2)` -/// *The general_graph._amountCommonNeighbors function returns the amount of +/// *The general_graph._countCommonNeighbors function returns the amount of /// common neighbors of the vertices defined by the examples.* /// /// The function accepts an id, an example, a list of examples or even an empty @@ -2650,7 +2735,7 @@ Graph.prototype._listCommonNeighbors = function(vertex1Example, vertex2Example, /// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that /// match one of the examples. /// -/// @EXAMPLES +/// *Examples* /// /// A route planner example, all common neighbors of capitals. /// @@ -2658,17 +2743,17 @@ Graph.prototype._listCommonNeighbors = function(vertex1Example, vertex2Example, /// ~ var db = require("internal").db; /// var examples = require("org/arangodb/graph-examples/example-graph.js"); /// var g = examples.loadGraph("routeplanner"); -/// g._amountCommonNeighbors({isCapital : true}, {isCapital : true}); +/// g._countCommonNeighbors({isCapital : true}, {isCapital : true}); /// @END_EXAMPLE_ARANGOSH_OUTPUT /// -/// A route planner example, all common outbound neighbors of munich with any other location +/// A route planner example, all common outbound neighbors of Hamburg with any other location /// which have a maximal depth of 2 : /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleCommonNeighborsAmount2} /// ~ var db = require("internal").db; /// var examples = require("org/arangodb/graph-examples/example-graph.js"); /// var g = examples.loadGraph("routeplanner"); -/// |g._amountCommonNeighbors('city/Munich', {}, {direction : 'outbound', maxDepth : 2}, +/// |g._countCommonNeighbors('germanCity/Hamburg', {}, {direction : 'outbound', maxDepth : 2}, /// {direction : 'outbound', maxDepth : 2}); /// @END_EXAMPLE_ARANGOSH_OUTPUT /// @@ -2676,7 +2761,7 @@ Graph.prototype._listCommonNeighbors = function(vertex1Example, vertex2Example, // //////////////////////////////////////////////////////////////////////////////// -Graph.prototype._amountCommonNeighbors = function(vertex1Example, vertex2Example, optionsVertex1, optionsVertex2) { +Graph.prototype._countCommonNeighbors = function(vertex1Example, vertex2Example, optionsVertex1, optionsVertex2) { var ex1 = transformExample(vertex1Example); var ex2 = transformExample(vertex2Example); var query = "FOR e" @@ -2717,9 +2802,9 @@ Graph.prototype._amountCommonNeighbors = function(vertex1Example, vertex2Example //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_common_properties /// -/// `general_graph._listCommonProperties(vertex1Example, vertex2Examples, +/// `general_graph._commonProperties(vertex1Example, vertex2Examples, /// options)` -/// *The general_graph._listCommonProperties function returns the vertices of +/// *The general_graph._commonProperties function returns the vertices of /// the graph that share common properties.* /// /// The function accepts an id, an example, a list of examples or even an empty @@ -2746,7 +2831,7 @@ Graph.prototype._amountCommonNeighbors = function(vertex1Example, vertex2Example /// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that /// match one of the examples. /// -/// @EXAMPLES +/// *Examples* /// /// A route planner example, all locations with the same properties: /// @@ -2754,7 +2839,7 @@ Graph.prototype._amountCommonNeighbors = function(vertex1Example, vertex2Example /// ~ var db = require("internal").db; /// var examples = require("org/arangodb/graph-examples/example-graph.js"); /// var g = examples.loadGraph("routeplanner"); -/// g._listCommonProperties({}, {}); +/// g._commonProperties({}, {}); /// @END_EXAMPLE_ARANGOSH_OUTPUT /// /// A route planner example, all cities which share same properties except for population. @@ -2763,15 +2848,14 @@ Graph.prototype._amountCommonNeighbors = function(vertex1Example, vertex2Example /// ~ var db = require("internal").db; /// var examples = require("org/arangodb/graph-examples/example-graph.js"); /// var g = examples.loadGraph("routeplanner"); -/// |g._listCommonProperties({}, {}, {vertex1CollectionRestriction : 'city', -/// vertex2CollectionRestriction : 'city' ,ignoreProperties: 'population'}); +/// g._commonProperties({}, {}, {ignoreProperties: 'population'}); /// @END_EXAMPLE_ARANGOSH_OUTPUT /// /// @endDocuBlock // //////////////////////////////////////////////////////////////////////////////// -Graph.prototype._listCommonProperties = function(vertex1Example, vertex2Example, options) { +Graph.prototype._commonProperties = function(vertex1Example, vertex2Example, options) { var ex1 = transformExample(vertex1Example); var ex2 = transformExample(vertex2Example); @@ -2793,11 +2877,11 @@ Graph.prototype._listCommonProperties = function(vertex1Example, vertex2Example, }; //////////////////////////////////////////////////////////////////////////////// -/// @startDocuBlock JSF_general_graph_amount_common_properties +/// @startDocuBlock JSF_general_graph_count_common_properties /// -/// `general_graph._amountCommonProperties(vertex1Example, vertex2Examples, +/// `general_graph._countCommonProperties(vertex1Example, vertex2Examples, /// options)` -/// *The general_graph._amountCommonProperties function returns the amount of vertices of +/// *The general_graph._countCommonProperties function returns the amount of vertices of /// the graph that share common properties.* /// /// The function accepts an id, an example, a list of examples or even an empty @@ -2824,7 +2908,7 @@ Graph.prototype._listCommonProperties = function(vertex1Example, vertex2Example, /// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that /// match one of the examples. /// -/// @EXAMPLES +/// *Examples* /// /// A route planner example, all locations with the same properties: /// @@ -2832,24 +2916,24 @@ Graph.prototype._listCommonProperties = function(vertex1Example, vertex2Example, /// ~ var db = require("internal").db; /// var examples = require("org/arangodb/graph-examples/example-graph.js"); /// var g = examples.loadGraph("routeplanner"); -/// g._amountCommonProperties({}, {}); +/// g._countCommonProperties({}, {}); /// @END_EXAMPLE_ARANGOSH_OUTPUT /// -/// A route planner example, all cities which share same properties except for population. +/// A route planner example, all german cities which share same properties except for population. /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleAmountProperties2} /// ~ var db = require("internal").db; /// var examples = require("org/arangodb/graph-examples/example-graph.js"); /// var g = examples.loadGraph("routeplanner"); -/// |g._amountCommonProperties({}, {}, {vertex1CollectionRestriction : 'city', -/// vertex2CollectionRestriction : 'city' ,ignoreProperties: 'population'}); +/// |g._countCommonProperties({}, {}, {vertex1CollectionRestriction : 'germanCity', +/// vertex2CollectionRestriction : 'germanCity' ,ignoreProperties: 'population'}); /// @END_EXAMPLE_ARANGOSH_OUTPUT /// /// @endDocuBlock // //////////////////////////////////////////////////////////////////////////////// -Graph.prototype._amountCommonProperties = function(vertex1Example, vertex2Example, options) { +Graph.prototype._countCommonProperties = function(vertex1Example, vertex2Example, options) { var ex1 = transformExample(vertex1Example); var ex2 = transformExample(vertex2Example); var query = "FOR e" @@ -2875,6 +2959,625 @@ Graph.prototype._amountCommonProperties = function(vertex1Example, vertex2Exampl }; +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_absolute_eccentricity +/// +/// `general_graph._absoluteEccentricity(vertexExample, options)` +/// *The _absoluteEccentricity function returns the* +/// [eccentricity](http://en.wikipedia.org/wiki/Distance_%28graph_theory%29) +/// *of the vertices defined by the examples.* +/// +/// The function accepts an id, an example, a list of examples or even an empty +/// example as parameter for vertexExample. +/// +/// * String|Object|Array *vertexExample* : An example for the desired +/// vertices (see below). +/// * Object *options* : Optional options, see below: +/// +/// Possible options and there defaults: +/// * String *direction* : The direction of the edges. +/// Possible values are *outbound*, *inbound* and *any* (default). +/// * String|Array *edgeCollectionRestriction* : One or multiple edge +/// collections that should be considered. +/// * String|Array *startVertexCollectionRestriction* : One or multiple vertex +/// collections that should be considered. +/// * String|Array *endVertexCollectionRestriction* : One or multiple vertex +/// collections that should be considered. +/// * String|Object|Array *edgeExamples* : A filter example for the +/// edges in the shortest paths (see below). +/// * String *algorithm* : The algorithm to calculate +/// the shortest paths. +/// * String *weight* : The name of the attribute of +/// the edges containing the length. +/// * Number *defaultWeight* : Only used with the option *weight*. +/// If an edge does not have the attribute named as defined in option *weight* this default +/// is used as length. +/// If no default is supplied the default would be positive Infinity so the path and +/// hence the eccentricity can not be calculated. +/// +/// Examples for vertexExample: +/// * {} : Returns all possible vertices for this graph. +/// * *idString* : Returns the vertex with the id *idString*. +/// * {*key* : *value*} : Returns the vertices that match this example. +/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that +/// match one of the examples. +/// +/// @EXAMPLES +/// +/// A route planner example, the absolute eccentricity of all locations. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleAbsEccentricity1} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// |db._query("RETURN GRAPH_ABSOLUTE_ECCENTRICITY(" +/// |+"'routeplanner', {})" +/// ).toArray(); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the absolute eccentricity of all locations. +/// This considers the actual distances. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleAbsEccentricity2} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._absoluteEccentricity({}, {weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the absolute eccentricity of all cities regarding only +/// outbound paths. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleAbsEccentricity3} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// |g._absoluteEccentricity({}, {startVertexCollectionRestriction : 'city', +/// direction : 'outbound', weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// @endDocuBlock +// +//////////////////////////////////////////////////////////////////////////////// +Graph.prototype._absoluteEccentricity = function(vertexExample, options) { + var ex1 = transformExample(vertexExample); + var query = "RETURN" + + " GRAPH_ABSOLUTE_ECCENTRICITY(@graphName" + + ',@ex1' + + ',@options' + + ')'; + options = options || {}; + var bindVars = { + "graphName": this.__name, + "options": options, + "ex1": ex1 + }; + var result = db._query(query, bindVars).toArray(), returnHash = []; + return result; +}; + + +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_eccentricity +/// +/// `general_graph._eccentricity(vertexExample, options)` +/// *The _eccentricity function returns the normalized* +/// [eccentricity](http://en.wikipedia.org/wiki/Distance_%28graph_theory%29) +/// *of the vertices defined by the examples.* +/// +/// * Object *options* : Optional options, see below: +/// +/// Possible options and there defaults: +/// * String *direction* : The direction of the edges. +/// Possible values are *outbound*, *inbound* and *any* (default). +/// * String *algorithm* : The algorithm to calculate +/// the shortest paths. +/// * String *weight* : The name of the attribute of +/// the edges containing the length. +/// * Number *defaultWeight* : Only used with the option *weight*. +/// If an edge does not have the attribute named as defined in option *weight* this default +/// is used as length. +/// If no default is supplied the default would be positive Infinity so the path and +/// hence the eccentricity can not be calculated. +/// +/// @EXAMPLES +/// +/// A route planner example, the eccentricity of all locations. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleEccentricity2} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._eccentricity(); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the weighted eccentricity. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleEccentricity3} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._eccentricity({weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// @endDocuBlock +// +//////////////////////////////////////////////////////////////////////////////// +Graph.prototype._eccentricity = function(options) { + var query = "RETURN" + + " GRAPH_ECCENTRICITY(@graphName" + + ',@options' + + ')'; + options = options || {}; + var bindVars = { + "graphName": this.__name, + "options": options + }; + var result = db._query(query, bindVars).toArray(), returnHash = []; + return result; +}; + + + +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_absolute_closeness +/// +/// `general_graph._absoluteCloseness(vertexExample, options)` +/// *The _absoluteCloseness function returns the* +/// [closeness](http://en.wikipedia.org/wiki/Centrality#Closeness_centrality) +/// *of the vertices defined by the examples.* +/// +/// The function accepts an id, an example, a list of examples or even an empty +/// example as parameter for vertexExample. +/// +/// * String|Object|Array *vertexExample* : An example for the desired +/// vertices (see below). +/// * Object *options* : Optional options, see below: +/// +/// Possible options and there defaults: +/// * String *direction* : The direction of the edges. +/// Possible values are *outbound*, *inbound* and *any* (default). +/// * String|Array *edgeCollectionRestriction* : One or multiple edge +/// collections that should be considered. +/// * String|Array *startVertexCollectionRestriction* : One or multiple vertex +/// collections that should be considered. +/// * String|Array *endVertexCollectionRestriction* : One or multiple vertex +/// collections that should be considered. +/// * String|Object|Array *edgeExamples* : A filter example for the +/// edges in the shortest paths (see below). +/// * String *algorithm* : The algorithm to calculate +/// the shortest paths. +/// * String *weight* : The name of the attribute of +/// the edges containing the length. +/// * Number *defaultWeight* : Only used with the option *weight*. +/// If an edge does not have the attribute named as defined in option *weight* this default +/// is used as length. +/// If no default is supplied the default would be positive Infinity so the path and +/// hence the eccentricity can not be calculated. +/// +/// Examples for vertexExample: +/// * {} : Returns all possible vertices for this graph. +/// * *idString* : Returns the vertex with the id *idString*. +/// * {*key* : *value*} : Returns the vertices that match this example. +/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that +/// match one of the examples. +/// +/// @EXAMPLES +/// +/// A route planner example, the absolute closeness of all locations. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleAbsCloseness1} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._absoluteCloseness({}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the absolute closeness of all locations. +/// This considers the actual distances. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleAbsCloseness2} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._absoluteCloseness({}, {weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the absolute closeness of all germanCities regarding only +/// outbound paths. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleAbsCloseness3} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// |g._absoluteCloseness({}, {startVertexCollectionRestriction : 'germanCity', +/// direction : 'outbound', weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// @endDocuBlock +// +//////////////////////////////////////////////////////////////////////////////// +Graph.prototype._absoluteCloseness = function(vertexExample, options) { + var ex1 = transformExample(vertexExample); + var query = "RETURN" + + " GRAPH_ABSOLUTE_CLOSENESS(@graphName" + + ',@ex1' + + ',@options' + + ')'; + options = options || {}; + var bindVars = { + "graphName": this.__name, + "options": options, + "ex1": ex1 + }; + var result = db._query(query, bindVars).toArray(), returnHash = []; + return result; +}; + +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_closeness +/// +/// `general_graph._closeness(options)` +/// *The _closeness function returns the normalized* +/// [closeness](http://en.wikipedia.org/wiki/Centrality#Closeness_centrality) +/// *of graphs vertices.* +/// +/// * Object *options* : Optional options, see below: +/// +/// Possible options and there defaults: +/// * String *direction* : The direction of the edges. +/// Possible values are *outbound*, *inbound* and *any* (default). +/// * String *algorithm* : The algorithm to calculate +/// the shortest paths. +/// * String *weight* : The name of the attribute of +/// the edges containing the length. +/// * Number *defaultWeight* : Only used with the option *weight*. +/// If an edge does not have the attribute named as defined in option *weight* this default +/// is used as length. +/// If no default is supplied the default would be positive Infinity so the path and +/// hence the eccentricity can not be calculated. +/// +/// @EXAMPLES +/// +/// A route planner example, the normalized closeness of all locations. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleCloseness1} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._closeness(); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the closeness of all locations. +/// This considers the actual distances. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleCloseness2} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._closeness({weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the closeness of all cities regarding only +/// outbound paths. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleCloseness3} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._closeness({direction : 'outbound', weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// @endDocuBlock +// +//////////////////////////////////////////////////////////////////////////////// +Graph.prototype._closeness = function(options) { + var query = "RETURN" + + " GRAPH_CLOSENESS(@graphName" + + ',@options' + + ')'; + options = options || {}; + var bindVars = { + "graphName": this.__name, + "options": options + }; + var result = db._query(query, bindVars).toArray(), returnHash = []; + return result; +}; + + + +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_absolute_betweenness +/// +/// `general_graph._absoluteBetweenness(options)` +/// *The _absoluteBetweenness function returns the* +/// [betweenness](http://en.wikipedia.org/wiki/Betweenness_centrality) +/// *of all vertices in the graph.* +/// +/// +/// * Object *options* : Optional options, see below: +/// +/// Possible options and there defaults: +/// * String *direction* : The direction of the edges. +/// Possible values are *outbound*, *inbound* and *any* (default). +/// * String *weight* : The name of the attribute of +/// the edges containing the length. +/// * Number *defaultWeight* : Only used with the option *weight*. +/// If an edge does not have the attribute named as defined in option *weight* this default +/// is used as length. +/// If no default is supplied the default would be positive Infinity so the path and +/// hence the betweenness can not be calculated. +/// +/// @EXAMPLES +/// +/// A route planner example, the absolute betweenness of all locations. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleAbsBetweenness1} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._absoluteBetweenness({}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the absolute betweenness of all locations. +/// This considers the actual distances. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleAbsBetweenness2} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._absoluteBetweenness({weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the absolute closeness of all cities regarding only +/// outbound paths. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleAbsBetweenness3} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._absoluteBetweenness({direction : 'outbound', weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// @endDocuBlock +// +//////////////////////////////////////////////////////////////////////////////// +Graph.prototype._absoluteBetweenness = function(options) { + + var query = "RETURN" + + " GRAPH_ABSOLUTE_BETWEENNESS(@graphName" + + ',@options' + + ')'; + options = options || {}; + var bindVars = { + "graphName": this.__name, + "options": options + }; + var result = db._query(query, bindVars).toArray(), returnHash = []; + return result; +}; + +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_betweenness +/// +/// `general_graph._betweenness(options)` +/// *The _betweenness function returns the* +/// [betweenness](http://en.wikipedia.org/wiki/Betweenness_centrality) +/// *of graphs vertices.* +/// +/// * Object *options* : Optional options, see below: +/// +/// Possible options and there defaults: +/// * String *direction* : The direction of the edges. +/// Possible values are *outbound*, *inbound* and *any* (default). +/// * String *weight* : The name of the attribute of +/// the edges containing the length. +/// * Number *defaultWeight* : Only used with the option *weight*. +/// If an edge does not have the attribute named as defined in option *weight* this default +/// is used as length. +/// If no default is supplied the default would be positive Infinity so the path and +/// hence the eccentricity can not be calculated. +/// +/// @EXAMPLES +/// +/// A route planner example, the betweenness of all locations. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleBetweenness1} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._betweenness(); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the closeness of all locations. +/// This considers the actual distances. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleBetweenness2} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._betweenness({weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the closeness of all cities regarding only +/// outbound paths. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleBetweenness3} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._betweenness({direction : 'outbound', weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// @endDocuBlock +// +//////////////////////////////////////////////////////////////////////////////// +Graph.prototype._betweenness = function(options) { + + var query = "RETURN" + + " GRAPH_BETWEENNESS(@graphName" + + ',@options' + + ')'; + options = options || {}; + var bindVars = { + "graphName": this.__name, + "options": options + }; + var result = db._query(query, bindVars).toArray(), returnHash = []; + return result; +}; + + + +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_radius +/// +/// `general_graph._radius(options)` +/// *The _radius function returns the* +/// [radius](http://en.wikipedia.org/wiki/Eccentricity_%28graph_theory%29) +/// *of a graph.* +/// +/// * Object *options* : Optional options, see below: +/// +/// Possible options and there defaults: +/// * String *direction* : The direction of the edges. +/// Possible values are *outbound*, *inbound* and *any* (default). +/// * String *algorithm* : The algorithm to calculate +/// the shortest paths. +/// * String *weight* : The name of the attribute of +/// the edges containing the length. +/// * Number *defaultWeight* : Only used with the option *weight*. +/// If an edge does not have the attribute named as defined in option *weight* this default +/// is used as length. +/// If no default is supplied the default would be positive Infinity so the path and +/// hence the eccentricity can not be calculated. +/// +/// @EXAMPLES +/// +/// A route planner example, the radius of the graph. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleRadius1} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._radius(); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the radius of the graph. +/// This considers the actual distances. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleRadius2} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._radius({weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the radius of the graph regarding only +/// outbound paths. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleRadius3} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._radius({direction : 'outbound', weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// @endDocuBlock +// +//////////////////////////////////////////////////////////////////////////////// +Graph.prototype._radius = function(options) { + + var query = "RETURN" + + " GRAPH_RADIUS(@graphName" + + ',@options' + + ')'; + options = options || {}; + var bindVars = { + "graphName": this.__name, + "options": options + }; + var result = db._query(query, bindVars).toArray(), returnHash = []; + return result; +}; + + + +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_diameter +/// +/// `general_graph._diameter(graphName, options)` +/// *The _diameter function returns the* +/// [diameter](http://en.wikipedia.org/wiki/Eccentricity_%28graph_theory%29) +/// *of a graph.* +/// +/// * Object *options* : Optional options, see below: +/// +/// Possible options and there defaults: +/// * String *direction* : The direction of the edges. +/// Possible values are *outbound*, *inbound* and *any* (default). +/// * String *algorithm* : The algorithm to calculate +/// the shortest paths. +/// * String *weight* : The name of the attribute of +/// the edges containing the length. +/// * Number *defaultWeight* : Only used with the option *weight*. +/// If an edge does not have the attribute named as defined in option *weight* this default +/// is used as length. +/// If no default is supplied the default would be positive Infinity so the path and +/// hence the eccentricity can not be calculated. +/// +/// @EXAMPLES +/// +/// A route planner example, the diameter of the graph. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleDiameter1} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._diameter(); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the diameter of the graph. +/// This considers the actual distances. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleDiameter2} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._diameter({weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// A route planner example, the diameter of the graph regarding only +/// outbound paths. +/// +/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleDiameter3} +/// ~ var db = require("internal").db; +/// var examples = require("org/arangodb/graph-examples/example-graph.js"); +/// var g = examples.loadGraph("routeplanner"); +/// g._diameter({direction : 'outbound', weight : 'distance'}); +/// @END_EXAMPLE_ARANGOSH_OUTPUT +/// +/// @endDocuBlock +// +//////////////////////////////////////////////////////////////////////////////// +Graph.prototype._diameter = function(options) { + + var query = "RETURN" + + " GRAPH_DIAMETER(@graphName" + + ',@options' + + ')'; + options = options || {}; + var bindVars = { + "graphName": this.__name, + "options": options + }; + var result = db._query(query, bindVars).toArray(), returnHash = []; + return result; +}; + + + //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph__extendEdgeDefinitions diff --git a/js/common/modules/org/arangodb/general-graph.js b/js/common/modules/org/arangodb/general-graph.js index 5e0351c65e..49755e8888 100644 --- a/js/common/modules/org/arangodb/general-graph.js +++ b/js/common/modules/org/arangodb/general-graph.js @@ -177,6 +177,22 @@ var wrapCollection = function(col) { return wrapper; }; +//////////////////////////////////////////////////////////////////////////////// +/// @startDocuBlock JSF_general_graph_example_description +/// +/// For many of the following functions *examples* can be passed in as a parameter. +/// *Examples* are used to filter the result set for objects that match the conditions. +/// These *examples* can have the following values: +/// +/// * Empty, there is no matching executed all found results are valid. +/// * A string, only the result having this value as it's *_id* is returned. +/// * An example object, defining a set of attributes. +/// Only results having these attributes are matched. +/// * A list containing example objects and/or strings. +/// All results matching at least one of the elements in the list are returned. +/// +/// @endDocuBlock +//////////////////////////////////////////////////////////////////////////////// var transformExample = function(example) { if (example === undefined) { @@ -395,23 +411,16 @@ AQLGenerator.prototype._edges = function(edgeExample, options) { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_edges -/// Select all edges for the vertices selected before. +/// `graph_query.edges(examples)` +/// *Select all edges for the vertices selected before.* /// -/// `graph-query.edges(examples)` /// /// Creates an AQL statement to select all edges for each of the vertices selected /// in the step before. /// This will include *inbound* as well as *outbound* edges. /// The resulting set of edges can be filtered by defining one or more *examples*. /// -/// *examples* can have the following values: -/// -/// * Empty, there is no matching executed all edges are valid. -/// * A string, only the edge having this value as it's id is returned. -/// * An example object, defining a set of attributes. -/// Only edges having these attributes are matched. -/// * A list containing example objects and/or strings. -/// All edges matching at least one of the elements in the list are returned. +/// * *examples*: See [Definition of examples](#definition_of_examples) /// /// *Examples* /// @@ -452,22 +461,15 @@ AQLGenerator.prototype.edges = function(example) { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_outEdges -/// Select all outbound edges for the vertices selected before. +/// `graph_query.outEdges(examples)` +/// *Select all outbound edges for the vertices selected before.* /// -/// `graph-query.outEdges(examples)` /// /// Creates an AQL statement to select all *outbound* edges for each of the vertices selected /// in the step before. /// The resulting set of edges can be filtered by defining one or more *examples*. /// -/// *examples* can have the following values: -/// -/// * Empty, there is no matching executed all edges are valid. -/// * A string, only the edge having this value as it's id is returned. -/// * An example object, defining a set of attributes. -/// Only edges having these attributes are matched. -/// * A list containing example objects and/or strings. -/// All edges matching at least one of the elements in the list are returned. +/// * *examples*: See [Definition of examples](#definition_of_examples) /// /// *Examples* /// @@ -508,22 +510,15 @@ AQLGenerator.prototype.outEdges = function(example) { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_inEdges -/// Select all inbound edges for the vertices selected before. +/// `graph_query.inEdges(examples)` +/// *Select all inbound edges for the vertices selected before.* /// -/// `graph-query.inEdges(examples)` /// /// Creates an AQL statement to select all *inbound* edges for each of the vertices selected /// in the step before. /// The resulting set of edges can be filtered by defining one or more *examples*. /// -/// *examples* can have the following values: -/// -/// * Empty, there is no matching executed all edges are valid. -/// * A string, only the edge having this value as it's id is returned. -/// * An example object, defining a set of attributes. -/// Only edges having these attributes are matched. -/// * A list containing example objects and/or strings. -/// All edges matching at least one of the elements in the list are returned. +/// * *examples*: See [Definition of examples](#definition_of_examples) /// /// *Examples* /// @@ -594,23 +589,16 @@ AQLGenerator.prototype._vertices = function(example, options) { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_vertices -/// Select all vertices connected to the edges selected before. +/// `graph_query.vertices(examples)` +/// *Select all vertices connected to the edges selected before.* /// -/// `graph-query.vertices(examples)` /// /// Creates an AQL statement to select all vertices for each of the edges selected /// in the step before. /// This includes all vertices contained in *_from* as well as *_to* attribute of the edges. /// The resulting set of vertices can be filtered by defining one or more *examples*. /// -/// *examples* can have the following values: -/// -/// * Empty, there is no matching executed all vertices are valid. -/// * A string, only the vertex having this value as it's id is returned. -/// * An example object, defining a set of attributes. -/// Only vertices having these attributes are matched. -/// * A list containing example objects and/or strings. -/// All vertices matching at least one of the elements in the list are returned. +/// * *examples*: See [Definition of examples](#definition_of_examples) /// /// *Examples* /// @@ -664,23 +652,16 @@ AQLGenerator.prototype.vertices = function(example) { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_fromVertices -/// Select all vertices where the edges selected before start. +/// `graph_query.vertices(examples)` +/// *Select all vertices where the edges selected before start.* /// -/// `graph-query.vertices(examples)` /// /// Creates an AQL statement to select the set of vertices where the edges selected /// in the step before start at. /// This includes all vertices contained in *_from* attribute of the edges. /// The resulting set of vertices can be filtered by defining one or more *examples*. /// -/// *examples* can have the following values: -/// -/// * Empty, there is no matching executed all vertices are valid. -/// * A string, only the vertex having this value as it's id is returned. -/// * An example object, defining a set of attributes. -/// Only vertices having these attributes are matched. -/// * A list containing example objects and/or strings. -/// All vertices matching at least one of the elements in the list are returned. +/// * *examples*: See [Definition of examples](#definition_of_examples) /// /// *Examples* /// @@ -732,23 +713,16 @@ AQLGenerator.prototype.fromVertices = function(example) { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_toVertices -/// Select all vertices targeted by the edges selected before. +/// `graph_query.vertices(examples)` +/// *Select all vertices targeted by the edges selected before.* /// -/// `graph-query.vertices(examples)` /// /// Creates an AQL statement to select the set of vertices where the edges selected /// in the step before end in. /// This includes all vertices contained in *_to* attribute of the edges. /// The resulting set of vertices can be filtered by defining one or more *examples*. /// -/// *examples* can have the following values: -/// -/// * Empty, there is no matching executed all vertices are valid. -/// * A string, only the vertex having this value as it's id is returned. -/// * An example object, defining a set of attributes. -/// Only vertices having these attributes are matched. -/// * A list containing example objects and/or strings. -/// All vertices matching at least one of the elements in the list are returned. +/// * *examples*: See [Definition of examples](#definition_of_examples) /// /// *Examples* /// @@ -817,7 +791,8 @@ AQLGenerator.prototype.getLastVar = function() { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_path -/// The result of the query is the path to all elements. +/// `graph_query.path()` +/// *The result of the query is the path to all elements.* /// /// By defaut the result of the generated AQL query is the set of elements passing the last matches. /// So having a `vertices()` query as the last step the result will be set of vertices. @@ -870,35 +845,25 @@ AQLGenerator.prototype.pathEdges = function() { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_neighbors -/// Select all neighbors of the vertices selected in the step before. +/// `graph_query.neighbors(examples, options)` +/// *Select all neighbors of the vertices selected in the step before.* /// -/// `graph-query.neighbors(examples)` /// /// Creates an AQL statement to select all neighbors for each of the vertices selected /// in the step before. /// The resulting set of vertices can be filtered by defining one or more *examples*. /// -/// *examples* can have the following values: -/// -/// * Empty, there is no matching executed all vertices are valid. -/// * A string, only the vertex having this value as it's id is returned. -/// * An example object, defining a set of attributes. -/// Only vertices having these attributes are matched. -/// * A list containing example objects and/or strings. -/// All vertices matching at least one of the elements in the list are returned. -/// Possible options and there defaults: -/// * String *direction* : The direction of the -/// edges. Possible values are *outbound*, *inbound* and *any* (default). -/// * String|Object|Array *edgeExamples* : A filter example -/// for the edges to the neighbors (see below). -/// * String|Array *edgeCollectionRestriction* : One or multiple -/// edge collections that should be considered. -/// * String|Array *vertexCollectionRestriction* : One or multiple -/// vertex collections that should be considered. -/// * Number *minDepth* : Defines the minimal -/// depth a path to a neighbor must have to be returned (default is 1). -/// * Number *maxDepth* : Defines the maximal -/// depth a path to a neighbor must have to be returned (default is 1). +/// * *examples*: See [Definition of examples](#definition_of_examples) +/// * *options* (optional): An object defining further options. Can have the following values: +/// Possible options and their defaults: +/// * *direction*: The direction of the edges. Possible values are *outbound*, *inbound* and *any* (default). +/// * *edgeExamples*: See [Definition of examples](#definition_of_examples) +/// * *edgeCollectionRestriction* : One or a list of edge-collection names that should be +/// considered to be on the path. +/// * *vertexCollectionRestriction* : One or a list of vertex-collection names that should be +/// considered on the intermediate vertex steps. +/// * *minDepth*: Defines the minimal number of intermediate steps to neighbors (default is 1). +/// * *maxDepth*: Defines the maximal number of intermediate steps to neighbors (default is 1). /// /// *Examples* /// @@ -981,10 +946,10 @@ AQLGenerator.prototype._getLastRestrictableStatementInfo = function() { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_restrict -/// Restricts the last statement in the chain to return -/// only elements of a specified set of collections +/// `graph_query.restrict(restrictions)` +/// *Restricts the last statement in the chain to return +/// only elements of a specified set of collections* /// -/// `graph-query.restrict(restrictions)` /// /// By default all collections in the graph are searched for matching elements /// whenever vertices and edges are requested. @@ -993,12 +958,8 @@ AQLGenerator.prototype._getLastRestrictableStatementInfo = function() { /// Restriction is only applied to this one part of the query. /// It does not effect earlier or later statements. /// -/// *restrictions* can have the following values: -/// -/// * A string defining the name of one specific collection in the graph. -/// Only elements from this collection are used for matching -/// * A list of strings defining a set of collection names. -/// Elements from all collections in this set are used for matching +/// * *restrictions*: Define either one or a list of collections in the graph. +/// Only elements from these collections are taken into account for the result. /// /// *Examples* /// @@ -1062,20 +1023,13 @@ AQLGenerator.prototype.restrict = function(restrictions) { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_filter -/// Filter the result of the query -/// -/// `graph-query.filter(examples)` +/// `graph_query.filter(examples)` +/// *Filter the result of the query* /// /// This can be used to further specfiy the expected result of the query. /// The result set is reduced to the set of elements that matches the given *examples*. /// -/// *examples* can have the following values: -/// -/// * A string, only the elements having this value as it's id is returned. -/// * An example object, defining a set of attributes. -/// Only elements having these attributes are matched. -/// * A list containing example objects and/or strings. -/// All elements matching at least one of the elements in the list are returned. +/// * *examples*: See [Definition of examples](#definition_of_examples) /// /// *Examples* /// @@ -1159,9 +1113,9 @@ AQLGenerator.prototype.execute = function() { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_toArray -/// Returns an array containing the complete result. -/// /// `graph-query.toArray()` +/// *Returns an array containing the complete result.* +/// /// /// This function executes the generated query and returns the /// entire result as one array. From 99a67861e6f54a2f225c91328470e2f660b6900a Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 20 Jun 2014 15:51:53 +0200 Subject: [PATCH 2/8] fixed VS warnings --- arangod/Wal/Marker.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arangod/Wal/Marker.cpp b/arangod/Wal/Marker.cpp index 60c05ad107..49e0fb436a 100644 --- a/arangod/Wal/Marker.cpp +++ b/arangod/Wal/Marker.cpp @@ -882,8 +882,8 @@ DocumentMarker::DocumentMarker (TRI_voc_tick_t databaseId, m->_shape = shapedJson->_sid; m->_offsetKey = sizeof(document_marker_t); // start position of key - m->_offsetLegend = m->_offsetKey + alignedSize(key.size() + 1); - m->_offsetJson = m->_offsetLegend + alignedSize(legend.getSize()); + m->_offsetLegend = static_cast(m->_offsetKey + alignedSize(key.size() + 1)); + m->_offsetJson = static_cast(m->_offsetLegend + alignedSize(legend.getSize())); storeSizedString(m->_offsetKey, key); @@ -1016,10 +1016,10 @@ EdgeMarker::EdgeMarker (TRI_voc_tick_t databaseId, m->_offsetKey = sizeof(edge_marker_t); // start position of key m->_toCid = edge->_toCid; m->_fromCid = edge->_fromCid; - m->_offsetToKey = m->_offsetKey + alignedSize(key.size() + 1); - m->_offsetFromKey = m->_offsetToKey + alignedSize(strlen(edge->_toKey) + 1); - m->_offsetLegend = m->_offsetFromKey + alignedSize(strlen(edge->_fromKey) + 1); - m->_offsetJson = m->_offsetLegend + alignedSize(legend.getSize()); + m->_offsetToKey = static_cast(m->_offsetKey + alignedSize(key.size() + 1)); + m->_offsetFromKey = static_cast(m->_offsetToKey + alignedSize(strlen(edge->_toKey) + 1)); + m->_offsetLegend = static_cast(m->_offsetFromKey + alignedSize(strlen(edge->_fromKey) + 1)); + m->_offsetJson = static_cast(m->_offsetLegend + alignedSize(legend.getSize())); // store keys storeSizedString(m->_offsetKey, key.c_str()); From 248b3e3329758d5377b3876e2c0a4dc757053f5a Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Fri, 20 Jun 2014 15:59:45 +0200 Subject: [PATCH 3/8] fixed typo --- js/server/modules/org/arangodb/foxx/manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/server/modules/org/arangodb/foxx/manager.js b/js/server/modules/org/arangodb/foxx/manager.js index d9d8c2f230..43e444b724 100644 --- a/js/server/modules/org/arangodb/foxx/manager.js +++ b/js/server/modules/org/arangodb/foxx/manager.js @@ -1080,7 +1080,7 @@ exports.mount = function (appId, mount, options) { } catch (err2) { markAsIllegal(doc, err2); - throw err; + throw err2; } } From c0cbe73476f56b5e2b17f05efeb025b5e60887b8 Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Fri, 20 Jun 2014 16:01:25 +0200 Subject: [PATCH 4/8] Futher layout optimization of FluentAQL Graph Module --- .../modules/org/arangodb/general-graph.js | 170 ++++++++++-------- 1 file changed, 99 insertions(+), 71 deletions(-) diff --git a/js/common/modules/org/arangodb/general-graph.js b/js/common/modules/org/arangodb/general-graph.js index 49755e8888..26fd97dae7 100644 --- a/js/common/modules/org/arangodb/general-graph.js +++ b/js/common/modules/org/arangodb/general-graph.js @@ -184,12 +184,12 @@ var wrapCollection = function(col) { /// *Examples* are used to filter the result set for objects that match the conditions. /// These *examples* can have the following values: /// -/// * Empty, there is no matching executed all found results are valid. -/// * A string, only the result having this value as it's *_id* is returned. -/// * An example object, defining a set of attributes. -/// Only results having these attributes are matched. -/// * A list containing example objects and/or strings. -/// All results matching at least one of the elements in the list are returned. +/// * Empty, there is no matching executed all found results are valid. +/// * A string, only the result having this value as it's *_id* is returned. +/// * An example object, defining a set of attributes. +/// Only results having these attributes are matched. +/// * A list containing example objects and/or strings. +/// All results matching at least one of the elements in the list are returned. /// /// @endDocuBlock //////////////////////////////////////////////////////////////////////////////// @@ -1113,7 +1113,7 @@ AQLGenerator.prototype.execute = function() { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_toArray -/// `graph-query.toArray()` +/// `graph_query.toArray()` /// *Returns an array containing the complete result.* /// /// @@ -1145,9 +1145,8 @@ AQLGenerator.prototype.toArray = function() { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_count -/// Returns the number of returned elements if the query is executed. -/// -/// `graph-query.count()` +/// `graph_query.count()` +/// *Returns the number of returned elements if the query is executed.* /// /// This function determines the amount of elements to be expected within the result of the query. /// It can be used at the beginning of execution of the query @@ -1176,9 +1175,8 @@ AQLGenerator.prototype.count = function() { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_hasNext -/// Checks if the query has further results. -/// -/// `graph-query.neighbors(examples)` +/// `graph_query.neighbors(examples)` +/// *Checks if the query has further results.* /// /// The generated statement maintains a cursor for you. /// If this cursor is already present *hasNext()* will @@ -1217,9 +1215,8 @@ AQLGenerator.prototype.hasNext = function() { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_fluent_aql_next -/// Request the next element in the result. -/// -/// `graph-query.next()` +/// `graph_query.next()` +/// *Request the next element in the result.* /// /// The generated statement maintains a cursor for you. /// If this cursor is already present *next()* will @@ -1267,8 +1264,7 @@ AQLGenerator.prototype.next = function() { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_undirectedRelation -/// -/// `general-graph._undirectedRelation(relationName, vertexCollections)` +/// `graph_module._undirectedRelation(relationName, vertexCollections)` /// *Define an undirected relation.* /// /// Defines an undirected relation with the name *relationName* using the @@ -1276,6 +1272,11 @@ AQLGenerator.prototype.next = function() { /// edges in any direction between any pair of vertices within the /// *vertexCollections*. /// +/// * *relationName*: The name of the edge collection where the edges should be stored. +/// Will be created if it does not yet exist. +/// * *vertexCollections*: One or a list of collection names for which connections are allowed. +/// Will be created if they do not exist. +/// /// *Examples* /// /// To define simple relation with only one vertex collection: @@ -1318,13 +1319,9 @@ var _undirectedRelation = function (relationName, vertexCollections) { }; -//////////////////////////////////////////////////////////////////////////////// -/// Define an directed relation. -//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_directedRelation -/// -/// `general-graph._directedRelation(relationName, fromVertexCollections, toVertexCollections)` +/// `graph_module._directedRelation(relationName, fromVertexCollections, toVertexCollections)` /// *Define a directed relation.* /// /// The *relationName* defines the name of this relation and references to the underlying edge collection. @@ -1333,6 +1330,13 @@ var _undirectedRelation = function (relationName, vertexCollections) { /// Relations are only allowed in the direction from any collection in *fromVertexCollections* /// to any collection in *toVertexCollections*. /// +/// * *relationName*: The name of the edge collection where the edges should be stored. +/// Will be created if it does not yet exist. +/// * *fromVertexCollections*: One or a list of collection names. Source vertices for the edges +/// have to be stored in these collections. Collections will be created if they do not exist. +/// * *toVertexCollections*: One or a list of collection names. Target vertices for the edges +/// have to be stored in these collections. Collections will be created if they do not exist. +/// /// *Examples* /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphDirectedRelationDefinition} @@ -1371,17 +1375,13 @@ var _directedRelation = function ( }; //////////////////////////////////////////////////////////////////////////////// -/// @startDocuBlock JSF_general_graph_list_call -/// `general-graph._list()` +/// @startDocuBlock JSF_general_graph_list +/// `general_graph._list()` /// *List all graphs.* -/// @endDocuBlock -/// -/// @startDocuBlock JSF_general_graph_list_info +// /// Lists all graph names stored in this database. /// /// *Examples* -/// @endDocuBlock -/// @startDocuBlock JSF_general_graph_list_examples /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphList} /// var graph = require("org/arangodb/general-graph"); @@ -1400,14 +1400,19 @@ var _list = function() { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_edge_definitions +/// `graph_module._edgeDefinitions(relation1, relation2, ..., relationN)` +/// *Create a list of edge definitions to construct a graph.* /// /// The edge definitions for a graph is an array containing arbitrary many directed /// and/or undirected relations as defined below. /// The list of edge definitions of a graph can be managed by the graph module itself. /// This function is the entry point for the management and will return the correct list. /// -/// *Examples* +/// *Parameter* /// +/// * *relationX*: An object representing a definition of one relation in the graph +/// +/// *Examples* /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitions} /// var graph = require("org/arangodb/general-graph"); @@ -1434,10 +1439,17 @@ var _edgeDefinitions = function () { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_extend_edge_definitions +/// `graph_module._extendEdgeDefinitions(edgeDefinitions, relation1, relation2, ..., relationN)` +/// *Extend the list of edge definitions to construct a graph.* /// /// In order to add more edge definitions to the graph before creating /// this function can be used to add more definitions to the initial list. /// +/// *Parameter* +/// +/// * *edgeDefinitions*: An list of relation definition objects. +/// * *relationX*: An object representing a definition of one relation in the graph +/// /// *Examples* /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitionsExtend} @@ -1471,7 +1483,7 @@ var _extendEdgeDefinitions = function (edgeDefinition) { //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_create -/// `general-graph._create(graph-name, edge-definitions, orphan-collections)` +/// `graph_module._create(graphName, edgeDefinitions, orphanCollections)` /// *Create a graph* /// /// @@ -1482,9 +1494,11 @@ var _extendEdgeDefinitions = function (edgeDefinition) { /// These collections are refered to as orphan collections within this chapter. /// All collections used within the creation process are created if they do not exist. /// -/// * *graph-name*: string - unique identifier of the graph -/// * *edge-definitions*: array - list of edge definition objects -/// * *orphan-collections*: array - list of additonal vertex collection names +/// *Parameter* +/// +/// * *graphName*: Unique identifier of the graph +/// * *edgeDefinitions* (optional): List of relation definition objects +/// * *orphanCollections* (optional): List of additonal vertex collection names /// /// *Examples* /// @@ -1811,16 +1825,14 @@ var updateBindCollections = function(graph) { bindVertexCollections(graph, graph.__orphanCollections); }; -//////////////////////////////////////////////////////////////////////////////// -/// @brief constructor. -//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_vertex_collection_save -/// Creates and saves a new vertex in collection *vertexCollectionName* +/// `graph.vertexCollectionName.save(data)` +/// *Create a new vertex in vertexCollectionName* /// -/// `general-graph.vertexCollectionName.save(data)` +/// *Parameter* /// -/// *data*: json - data of vertex +/// * *data*: Json data of vertex. /// /// *Examples* /// @@ -1835,13 +1847,14 @@ var updateBindCollections = function(graph) { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_vertex_collection_replace -/// Replaces the data of a vertex in collection *vertexCollectionName* +/// `graph.vertexCollectionName.replace(vertexId, data, options)` +/// *Replaces the data of a vertex in collection vertexCollectionName* /// -/// `general-graph.vertexCollectionName.replace(vertexId, data, options)` +/// *Parameter* /// -/// *vertexId*: string - id of the vertex -/// *data*: json - data of vertex -/// *options*: json - (optional) - see collection documentation +/// * *vertexId*: *_id* attribute of the vertex +/// * *data*: Json data of vertex. +/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md) /// /// *Examples* /// @@ -1857,13 +1870,14 @@ var updateBindCollections = function(graph) { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_vertex_collection_update -/// Updates the data of a vertex in collection *vertexCollectionName* +/// `graph.vertexCollectionName.update(vertexId, data, options)` +/// *Updates the data of a vertex in collection vertexCollectionName* /// -/// `general-graph.vertexCollectionName.update(vertexId, data, options)` +/// *Parameter* /// -/// *vertexId*: string - id of the vertex -/// *data*: json - data of vertex -/// *options*: json - (optional) - see collection documentation +/// * *vertexId*: *_id* attribute of the vertex +/// * *data*: Json data of vertex. +/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md) /// /// *Examples* /// @@ -1879,13 +1893,18 @@ var updateBindCollections = function(graph) { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_vertex_collection_remove +/// `graph.vertexCollectionName.remove(vertexId, options)` /// Removes a vertex in collection *vertexCollectionName* /// -/// `general-graph.vertexCollectionName.remove(vertexId, options)` /// /// Additionally removes all ingoing and outgoing edges of the vertex recursively /// (see [edge remove](#edge.remove)). /// +/// *Parameter* +/// +/// * *vertexId*: *_id* attribute of the vertex +/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md) +/// /// *Examples* /// /// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVertexCollectionRemove} @@ -1902,14 +1921,15 @@ var updateBindCollections = function(graph) { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_edge_collection_save -/// Creates and saves a new edge from vertex *from* to vertex *to* in -/// collection *edgeCollectionName* +/// `graph.edgeCollectionName.save(from, to, data, options)` +/// *Creates an edge from vertex *from* to vertex *to* in collection edgeCollectionName* /// -/// `general-graph.edgeCollectionName.save(from, to, data)` +/// *Parameter* /// -/// *from*: string - id of outgoing vertex -/// *to*: string - of ingoing vertex -/// *data*: json - data of edge +/// * *from*: *_id* attribute of the source vertex +/// * *to*: *_id* attribute of the target vertex +/// * *data*: Json data of the edge +/// * *options* (optional): See [collection documentation](../Edges/EdgeMethods.md) /// /// *Examples* /// @@ -1933,13 +1953,14 @@ var updateBindCollections = function(graph) { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_edge_collection_replace +/// `graph.edgeCollectionName.replace(edgeId, data, options)` /// Replaces the data of an edge in collection *edgeCollectionName* /// -/// `general-graph.edgeCollectionName.replace(edgeId, data, options)` +/// *Parameter* /// -/// *edgeId*: string - id of the edge -/// *data*: json - data of edge -/// *options*: json - (optional) - see collection documentation +/// * *edgeId*: *_id* attribute of the edge +/// * *data*: Json data of the edge +/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md) /// /// *Examples* /// @@ -1955,13 +1976,14 @@ var updateBindCollections = function(graph) { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_edge_collection_update -/// Updates the data of an edge in collection *edgeCollectionName* +/// `graph.edgeCollectionName.update(edgeId, data, options)` +/// *Updates the data of an edge in collection edgeCollectionName* /// -/// `general-graph.edgeCollectionName.update(edgeId, data, options)` +/// *Parameter* /// -/// *edgeId*: string - id of the edge -/// *data*: json - data of edge -/// *options*: json - (optional) - see collection documentation +/// * *edgeId*: *_id* attribute of the edge +/// * *data*: Json data of the edge +/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md) /// /// *Examples* /// @@ -1977,9 +1999,13 @@ var updateBindCollections = function(graph) { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_edge_collection_remove -/// Removes an edge in collection *edgeCollectionName* +/// `graph.edgeCollectionName.remove(edgeId, options)` +/// *Removes an edge in collection edgeCollectionName* /// -/// `general-graph.edgeCollectionName.remove(edgeId, options)` +/// *Parameter* +/// +/// * *edgeId*: *_id* attribute of the edge +/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md) /// /// If this edge is used as a vertex by another edge, the other edge will be removed (recursively). /// @@ -2018,12 +2044,14 @@ var Graph = function(graphName, edgeDefinitions, vertexCollections, edgeCollecti //////////////////////////////////////////////////////////////////////////////// /// @startDocuBlock JSF_general_graph_graph -/// `general-graph._graph(graph-name)` +/// `graph_module._graph(graphName)` /// *Load a graph* /// /// A graph can be loaded by its name. /// -/// * *graph-name*: string - unique identifier of the graph +/// *Parameter* +/// +/// * *graphName*: Unique identifier of the graph /// /// *Examples* /// From 95fb92b195b708c6f6bf56be080a002469edb354 Mon Sep 17 00:00:00 2001 From: Lucas Dohmen Date: Fri, 20 Jun 2014 15:57:43 +0200 Subject: [PATCH 5/8] Move testrunner into the org/arangodb 'namespace' --- arangod/RestServer/ArangoServer.cpp | 2 +- arangosh/V8Client/arangosh.cpp | 2 +- .../modules/{test_runner.js => org/arangodb/testrunner.js} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename js/common/modules/{test_runner.js => org/arangodb/testrunner.js} (100%) diff --git a/arangod/RestServer/ArangoServer.cpp b/arangod/RestServer/ArangoServer.cpp index 6f9f93eab0..d7971cbde9 100644 --- a/arangod/RestServer/ArangoServer.cpp +++ b/arangod/RestServer/ArangoServer.cpp @@ -1001,7 +1001,7 @@ int ArangoServer::runUnitTests (TRI_vocbase_t* vocbase) { context->_context->Global()->Set(v8::String::New("SYS_UNIT_TESTS_RESULT"), v8::True()); // run tests - char const* input = "require(\"test_runner\").runCommandLineTests();"; + char const* input = "require(\"org/arangodb/testrunner\").runCommandLineTests();"; TRI_ExecuteJavaScriptString(context->_context, v8::String::New(input), name, true); if (tryCatch.HasCaught()) { diff --git a/arangosh/V8Client/arangosh.cpp b/arangosh/V8Client/arangosh.cpp index d98c467688..c5063541b1 100644 --- a/arangosh/V8Client/arangosh.cpp +++ b/arangosh/V8Client/arangosh.cpp @@ -1589,7 +1589,7 @@ static bool RunUnitTests (v8::Handle context) { context->Global()->Set(v8::String::New("SYS_UNIT_TESTS_RESULT"), v8::True()); // run tests - char const* input = "require(\"test_runner\").runCommandLineTests();"; + char const* input = "require(\"org/arangodb/testrunner\").runCommandLineTests();"; v8::Local name(v8::String::New("(arangosh)")); TRI_ExecuteJavaScriptString(context, v8::String::New(input), name, true); diff --git a/js/common/modules/test_runner.js b/js/common/modules/org/arangodb/testrunner.js similarity index 100% rename from js/common/modules/test_runner.js rename to js/common/modules/org/arangodb/testrunner.js From 7aaaa88f855a3b4312220808350ae576d59d5d90 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Fri, 20 Jun 2014 16:09:13 +0200 Subject: [PATCH 6/8] added github update for foxx applications via frontend --- .../frontend/js/collections/foxxCollection.js | 21 +++++++ .../frontend/js/views/foxxInstalledView.js | 57 +++++++++++++++++-- 2 files changed, 72 insertions(+), 6 deletions(-) diff --git a/js/apps/system/aardvark/frontend/js/collections/foxxCollection.js b/js/apps/system/aardvark/frontend/js/collections/foxxCollection.js index d63a1b9520..b98a968dd8 100644 --- a/js/apps/system/aardvark/frontend/js/collections/foxxCollection.js +++ b/js/apps/system/aardvark/frontend/js/collections/foxxCollection.js @@ -27,6 +27,7 @@ result = true; }, error: function(data) { + console.log(data); result = false; } }); @@ -53,6 +54,26 @@ return result; }, + gitInfo: function (key) { + var result; + $.ajax({ + cache: false, + type: "GET", + async: false, // sequential calls! + url: "/_admin/aardvark/foxxes/gitinfo/"+key, + contentType: "application/json", + processData: false, + success: function(data) { + result = data; + }, + error: function(data) { + result = data; + } + }); + + return result; + }, + purgeFoxx: function (key) { var msg, url = "/_admin/aardvark/foxxes/purge/"+key; $.ajax({ diff --git a/js/apps/system/aardvark/frontend/js/views/foxxInstalledView.js b/js/apps/system/aardvark/frontend/js/views/foxxInstalledView.js index 063855ae13..998b6c9b9a 100644 --- a/js/apps/system/aardvark/frontend/js/views/foxxInstalledView.js +++ b/js/apps/system/aardvark/frontend/js/views/foxxInstalledView.js @@ -40,6 +40,14 @@ ) ]; var buttonInfoConfig = [ + window.modalView.createDeleteButton( + "Remove", this.confirmRemovalSingle.bind(this) + ), + window.modalView.createSuccessButton( + "Install", this.installDialog.bind(this) + ) + ]; + var buttonInfoConfigUpdate = [ window.modalView.createDeleteButton( "Remove", this.confirmRemovalSingle.bind(this) ), @@ -51,6 +59,17 @@ ) ]; var buttonInfoMultipleVersionsConfig = [ + window.modalView.createDeleteButton( + "Remove All", this.confirmRemovalAll.bind(this) + ), + window.modalView.createDeleteButton( + "Remove", this.confirmRemovalSingle.bind(this) + ), + window.modalView.createSuccessButton( + "Install", this.installDialog.bind(this) + ) + ]; + var buttonInfoMultipleVersionsConfigUpdate = [ window.modalView.createDeleteButton( "Remove All", this.confirmRemovalAll.bind(this) ), @@ -78,12 +97,24 @@ "Application Settings", buttonInfoConfig ); + this.showInfoModUpdate = window.modalView.show.bind( + window.modalView, + "modalTable.ejs", + "Application Settings", + buttonInfoConfigUpdate + ); this.showInfoMultipleVersionsMod = window.modalView.show.bind( window.modalView, "modalTable.ejs", "Application Settings", buttonInfoMultipleVersionsConfig ); + this.showInfoMultipleVersionsModUpdate = window.modalView.show.bind( + window.modalView, + "modalTable.ejs", + "Application Settings", + buttonInfoMultipleVersionsConfigUpdate + ); this.showSystemInfoMod = window.modalView.show.bind( window.modalView, "modalTable.ejs", @@ -267,7 +298,15 @@ }, infoDialog: function(event) { - var versions, isSystem = false; + var name = this.model.get("name"), + mountinfo = this.model.collection.gitInfo(name), + versions, isSystem = false, isGit; + + if (mountinfo.git === true) { + this.model.set("isGit", mountinfo.git); + this.model.set("gitUrl", mountinfo.url); + } + if (this.model.get("isSystem")) { isSystem = true; } else { @@ -275,14 +314,21 @@ } versions = this.model.get("versions"); + isGit = this.model.get("isGit"); event.stopPropagation(); - if (isSystem === false && !versions) { + if (isSystem === false && !versions && !isGit) { this.showInfoMod(this.fillInfoValues()); } - else if (isSystem === false && versions) { + else if (isSystem === false && !versions && isGit) { + this.showInfoModUpdate(this.fillInfoValues()); + } + else if (isSystem === false && versions && !isGit) { this.showInfoMultipleVersionsMod(this.fillInfoValues()); } + else if (isSystem === false && versions && isGit) { + this.showInfoMultipleVersionsModUpdate(this.fillInfoValues()); + } else { this.showSystemInfoMod(this.fillInfoValues()); } @@ -301,8 +347,7 @@ }, update: function() { - var url = this.model.get("git"), - name = '', + var url = this.model.get("gitUrl"), version = 'master', result; @@ -311,7 +356,7 @@ return; } - result = this.collection.installFoxxFromGithub(url, name, version); + result = this.model.collection.installFoxxFromGithub(url, name, version); if (result === true) { window.modalView.hide(); window.App.applicationsView.reload(); From 6afee10309cd9dd2ad665615712081d319d6a865 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Fri, 20 Jun 2014 16:11:43 +0200 Subject: [PATCH 7/8] jslint --- .../system/aardvark/frontend/js/collections/foxxCollection.js | 1 - js/apps/system/aardvark/frontend/js/views/foxxInstalledView.js | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/js/apps/system/aardvark/frontend/js/collections/foxxCollection.js b/js/apps/system/aardvark/frontend/js/collections/foxxCollection.js index b98a968dd8..def733d158 100644 --- a/js/apps/system/aardvark/frontend/js/collections/foxxCollection.js +++ b/js/apps/system/aardvark/frontend/js/collections/foxxCollection.js @@ -27,7 +27,6 @@ result = true; }, error: function(data) { - console.log(data); result = false; } }); diff --git a/js/apps/system/aardvark/frontend/js/views/foxxInstalledView.js b/js/apps/system/aardvark/frontend/js/views/foxxInstalledView.js index 998b6c9b9a..de816b47f1 100644 --- a/js/apps/system/aardvark/frontend/js/views/foxxInstalledView.js +++ b/js/apps/system/aardvark/frontend/js/views/foxxInstalledView.js @@ -349,6 +349,7 @@ update: function() { var url = this.model.get("gitUrl"), version = 'master', + name = '', result; if (url === undefined || url === '') { From 022d7f32d05bb29fbc24f1a740cbd3e74c26f4fa Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 20 Jun 2014 16:13:49 +0200 Subject: [PATCH 8/8] bison --- arangod/Ahuacatl/ahuacatl-grammar.c | 1769 +++++++++++-------------- arangod/Ahuacatl/ahuacatl-grammar.cpp | 1769 +++++++++++-------------- arangod/Ahuacatl/ahuacatl-grammar.h | 174 ++- config/bison-c++.sh | 1 + 4 files changed, 1639 insertions(+), 2074 deletions(-) diff --git a/arangod/Ahuacatl/ahuacatl-grammar.c b/arangod/Ahuacatl/ahuacatl-grammar.c index 4ea2fc028b..330a2c523b 100644 --- a/arangod/Ahuacatl/ahuacatl-grammar.c +++ b/arangod/Ahuacatl/ahuacatl-grammar.c @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -63,15 +63,12 @@ #define yyparse Ahuacatlparse #define yylex Ahuacatllex #define yyerror Ahuacatlerror -#define yylval Ahuacatllval -#define yychar Ahuacatlchar #define yydebug Ahuacatldebug #define yynerrs Ahuacatlnerrs -#define yylloc Ahuacatllloc + /* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ -#line 10 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 10 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:339 */ #include #include @@ -87,14 +84,13 @@ #include "Ahuacatl/ahuacatl-parser-functions.h" #include "Ahuacatl/ahuacatl-scope.h" -/* Line 371 of yacc.c */ -#line 92 "arangod/Ahuacatl/ahuacatl-grammar.c" +#line 88 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:339 */ -# ifndef YY_NULL +# ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr +# define YY_NULLPTR nullptr # else -# define YY_NULL 0 +# define YY_NULLPTR 0 # endif # endif @@ -110,7 +106,7 @@ by #include "ahuacatl-grammar.h". */ #ifndef YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED # define YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -118,126 +114,111 @@ extern int Ahuacatldebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - T_END = 0, - T_FOR = 258, - T_LET = 259, - T_FILTER = 260, - T_RETURN = 261, - T_COLLECT = 262, - T_SORT = 263, - T_LIMIT = 264, - T_ASC = 265, - T_DESC = 266, - T_IN = 267, - T_INTO = 268, - T_WITH = 269, - T_REMOVE = 270, - T_INSERT = 271, - T_UPDATE = 272, - T_REPLACE = 273, - T_NULL = 274, - T_TRUE = 275, - T_FALSE = 276, - T_STRING = 277, - T_QUOTED_STRING = 278, - T_INTEGER = 279, - T_DOUBLE = 280, - T_PARAMETER = 281, - T_ASSIGN = 282, - T_NOT = 283, - T_AND = 284, - T_OR = 285, - T_EQ = 286, - T_NE = 287, - T_LT = 288, - T_GT = 289, - T_LE = 290, - T_GE = 291, - T_PLUS = 292, - T_MINUS = 293, - T_TIMES = 294, - T_DIV = 295, - T_MOD = 296, - T_EXPAND = 297, - T_QUESTION = 298, - T_COLON = 299, - T_SCOPE = 300, - T_RANGE = 301, - T_COMMA = 302, - T_OPEN = 303, - T_CLOSE = 304, - T_DOC_OPEN = 305, - T_DOC_CLOSE = 306, - T_LIST_OPEN = 307, - T_LIST_CLOSE = 308, - UPLUS = 309, - UMINUS = 310, - FUNCCALL = 311, - REFERENCE = 312, - INDEXED = 313 - }; + enum yytokentype + { + T_END = 0, + T_FOR = 258, + T_LET = 259, + T_FILTER = 260, + T_RETURN = 261, + T_COLLECT = 262, + T_SORT = 263, + T_LIMIT = 264, + T_ASC = 265, + T_DESC = 266, + T_IN = 267, + T_INTO = 268, + T_WITH = 269, + T_REMOVE = 270, + T_INSERT = 271, + T_UPDATE = 272, + T_REPLACE = 273, + T_NULL = 274, + T_TRUE = 275, + T_FALSE = 276, + T_STRING = 277, + T_QUOTED_STRING = 278, + T_INTEGER = 279, + T_DOUBLE = 280, + T_PARAMETER = 281, + T_ASSIGN = 282, + T_NOT = 283, + T_AND = 284, + T_OR = 285, + T_EQ = 286, + T_NE = 287, + T_LT = 288, + T_GT = 289, + T_LE = 290, + T_GE = 291, + T_PLUS = 292, + T_MINUS = 293, + T_TIMES = 294, + T_DIV = 295, + T_MOD = 296, + T_EXPAND = 297, + T_QUESTION = 298, + T_COLON = 299, + T_SCOPE = 300, + T_RANGE = 301, + T_COMMA = 302, + T_OPEN = 303, + T_CLOSE = 304, + T_DOC_OPEN = 305, + T_DOC_CLOSE = 306, + T_LIST_OPEN = 307, + T_LIST_CLOSE = 308, + UMINUS = 309, + UPLUS = 310, + FUNCCALL = 311, + REFERENCE = 312, + INDEXED = 313 + }; #endif - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { -/* Line 387 of yacc.c */ -#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:355 */ TRI_aql_node_t* node; char* strval; bool boolval; int64_t intval; - -/* Line 387 of yacc.c */ -#line 202 "arangod/Ahuacatl/ahuacatl-grammar.c" -} YYSTYPE; +#line 195 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif +/* Location type. */ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE +typedef struct YYLTYPE YYLTYPE; +struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +}; # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int Ahuacatlparse (void *YYPARSE_PARAM); -#else -int Ahuacatlparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus + int Ahuacatlparse (TRI_aql_context_t* const context); -#else -int Ahuacatlparse (); -#endif -#endif /* ! YYPARSE_PARAM */ #endif /* !YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED */ /* Copy the second part of user declarations. */ -/* Line 390 of yacc.c */ -#line 33 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 33 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:358 */ //////////////////////////////////////////////////////////////////////////////// @@ -265,8 +246,7 @@ void Ahuacatlerror (YYLTYPE* locp, TRI_aql_context_t* const context, const char* #define scanner context->_parser->_scanner -/* Line 390 of yacc.c */ -#line 270 "arangod/Ahuacatl/ahuacatl-grammar.c" +#line 250 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:358 */ #ifdef short # undef short @@ -280,11 +260,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -304,8 +281,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -327,6 +303,33 @@ typedef short int yytype_int16; # endif #endif +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -334,23 +337,25 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + #if ! defined yyoverflow || YYERROR_VERBOSE @@ -369,8 +374,7 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -382,8 +386,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -399,7 +403,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -407,15 +411,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -425,8 +427,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -452,16 +454,16 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif @@ -480,7 +482,7 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -496,17 +498,19 @@ union yyalloc #define YYNNTS 58 /* YYNRULES -- Number of rules. */ #define YYNRULES 128 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 215 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 313 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -544,70 +548,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 6, 9, 12, 15, 18, 19, 22, - 24, 26, 28, 30, 32, 34, 39, 42, 45, 47, - 51, 55, 56, 61, 63, 67, 71, 72, 75, 76, - 80, 82, 86, 89, 90, 92, 94, 97, 102, 105, - 111, 117, 123, 131, 137, 145, 149, 150, 155, 157, - 159, 161, 163, 165, 167, 171, 173, 177, 178, 184, - 187, 190, 193, 197, 201, 205, 209, 213, 217, 221, - 225, 229, 233, 237, 241, 245, 249, 255, 256, 258, - 260, 264, 266, 268, 269, 274, 275, 277, 279, 283, - 284, 287, 288, 293, 294, 296, 298, 302, 306, 308, - 309, 314, 316, 318, 322, 326, 331, 334, 337, 341, - 345, 349, 354, 356, 358, 360, 362, 364, 366, 368, - 370, 372, 374, 376, 378, 380, 382, 384, 386 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 61, 0, -1, 62, 80, -1, 62, 81, -1, 62, - 82, -1, 62, 83, -1, 62, 84, -1, -1, 62, - 63, -1, 64, -1, 66, -1, 65, -1, 69, -1, - 74, -1, 79, -1, 3, 116, 12, 85, -1, 5, - 85, -1, 4, 67, -1, 68, -1, 67, 47, 68, - -1, 116, 27, 85, -1, -1, 7, 70, 71, 73, - -1, 72, -1, 71, 47, 72, -1, 116, 27, 85, - -1, -1, 13, 116, -1, -1, 8, 75, 76, -1, - 77, -1, 76, 47, 77, -1, 85, 78, -1, -1, - 10, -1, 11, -1, 9, 110, -1, 9, 110, 47, - 110, -1, 6, 85, -1, 15, 85, 12, 113, 100, - -1, 16, 85, 12, 113, 100, -1, 17, 85, 12, - 113, 100, -1, 17, 85, 14, 85, 12, 113, 100, - -1, 18, 85, 12, 113, 100, -1, 18, 85, 14, - 85, 12, 113, 100, -1, 48, 85, 49, -1, -1, - 48, 86, 61, 49, -1, 90, -1, 91, -1, 92, - -1, 95, -1, 110, -1, 106, -1, 85, 46, 85, - -1, 22, -1, 87, 45, 22, -1, -1, 87, 89, - 48, 93, 49, -1, 37, 85, -1, 38, 85, -1, - 28, 85, -1, 85, 30, 85, -1, 85, 29, 85, - -1, 85, 37, 85, -1, 85, 38, 85, -1, 85, - 39, 85, -1, 85, 40, 85, -1, 85, 41, 85, - -1, 85, 31, 85, -1, 85, 32, 85, -1, 85, - 33, 85, -1, 85, 34, 85, -1, 85, 35, 85, - -1, 85, 36, 85, -1, 85, 12, 85, -1, 85, - 43, 85, 44, 85, -1, -1, 94, -1, 85, -1, - 94, 47, 85, -1, 96, -1, 101, -1, -1, 52, - 97, 98, 53, -1, -1, 99, -1, 85, -1, 99, - 47, 85, -1, -1, 22, 101, -1, -1, 50, 102, - 103, 51, -1, -1, 104, -1, 105, -1, 104, 47, - 105, -1, 115, 44, 85, -1, 108, -1, -1, 106, - 107, 42, 109, -1, 22, -1, 88, -1, 108, 59, - 22, -1, 108, 59, 114, -1, 108, 52, 85, 53, - -1, 59, 22, -1, 59, 114, -1, 52, 85, 53, - -1, 109, 59, 22, -1, 109, 59, 114, -1, 109, - 52, 85, 53, -1, 112, -1, 114, -1, 117, -1, - 25, -1, 23, -1, 111, -1, 19, -1, 20, -1, - 21, -1, 22, -1, 23, -1, 26, -1, 26, -1, - 22, -1, 23, -1, 22, -1, 24, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 193, 193, 196, 199, 202, 205, 211, 213, 218, @@ -645,7 +586,7 @@ static const char *const yytname[] = "\">= operator\"", "\"+ operator\"", "\"- operator\"", "\"* operator\"", "\"/ operator\"", "\"% operator\"", "\"[*] operator\"", "\"?\"", "\":\"", "\"::\"", "\"..\"", "\",\"", "\"(\"", "\")\"", "\"{\"", "\"}\"", "\"[\"", - "\"]\"", "UPLUS", "UMINUS", "FUNCCALL", "REFERENCE", "INDEXED", "'.'", + "\"]\"", "UMINUS", "UPLUS", "FUNCCALL", "REFERENCE", "INDEXED", "'.'", "$accept", "query", "optional_statement_block_statements", "statement_block_statement", "for_statement", "filter_statement", "let_statement", "let_list", "let_element", "collect_statement", "$@1", @@ -661,13 +602,13 @@ static const char *const yytname[] = "optional_array_elements", "array_elements_list", "array_element", "reference", "$@7", "single_reference", "expansion", "atomic_value", "numeric_value", "value_literal", "collection_name", "bind_parameter", - "array_element_name", "variable_name", "integer_value", YY_NULL + "array_element_name", "variable_name", "integer_value", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -679,85 +620,18 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 60, 61, 61, 61, 61, 61, 62, 62, 63, - 63, 63, 63, 63, 63, 64, 65, 66, 67, 67, - 68, 70, 69, 71, 71, 72, 73, 73, 75, 74, - 76, 76, 77, 78, 78, 78, 79, 79, 80, 81, - 82, 83, 83, 84, 84, 85, 86, 85, 85, 85, - 85, 85, 85, 85, 85, 87, 87, 89, 88, 90, - 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 92, 93, 93, 94, - 94, 95, 95, 97, 96, 98, 98, 99, 99, 100, - 100, 102, 101, 103, 103, 104, 104, 105, 106, 107, - 106, 108, 108, 108, 108, 108, 109, 109, 109, 109, - 109, 109, 110, 110, 111, 111, 112, 112, 112, 112, - 112, 113, 113, 113, 114, 115, 115, 116, 117 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 2, 2, 2, 2, 2, 0, 2, 1, - 1, 1, 1, 1, 1, 4, 2, 2, 1, 3, - 3, 0, 4, 1, 3, 3, 0, 2, 0, 3, - 1, 3, 2, 0, 1, 1, 2, 4, 2, 5, - 5, 5, 7, 5, 7, 3, 0, 4, 1, 1, - 1, 1, 1, 1, 3, 1, 3, 0, 5, 2, - 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 5, 0, 1, 1, - 3, 1, 1, 0, 4, 0, 1, 1, 3, 0, - 2, 0, 4, 0, 1, 1, 3, 3, 1, 0, - 4, 1, 1, 3, 3, 4, 2, 2, 3, 3, - 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 7, 0, 0, 1, 0, 0, 0, 0, 21, 28, - 0, 0, 0, 0, 0, 8, 9, 11, 10, 12, - 13, 14, 2, 3, 4, 5, 6, 127, 0, 17, - 18, 0, 118, 119, 120, 101, 116, 128, 115, 124, - 0, 0, 0, 46, 91, 83, 16, 57, 102, 48, - 49, 50, 51, 81, 82, 53, 98, 52, 117, 112, - 113, 114, 38, 0, 0, 36, 0, 0, 0, 0, - 0, 0, 0, 61, 59, 60, 0, 7, 93, 85, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 26, 23, 0, 29, 30, 33, 0, 0, 0, - 0, 0, 0, 0, 15, 19, 20, 45, 0, 125, - 126, 0, 94, 95, 0, 87, 0, 86, 75, 63, - 62, 69, 70, 71, 72, 73, 74, 64, 65, 66, - 67, 68, 0, 54, 56, 77, 0, 0, 103, 104, - 0, 0, 22, 0, 0, 34, 35, 32, 37, 101, - 116, 124, 89, 89, 89, 0, 89, 0, 47, 92, - 0, 0, 84, 0, 0, 79, 0, 78, 0, 0, - 100, 105, 27, 24, 25, 31, 0, 39, 40, 41, - 0, 43, 0, 96, 97, 88, 76, 58, 0, 0, - 106, 107, 0, 0, 90, 89, 89, 80, 108, 0, - 109, 110, 42, 44, 111 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 1, 2, 15, 16, 17, 18, 29, 30, 19, - 63, 101, 102, 152, 20, 64, 104, 105, 157, 21, - 22, 23, 24, 25, 26, 128, 77, 47, 48, 97, - 49, 50, 51, 176, 177, 52, 53, 79, 126, 127, - 187, 54, 78, 121, 122, 123, 55, 98, 56, 180, - 57, 58, 59, 162, 60, 124, 31, 61 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ #define YYPACT_NINF -137 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-137))) + +#define YYTABLE_NINF -124 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { -137, 21, 592, -137, 9, 9, 506, 506, -137, -137, @@ -784,7 +658,36 @@ static const yytype_int16 yypact[] = -137, -137, -137, -137, -137 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 7, 0, 0, 1, 0, 0, 0, 0, 21, 28, + 0, 0, 0, 0, 0, 8, 9, 11, 10, 12, + 13, 14, 2, 3, 4, 5, 6, 127, 0, 17, + 18, 0, 118, 119, 120, 101, 116, 128, 115, 124, + 0, 0, 0, 46, 91, 83, 16, 57, 102, 48, + 49, 50, 51, 81, 82, 53, 98, 52, 117, 112, + 113, 114, 38, 0, 0, 36, 0, 0, 0, 0, + 0, 0, 0, 61, 59, 60, 0, 7, 93, 85, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 26, 23, 0, 29, 30, 33, 0, 0, 0, + 0, 0, 0, 0, 15, 19, 20, 45, 0, 125, + 126, 0, 94, 95, 0, 87, 0, 86, 75, 63, + 62, 69, 70, 71, 72, 73, 74, 64, 65, 66, + 67, 68, 0, 54, 56, 77, 0, 0, 103, 104, + 0, 0, 22, 0, 0, 34, 35, 32, 37, 101, + 116, 124, 89, 89, 89, 0, 89, 0, 47, 92, + 0, 0, 84, 0, 0, 79, 0, 78, 0, 0, + 100, 105, 27, 24, 25, 31, 0, 39, 40, 41, + 0, 43, 0, 96, 97, 88, 76, 58, 0, 0, + 106, 107, 0, 0, 90, 89, 89, 80, 108, 0, + 109, 110, 42, 44, 111 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -137, 32, -137, -137, -137, -137, -137, -137, 41, -137, @@ -795,10 +698,20 @@ static const yytype_int16 yypgoto[] = -8, -137, -137, -96, -89, -137, -1, -137 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -124 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 1, 2, 15, 16, 17, 18, 29, 30, 19, + 63, 101, 102, 152, 20, 64, 104, 105, 157, 21, + 22, 23, 24, 25, 26, 128, 77, 47, 48, 97, + 49, 50, 51, 176, 177, 52, 53, 79, 126, 127, + 187, 54, 78, 121, 122, 123, 55, 98, 56, 180, + 57, 58, 59, 162, 60, 124, 31, 61 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 46, 62, 65, 28, -121, 66, 67, 68, 69, 150, @@ -865,12 +778,6 @@ static const yytype_int16 yytable[] = 14 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-137))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { 6, 7, 10, 4, 0, 11, 12, 13, 14, 13, @@ -937,8 +844,8 @@ static const yytype_int16 yycheck[] = 18 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 61, 62, 0, 3, 4, 5, 6, 7, 8, @@ -965,30 +872,52 @@ static const yytype_uint8 yystos[] = 22, 114, 100, 100, 53 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 60, 61, 61, 61, 61, 61, 62, 62, 63, + 63, 63, 63, 63, 63, 64, 65, 66, 67, 67, + 68, 70, 69, 71, 71, 72, 73, 73, 75, 74, + 76, 76, 77, 78, 78, 78, 79, 79, 80, 81, + 82, 83, 83, 84, 84, 85, 86, 85, 85, 85, + 85, 85, 85, 85, 85, 87, 87, 89, 88, 90, + 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 92, 93, 93, 94, + 94, 95, 95, 97, 96, 98, 98, 99, 99, 100, + 100, 102, 101, 103, 103, 104, 104, 105, 106, 107, + 106, 108, 108, 108, 108, 108, 109, 109, 109, 109, + 109, 109, 110, 110, 111, 111, 112, 112, 112, 112, + 112, 113, 113, 113, 114, 115, 115, 116, 117 +}; -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 2, 2, 2, 2, 2, 0, 2, 1, + 1, 1, 1, 1, 1, 4, 2, 2, 1, 3, + 3, 0, 4, 1, 3, 3, 0, 2, 0, 3, + 1, 3, 2, 0, 1, 1, 2, 4, 2, 5, + 5, 5, 7, 5, 7, 3, 0, 4, 1, 1, + 1, 1, 1, 1, 3, 1, 3, 0, 5, 2, + 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 5, 0, 1, 1, + 3, 1, 1, 0, 4, 0, 1, 1, 3, 0, + 2, 0, 4, 0, 1, 1, 3, 3, 1, 0, + 4, 1, 1, 3, 3, 4, 2, 2, 3, 3, + 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) @@ -1005,13 +934,13 @@ do \ else \ { \ yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. @@ -1021,7 +950,7 @@ while (YYID (0)) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ - if (YYID (N)) \ + if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ @@ -1035,12 +964,27 @@ while (YYID (0)) (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ - while (YYID (0)) + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + + /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ @@ -1050,36 +994,28 @@ while (YYID (0)) /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ -__attribute__((__unused__)) -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +YY_ATTRIBUTE_UNUSED static unsigned yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) -#else -static unsigned -yy_location_print_ (yyo, yylocp) - FILE *yyo; - YYLTYPE const * const yylocp; -#endif { unsigned res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { - res += fprintf (yyo, "%d", yylocp->first_line); + res += YYFPRINTF (yyo, "%d", yylocp->first_line); if (0 <= yylocp->first_column) - res += fprintf (yyo, ".%d", yylocp->first_column); + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); } if (0 <= yylocp->last_line) { if (yylocp->first_line < yylocp->last_line) { - res += fprintf (yyo, "-%d", yylocp->last_line); + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); if (0 <= end_col) - res += fprintf (yyo, ".%d", end_col); + res += YYFPRINTF (yyo, ".%d", end_col); } else if (0 <= end_col && yylocp->first_column < end_col) - res += fprintf (yyo, "-%d", end_col); + res += YYFPRINTF (yyo, "-%d", end_col); } return res; } @@ -1093,75 +1029,36 @@ yy_location_print_ (yyo, yylocp) #endif -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc, scanner) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, context); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, Location, context); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TRI_aql_context_t* const context) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - TRI_aql_context_t* const context; -#endif { FILE *yyo = yyoutput; YYUSE (yyo); - if (!yyvaluep) - return; YYUSE (yylocationp); YYUSE (context); + if (!yyvaluep) + return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -1169,24 +1066,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TRI_aql_context_t* const context) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - TRI_aql_context_t* const context; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); @@ -1199,16 +1083,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -1219,51 +1095,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TRI_aql_context_t* const context) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, context) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; - TRI_aql_context_t* const context; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TRI_aql_context_t* const context) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , context); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , &(yylsp[(yyi + 1) - (yynrhs)]) , context); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, context); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, context); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1277,7 +1144,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1300,15 +1167,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1324,16 +1184,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1363,27 +1215,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1406,11 +1258,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1418,10 +1270,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1471,7 +1319,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1538,35 +1386,19 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TRI_aql_context_t* const context) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, context) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; - TRI_aql_context_t* const context; -#endif { YYUSE (yyvaluep); YYUSE (yylocationp); YYUSE (context); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1576,66 +1408,27 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, context) | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (TRI_aql_context_t* const context) -#else -int -yyparse (context) - TRI_aql_context_t* const context; -#endif -#endif { /* The lookahead symbol. */ int yychar; -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else +/* The semantic value of the lookahead symbol. */ /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ -static YYSTYPE yyval_default; -# define YY_INITIAL_VALUE(Value) = Value -#endif +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + +/* Location data for the lookahead symbol. */ static YYLTYPE yyloc_default # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL = { 1, 1, 1, 1 } # endif ; -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - -/* Location data for the lookahead symbol. */ YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ int yynerrs; @@ -1644,9 +1437,9 @@ YYLTYPE yylloc = yyloc_default; int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. + 'yyss': related to states. + 'yyvs': related to semantic values. + 'yyls': related to locations. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -1725,26 +1518,26 @@ YYLTYPE yylloc = yyloc_default; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + YYLTYPE *yyls1 = yyls; - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; + yyls = yyls1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1752,23 +1545,23 @@ YYLTYPE yylloc = yyloc_default; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1778,10 +1571,10 @@ YYLTYPE yylloc = yyloc_default; yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1810,7 +1603,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (&yylval, &yylloc, scanner); } if (yychar <= YYEOF) @@ -1875,7 +1668,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1890,104 +1683,103 @@ yyreduce: switch (yyn) { case 2: -/* Line 1792 of yacc.c */ -#line 193 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 193 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { context->_type = TRI_AQL_QUERY_READ; } +#line 1691 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 3: -/* Line 1792 of yacc.c */ -#line 196 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 196 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { context->_type = TRI_AQL_QUERY_REMOVE; } +#line 1699 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 4: -/* Line 1792 of yacc.c */ -#line 199 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 199 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { context->_type = TRI_AQL_QUERY_INSERT; } +#line 1707 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 5: -/* Line 1792 of yacc.c */ -#line 202 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 202 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { context->_type = TRI_AQL_QUERY_UPDATE; } +#line 1715 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 6: -/* Line 1792 of yacc.c */ -#line 205 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 205 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { context->_type = TRI_AQL_QUERY_REPLACE; } +#line 1723 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 7: -/* Line 1792 of yacc.c */ -#line 211 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 211 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1730 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 8: -/* Line 1792 of yacc.c */ -#line 213 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 213 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1737 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 9: -/* Line 1792 of yacc.c */ -#line 218 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 218 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1744 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 10: -/* Line 1792 of yacc.c */ -#line 220 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 220 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1751 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 11: -/* Line 1792 of yacc.c */ -#line 222 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 222 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1758 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 12: -/* Line 1792 of yacc.c */ -#line 224 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 224 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1765 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 13: -/* Line 1792 of yacc.c */ -#line 226 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 226 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1772 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 14: -/* Line 1792 of yacc.c */ -#line 228 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 228 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1779 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 15: -/* Line 1792 of yacc.c */ -#line 233 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 233 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; @@ -1995,7 +1787,7 @@ yyreduce: ABORT_OOM } - node = TRI_CreateNodeForAql(context, (yyvsp[(2) - (4)].strval), (yyvsp[(4) - (4)].node)); + node = TRI_CreateNodeForAql(context, (yyvsp[-2].strval), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2004,13 +1796,13 @@ yyreduce: ABORT_OOM } } +#line 1800 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 16: -/* Line 1792 of yacc.c */ -#line 252 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 252 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeFilterAql(context, (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeFilterAql(context, (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2019,34 +1811,34 @@ yyreduce: ABORT_OOM } } +#line 1815 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 17: -/* Line 1792 of yacc.c */ -#line 265 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 265 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1822 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 18: -/* Line 1792 of yacc.c */ -#line 270 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 270 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1829 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 19: -/* Line 1792 of yacc.c */ -#line 272 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 272 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1836 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 20: -/* Line 1792 of yacc.c */ -#line 277 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 277 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeLetAql(context, (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeLetAql(context, (yyvsp[-2].strval), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM @@ -2056,11 +1848,11 @@ yyreduce: ABORT_OOM } } +#line 1852 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 21: -/* Line 1792 of yacc.c */ -#line 291 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 291 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeListAql(context); @@ -2070,17 +1862,17 @@ yyreduce: TRI_PushStackParseAql(context, node); } +#line 1866 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 22: -/* Line 1792 of yacc.c */ -#line 299 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 299 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeCollectAql( context, static_cast (TRI_PopStackParseAql(context)), - (yyvsp[(4) - (4)].strval)); + (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM } @@ -2089,27 +1881,27 @@ yyreduce: ABORT_OOM } } +#line 1885 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 23: -/* Line 1792 of yacc.c */ -#line 316 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 316 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1892 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 24: -/* Line 1792 of yacc.c */ -#line 318 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 318 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1899 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 25: -/* Line 1792 of yacc.c */ -#line 323 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 323 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeAssignAql(context, (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeAssignAql(context, (yyvsp[-2].strval), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2118,27 +1910,27 @@ yyreduce: ABORT_OOM } } +#line 1914 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 26: -/* Line 1792 of yacc.c */ -#line 336 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 336 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.strval) = NULL; } +#line 1922 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 27: -/* Line 1792 of yacc.c */ -#line 339 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 339 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.strval) = (yyvsp[(2) - (2)].strval); + (yyval.strval) = (yyvsp[0].strval); } +#line 1930 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 28: -/* Line 1792 of yacc.c */ -#line 345 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 345 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeListAql(context); @@ -2148,11 +1940,11 @@ yyreduce: TRI_PushStackParseAql(context, node); } +#line 1944 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 29: -/* Line 1792 of yacc.c */ -#line 353 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 353 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* list = static_cast(TRI_PopStackParseAql(context)); @@ -2165,70 +1957,70 @@ yyreduce: ABORT_OOM } } +#line 1961 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 30: -/* Line 1792 of yacc.c */ -#line 368 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 368 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(1) - (1)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 1971 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 31: -/* Line 1792 of yacc.c */ -#line 373 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 373 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(3) - (3)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 1981 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 32: -/* Line 1792 of yacc.c */ -#line 381 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 381 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeSortElementAql(context, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].boolval)); + TRI_aql_node_t* node = TRI_CreateNodeSortElementAql(context, (yyvsp[-1].node), (yyvsp[0].boolval)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 1994 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 33: -/* Line 1792 of yacc.c */ -#line 392 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 392 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.boolval) = true; } +#line 2002 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 34: -/* Line 1792 of yacc.c */ -#line 395 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 395 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.boolval) = true; } +#line 2010 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 35: -/* Line 1792 of yacc.c */ -#line 398 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 398 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.boolval) = false; } +#line 2018 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 36: -/* Line 1792 of yacc.c */ -#line 404 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 404 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, TRI_CreateNodeValueIntAql(context, 0), (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, TRI_CreateNodeValueIntAql(context, 0), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2238,13 +2030,13 @@ yyreduce: } } +#line 2034 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 37: -/* Line 1792 of yacc.c */ -#line 415 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 415 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); + TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2253,13 +2045,13 @@ yyreduce: ABORT_OOM } } +#line 2049 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 38: -/* Line 1792 of yacc.c */ -#line 428 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 428 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeReturnAql(context, (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeReturnAql(context, (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2272,15 +2064,15 @@ yyreduce: ABORT_OOM } } +#line 2068 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 39: -/* Line 1792 of yacc.c */ -#line 445 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 445 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeRemoveAql(context, (yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); + node = TRI_CreateNodeRemoveAql(context, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2293,15 +2085,15 @@ yyreduce: ABORT_OOM } } +#line 2089 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 40: -/* Line 1792 of yacc.c */ -#line 464 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 464 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeInsertAql(context, (yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); + node = TRI_CreateNodeInsertAql(context, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2314,15 +2106,15 @@ yyreduce: ABORT_OOM } } +#line 2110 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 41: -/* Line 1792 of yacc.c */ -#line 483 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 483 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeUpdateAql(context, NULL, (yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); + node = TRI_CreateNodeUpdateAql(context, NULL, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2335,15 +2127,15 @@ yyreduce: ABORT_OOM } } +#line 2131 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 42: -/* Line 1792 of yacc.c */ -#line 499 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 499 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeUpdateAql(context, (yyvsp[(2) - (7)].node), (yyvsp[(4) - (7)].node), (yyvsp[(6) - (7)].node), (yyvsp[(7) - (7)].node)); + node = TRI_CreateNodeUpdateAql(context, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2356,15 +2148,15 @@ yyreduce: ABORT_OOM } } +#line 2152 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 43: -/* Line 1792 of yacc.c */ -#line 518 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 518 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeReplaceAql(context, NULL, (yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); + node = TRI_CreateNodeReplaceAql(context, NULL, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2377,15 +2169,15 @@ yyreduce: ABORT_OOM } } +#line 2173 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 44: -/* Line 1792 of yacc.c */ -#line 534 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 534 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeReplaceAql(context, (yyvsp[(2) - (7)].node), (yyvsp[(4) - (7)].node), (yyvsp[(6) - (7)].node), (yyvsp[(7) - (7)].node)); + node = TRI_CreateNodeReplaceAql(context, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2398,19 +2190,19 @@ yyreduce: ABORT_OOM } } +#line 2194 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 45: -/* Line 1792 of yacc.c */ -#line 553 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 553 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(2) - (3)].node); + (yyval.node) = (yyvsp[-1].node); } +#line 2202 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 46: -/* Line 1792 of yacc.c */ -#line 556 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 556 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { if (! TRI_StartScopeAql(context, TRI_AQL_SCOPE_SUBQUERY)) { ABORT_OOM @@ -2419,11 +2211,11 @@ yyreduce: context->_subQueries++; } +#line 2215 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 47: -/* Line 1792 of yacc.c */ -#line 563 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 563 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* result; TRI_aql_node_t* subQuery; @@ -2458,64 +2250,64 @@ yyreduce: // return the result (yyval.node) = result; } +#line 2254 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 48: -/* Line 1792 of yacc.c */ -#line 597 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 597 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2262 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 49: -/* Line 1792 of yacc.c */ -#line 600 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 600 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2270 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 50: -/* Line 1792 of yacc.c */ -#line 603 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 603 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2278 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 51: -/* Line 1792 of yacc.c */ -#line 606 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 606 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2286 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 52: -/* Line 1792 of yacc.c */ -#line 609 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 609 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2294 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 53: -/* Line 1792 of yacc.c */ -#line 612 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 612 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2302 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 54: -/* Line 1792 of yacc.c */ -#line 615 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 615 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; TRI_aql_node_t* list; - if ((yyvsp[(1) - (3)].node) == NULL || (yyvsp[(3) - (3)].node) == NULL) { + if ((yyvsp[-2].node) == NULL || (yyvsp[0].node) == NULL) { ABORT_OOM } @@ -2524,10 +2316,10 @@ yyreduce: ABORT_OOM } - if (TRI_ERROR_NO_ERROR != TRI_PushBackVectorPointer(&list->_members, (void*) (yyvsp[(1) - (3)].node))) { + if (TRI_ERROR_NO_ERROR != TRI_PushBackVectorPointer(&list->_members, (void*) (yyvsp[-2].node))) { ABORT_OOM } - if (TRI_ERROR_NO_ERROR != TRI_PushBackVectorPointer(&list->_members, (void*) (yyvsp[(3) - (3)].node))) { + if (TRI_ERROR_NO_ERROR != TRI_PushBackVectorPointer(&list->_members, (void*) (yyvsp[0].node))) { ABORT_OOM } @@ -2539,43 +2331,43 @@ yyreduce: (yyval.node) = node; } +#line 2335 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 55: -/* Line 1792 of yacc.c */ -#line 646 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 646 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.strval) = (yyvsp[(1) - (1)].strval); + (yyval.strval) = (yyvsp[0].strval); if ((yyval.strval) == NULL) { ABORT_OOM } } +#line 2347 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 56: -/* Line 1792 of yacc.c */ -#line 653 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 653 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (3)].strval) == NULL || (yyvsp[(3) - (3)].strval) == NULL) { + if ((yyvsp[-2].strval) == NULL || (yyvsp[0].strval) == NULL) { ABORT_OOM } - (yyval.strval) = TRI_RegisterString3Aql(context, (yyvsp[(1) - (3)].strval), "::", (yyvsp[(3) - (3)].strval)); + (yyval.strval) = TRI_RegisterString3Aql(context, (yyvsp[-2].strval), "::", (yyvsp[0].strval)); if ((yyval.strval) == NULL) { ABORT_OOM } } +#line 2363 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 57: -/* Line 1792 of yacc.c */ -#line 667 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 667 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - if (! TRI_PushStackParseAql(context, (yyvsp[(1) - (1)].strval))) { + if (! TRI_PushStackParseAql(context, (yyvsp[0].strval))) { ABORT_OOM } @@ -2586,11 +2378,11 @@ yyreduce: TRI_PushStackParseAql(context, node); } +#line 2382 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 58: -/* Line 1792 of yacc.c */ -#line 680 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 680 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* list = static_cast(TRI_PopStackParseAql(context)); @@ -2604,234 +2396,234 @@ yyreduce: (yyval.node) = node; } +#line 2400 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 59: -/* Line 1792 of yacc.c */ -#line 696 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 696 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryPlusAql(context, (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryPlusAql(context, (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2413 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 60: -/* Line 1792 of yacc.c */ -#line 704 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 704 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryMinusAql(context, (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryMinusAql(context, (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2426 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 61: -/* Line 1792 of yacc.c */ -#line 712 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 712 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryNotAql(context, (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryNotAql(context, (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2439 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 62: -/* Line 1792 of yacc.c */ -#line 723 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 723 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryOrAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryOrAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2452 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 63: -/* Line 1792 of yacc.c */ -#line 731 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 731 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryAndAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryAndAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2465 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 64: -/* Line 1792 of yacc.c */ -#line 739 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 739 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryPlusAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryPlusAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2478 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 65: -/* Line 1792 of yacc.c */ -#line 747 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 747 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryMinusAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryMinusAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2491 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 66: -/* Line 1792 of yacc.c */ -#line 755 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 755 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryTimesAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryTimesAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2504 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 67: -/* Line 1792 of yacc.c */ -#line 763 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 763 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryDivAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryDivAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2517 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 68: -/* Line 1792 of yacc.c */ -#line 771 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 771 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryModAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryModAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2530 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 69: -/* Line 1792 of yacc.c */ -#line 779 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 779 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryEqAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryEqAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2543 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 70: -/* Line 1792 of yacc.c */ -#line 787 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 787 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryNeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryNeAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2556 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 71: -/* Line 1792 of yacc.c */ -#line 795 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 795 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLtAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLtAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2569 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 72: -/* Line 1792 of yacc.c */ -#line 803 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 803 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGtAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGtAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2582 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 73: -/* Line 1792 of yacc.c */ -#line 811 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 811 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLeAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2595 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 74: -/* Line 1792 of yacc.c */ -#line 819 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 819 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGeAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2608 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 75: -/* Line 1792 of yacc.c */ -#line 827 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 827 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryInAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryInAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2621 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 76: -/* Line 1792 of yacc.c */ -#line 838 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 838 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorTernaryAql(context, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorTernaryAql(context, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM @@ -2839,61 +2631,61 @@ yyreduce: (yyval.node) = node; } +#line 2635 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 77: -/* Line 1792 of yacc.c */ -#line 850 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 850 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2642 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 78: -/* Line 1792 of yacc.c */ -#line 852 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 852 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2649 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 79: -/* Line 1792 of yacc.c */ -#line 857 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 857 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(1) - (1)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 2659 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 80: -/* Line 1792 of yacc.c */ -#line 862 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 862 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(3) - (3)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 2669 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 81: -/* Line 1792 of yacc.c */ -#line 870 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 870 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2677 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 82: -/* Line 1792 of yacc.c */ -#line 873 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 873 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2685 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 83: -/* Line 1792 of yacc.c */ -#line 879 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 879 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeListAql(context); if (node == NULL) { @@ -2902,78 +2694,78 @@ yyreduce: TRI_PushStackParseAql(context, node); } +#line 2698 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 84: -/* Line 1792 of yacc.c */ -#line 886 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 886 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.node) = static_cast(TRI_PopStackParseAql(context)); } +#line 2706 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 85: -/* Line 1792 of yacc.c */ -#line 892 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 892 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2713 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 86: -/* Line 1792 of yacc.c */ -#line 894 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 894 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2720 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 87: -/* Line 1792 of yacc.c */ -#line 899 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 899 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(1) - (1)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 2730 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 88: -/* Line 1792 of yacc.c */ -#line 904 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 904 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(3) - (3)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 2740 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 89: -/* Line 1792 of yacc.c */ -#line 912 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 912 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.node) = NULL; } +#line 2748 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 90: -/* Line 1792 of yacc.c */ -#line 915 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 915 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (2)].strval) == NULL || (yyvsp[(2) - (2)].node) == NULL) { + if ((yyvsp[-1].strval) == NULL || (yyvsp[0].node) == NULL) { ABORT_OOM } - if (! TRI_CaseEqualString((yyvsp[(1) - (2)].strval), "OPTIONS")) { + if (! TRI_CaseEqualString((yyvsp[-1].strval), "OPTIONS")) { TRI_SetErrorContextAql(__FILE__, __LINE__, context, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, NULL); YYABORT; } - (yyval.node) = (yyvsp[(2) - (2)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2765 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 91: -/* Line 1792 of yacc.c */ -#line 930 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 930 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeArrayAql(context); if (node == NULL) { @@ -2982,66 +2774,66 @@ yyreduce: TRI_PushStackParseAql(context, node); } +#line 2778 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 92: -/* Line 1792 of yacc.c */ -#line 937 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 937 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.node) = static_cast(TRI_PopStackParseAql(context)); } +#line 2786 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 93: -/* Line 1792 of yacc.c */ -#line 943 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 943 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2793 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 94: -/* Line 1792 of yacc.c */ -#line 945 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 945 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2800 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 95: -/* Line 1792 of yacc.c */ -#line 950 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 950 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2807 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 96: -/* Line 1792 of yacc.c */ -#line 952 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 952 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2814 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 97: -/* Line 1792 of yacc.c */ -#line 957 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 957 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushArrayAql(context, (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].node))) { + if (! TRI_PushArrayAql(context, (yyvsp[-2].strval), (yyvsp[0].node))) { ABORT_OOM } } +#line 2824 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 98: -/* Line 1792 of yacc.c */ -#line 965 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 965 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // start of reference (collection or variable name) - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2833 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 99: -/* Line 1792 of yacc.c */ -#line 969 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 969 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // expanded variable access, e.g. variable[*] TRI_aql_node_t* node; @@ -3055,7 +2847,7 @@ yyreduce: TRI_PushStackParseAql(context, varname); // push on the stack what's going to be expanded (will be popped when we come back) - TRI_PushStackParseAql(context, (yyvsp[(1) - (1)].node)); + TRI_PushStackParseAql(context, (yyvsp[0].node)); // create a temporary variable for the row iterator (will be popped by "expansion" rule") node = TRI_CreateNodeReferenceAql(context, varname); @@ -3067,11 +2859,11 @@ yyreduce: // push the variable TRI_PushStackParseAql(context, node); } +#line 2863 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 100: -/* Line 1792 of yacc.c */ -#line 993 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 993 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // return from the "expansion" subrule TRI_aql_node_t* expanded = static_cast(TRI_PopStackParseAql(context)); @@ -3080,7 +2872,7 @@ yyreduce: char* varname = static_cast(TRI_PopStackParseAql(context)); // push the actual expand node into the statement list - expand = TRI_CreateNodeExpandAql(context, varname, expanded, (yyvsp[(4) - (4)].node)); + expand = TRI_CreateNodeExpandAql(context, varname, expanded, (yyvsp[0].node)); if (expand == NULL) { ABORT_OOM @@ -3103,20 +2895,20 @@ yyreduce: ABORT_OOM } } +#line 2899 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 101: -/* Line 1792 of yacc.c */ -#line 1027 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1027 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // variable or collection TRI_aql_node_t* node; - if (TRI_VariableExistsScopeAql(context, (yyvsp[(1) - (1)].strval))) { - node = TRI_CreateNodeReferenceAql(context, (yyvsp[(1) - (1)].strval)); + if (TRI_VariableExistsScopeAql(context, (yyvsp[0].strval))) { + node = TRI_CreateNodeReferenceAql(context, (yyvsp[0].strval)); } else { - node = TRI_CreateNodeCollectionAql(context, (yyvsp[(1) - (1)].strval)); + node = TRI_CreateNodeCollectionAql(context, (yyvsp[0].strval)); } if (node == NULL) { @@ -3125,179 +2917,179 @@ yyreduce: (yyval.node) = node; } +#line 2921 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 102: -/* Line 1792 of yacc.c */ -#line 1044 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1044 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 2933 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 103: -/* Line 1792 of yacc.c */ -#line 1051 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1051 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access, e.g. variable.reference - (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].strval)); + (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, (yyvsp[-2].node), (yyvsp[0].strval)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 2946 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 104: -/* Line 1792 of yacc.c */ -#line 1059 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1059 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access, e.g. variable.@reference - (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 2959 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 105: -/* Line 1792 of yacc.c */ -#line 1067 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1067 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // indexed variable access, e.g. variable[index] - (yyval.node) = TRI_CreateNodeIndexedAql(context, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); + (yyval.node) = TRI_CreateNodeIndexedAql(context, (yyvsp[-3].node), (yyvsp[-1].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 2972 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 106: -/* Line 1792 of yacc.c */ -#line 1078 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1078 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access, continuation from * expansion, e.g. [*].variable.reference TRI_aql_node_t* node = static_cast(TRI_PopStackParseAql(context)); - (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, node, (yyvsp[(2) - (2)].strval)); + (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, node, (yyvsp[0].strval)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 2987 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 107: -/* Line 1792 of yacc.c */ -#line 1088 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1088 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access w/ bind parameter, continuation from * expansion, e.g. [*].variable.@reference TRI_aql_node_t* node = static_cast(TRI_PopStackParseAql(context)); - (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, node, (yyvsp[(2) - (2)].node)); + (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, node, (yyvsp[0].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 3002 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 108: -/* Line 1792 of yacc.c */ -#line 1098 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1098 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // indexed variable access, continuation from * expansion, e.g. [*].variable[index] TRI_aql_node_t* node = static_cast(TRI_PopStackParseAql(context)); - (yyval.node) = TRI_CreateNodeIndexedAql(context, node, (yyvsp[(2) - (3)].node)); + (yyval.node) = TRI_CreateNodeIndexedAql(context, node, (yyvsp[-1].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 3017 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 109: -/* Line 1792 of yacc.c */ -#line 1108 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1108 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access, continuation from * expansion, e.g. [*].variable.xx.reference - (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].strval)); + (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, (yyvsp[-2].node), (yyvsp[0].strval)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 3030 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 110: -/* Line 1792 of yacc.c */ -#line 1116 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1116 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access w/ bind parameter, continuation from * expansion, e.g. [*].variable.xx.@reference - (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 3043 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 111: -/* Line 1792 of yacc.c */ -#line 1124 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1124 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // indexed variable access, continuation from * expansion, e.g. [*].variable.xx.[index] - (yyval.node) = TRI_CreateNodeIndexedAql(context, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); + (yyval.node) = TRI_CreateNodeIndexedAql(context, (yyvsp[-3].node), (yyvsp[-1].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 3056 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 112: -/* Line 1792 of yacc.c */ -#line 1135 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1135 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 3064 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 113: -/* Line 1792 of yacc.c */ -#line 1138 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1138 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 3072 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 114: -/* Line 1792 of yacc.c */ -#line 1144 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1144 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 3080 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 115: -/* Line 1792 of yacc.c */ -#line 1147 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1147 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; double value; - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - value = TRI_DoubleString((yyvsp[(1) - (1)].strval)); + value = TRI_DoubleString((yyvsp[0].strval)); if (TRI_errno() != TRI_ERROR_NO_ERROR) { TRI_SetErrorContextAql(__FILE__, __LINE__, context, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, NULL); @@ -3312,13 +3104,13 @@ yyreduce: (yyval.node) = node; } +#line 3108 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 116: -/* Line 1792 of yacc.c */ -#line 1172 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1172 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeValueStringAql(context, (yyvsp[(1) - (1)].strval)); + TRI_aql_node_t* node = TRI_CreateNodeValueStringAql(context, (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM @@ -3326,19 +3118,19 @@ yyreduce: (yyval.node) = node; } +#line 3122 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 117: -/* Line 1792 of yacc.c */ -#line 1181 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1181 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 3130 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 118: -/* Line 1792 of yacc.c */ -#line 1184 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1184 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeValueNullAql(context); @@ -3348,11 +3140,11 @@ yyreduce: (yyval.node) = node; } +#line 3144 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 119: -/* Line 1792 of yacc.c */ -#line 1193 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1193 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeValueBoolAql(context, true); @@ -3362,11 +3154,11 @@ yyreduce: (yyval.node) = node; } +#line 3158 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 120: -/* Line 1792 of yacc.c */ -#line 1202 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1202 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeValueBoolAql(context, false); @@ -3376,62 +3168,62 @@ yyreduce: (yyval.node) = node; } +#line 3172 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 121: -/* Line 1792 of yacc.c */ -#line 1214 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1214 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - node = TRI_CreateNodeCollectionAql(context, (yyvsp[(1) - (1)].strval)); + node = TRI_CreateNodeCollectionAql(context, (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 3191 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 122: -/* Line 1792 of yacc.c */ -#line 1228 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1228 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - node = TRI_CreateNodeCollectionAql(context, (yyvsp[(1) - (1)].strval)); + node = TRI_CreateNodeCollectionAql(context, (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 3210 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 123: -/* Line 1792 of yacc.c */ -#line 1242 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1242 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - if (strlen((yyvsp[(1) - (1)].strval)) < 2 || (yyvsp[(1) - (1)].strval)[0] != '@') { - TRI_SetErrorContextAql(__FILE__, __LINE__, context, TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, (yyvsp[(1) - (1)].strval)); + if (strlen((yyvsp[0].strval)) < 2 || (yyvsp[0].strval)[0] != '@') { + TRI_SetErrorContextAql(__FILE__, __LINE__, context, TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, (yyvsp[0].strval)); YYABORT; } - node = TRI_CreateNodeParameterAql(context, (yyvsp[(1) - (1)].strval)); + node = TRI_CreateNodeParameterAql(context, (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM @@ -3439,13 +3231,13 @@ yyreduce: (yyval.node) = node; } +#line 3235 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 124: -/* Line 1792 of yacc.c */ -#line 1265 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1265 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeParameterAql(context, (yyvsp[(1) - (1)].strval)); + TRI_aql_node_t* node = TRI_CreateNodeParameterAql(context, (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM @@ -3453,52 +3245,52 @@ yyreduce: (yyval.node) = node; } +#line 3249 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 125: -/* Line 1792 of yacc.c */ -#line 1277 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1277 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - (yyval.strval) = (yyvsp[(1) - (1)].strval); + (yyval.strval) = (yyvsp[0].strval); } +#line 3261 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 126: -/* Line 1792 of yacc.c */ -#line 1284 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1284 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - (yyval.strval) = (yyvsp[(1) - (1)].strval); + (yyval.strval) = (yyvsp[0].strval); } +#line 3273 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 127: -/* Line 1792 of yacc.c */ -#line 1293 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1293 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.strval) = (yyvsp[(1) - (1)].strval); + (yyval.strval) = (yyvsp[0].strval); } +#line 3281 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 128: -/* Line 1792 of yacc.c */ -#line 1299 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1299 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; int64_t value; - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - value = TRI_Int64String((yyvsp[(1) - (1)].strval)); + value = TRI_Int64String((yyvsp[0].strval)); if (TRI_errno() != TRI_ERROR_NO_ERROR) { TRI_SetErrorContextAql(__FILE__, __LINE__, context, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, NULL); YYABORT; @@ -3511,11 +3303,11 @@ yyreduce: (yyval.node) = node; } +#line 3307 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; -/* Line 1792 of yacc.c */ -#line 3519 "arangod/Ahuacatl/ahuacatl-grammar.c" +#line 3311 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3538,7 +3330,7 @@ yyreduce: *++yyvsp = yyval; *++yylsp = yyloc; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -3553,9 +3345,9 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -3606,20 +3398,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, context); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, context); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -3639,7 +3431,7 @@ yyerrorlab: goto yyerrorlab; yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -3652,29 +3444,29 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yyerror_range[1] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, context); + yystos[yystate], yyvsp, yylsp, context); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -3730,14 +3522,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, context); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, context); + yystos[*yyssp], yyvsp, yylsp, context); YYPOPSTACK (1); } #ifndef yyoverflow @@ -3748,8 +3540,5 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - diff --git a/arangod/Ahuacatl/ahuacatl-grammar.cpp b/arangod/Ahuacatl/ahuacatl-grammar.cpp index 4ea2fc028b..330a2c523b 100644 --- a/arangod/Ahuacatl/ahuacatl-grammar.cpp +++ b/arangod/Ahuacatl/ahuacatl-grammar.cpp @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -63,15 +63,12 @@ #define yyparse Ahuacatlparse #define yylex Ahuacatllex #define yyerror Ahuacatlerror -#define yylval Ahuacatllval -#define yychar Ahuacatlchar #define yydebug Ahuacatldebug #define yynerrs Ahuacatlnerrs -#define yylloc Ahuacatllloc + /* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ -#line 10 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 10 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:339 */ #include #include @@ -87,14 +84,13 @@ #include "Ahuacatl/ahuacatl-parser-functions.h" #include "Ahuacatl/ahuacatl-scope.h" -/* Line 371 of yacc.c */ -#line 92 "arangod/Ahuacatl/ahuacatl-grammar.c" +#line 88 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:339 */ -# ifndef YY_NULL +# ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr +# define YY_NULLPTR nullptr # else -# define YY_NULL 0 +# define YY_NULLPTR 0 # endif # endif @@ -110,7 +106,7 @@ by #include "ahuacatl-grammar.h". */ #ifndef YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED # define YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -118,126 +114,111 @@ extern int Ahuacatldebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - T_END = 0, - T_FOR = 258, - T_LET = 259, - T_FILTER = 260, - T_RETURN = 261, - T_COLLECT = 262, - T_SORT = 263, - T_LIMIT = 264, - T_ASC = 265, - T_DESC = 266, - T_IN = 267, - T_INTO = 268, - T_WITH = 269, - T_REMOVE = 270, - T_INSERT = 271, - T_UPDATE = 272, - T_REPLACE = 273, - T_NULL = 274, - T_TRUE = 275, - T_FALSE = 276, - T_STRING = 277, - T_QUOTED_STRING = 278, - T_INTEGER = 279, - T_DOUBLE = 280, - T_PARAMETER = 281, - T_ASSIGN = 282, - T_NOT = 283, - T_AND = 284, - T_OR = 285, - T_EQ = 286, - T_NE = 287, - T_LT = 288, - T_GT = 289, - T_LE = 290, - T_GE = 291, - T_PLUS = 292, - T_MINUS = 293, - T_TIMES = 294, - T_DIV = 295, - T_MOD = 296, - T_EXPAND = 297, - T_QUESTION = 298, - T_COLON = 299, - T_SCOPE = 300, - T_RANGE = 301, - T_COMMA = 302, - T_OPEN = 303, - T_CLOSE = 304, - T_DOC_OPEN = 305, - T_DOC_CLOSE = 306, - T_LIST_OPEN = 307, - T_LIST_CLOSE = 308, - UPLUS = 309, - UMINUS = 310, - FUNCCALL = 311, - REFERENCE = 312, - INDEXED = 313 - }; + enum yytokentype + { + T_END = 0, + T_FOR = 258, + T_LET = 259, + T_FILTER = 260, + T_RETURN = 261, + T_COLLECT = 262, + T_SORT = 263, + T_LIMIT = 264, + T_ASC = 265, + T_DESC = 266, + T_IN = 267, + T_INTO = 268, + T_WITH = 269, + T_REMOVE = 270, + T_INSERT = 271, + T_UPDATE = 272, + T_REPLACE = 273, + T_NULL = 274, + T_TRUE = 275, + T_FALSE = 276, + T_STRING = 277, + T_QUOTED_STRING = 278, + T_INTEGER = 279, + T_DOUBLE = 280, + T_PARAMETER = 281, + T_ASSIGN = 282, + T_NOT = 283, + T_AND = 284, + T_OR = 285, + T_EQ = 286, + T_NE = 287, + T_LT = 288, + T_GT = 289, + T_LE = 290, + T_GE = 291, + T_PLUS = 292, + T_MINUS = 293, + T_TIMES = 294, + T_DIV = 295, + T_MOD = 296, + T_EXPAND = 297, + T_QUESTION = 298, + T_COLON = 299, + T_SCOPE = 300, + T_RANGE = 301, + T_COMMA = 302, + T_OPEN = 303, + T_CLOSE = 304, + T_DOC_OPEN = 305, + T_DOC_CLOSE = 306, + T_LIST_OPEN = 307, + T_LIST_CLOSE = 308, + UMINUS = 309, + UPLUS = 310, + FUNCCALL = 311, + REFERENCE = 312, + INDEXED = 313 + }; #endif - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { -/* Line 387 of yacc.c */ -#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:355 */ TRI_aql_node_t* node; char* strval; bool boolval; int64_t intval; - -/* Line 387 of yacc.c */ -#line 202 "arangod/Ahuacatl/ahuacatl-grammar.c" -} YYSTYPE; +#line 195 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif +/* Location type. */ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE +typedef struct YYLTYPE YYLTYPE; +struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +}; # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int Ahuacatlparse (void *YYPARSE_PARAM); -#else -int Ahuacatlparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus + int Ahuacatlparse (TRI_aql_context_t* const context); -#else -int Ahuacatlparse (); -#endif -#endif /* ! YYPARSE_PARAM */ #endif /* !YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED */ /* Copy the second part of user declarations. */ -/* Line 390 of yacc.c */ -#line 33 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 33 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:358 */ //////////////////////////////////////////////////////////////////////////////// @@ -265,8 +246,7 @@ void Ahuacatlerror (YYLTYPE* locp, TRI_aql_context_t* const context, const char* #define scanner context->_parser->_scanner -/* Line 390 of yacc.c */ -#line 270 "arangod/Ahuacatl/ahuacatl-grammar.c" +#line 250 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:358 */ #ifdef short # undef short @@ -280,11 +260,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -304,8 +281,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -327,6 +303,33 @@ typedef short int yytype_int16; # endif #endif +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -334,23 +337,25 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + #if ! defined yyoverflow || YYERROR_VERBOSE @@ -369,8 +374,7 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -382,8 +386,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -399,7 +403,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -407,15 +411,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -425,8 +427,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -452,16 +454,16 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif @@ -480,7 +482,7 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -496,17 +498,19 @@ union yyalloc #define YYNNTS 58 /* YYNRULES -- Number of rules. */ #define YYNRULES 128 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 215 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 313 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -544,70 +548,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 6, 9, 12, 15, 18, 19, 22, - 24, 26, 28, 30, 32, 34, 39, 42, 45, 47, - 51, 55, 56, 61, 63, 67, 71, 72, 75, 76, - 80, 82, 86, 89, 90, 92, 94, 97, 102, 105, - 111, 117, 123, 131, 137, 145, 149, 150, 155, 157, - 159, 161, 163, 165, 167, 171, 173, 177, 178, 184, - 187, 190, 193, 197, 201, 205, 209, 213, 217, 221, - 225, 229, 233, 237, 241, 245, 249, 255, 256, 258, - 260, 264, 266, 268, 269, 274, 275, 277, 279, 283, - 284, 287, 288, 293, 294, 296, 298, 302, 306, 308, - 309, 314, 316, 318, 322, 326, 331, 334, 337, 341, - 345, 349, 354, 356, 358, 360, 362, 364, 366, 368, - 370, 372, 374, 376, 378, 380, 382, 384, 386 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 61, 0, -1, 62, 80, -1, 62, 81, -1, 62, - 82, -1, 62, 83, -1, 62, 84, -1, -1, 62, - 63, -1, 64, -1, 66, -1, 65, -1, 69, -1, - 74, -1, 79, -1, 3, 116, 12, 85, -1, 5, - 85, -1, 4, 67, -1, 68, -1, 67, 47, 68, - -1, 116, 27, 85, -1, -1, 7, 70, 71, 73, - -1, 72, -1, 71, 47, 72, -1, 116, 27, 85, - -1, -1, 13, 116, -1, -1, 8, 75, 76, -1, - 77, -1, 76, 47, 77, -1, 85, 78, -1, -1, - 10, -1, 11, -1, 9, 110, -1, 9, 110, 47, - 110, -1, 6, 85, -1, 15, 85, 12, 113, 100, - -1, 16, 85, 12, 113, 100, -1, 17, 85, 12, - 113, 100, -1, 17, 85, 14, 85, 12, 113, 100, - -1, 18, 85, 12, 113, 100, -1, 18, 85, 14, - 85, 12, 113, 100, -1, 48, 85, 49, -1, -1, - 48, 86, 61, 49, -1, 90, -1, 91, -1, 92, - -1, 95, -1, 110, -1, 106, -1, 85, 46, 85, - -1, 22, -1, 87, 45, 22, -1, -1, 87, 89, - 48, 93, 49, -1, 37, 85, -1, 38, 85, -1, - 28, 85, -1, 85, 30, 85, -1, 85, 29, 85, - -1, 85, 37, 85, -1, 85, 38, 85, -1, 85, - 39, 85, -1, 85, 40, 85, -1, 85, 41, 85, - -1, 85, 31, 85, -1, 85, 32, 85, -1, 85, - 33, 85, -1, 85, 34, 85, -1, 85, 35, 85, - -1, 85, 36, 85, -1, 85, 12, 85, -1, 85, - 43, 85, 44, 85, -1, -1, 94, -1, 85, -1, - 94, 47, 85, -1, 96, -1, 101, -1, -1, 52, - 97, 98, 53, -1, -1, 99, -1, 85, -1, 99, - 47, 85, -1, -1, 22, 101, -1, -1, 50, 102, - 103, 51, -1, -1, 104, -1, 105, -1, 104, 47, - 105, -1, 115, 44, 85, -1, 108, -1, -1, 106, - 107, 42, 109, -1, 22, -1, 88, -1, 108, 59, - 22, -1, 108, 59, 114, -1, 108, 52, 85, 53, - -1, 59, 22, -1, 59, 114, -1, 52, 85, 53, - -1, 109, 59, 22, -1, 109, 59, 114, -1, 109, - 52, 85, 53, -1, 112, -1, 114, -1, 117, -1, - 25, -1, 23, -1, 111, -1, 19, -1, 20, -1, - 21, -1, 22, -1, 23, -1, 26, -1, 26, -1, - 22, -1, 23, -1, 22, -1, 24, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 193, 193, 196, 199, 202, 205, 211, 213, 218, @@ -645,7 +586,7 @@ static const char *const yytname[] = "\">= operator\"", "\"+ operator\"", "\"- operator\"", "\"* operator\"", "\"/ operator\"", "\"% operator\"", "\"[*] operator\"", "\"?\"", "\":\"", "\"::\"", "\"..\"", "\",\"", "\"(\"", "\")\"", "\"{\"", "\"}\"", "\"[\"", - "\"]\"", "UPLUS", "UMINUS", "FUNCCALL", "REFERENCE", "INDEXED", "'.'", + "\"]\"", "UMINUS", "UPLUS", "FUNCCALL", "REFERENCE", "INDEXED", "'.'", "$accept", "query", "optional_statement_block_statements", "statement_block_statement", "for_statement", "filter_statement", "let_statement", "let_list", "let_element", "collect_statement", "$@1", @@ -661,13 +602,13 @@ static const char *const yytname[] = "optional_array_elements", "array_elements_list", "array_element", "reference", "$@7", "single_reference", "expansion", "atomic_value", "numeric_value", "value_literal", "collection_name", "bind_parameter", - "array_element_name", "variable_name", "integer_value", YY_NULL + "array_element_name", "variable_name", "integer_value", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -679,85 +620,18 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 60, 61, 61, 61, 61, 61, 62, 62, 63, - 63, 63, 63, 63, 63, 64, 65, 66, 67, 67, - 68, 70, 69, 71, 71, 72, 73, 73, 75, 74, - 76, 76, 77, 78, 78, 78, 79, 79, 80, 81, - 82, 83, 83, 84, 84, 85, 86, 85, 85, 85, - 85, 85, 85, 85, 85, 87, 87, 89, 88, 90, - 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 92, 93, 93, 94, - 94, 95, 95, 97, 96, 98, 98, 99, 99, 100, - 100, 102, 101, 103, 103, 104, 104, 105, 106, 107, - 106, 108, 108, 108, 108, 108, 109, 109, 109, 109, - 109, 109, 110, 110, 111, 111, 112, 112, 112, 112, - 112, 113, 113, 113, 114, 115, 115, 116, 117 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 2, 2, 2, 2, 2, 0, 2, 1, - 1, 1, 1, 1, 1, 4, 2, 2, 1, 3, - 3, 0, 4, 1, 3, 3, 0, 2, 0, 3, - 1, 3, 2, 0, 1, 1, 2, 4, 2, 5, - 5, 5, 7, 5, 7, 3, 0, 4, 1, 1, - 1, 1, 1, 1, 3, 1, 3, 0, 5, 2, - 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 5, 0, 1, 1, - 3, 1, 1, 0, 4, 0, 1, 1, 3, 0, - 2, 0, 4, 0, 1, 1, 3, 3, 1, 0, - 4, 1, 1, 3, 3, 4, 2, 2, 3, 3, - 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 7, 0, 0, 1, 0, 0, 0, 0, 21, 28, - 0, 0, 0, 0, 0, 8, 9, 11, 10, 12, - 13, 14, 2, 3, 4, 5, 6, 127, 0, 17, - 18, 0, 118, 119, 120, 101, 116, 128, 115, 124, - 0, 0, 0, 46, 91, 83, 16, 57, 102, 48, - 49, 50, 51, 81, 82, 53, 98, 52, 117, 112, - 113, 114, 38, 0, 0, 36, 0, 0, 0, 0, - 0, 0, 0, 61, 59, 60, 0, 7, 93, 85, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 26, 23, 0, 29, 30, 33, 0, 0, 0, - 0, 0, 0, 0, 15, 19, 20, 45, 0, 125, - 126, 0, 94, 95, 0, 87, 0, 86, 75, 63, - 62, 69, 70, 71, 72, 73, 74, 64, 65, 66, - 67, 68, 0, 54, 56, 77, 0, 0, 103, 104, - 0, 0, 22, 0, 0, 34, 35, 32, 37, 101, - 116, 124, 89, 89, 89, 0, 89, 0, 47, 92, - 0, 0, 84, 0, 0, 79, 0, 78, 0, 0, - 100, 105, 27, 24, 25, 31, 0, 39, 40, 41, - 0, 43, 0, 96, 97, 88, 76, 58, 0, 0, - 106, 107, 0, 0, 90, 89, 89, 80, 108, 0, - 109, 110, 42, 44, 111 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 1, 2, 15, 16, 17, 18, 29, 30, 19, - 63, 101, 102, 152, 20, 64, 104, 105, 157, 21, - 22, 23, 24, 25, 26, 128, 77, 47, 48, 97, - 49, 50, 51, 176, 177, 52, 53, 79, 126, 127, - 187, 54, 78, 121, 122, 123, 55, 98, 56, 180, - 57, 58, 59, 162, 60, 124, 31, 61 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ #define YYPACT_NINF -137 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-137))) + +#define YYTABLE_NINF -124 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { -137, 21, 592, -137, 9, 9, 506, 506, -137, -137, @@ -784,7 +658,36 @@ static const yytype_int16 yypact[] = -137, -137, -137, -137, -137 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 7, 0, 0, 1, 0, 0, 0, 0, 21, 28, + 0, 0, 0, 0, 0, 8, 9, 11, 10, 12, + 13, 14, 2, 3, 4, 5, 6, 127, 0, 17, + 18, 0, 118, 119, 120, 101, 116, 128, 115, 124, + 0, 0, 0, 46, 91, 83, 16, 57, 102, 48, + 49, 50, 51, 81, 82, 53, 98, 52, 117, 112, + 113, 114, 38, 0, 0, 36, 0, 0, 0, 0, + 0, 0, 0, 61, 59, 60, 0, 7, 93, 85, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 26, 23, 0, 29, 30, 33, 0, 0, 0, + 0, 0, 0, 0, 15, 19, 20, 45, 0, 125, + 126, 0, 94, 95, 0, 87, 0, 86, 75, 63, + 62, 69, 70, 71, 72, 73, 74, 64, 65, 66, + 67, 68, 0, 54, 56, 77, 0, 0, 103, 104, + 0, 0, 22, 0, 0, 34, 35, 32, 37, 101, + 116, 124, 89, 89, 89, 0, 89, 0, 47, 92, + 0, 0, 84, 0, 0, 79, 0, 78, 0, 0, + 100, 105, 27, 24, 25, 31, 0, 39, 40, 41, + 0, 43, 0, 96, 97, 88, 76, 58, 0, 0, + 106, 107, 0, 0, 90, 89, 89, 80, 108, 0, + 109, 110, 42, 44, 111 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -137, 32, -137, -137, -137, -137, -137, -137, 41, -137, @@ -795,10 +698,20 @@ static const yytype_int16 yypgoto[] = -8, -137, -137, -96, -89, -137, -1, -137 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -124 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 1, 2, 15, 16, 17, 18, 29, 30, 19, + 63, 101, 102, 152, 20, 64, 104, 105, 157, 21, + 22, 23, 24, 25, 26, 128, 77, 47, 48, 97, + 49, 50, 51, 176, 177, 52, 53, 79, 126, 127, + 187, 54, 78, 121, 122, 123, 55, 98, 56, 180, + 57, 58, 59, 162, 60, 124, 31, 61 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 46, 62, 65, 28, -121, 66, 67, 68, 69, 150, @@ -865,12 +778,6 @@ static const yytype_int16 yytable[] = 14 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-137))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { 6, 7, 10, 4, 0, 11, 12, 13, 14, 13, @@ -937,8 +844,8 @@ static const yytype_int16 yycheck[] = 18 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 61, 62, 0, 3, 4, 5, 6, 7, 8, @@ -965,30 +872,52 @@ static const yytype_uint8 yystos[] = 22, 114, 100, 100, 53 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 60, 61, 61, 61, 61, 61, 62, 62, 63, + 63, 63, 63, 63, 63, 64, 65, 66, 67, 67, + 68, 70, 69, 71, 71, 72, 73, 73, 75, 74, + 76, 76, 77, 78, 78, 78, 79, 79, 80, 81, + 82, 83, 83, 84, 84, 85, 86, 85, 85, 85, + 85, 85, 85, 85, 85, 87, 87, 89, 88, 90, + 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 92, 93, 93, 94, + 94, 95, 95, 97, 96, 98, 98, 99, 99, 100, + 100, 102, 101, 103, 103, 104, 104, 105, 106, 107, + 106, 108, 108, 108, 108, 108, 109, 109, 109, 109, + 109, 109, 110, 110, 111, 111, 112, 112, 112, 112, + 112, 113, 113, 113, 114, 115, 115, 116, 117 +}; -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 2, 2, 2, 2, 2, 0, 2, 1, + 1, 1, 1, 1, 1, 4, 2, 2, 1, 3, + 3, 0, 4, 1, 3, 3, 0, 2, 0, 3, + 1, 3, 2, 0, 1, 1, 2, 4, 2, 5, + 5, 5, 7, 5, 7, 3, 0, 4, 1, 1, + 1, 1, 1, 1, 3, 1, 3, 0, 5, 2, + 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 5, 0, 1, 1, + 3, 1, 1, 0, 4, 0, 1, 1, 3, 0, + 2, 0, 4, 0, 1, 1, 3, 3, 1, 0, + 4, 1, 1, 3, 3, 4, 2, 2, 3, 3, + 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) @@ -1005,13 +934,13 @@ do \ else \ { \ yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. @@ -1021,7 +950,7 @@ while (YYID (0)) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ - if (YYID (N)) \ + if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ @@ -1035,12 +964,27 @@ while (YYID (0)) (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ - while (YYID (0)) + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + + /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ @@ -1050,36 +994,28 @@ while (YYID (0)) /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ -__attribute__((__unused__)) -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +YY_ATTRIBUTE_UNUSED static unsigned yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) -#else -static unsigned -yy_location_print_ (yyo, yylocp) - FILE *yyo; - YYLTYPE const * const yylocp; -#endif { unsigned res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { - res += fprintf (yyo, "%d", yylocp->first_line); + res += YYFPRINTF (yyo, "%d", yylocp->first_line); if (0 <= yylocp->first_column) - res += fprintf (yyo, ".%d", yylocp->first_column); + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); } if (0 <= yylocp->last_line) { if (yylocp->first_line < yylocp->last_line) { - res += fprintf (yyo, "-%d", yylocp->last_line); + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); if (0 <= end_col) - res += fprintf (yyo, ".%d", end_col); + res += YYFPRINTF (yyo, ".%d", end_col); } else if (0 <= end_col && yylocp->first_column < end_col) - res += fprintf (yyo, "-%d", end_col); + res += YYFPRINTF (yyo, "-%d", end_col); } return res; } @@ -1093,75 +1029,36 @@ yy_location_print_ (yyo, yylocp) #endif -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc, scanner) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, context); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, Location, context); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TRI_aql_context_t* const context) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - TRI_aql_context_t* const context; -#endif { FILE *yyo = yyoutput; YYUSE (yyo); - if (!yyvaluep) - return; YYUSE (yylocationp); YYUSE (context); + if (!yyvaluep) + return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -1169,24 +1066,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TRI_aql_context_t* const context) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - TRI_aql_context_t* const context; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); @@ -1199,16 +1083,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -1219,51 +1095,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TRI_aql_context_t* const context) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, context) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; - TRI_aql_context_t* const context; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TRI_aql_context_t* const context) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , context); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , &(yylsp[(yyi + 1) - (yynrhs)]) , context); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, context); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, context); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1277,7 +1144,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1300,15 +1167,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1324,16 +1184,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1363,27 +1215,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1406,11 +1258,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1418,10 +1270,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1471,7 +1319,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1538,35 +1386,19 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TRI_aql_context_t* const context) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, context) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; - TRI_aql_context_t* const context; -#endif { YYUSE (yyvaluep); YYUSE (yylocationp); YYUSE (context); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1576,66 +1408,27 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, context) | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (TRI_aql_context_t* const context) -#else -int -yyparse (context) - TRI_aql_context_t* const context; -#endif -#endif { /* The lookahead symbol. */ int yychar; -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else +/* The semantic value of the lookahead symbol. */ /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ -static YYSTYPE yyval_default; -# define YY_INITIAL_VALUE(Value) = Value -#endif +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + +/* Location data for the lookahead symbol. */ static YYLTYPE yyloc_default # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL = { 1, 1, 1, 1 } # endif ; -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - -/* Location data for the lookahead symbol. */ YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ int yynerrs; @@ -1644,9 +1437,9 @@ YYLTYPE yylloc = yyloc_default; int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. + 'yyss': related to states. + 'yyvs': related to semantic values. + 'yyls': related to locations. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -1725,26 +1518,26 @@ YYLTYPE yylloc = yyloc_default; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + YYLTYPE *yyls1 = yyls; - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; + yyls = yyls1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1752,23 +1545,23 @@ YYLTYPE yylloc = yyloc_default; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1778,10 +1571,10 @@ YYLTYPE yylloc = yyloc_default; yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1810,7 +1603,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (&yylval, &yylloc, scanner); } if (yychar <= YYEOF) @@ -1875,7 +1668,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1890,104 +1683,103 @@ yyreduce: switch (yyn) { case 2: -/* Line 1792 of yacc.c */ -#line 193 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 193 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { context->_type = TRI_AQL_QUERY_READ; } +#line 1691 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 3: -/* Line 1792 of yacc.c */ -#line 196 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 196 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { context->_type = TRI_AQL_QUERY_REMOVE; } +#line 1699 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 4: -/* Line 1792 of yacc.c */ -#line 199 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 199 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { context->_type = TRI_AQL_QUERY_INSERT; } +#line 1707 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 5: -/* Line 1792 of yacc.c */ -#line 202 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 202 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { context->_type = TRI_AQL_QUERY_UPDATE; } +#line 1715 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 6: -/* Line 1792 of yacc.c */ -#line 205 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 205 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { context->_type = TRI_AQL_QUERY_REPLACE; } +#line 1723 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 7: -/* Line 1792 of yacc.c */ -#line 211 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 211 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1730 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 8: -/* Line 1792 of yacc.c */ -#line 213 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 213 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1737 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 9: -/* Line 1792 of yacc.c */ -#line 218 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 218 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1744 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 10: -/* Line 1792 of yacc.c */ -#line 220 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 220 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1751 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 11: -/* Line 1792 of yacc.c */ -#line 222 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 222 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1758 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 12: -/* Line 1792 of yacc.c */ -#line 224 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 224 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1765 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 13: -/* Line 1792 of yacc.c */ -#line 226 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 226 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1772 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 14: -/* Line 1792 of yacc.c */ -#line 228 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 228 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1779 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 15: -/* Line 1792 of yacc.c */ -#line 233 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 233 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; @@ -1995,7 +1787,7 @@ yyreduce: ABORT_OOM } - node = TRI_CreateNodeForAql(context, (yyvsp[(2) - (4)].strval), (yyvsp[(4) - (4)].node)); + node = TRI_CreateNodeForAql(context, (yyvsp[-2].strval), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2004,13 +1796,13 @@ yyreduce: ABORT_OOM } } +#line 1800 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 16: -/* Line 1792 of yacc.c */ -#line 252 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 252 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeFilterAql(context, (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeFilterAql(context, (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2019,34 +1811,34 @@ yyreduce: ABORT_OOM } } +#line 1815 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 17: -/* Line 1792 of yacc.c */ -#line 265 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 265 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1822 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 18: -/* Line 1792 of yacc.c */ -#line 270 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 270 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1829 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 19: -/* Line 1792 of yacc.c */ -#line 272 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 272 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1836 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 20: -/* Line 1792 of yacc.c */ -#line 277 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 277 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeLetAql(context, (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeLetAql(context, (yyvsp[-2].strval), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM @@ -2056,11 +1848,11 @@ yyreduce: ABORT_OOM } } +#line 1852 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 21: -/* Line 1792 of yacc.c */ -#line 291 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 291 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeListAql(context); @@ -2070,17 +1862,17 @@ yyreduce: TRI_PushStackParseAql(context, node); } +#line 1866 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 22: -/* Line 1792 of yacc.c */ -#line 299 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 299 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeCollectAql( context, static_cast (TRI_PopStackParseAql(context)), - (yyvsp[(4) - (4)].strval)); + (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM } @@ -2089,27 +1881,27 @@ yyreduce: ABORT_OOM } } +#line 1885 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 23: -/* Line 1792 of yacc.c */ -#line 316 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 316 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1892 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 24: -/* Line 1792 of yacc.c */ -#line 318 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 318 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 1899 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 25: -/* Line 1792 of yacc.c */ -#line 323 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 323 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeAssignAql(context, (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeAssignAql(context, (yyvsp[-2].strval), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2118,27 +1910,27 @@ yyreduce: ABORT_OOM } } +#line 1914 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 26: -/* Line 1792 of yacc.c */ -#line 336 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 336 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.strval) = NULL; } +#line 1922 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 27: -/* Line 1792 of yacc.c */ -#line 339 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 339 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.strval) = (yyvsp[(2) - (2)].strval); + (yyval.strval) = (yyvsp[0].strval); } +#line 1930 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 28: -/* Line 1792 of yacc.c */ -#line 345 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 345 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeListAql(context); @@ -2148,11 +1940,11 @@ yyreduce: TRI_PushStackParseAql(context, node); } +#line 1944 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 29: -/* Line 1792 of yacc.c */ -#line 353 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 353 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* list = static_cast(TRI_PopStackParseAql(context)); @@ -2165,70 +1957,70 @@ yyreduce: ABORT_OOM } } +#line 1961 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 30: -/* Line 1792 of yacc.c */ -#line 368 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 368 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(1) - (1)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 1971 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 31: -/* Line 1792 of yacc.c */ -#line 373 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 373 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(3) - (3)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 1981 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 32: -/* Line 1792 of yacc.c */ -#line 381 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 381 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeSortElementAql(context, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].boolval)); + TRI_aql_node_t* node = TRI_CreateNodeSortElementAql(context, (yyvsp[-1].node), (yyvsp[0].boolval)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 1994 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 33: -/* Line 1792 of yacc.c */ -#line 392 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 392 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.boolval) = true; } +#line 2002 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 34: -/* Line 1792 of yacc.c */ -#line 395 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 395 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.boolval) = true; } +#line 2010 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 35: -/* Line 1792 of yacc.c */ -#line 398 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 398 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.boolval) = false; } +#line 2018 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 36: -/* Line 1792 of yacc.c */ -#line 404 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 404 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, TRI_CreateNodeValueIntAql(context, 0), (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, TRI_CreateNodeValueIntAql(context, 0), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2238,13 +2030,13 @@ yyreduce: } } +#line 2034 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 37: -/* Line 1792 of yacc.c */ -#line 415 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 415 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); + TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2253,13 +2045,13 @@ yyreduce: ABORT_OOM } } +#line 2049 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 38: -/* Line 1792 of yacc.c */ -#line 428 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 428 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeReturnAql(context, (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeReturnAql(context, (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2272,15 +2064,15 @@ yyreduce: ABORT_OOM } } +#line 2068 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 39: -/* Line 1792 of yacc.c */ -#line 445 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 445 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeRemoveAql(context, (yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); + node = TRI_CreateNodeRemoveAql(context, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2293,15 +2085,15 @@ yyreduce: ABORT_OOM } } +#line 2089 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 40: -/* Line 1792 of yacc.c */ -#line 464 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 464 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeInsertAql(context, (yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); + node = TRI_CreateNodeInsertAql(context, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2314,15 +2106,15 @@ yyreduce: ABORT_OOM } } +#line 2110 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 41: -/* Line 1792 of yacc.c */ -#line 483 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 483 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeUpdateAql(context, NULL, (yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); + node = TRI_CreateNodeUpdateAql(context, NULL, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2335,15 +2127,15 @@ yyreduce: ABORT_OOM } } +#line 2131 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 42: -/* Line 1792 of yacc.c */ -#line 499 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 499 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeUpdateAql(context, (yyvsp[(2) - (7)].node), (yyvsp[(4) - (7)].node), (yyvsp[(6) - (7)].node), (yyvsp[(7) - (7)].node)); + node = TRI_CreateNodeUpdateAql(context, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2356,15 +2148,15 @@ yyreduce: ABORT_OOM } } +#line 2152 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 43: -/* Line 1792 of yacc.c */ -#line 518 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 518 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeReplaceAql(context, NULL, (yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); + node = TRI_CreateNodeReplaceAql(context, NULL, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2377,15 +2169,15 @@ yyreduce: ABORT_OOM } } +#line 2173 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 44: -/* Line 1792 of yacc.c */ -#line 534 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 534 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - node = TRI_CreateNodeReplaceAql(context, (yyvsp[(2) - (7)].node), (yyvsp[(4) - (7)].node), (yyvsp[(6) - (7)].node), (yyvsp[(7) - (7)].node)); + node = TRI_CreateNodeReplaceAql(context, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } @@ -2398,19 +2190,19 @@ yyreduce: ABORT_OOM } } +#line 2194 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 45: -/* Line 1792 of yacc.c */ -#line 553 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 553 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(2) - (3)].node); + (yyval.node) = (yyvsp[-1].node); } +#line 2202 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 46: -/* Line 1792 of yacc.c */ -#line 556 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 556 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { if (! TRI_StartScopeAql(context, TRI_AQL_SCOPE_SUBQUERY)) { ABORT_OOM @@ -2419,11 +2211,11 @@ yyreduce: context->_subQueries++; } +#line 2215 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 47: -/* Line 1792 of yacc.c */ -#line 563 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 563 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* result; TRI_aql_node_t* subQuery; @@ -2458,64 +2250,64 @@ yyreduce: // return the result (yyval.node) = result; } +#line 2254 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 48: -/* Line 1792 of yacc.c */ -#line 597 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 597 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2262 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 49: -/* Line 1792 of yacc.c */ -#line 600 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 600 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2270 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 50: -/* Line 1792 of yacc.c */ -#line 603 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 603 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2278 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 51: -/* Line 1792 of yacc.c */ -#line 606 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 606 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2286 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 52: -/* Line 1792 of yacc.c */ -#line 609 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 609 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2294 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 53: -/* Line 1792 of yacc.c */ -#line 612 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 612 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2302 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 54: -/* Line 1792 of yacc.c */ -#line 615 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 615 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; TRI_aql_node_t* list; - if ((yyvsp[(1) - (3)].node) == NULL || (yyvsp[(3) - (3)].node) == NULL) { + if ((yyvsp[-2].node) == NULL || (yyvsp[0].node) == NULL) { ABORT_OOM } @@ -2524,10 +2316,10 @@ yyreduce: ABORT_OOM } - if (TRI_ERROR_NO_ERROR != TRI_PushBackVectorPointer(&list->_members, (void*) (yyvsp[(1) - (3)].node))) { + if (TRI_ERROR_NO_ERROR != TRI_PushBackVectorPointer(&list->_members, (void*) (yyvsp[-2].node))) { ABORT_OOM } - if (TRI_ERROR_NO_ERROR != TRI_PushBackVectorPointer(&list->_members, (void*) (yyvsp[(3) - (3)].node))) { + if (TRI_ERROR_NO_ERROR != TRI_PushBackVectorPointer(&list->_members, (void*) (yyvsp[0].node))) { ABORT_OOM } @@ -2539,43 +2331,43 @@ yyreduce: (yyval.node) = node; } +#line 2335 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 55: -/* Line 1792 of yacc.c */ -#line 646 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 646 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.strval) = (yyvsp[(1) - (1)].strval); + (yyval.strval) = (yyvsp[0].strval); if ((yyval.strval) == NULL) { ABORT_OOM } } +#line 2347 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 56: -/* Line 1792 of yacc.c */ -#line 653 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 653 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (3)].strval) == NULL || (yyvsp[(3) - (3)].strval) == NULL) { + if ((yyvsp[-2].strval) == NULL || (yyvsp[0].strval) == NULL) { ABORT_OOM } - (yyval.strval) = TRI_RegisterString3Aql(context, (yyvsp[(1) - (3)].strval), "::", (yyvsp[(3) - (3)].strval)); + (yyval.strval) = TRI_RegisterString3Aql(context, (yyvsp[-2].strval), "::", (yyvsp[0].strval)); if ((yyval.strval) == NULL) { ABORT_OOM } } +#line 2363 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 57: -/* Line 1792 of yacc.c */ -#line 667 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 667 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - if (! TRI_PushStackParseAql(context, (yyvsp[(1) - (1)].strval))) { + if (! TRI_PushStackParseAql(context, (yyvsp[0].strval))) { ABORT_OOM } @@ -2586,11 +2378,11 @@ yyreduce: TRI_PushStackParseAql(context, node); } +#line 2382 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 58: -/* Line 1792 of yacc.c */ -#line 680 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 680 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* list = static_cast(TRI_PopStackParseAql(context)); @@ -2604,234 +2396,234 @@ yyreduce: (yyval.node) = node; } +#line 2400 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 59: -/* Line 1792 of yacc.c */ -#line 696 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 696 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryPlusAql(context, (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryPlusAql(context, (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2413 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 60: -/* Line 1792 of yacc.c */ -#line 704 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 704 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryMinusAql(context, (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryMinusAql(context, (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2426 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 61: -/* Line 1792 of yacc.c */ -#line 712 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 712 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryNotAql(context, (yyvsp[(2) - (2)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryNotAql(context, (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2439 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 62: -/* Line 1792 of yacc.c */ -#line 723 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 723 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryOrAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryOrAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2452 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 63: -/* Line 1792 of yacc.c */ -#line 731 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 731 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryAndAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryAndAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2465 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 64: -/* Line 1792 of yacc.c */ -#line 739 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 739 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryPlusAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryPlusAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2478 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 65: -/* Line 1792 of yacc.c */ -#line 747 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 747 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryMinusAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryMinusAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2491 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 66: -/* Line 1792 of yacc.c */ -#line 755 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 755 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryTimesAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryTimesAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2504 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 67: -/* Line 1792 of yacc.c */ -#line 763 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 763 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryDivAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryDivAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2517 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 68: -/* Line 1792 of yacc.c */ -#line 771 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 771 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryModAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryModAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2530 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 69: -/* Line 1792 of yacc.c */ -#line 779 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 779 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryEqAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryEqAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2543 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 70: -/* Line 1792 of yacc.c */ -#line 787 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 787 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryNeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryNeAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2556 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 71: -/* Line 1792 of yacc.c */ -#line 795 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 795 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLtAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLtAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2569 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 72: -/* Line 1792 of yacc.c */ -#line 803 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 803 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGtAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGtAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2582 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 73: -/* Line 1792 of yacc.c */ -#line 811 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 811 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLeAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2595 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 74: -/* Line 1792 of yacc.c */ -#line 819 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 819 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGeAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2608 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 75: -/* Line 1792 of yacc.c */ -#line 827 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 827 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryInAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryInAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 2621 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 76: -/* Line 1792 of yacc.c */ -#line 838 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 838 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeOperatorTernaryAql(context, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); + TRI_aql_node_t* node = TRI_CreateNodeOperatorTernaryAql(context, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); if (node == NULL) { ABORT_OOM @@ -2839,61 +2631,61 @@ yyreduce: (yyval.node) = node; } +#line 2635 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 77: -/* Line 1792 of yacc.c */ -#line 850 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 850 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2642 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 78: -/* Line 1792 of yacc.c */ -#line 852 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 852 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2649 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 79: -/* Line 1792 of yacc.c */ -#line 857 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 857 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(1) - (1)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 2659 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 80: -/* Line 1792 of yacc.c */ -#line 862 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 862 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(3) - (3)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 2669 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 81: -/* Line 1792 of yacc.c */ -#line 870 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 870 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2677 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 82: -/* Line 1792 of yacc.c */ -#line 873 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 873 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2685 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 83: -/* Line 1792 of yacc.c */ -#line 879 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 879 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeListAql(context); if (node == NULL) { @@ -2902,78 +2694,78 @@ yyreduce: TRI_PushStackParseAql(context, node); } +#line 2698 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 84: -/* Line 1792 of yacc.c */ -#line 886 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 886 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.node) = static_cast(TRI_PopStackParseAql(context)); } +#line 2706 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 85: -/* Line 1792 of yacc.c */ -#line 892 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 892 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2713 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 86: -/* Line 1792 of yacc.c */ -#line 894 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 894 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2720 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 87: -/* Line 1792 of yacc.c */ -#line 899 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 899 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(1) - (1)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 2730 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 88: -/* Line 1792 of yacc.c */ -#line 904 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 904 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushListAql(context, (yyvsp[(3) - (3)].node))) { + if (! TRI_PushListAql(context, (yyvsp[0].node))) { ABORT_OOM } } +#line 2740 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 89: -/* Line 1792 of yacc.c */ -#line 912 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 912 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.node) = NULL; } +#line 2748 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 90: -/* Line 1792 of yacc.c */ -#line 915 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 915 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (2)].strval) == NULL || (yyvsp[(2) - (2)].node) == NULL) { + if ((yyvsp[-1].strval) == NULL || (yyvsp[0].node) == NULL) { ABORT_OOM } - if (! TRI_CaseEqualString((yyvsp[(1) - (2)].strval), "OPTIONS")) { + if (! TRI_CaseEqualString((yyvsp[-1].strval), "OPTIONS")) { TRI_SetErrorContextAql(__FILE__, __LINE__, context, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, NULL); YYABORT; } - (yyval.node) = (yyvsp[(2) - (2)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2765 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 91: -/* Line 1792 of yacc.c */ -#line 930 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 930 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeArrayAql(context); if (node == NULL) { @@ -2982,66 +2774,66 @@ yyreduce: TRI_PushStackParseAql(context, node); } +#line 2778 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 92: -/* Line 1792 of yacc.c */ -#line 937 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 937 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { (yyval.node) = static_cast(TRI_PopStackParseAql(context)); } +#line 2786 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 93: -/* Line 1792 of yacc.c */ -#line 943 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 943 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2793 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 94: -/* Line 1792 of yacc.c */ -#line 945 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 945 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2800 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 95: -/* Line 1792 of yacc.c */ -#line 950 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 950 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2807 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 96: -/* Line 1792 of yacc.c */ -#line 952 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 952 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { } +#line 2814 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 97: -/* Line 1792 of yacc.c */ -#line 957 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 957 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if (! TRI_PushArrayAql(context, (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].node))) { + if (! TRI_PushArrayAql(context, (yyvsp[-2].strval), (yyvsp[0].node))) { ABORT_OOM } } +#line 2824 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 98: -/* Line 1792 of yacc.c */ -#line 965 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 965 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // start of reference (collection or variable name) - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 2833 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 99: -/* Line 1792 of yacc.c */ -#line 969 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 969 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // expanded variable access, e.g. variable[*] TRI_aql_node_t* node; @@ -3055,7 +2847,7 @@ yyreduce: TRI_PushStackParseAql(context, varname); // push on the stack what's going to be expanded (will be popped when we come back) - TRI_PushStackParseAql(context, (yyvsp[(1) - (1)].node)); + TRI_PushStackParseAql(context, (yyvsp[0].node)); // create a temporary variable for the row iterator (will be popped by "expansion" rule") node = TRI_CreateNodeReferenceAql(context, varname); @@ -3067,11 +2859,11 @@ yyreduce: // push the variable TRI_PushStackParseAql(context, node); } +#line 2863 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 100: -/* Line 1792 of yacc.c */ -#line 993 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 993 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // return from the "expansion" subrule TRI_aql_node_t* expanded = static_cast(TRI_PopStackParseAql(context)); @@ -3080,7 +2872,7 @@ yyreduce: char* varname = static_cast(TRI_PopStackParseAql(context)); // push the actual expand node into the statement list - expand = TRI_CreateNodeExpandAql(context, varname, expanded, (yyvsp[(4) - (4)].node)); + expand = TRI_CreateNodeExpandAql(context, varname, expanded, (yyvsp[0].node)); if (expand == NULL) { ABORT_OOM @@ -3103,20 +2895,20 @@ yyreduce: ABORT_OOM } } +#line 2899 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 101: -/* Line 1792 of yacc.c */ -#line 1027 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1027 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // variable or collection TRI_aql_node_t* node; - if (TRI_VariableExistsScopeAql(context, (yyvsp[(1) - (1)].strval))) { - node = TRI_CreateNodeReferenceAql(context, (yyvsp[(1) - (1)].strval)); + if (TRI_VariableExistsScopeAql(context, (yyvsp[0].strval))) { + node = TRI_CreateNodeReferenceAql(context, (yyvsp[0].strval)); } else { - node = TRI_CreateNodeCollectionAql(context, (yyvsp[(1) - (1)].strval)); + node = TRI_CreateNodeCollectionAql(context, (yyvsp[0].strval)); } if (node == NULL) { @@ -3125,179 +2917,179 @@ yyreduce: (yyval.node) = node; } +#line 2921 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 102: -/* Line 1792 of yacc.c */ -#line 1044 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1044 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 2933 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 103: -/* Line 1792 of yacc.c */ -#line 1051 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1051 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access, e.g. variable.reference - (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].strval)); + (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, (yyvsp[-2].node), (yyvsp[0].strval)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 2946 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 104: -/* Line 1792 of yacc.c */ -#line 1059 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1059 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access, e.g. variable.@reference - (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 2959 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 105: -/* Line 1792 of yacc.c */ -#line 1067 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1067 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // indexed variable access, e.g. variable[index] - (yyval.node) = TRI_CreateNodeIndexedAql(context, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); + (yyval.node) = TRI_CreateNodeIndexedAql(context, (yyvsp[-3].node), (yyvsp[-1].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 2972 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 106: -/* Line 1792 of yacc.c */ -#line 1078 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1078 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access, continuation from * expansion, e.g. [*].variable.reference TRI_aql_node_t* node = static_cast(TRI_PopStackParseAql(context)); - (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, node, (yyvsp[(2) - (2)].strval)); + (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, node, (yyvsp[0].strval)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 2987 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 107: -/* Line 1792 of yacc.c */ -#line 1088 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1088 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access w/ bind parameter, continuation from * expansion, e.g. [*].variable.@reference TRI_aql_node_t* node = static_cast(TRI_PopStackParseAql(context)); - (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, node, (yyvsp[(2) - (2)].node)); + (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, node, (yyvsp[0].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 3002 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 108: -/* Line 1792 of yacc.c */ -#line 1098 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1098 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // indexed variable access, continuation from * expansion, e.g. [*].variable[index] TRI_aql_node_t* node = static_cast(TRI_PopStackParseAql(context)); - (yyval.node) = TRI_CreateNodeIndexedAql(context, node, (yyvsp[(2) - (3)].node)); + (yyval.node) = TRI_CreateNodeIndexedAql(context, node, (yyvsp[-1].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 3017 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 109: -/* Line 1792 of yacc.c */ -#line 1108 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1108 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access, continuation from * expansion, e.g. [*].variable.xx.reference - (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].strval)); + (yyval.node) = TRI_CreateNodeAttributeAccessAql(context, (yyvsp[-2].node), (yyvsp[0].strval)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 3030 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 110: -/* Line 1792 of yacc.c */ -#line 1116 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1116 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // named variable access w/ bind parameter, continuation from * expansion, e.g. [*].variable.xx.@reference - (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + (yyval.node) = TRI_CreateNodeBoundAttributeAccessAql(context, (yyvsp[-2].node), (yyvsp[0].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 3043 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 111: -/* Line 1792 of yacc.c */ -#line 1124 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1124 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { // indexed variable access, continuation from * expansion, e.g. [*].variable.xx.[index] - (yyval.node) = TRI_CreateNodeIndexedAql(context, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); + (yyval.node) = TRI_CreateNodeIndexedAql(context, (yyvsp[-3].node), (yyvsp[-1].node)); if ((yyval.node) == NULL) { ABORT_OOM } } +#line 3056 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 112: -/* Line 1792 of yacc.c */ -#line 1135 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1135 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 3064 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 113: -/* Line 1792 of yacc.c */ -#line 1138 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1138 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 3072 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 114: -/* Line 1792 of yacc.c */ -#line 1144 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1144 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 3080 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 115: -/* Line 1792 of yacc.c */ -#line 1147 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1147 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; double value; - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - value = TRI_DoubleString((yyvsp[(1) - (1)].strval)); + value = TRI_DoubleString((yyvsp[0].strval)); if (TRI_errno() != TRI_ERROR_NO_ERROR) { TRI_SetErrorContextAql(__FILE__, __LINE__, context, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, NULL); @@ -3312,13 +3104,13 @@ yyreduce: (yyval.node) = node; } +#line 3108 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 116: -/* Line 1792 of yacc.c */ -#line 1172 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1172 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeValueStringAql(context, (yyvsp[(1) - (1)].strval)); + TRI_aql_node_t* node = TRI_CreateNodeValueStringAql(context, (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM @@ -3326,19 +3118,19 @@ yyreduce: (yyval.node) = node; } +#line 3122 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 117: -/* Line 1792 of yacc.c */ -#line 1181 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1181 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = (yyvsp[0].node); } +#line 3130 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 118: -/* Line 1792 of yacc.c */ -#line 1184 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1184 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeValueNullAql(context); @@ -3348,11 +3140,11 @@ yyreduce: (yyval.node) = node; } +#line 3144 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 119: -/* Line 1792 of yacc.c */ -#line 1193 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1193 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeValueBoolAql(context, true); @@ -3362,11 +3154,11 @@ yyreduce: (yyval.node) = node; } +#line 3158 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 120: -/* Line 1792 of yacc.c */ -#line 1202 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1202 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node = TRI_CreateNodeValueBoolAql(context, false); @@ -3376,62 +3168,62 @@ yyreduce: (yyval.node) = node; } +#line 3172 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 121: -/* Line 1792 of yacc.c */ -#line 1214 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1214 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - node = TRI_CreateNodeCollectionAql(context, (yyvsp[(1) - (1)].strval)); + node = TRI_CreateNodeCollectionAql(context, (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 3191 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 122: -/* Line 1792 of yacc.c */ -#line 1228 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1228 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - node = TRI_CreateNodeCollectionAql(context, (yyvsp[(1) - (1)].strval)); + node = TRI_CreateNodeCollectionAql(context, (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM } (yyval.node) = node; } +#line 3210 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 123: -/* Line 1792 of yacc.c */ -#line 1242 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1242 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - if (strlen((yyvsp[(1) - (1)].strval)) < 2 || (yyvsp[(1) - (1)].strval)[0] != '@') { - TRI_SetErrorContextAql(__FILE__, __LINE__, context, TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, (yyvsp[(1) - (1)].strval)); + if (strlen((yyvsp[0].strval)) < 2 || (yyvsp[0].strval)[0] != '@') { + TRI_SetErrorContextAql(__FILE__, __LINE__, context, TRI_ERROR_QUERY_BIND_PARAMETER_TYPE, (yyvsp[0].strval)); YYABORT; } - node = TRI_CreateNodeParameterAql(context, (yyvsp[(1) - (1)].strval)); + node = TRI_CreateNodeParameterAql(context, (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM @@ -3439,13 +3231,13 @@ yyreduce: (yyval.node) = node; } +#line 3235 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 124: -/* Line 1792 of yacc.c */ -#line 1265 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1265 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - TRI_aql_node_t* node = TRI_CreateNodeParameterAql(context, (yyvsp[(1) - (1)].strval)); + TRI_aql_node_t* node = TRI_CreateNodeParameterAql(context, (yyvsp[0].strval)); if (node == NULL) { ABORT_OOM @@ -3453,52 +3245,52 @@ yyreduce: (yyval.node) = node; } +#line 3249 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 125: -/* Line 1792 of yacc.c */ -#line 1277 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1277 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - (yyval.strval) = (yyvsp[(1) - (1)].strval); + (yyval.strval) = (yyvsp[0].strval); } +#line 3261 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 126: -/* Line 1792 of yacc.c */ -#line 1284 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1284 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - (yyval.strval) = (yyvsp[(1) - (1)].strval); + (yyval.strval) = (yyvsp[0].strval); } +#line 3273 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 127: -/* Line 1792 of yacc.c */ -#line 1293 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1293 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { - (yyval.strval) = (yyvsp[(1) - (1)].strval); + (yyval.strval) = (yyvsp[0].strval); } +#line 3281 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; case 128: -/* Line 1792 of yacc.c */ -#line 1299 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 1299 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1646 */ { TRI_aql_node_t* node; int64_t value; - if ((yyvsp[(1) - (1)].strval) == NULL) { + if ((yyvsp[0].strval) == NULL) { ABORT_OOM } - value = TRI_Int64String((yyvsp[(1) - (1)].strval)); + value = TRI_Int64String((yyvsp[0].strval)); if (TRI_errno() != TRI_ERROR_NO_ERROR) { TRI_SetErrorContextAql(__FILE__, __LINE__, context, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, NULL); YYABORT; @@ -3511,11 +3303,11 @@ yyreduce: (yyval.node) = node; } +#line 3307 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ break; -/* Line 1792 of yacc.c */ -#line 3519 "arangod/Ahuacatl/ahuacatl-grammar.c" +#line 3311 "arangod/Ahuacatl/ahuacatl-grammar.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3538,7 +3330,7 @@ yyreduce: *++yyvsp = yyval; *++yylsp = yyloc; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -3553,9 +3345,9 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -3606,20 +3398,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, context); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, context); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -3639,7 +3431,7 @@ yyerrorlab: goto yyerrorlab; yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -3652,29 +3444,29 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yyerror_range[1] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, context); + yystos[yystate], yyvsp, yylsp, context); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -3730,14 +3522,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, context); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, context); + yystos[*yyssp], yyvsp, yylsp, context); YYPOPSTACK (1); } #ifndef yyoverflow @@ -3748,8 +3540,5 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - diff --git a/arangod/Ahuacatl/ahuacatl-grammar.h b/arangod/Ahuacatl/ahuacatl-grammar.h index 73eab3cf3c..c85a8d93a1 100644 --- a/arangod/Ahuacatl/ahuacatl-grammar.h +++ b/arangod/Ahuacatl/ahuacatl-grammar.h @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,13 +26,13 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED # define YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -40,119 +40,105 @@ extern int Ahuacatldebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - T_END = 0, - T_FOR = 258, - T_LET = 259, - T_FILTER = 260, - T_RETURN = 261, - T_COLLECT = 262, - T_SORT = 263, - T_LIMIT = 264, - T_ASC = 265, - T_DESC = 266, - T_IN = 267, - T_INTO = 268, - T_WITH = 269, - T_REMOVE = 270, - T_INSERT = 271, - T_UPDATE = 272, - T_REPLACE = 273, - T_NULL = 274, - T_TRUE = 275, - T_FALSE = 276, - T_STRING = 277, - T_QUOTED_STRING = 278, - T_INTEGER = 279, - T_DOUBLE = 280, - T_PARAMETER = 281, - T_ASSIGN = 282, - T_NOT = 283, - T_AND = 284, - T_OR = 285, - T_EQ = 286, - T_NE = 287, - T_LT = 288, - T_GT = 289, - T_LE = 290, - T_GE = 291, - T_PLUS = 292, - T_MINUS = 293, - T_TIMES = 294, - T_DIV = 295, - T_MOD = 296, - T_EXPAND = 297, - T_QUESTION = 298, - T_COLON = 299, - T_SCOPE = 300, - T_RANGE = 301, - T_COMMA = 302, - T_OPEN = 303, - T_CLOSE = 304, - T_DOC_OPEN = 305, - T_DOC_CLOSE = 306, - T_LIST_OPEN = 307, - T_LIST_CLOSE = 308, - UPLUS = 309, - UMINUS = 310, - FUNCCALL = 311, - REFERENCE = 312, - INDEXED = 313 - }; + enum yytokentype + { + T_END = 0, + T_FOR = 258, + T_LET = 259, + T_FILTER = 260, + T_RETURN = 261, + T_COLLECT = 262, + T_SORT = 263, + T_LIMIT = 264, + T_ASC = 265, + T_DESC = 266, + T_IN = 267, + T_INTO = 268, + T_WITH = 269, + T_REMOVE = 270, + T_INSERT = 271, + T_UPDATE = 272, + T_REPLACE = 273, + T_NULL = 274, + T_TRUE = 275, + T_FALSE = 276, + T_STRING = 277, + T_QUOTED_STRING = 278, + T_INTEGER = 279, + T_DOUBLE = 280, + T_PARAMETER = 281, + T_ASSIGN = 282, + T_NOT = 283, + T_AND = 284, + T_OR = 285, + T_EQ = 286, + T_NE = 287, + T_LT = 288, + T_GT = 289, + T_LE = 290, + T_GE = 291, + T_PLUS = 292, + T_MINUS = 293, + T_TIMES = 294, + T_DIV = 295, + T_MOD = 296, + T_EXPAND = 297, + T_QUESTION = 298, + T_COLON = 299, + T_SCOPE = 300, + T_RANGE = 301, + T_COMMA = 302, + T_OPEN = 303, + T_CLOSE = 304, + T_DOC_OPEN = 305, + T_DOC_CLOSE = 306, + T_LIST_OPEN = 307, + T_LIST_CLOSE = 308, + UMINUS = 309, + UPLUS = 310, + FUNCCALL = 311, + REFERENCE = 312, + INDEXED = 313 + }; #endif - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { -/* Line 2058 of yacc.c */ -#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" +#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1909 */ TRI_aql_node_t* node; char* strval; bool boolval; int64_t intval; - -/* Line 2058 of yacc.c */ -#line 124 "arangod/Ahuacatl/ahuacatl-grammar.h" -} YYSTYPE; +#line 121 "arangod/Ahuacatl/ahuacatl-grammar.h" /* yacc.c:1909 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif +/* Location type. */ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE +typedef struct YYLTYPE YYLTYPE; +struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +}; # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int Ahuacatlparse (void *YYPARSE_PARAM); -#else -int Ahuacatlparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus + int Ahuacatlparse (TRI_aql_context_t* const context); -#else -int Ahuacatlparse (); -#endif -#endif /* ! YYPARSE_PARAM */ #endif /* !YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED */ diff --git a/config/bison-c++.sh b/config/bison-c++.sh index 172c777b26..21cab6ced5 100755 --- a/config/bison-c++.sh +++ b/config/bison-c++.sh @@ -56,6 +56,7 @@ mv ${PREFIX}.hpp ${PREFIX}.h || exit 1 sed -e 's:\.hpp:.h:' < ${OUTPUT} \ | sed -e 's:# if YYENABLE_NLS:# if defined(YYENABLE_NLS) \&\& YYENABLE_NLS:' \ + | sed -e 's:__attribute__((__unused__)):' \ > ${OUTPUT}.tmp # give some information