diff --git a/arangod/Ahuacatl/ahuacatl-grammar.c b/arangod/Ahuacatl/ahuacatl-grammar.c index 00d610e44e..3aadbc4b0e 100644 --- a/arangod/Ahuacatl/ahuacatl-grammar.c +++ b/arangod/Ahuacatl/ahuacatl-grammar.c @@ -1,10 +1,8 @@ +/* A Bison parser, made by GNU Bison 2.5. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 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 @@ -46,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -75,7 +73,7 @@ /* Copy the first part of user declarations. */ -/* Line 189 of yacc.c */ +/* Line 268 of yacc.c */ #line 10 "arangod/Ahuacatl/ahuacatl-grammar.y" #include @@ -93,8 +91,8 @@ #include "Ahuacatl/ahuacatl-scope.h" -/* Line 189 of yacc.c */ -#line 98 "arangod/Ahuacatl/ahuacatl-grammar.c" +/* Line 268 of yacc.c */ +#line 96 "arangod/Ahuacatl/ahuacatl-grammar.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -180,7 +178,7 @@ typedef union YYSTYPE { -/* Line 214 of yacc.c */ +/* Line 301 of yacc.c */ #line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" TRI_aql_node_t* node; @@ -190,8 +188,8 @@ typedef union YYSTYPE -/* Line 214 of yacc.c */ -#line 195 "arangod/Ahuacatl/ahuacatl-grammar.c" +/* Line 301 of yacc.c */ +#line 193 "arangod/Ahuacatl/ahuacatl-grammar.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -214,7 +212,7 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ +/* Line 343 of yacc.c */ #line 33 "arangod/Ahuacatl/ahuacatl-grammar.y" @@ -244,8 +242,8 @@ void Ahuacatlerror (YYLTYPE* locp, TRI_aql_context_t* const context, const char* -/* Line 264 of yacc.c */ -#line 249 "arangod/Ahuacatl/ahuacatl-grammar.c" +/* Line 343 of yacc.c */ +#line 247 "arangod/Ahuacatl/ahuacatl-grammar.c" #ifdef short # undef short @@ -295,7 +293,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -348,11 +346,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -375,24 +373,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -423,23 +421,7 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -459,6 +441,26 @@ union yyalloc #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ @@ -668,8 +670,8 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero +/* 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[] = { @@ -738,8 +740,7 @@ static const yytype_int8 yypgoto[] = /* 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 zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ + number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -84 static const yytype_int16 yytable[] = { @@ -779,6 +780,12 @@ static const yytype_int16 yytable[] = 71, 72, 73, 74, 75, 76, 77 }; +#define yypact_value_is_default(yystate) \ + ((yystate) == (-30)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + static const yytype_int16 yycheck[] = { 6, 7, 4, 5, 0, 10, 28, 29, 30, 31, @@ -852,9 +859,18 @@ static const yytype_uint8 yystos[] = /* 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. */ + 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 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) @@ -864,7 +880,6 @@ do \ { \ yychar = (Token); \ yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -911,7 +926,7 @@ while (YYID (0)) we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -1120,7 +1135,6 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE @@ -1223,115 +1237,142 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) { - int yyn = yypact[yystate]; + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else + /* 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 + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -1368,6 +1409,7 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, context) } } + /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -1384,12 +1426,9 @@ int yyparse (); #endif /* ! YYPARSE_PARAM */ - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1453,7 +1492,7 @@ YYLTYPE yylloc; YYLTYPE *yylsp; /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; + YYLTYPE yyerror_range[3]; YYSIZE_T yystacksize; @@ -1500,7 +1539,7 @@ YYLTYPE yylloc; yyvsp = yyvs; yylsp = yyls; -#if YYLTYPE_IS_TRIVIAL +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; yylloc.first_column = yylloc.last_column = 1; @@ -1602,7 +1641,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -1633,8 +1672,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1690,79 +1729,79 @@ yyreduce: { case 2: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 180 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 3: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 185 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 4: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 187 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 5: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 192 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 6: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 194 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 7: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 196 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 8: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 198 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 9: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 200 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 10: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 202 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 11: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 207 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node; @@ -1779,12 +1818,12 @@ yyreduce: if (! TRI_AppendStatementListAql(context->_statements, node)) { ABORT_OOM } - ;} + } break; case 12: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 226 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeFilterAql(context, (yyvsp[(2) - (2)].node)); @@ -1795,12 +1834,12 @@ yyreduce: if (! TRI_AppendStatementListAql(context->_statements, node)) { ABORT_OOM } - ;} + } break; case 13: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 239 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeLetAql(context, (yyvsp[(2) - (4)].strval), (yyvsp[(4) - (4)].node)); @@ -1811,12 +1850,12 @@ yyreduce: if (! TRI_AppendStatementListAql(context->_statements, node)) { ABORT_OOM } - ;} + } break; case 14: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 252 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeListAql(context); @@ -1826,12 +1865,12 @@ yyreduce: } TRI_PushStackParseAql(context, node); - ;} + } break; case 15: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 260 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeCollectAql(context, TRI_PopStackParseAql(context), (yyvsp[(4) - (4)].strval)); @@ -1842,28 +1881,28 @@ yyreduce: if (! TRI_AppendStatementListAql(context->_statements, node)) { ABORT_OOM } - ;} + } break; case 16: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 273 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 17: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 275 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 18: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 280 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeAssignAql(context, (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].node)); @@ -1874,30 +1913,30 @@ yyreduce: if (! TRI_PushListAql(context, node)) { ABORT_OOM } - ;} + } break; case 19: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 293 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.strval) = NULL; - ;} + } break; case 20: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 296 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.strval) = (yyvsp[(2) - (2)].strval); - ;} + } break; case 21: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 302 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeListAql(context); @@ -1907,12 +1946,12 @@ yyreduce: } TRI_PushStackParseAql(context, node); - ;} + } break; case 22: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 310 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* list = TRI_PopStackParseAql(context); @@ -1924,34 +1963,34 @@ yyreduce: if (! TRI_AppendStatementListAql(context->_statements, node)) { ABORT_OOM } - ;} + } break; case 23: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 324 "arangod/Ahuacatl/ahuacatl-grammar.y" { if (! TRI_PushListAql(context, (yyvsp[(1) - (1)].node))) { ABORT_OOM } - ;} + } break; case 24: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 329 "arangod/Ahuacatl/ahuacatl-grammar.y" { if (! TRI_PushListAql(context, (yyvsp[(3) - (3)].node))) { ABORT_OOM } - ;} + } break; case 25: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 337 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeSortElementAql(context, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].boolval)); @@ -1960,39 +1999,39 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 26: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 348 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.boolval) = true; - ;} + } break; case 27: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 351 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.boolval) = true; - ;} + } break; case 28: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 354 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.boolval) = false; - ;} + } break; case 29: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 360 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, TRI_CreateNodeValueIntAql(context, 0), (yyvsp[(2) - (2)].node)); @@ -2004,12 +2043,12 @@ yyreduce: ABORT_OOM } - ;} + } break; case 30: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 371 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, (yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); @@ -2020,12 +2059,12 @@ yyreduce: if (! TRI_AppendStatementListAql(context->_statements, node)) { ABORT_OOM } - ;} + } break; case 31: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 384 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeReturnAql(context, (yyvsp[(2) - (2)].node)); @@ -2042,33 +2081,33 @@ yyreduce: } // $$ = node; - ;} + } break; case 32: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 404 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(2) - (3)].node); - ;} + } break; case 33: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 407 "arangod/Ahuacatl/ahuacatl-grammar.y" { if (! TRI_StartScopeAql(context, TRI_AQL_SCOPE_SUBQUERY)) { ABORT_OOM } - ;} + } break; case 34: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 412 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* result; @@ -2100,66 +2139,66 @@ yyreduce: // return the result (yyval.node) = result; - ;} + } break; case 35: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 443 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 36: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 446 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 37: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 449 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 38: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 452 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 39: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 455 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 40: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 458 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 41: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 464 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.strval) = (yyvsp[(1) - (1)].strval); @@ -2167,12 +2206,12 @@ yyreduce: if ((yyval.strval) == NULL) { ABORT_OOM } - ;} + } break; case 42: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 471 "arangod/Ahuacatl/ahuacatl-grammar.y" { if ((yyvsp[(1) - (3)].strval) == NULL || (yyvsp[(3) - (3)].strval) == NULL) { @@ -2184,12 +2223,12 @@ yyreduce: if ((yyval.strval) == NULL) { ABORT_OOM } - ;} + } break; case 43: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 485 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node; @@ -2204,12 +2243,12 @@ yyreduce: } TRI_PushStackParseAql(context, node); - ;} + } break; case 44: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 498 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* list = TRI_PopStackParseAql(context); @@ -2219,12 +2258,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 45: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 510 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryPlusAql(context, (yyvsp[(2) - (2)].node)); @@ -2233,12 +2272,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 46: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 518 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryMinusAql(context, (yyvsp[(2) - (2)].node)); @@ -2247,12 +2286,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 47: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 526 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryNotAql(context, (yyvsp[(2) - (2)].node)); @@ -2261,12 +2300,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 48: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 537 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryOrAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2275,12 +2314,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 49: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 545 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryAndAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2289,12 +2328,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 50: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 553 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryPlusAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2303,12 +2342,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 51: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 561 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryMinusAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2317,12 +2356,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 52: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 569 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryTimesAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2331,12 +2370,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 53: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 577 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryDivAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2345,12 +2384,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 54: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 585 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryModAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2359,12 +2398,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 55: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 593 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryEqAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2373,12 +2412,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 56: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 601 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryNeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2387,12 +2426,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 57: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 609 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLtAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2401,12 +2440,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 58: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 617 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGtAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2415,12 +2454,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 59: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 625 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2429,12 +2468,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 60: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 633 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2443,12 +2482,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 61: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 641 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryInAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); @@ -2457,12 +2496,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 62: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 652 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeOperatorTernaryAql(context, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); @@ -2471,64 +2510,64 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 63: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 663 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 64: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 665 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 65: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 670 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_PushListAql(context, (yyvsp[(1) - (1)].node)); - ;} + } break; case 66: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 673 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_PushListAql(context, (yyvsp[(3) - (3)].node)); - ;} + } break; case 67: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 679 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 68: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 682 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 69: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 688 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeListAql(context); @@ -2537,59 +2576,59 @@ yyreduce: } TRI_PushStackParseAql(context, node); - ;} + } break; case 70: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 695 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = TRI_PopStackParseAql(context); - ;} + } break; case 71: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 701 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 72: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 703 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 73: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 708 "arangod/Ahuacatl/ahuacatl-grammar.y" { if (! TRI_PushListAql(context, (yyvsp[(1) - (1)].node))) { ABORT_OOM } - ;} + } break; case 74: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 713 "arangod/Ahuacatl/ahuacatl-grammar.y" { if (! TRI_PushListAql(context, (yyvsp[(3) - (3)].node))) { ABORT_OOM } - ;} + } break; case 75: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 721 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeArrayAql(context); @@ -2598,74 +2637,74 @@ yyreduce: } TRI_PushStackParseAql(context, node); - ;} + } break; case 76: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 728 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = TRI_PopStackParseAql(context); - ;} + } break; case 77: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 734 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 78: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 736 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 79: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 741 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 80: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 743 "arangod/Ahuacatl/ahuacatl-grammar.y" { - ;} + } break; case 81: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 748 "arangod/Ahuacatl/ahuacatl-grammar.y" { if (! TRI_PushArrayAql(context, (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].node))) { ABORT_OOM } - ;} + } break; case 82: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 756 "arangod/Ahuacatl/ahuacatl-grammar.y" { // start of reference (collection or variable name) (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 83: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 760 "arangod/Ahuacatl/ahuacatl-grammar.y" { // expanded variable access, e.g. variable[*] @@ -2691,12 +2730,12 @@ yyreduce: // push the variable TRI_PushStackParseAql(context, node); - ;} + } break; case 84: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 784 "arangod/Ahuacatl/ahuacatl-grammar.y" { // return from the "expansion" subrule @@ -2723,12 +2762,12 @@ yyreduce: if (! (yyval.node)) { ABORT_OOM } - ;} + } break; case 85: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 813 "arangod/Ahuacatl/ahuacatl-grammar.y" { // variable or collection @@ -2746,12 +2785,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 86: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 830 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); @@ -2759,12 +2798,12 @@ yyreduce: if (! (yyval.node)) { ABORT_OOM } - ;} + } break; case 87: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 837 "arangod/Ahuacatl/ahuacatl-grammar.y" { // named variable access, e.g. variable.reference @@ -2773,12 +2812,12 @@ yyreduce: if (! (yyval.node)) { ABORT_OOM } - ;} + } break; case 88: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 845 "arangod/Ahuacatl/ahuacatl-grammar.y" { // indexed variable access, e.g. variable[index] @@ -2787,12 +2826,12 @@ yyreduce: if (! (yyval.node)) { ABORT_OOM } - ;} + } break; case 89: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 856 "arangod/Ahuacatl/ahuacatl-grammar.y" { // named variable access, continuation from * expansion, e.g. [*].variable.reference @@ -2803,12 +2842,12 @@ yyreduce: if (! (yyval.node)) { ABORT_OOM } - ;} + } break; case 90: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 866 "arangod/Ahuacatl/ahuacatl-grammar.y" { // indexed variable access, continuation from * expansion, e.g. [*].variable[index] @@ -2819,12 +2858,12 @@ yyreduce: if (! (yyval.node)) { ABORT_OOM } - ;} + } break; case 91: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 876 "arangod/Ahuacatl/ahuacatl-grammar.y" { // named variable access, continuation from * expansion, e.g. [*].variable.xx.reference @@ -2832,12 +2871,12 @@ yyreduce: if (! (yyval.node)) { ABORT_OOM } - ;} + } break; case 92: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 883 "arangod/Ahuacatl/ahuacatl-grammar.y" { // indexed variable access, continuation from * expansion, e.g. [*].variable.xx.[index] @@ -2845,30 +2884,30 @@ yyreduce: if (! (yyval.node)) { ABORT_OOM } - ;} + } break; case 93: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 893 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 94: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 896 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 95: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 902 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeValueStringAql(context, (yyvsp[(1) - (1)].strval)); @@ -2877,21 +2916,21 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 96: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 910 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.node) = (yyvsp[(1) - (1)].node); - ;} + } break; case 97: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 913 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node; @@ -2913,12 +2952,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 98: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 934 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeValueNullAql(context); @@ -2927,12 +2966,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 99: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 942 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeValueBoolAql(context, true); @@ -2941,12 +2980,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 100: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 950 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeValueBoolAql(context, false); @@ -2955,12 +2994,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 101: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 961 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node = TRI_CreateNodeParameterAql(context, (yyvsp[(1) - (1)].strval)); @@ -2969,12 +3008,12 @@ yyreduce: } (yyval.node) = node; - ;} + } break; case 102: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 972 "arangod/Ahuacatl/ahuacatl-grammar.y" { if (! (yyvsp[(1) - (1)].strval)) { @@ -2982,12 +3021,12 @@ yyreduce: } (yyval.strval) = (yyvsp[(1) - (1)].strval); - ;} + } break; case 103: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 979 "arangod/Ahuacatl/ahuacatl-grammar.y" { if (! (yyvsp[(1) - (1)].strval)) { @@ -2995,21 +3034,21 @@ yyreduce: } (yyval.strval) = (yyvsp[(1) - (1)].strval); - ;} + } break; case 104: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 988 "arangod/Ahuacatl/ahuacatl-grammar.y" { (yyval.strval) = (yyvsp[(1) - (1)].strval); - ;} + } break; case 105: -/* Line 1455 of yacc.c */ +/* Line 1821 of yacc.c */ #line 994 "arangod/Ahuacatl/ahuacatl-grammar.y" { TRI_aql_node_t* node; @@ -3027,15 +3066,26 @@ yyreduce: } (yyval.node) = node; - ;} + } break; -/* Line 1455 of yacc.c */ -#line 3037 "arangod/Ahuacatl/ahuacatl-grammar.c" +/* Line 1821 of yacc.c */ +#line 3076 "arangod/Ahuacatl/ahuacatl-grammar.c" default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -3064,6 +3114,10 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -3071,41 +3125,40 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (&yylloc, context, YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (&yylloc, context, yymsg); - } - else - { - yyerror (&yylloc, context, YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (&yylloc, context, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } - yyerror_range[0] = yylloc; + yyerror_range[1] = yylloc; if (yyerrstatus == 3) { @@ -3142,7 +3195,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - yyerror_range[0] = yylsp[1-yylen]; + yyerror_range[1] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); @@ -3161,7 +3214,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) + if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -3176,7 +3229,7 @@ yyerrlab1: if (yyssp == yyss) YYABORT; - yyerror_range[0] = *yylsp; + yyerror_range[1] = *yylsp; yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp, context); YYPOPSTACK (1); @@ -3186,10 +3239,10 @@ yyerrlab1: *++yyvsp = yylval; - yyerror_range[1] = yylloc; + yyerror_range[2] = yylloc; /* Using YYLLOC is tempting, but would change the location of the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); *++yylsp = yyloc; /* Shift the error token. */ @@ -3225,8 +3278,13 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, context); + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, context); + } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); diff --git a/arangod/Ahuacatl/ahuacatl-grammar.h b/arangod/Ahuacatl/ahuacatl-grammar.h index c8a556842d..1b9a1491ee 100644 --- a/arangod/Ahuacatl/ahuacatl-grammar.h +++ b/arangod/Ahuacatl/ahuacatl-grammar.h @@ -1,10 +1,8 @@ +/* A Bison parser, made by GNU Bison 2.5. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C +/* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 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 @@ -98,7 +96,7 @@ typedef union YYSTYPE { -/* Line 1676 of yacc.c */ +/* Line 2132 of yacc.c */ #line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" TRI_aql_node_t* node; @@ -108,8 +106,8 @@ typedef union YYSTYPE -/* Line 1676 of yacc.c */ -#line 113 "arangod/Ahuacatl/ahuacatl-grammar.h" +/* Line 2132 of yacc.c */ +#line 111 "arangod/Ahuacatl/ahuacatl-grammar.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/html/admin/js/bootstrap/module-internal.js b/html/admin/js/bootstrap/module-internal.js index 80b30fbde4..71d5065b2f 100644 --- a/html/admin/js/bootstrap/module-internal.js +++ b/html/admin/js/bootstrap/module-internal.js @@ -809,6 +809,7 @@ var useColor = context.useColor; var customInspect = context.customInspect; + var useToString = context.useToString; if (typeof context.seen === "undefined") { context.seen = []; @@ -836,7 +837,7 @@ else if (value.__proto__ === Object.prototype) { printObject(value, context); } - else if (typeof value.toString === "function") { + else if (typeof value === "function") { // it's possible that toString() throws, and this looks quite ugly try { @@ -863,8 +864,20 @@ context.output += "[Function]"; } } + else if (useToString && typeof value.toString === "function") { + try { + context.output += value.toString(); + } + catch (e) { + context.output += "[Object "; + printObject(value, context); + context.output += "]"; + } + } else { + context.output += "[Object "; printObject(value, context); + context.output += "]"; } } else if (value === undefined) { @@ -875,58 +888,56 @@ context.output += "undefined"; + if (useColor) { + context.output += colors.COLOR_RESET; + } + } + else if (typeof(value) === "string") { + if (useColor) { + context.output += colors.COLOR_STRING; + } + + context.output += quoteJsonString(value); + + if (useColor) { + context.output += colors.COLOR_RESET; + } + } + else if (typeof(value) === "boolean") { + if (useColor) { + context.output += value ? colors.COLOR_TRUE : colors.COLOR_FALSE; + } + + context.output += String(value); + + if (useColor) { + context.output += colors.COLOR_RESET; + } + } + else if (typeof(value) === "number") { + if (useColor) { + context.output += colors.COLOR_NUMBER; + } + + context.output += String(value); + + if (useColor) { + context.output += colors.COLOR_RESET; + } + } + else if (value === null) { + if (useColor) { + context.output += colors.COLOR_NULL; + } + + context.output += String(value); + if (useColor) { context.output += colors.COLOR_RESET; } } else { - if (typeof(value) === "string") { - if (useColor) { - context.output += colors.COLOR_STRING; - } - - context.output += quoteJsonString(value); - - if (useColor) { - context.output += colors.COLOR_RESET; - } - } - else if (typeof(value) === "boolean") { - if (useColor) { - context.output += value ? colors.COLOR_TRUE : colors.COLOR_FALSE; - } - - context.output += String(value); - - if (useColor) { - context.output += colors.COLOR_RESET; - } - } - else if (typeof(value) === "number") { - if (useColor) { - context.output += colors.COLOR_NUMBER; - } - - context.output += String(value); - - if (useColor) { - context.output += colors.COLOR_RESET; - } - } - else if (value === null) { - if (useColor) { - context.output += colors.COLOR_NULL; - } - - context.output += String(value); - - if (useColor) { - context.output += colors.COLOR_RESET; - } - } - else { - context.output += String(value); - } + context.output += String(value); } } }; @@ -1000,7 +1011,8 @@ output: "", prettyPrint: usePrettyPrint, useColor: useColor, - customInspect: true + customInspect: true, + useToString: true }; printRecursive(arguments[i], context); @@ -1040,7 +1052,8 @@ output: "", prettyPrint: true, useColor: false, - customInspect: options && options.customInspect + customInspect: options && options.customInspect, + useToString: false }; printRecursive(object, context); diff --git a/js/common/bootstrap/module-internal.js b/js/common/bootstrap/module-internal.js index 80b30fbde4..71d5065b2f 100644 --- a/js/common/bootstrap/module-internal.js +++ b/js/common/bootstrap/module-internal.js @@ -809,6 +809,7 @@ var useColor = context.useColor; var customInspect = context.customInspect; + var useToString = context.useToString; if (typeof context.seen === "undefined") { context.seen = []; @@ -836,7 +837,7 @@ else if (value.__proto__ === Object.prototype) { printObject(value, context); } - else if (typeof value.toString === "function") { + else if (typeof value === "function") { // it's possible that toString() throws, and this looks quite ugly try { @@ -863,8 +864,20 @@ context.output += "[Function]"; } } + else if (useToString && typeof value.toString === "function") { + try { + context.output += value.toString(); + } + catch (e) { + context.output += "[Object "; + printObject(value, context); + context.output += "]"; + } + } else { + context.output += "[Object "; printObject(value, context); + context.output += "]"; } } else if (value === undefined) { @@ -875,58 +888,56 @@ context.output += "undefined"; + if (useColor) { + context.output += colors.COLOR_RESET; + } + } + else if (typeof(value) === "string") { + if (useColor) { + context.output += colors.COLOR_STRING; + } + + context.output += quoteJsonString(value); + + if (useColor) { + context.output += colors.COLOR_RESET; + } + } + else if (typeof(value) === "boolean") { + if (useColor) { + context.output += value ? colors.COLOR_TRUE : colors.COLOR_FALSE; + } + + context.output += String(value); + + if (useColor) { + context.output += colors.COLOR_RESET; + } + } + else if (typeof(value) === "number") { + if (useColor) { + context.output += colors.COLOR_NUMBER; + } + + context.output += String(value); + + if (useColor) { + context.output += colors.COLOR_RESET; + } + } + else if (value === null) { + if (useColor) { + context.output += colors.COLOR_NULL; + } + + context.output += String(value); + if (useColor) { context.output += colors.COLOR_RESET; } } else { - if (typeof(value) === "string") { - if (useColor) { - context.output += colors.COLOR_STRING; - } - - context.output += quoteJsonString(value); - - if (useColor) { - context.output += colors.COLOR_RESET; - } - } - else if (typeof(value) === "boolean") { - if (useColor) { - context.output += value ? colors.COLOR_TRUE : colors.COLOR_FALSE; - } - - context.output += String(value); - - if (useColor) { - context.output += colors.COLOR_RESET; - } - } - else if (typeof(value) === "number") { - if (useColor) { - context.output += colors.COLOR_NUMBER; - } - - context.output += String(value); - - if (useColor) { - context.output += colors.COLOR_RESET; - } - } - else if (value === null) { - if (useColor) { - context.output += colors.COLOR_NULL; - } - - context.output += String(value); - - if (useColor) { - context.output += colors.COLOR_RESET; - } - } - else { - context.output += String(value); - } + context.output += String(value); } } }; @@ -1000,7 +1011,8 @@ output: "", prettyPrint: usePrettyPrint, useColor: useColor, - customInspect: true + customInspect: true, + useToString: true }; printRecursive(arguments[i], context); @@ -1040,7 +1052,8 @@ output: "", prettyPrint: true, useColor: false, - customInspect: options && options.customInspect + customInspect: options && options.customInspect, + useToString: false }; printRecursive(object, context); diff --git a/js/common/bootstrap/modules.js b/js/common/bootstrap/modules.js index d18b38f67c..30a45d19a7 100644 --- a/js/common/bootstrap/modules.js +++ b/js/common/bootstrap/modules.js @@ -1212,7 +1212,7 @@ function require (path) { libpath = fs.join(this._root, this._path, this._manifest[type]); } else { - libpath = fs.join(this._root, this._path); + libpath = fs.join(this._root, this._path, type); } var pkg = new Package("application", diff --git a/js/server/modules/org/arangodb/foxx.js b/js/server/modules/org/arangodb/foxx.js index 7b547d11b8..6dbf4ddbcd 100644 --- a/js/server/modules/org/arangodb/foxx.js +++ b/js/server/modules/org/arangodb/foxx.js @@ -159,7 +159,7 @@ _.extend(Application.prototype, { }, registerRepository: function (name, opts) { - this.routingInfo.repositories[name] = opts; + this.routingInfo.repositories[name] = opts || {}; }, //////////////////////////////////////////////////////////////////////////////// diff --git a/m4/all-in-one.zlib b/m4/all-in-one.zlib index fb5a2cd242..45a5f2351b 100644 --- a/m4/all-in-one.zlib +++ b/m4/all-in-one.zlib @@ -6,7 +6,7 @@ dnl ---------------------------------------------------------------------------- TRI_ZLIB_VERSION="1.2.7" -ZLIB_CPPFLAGS"=-I${srcdir}/3rdParty/zlib-${TRI_ZLIB_VERSION}/contrib/minizip" +ZLIB_CPPFLAGS="-I${srcdir}/3rdParty/zlib-${TRI_ZLIB_VERSION}/contrib/minizip" ZLIB_LDFLAGS="" ZLIB_LIBS="${srcdir}/3rdParty/zlib-${TRI_ZLIB_VERSION}/libz.a" diff --git a/m4/external.libev b/m4/external.libev index 8eb279e8da..dfe7f57ee3 100644 --- a/m4/external.libev +++ b/m4/external.libev @@ -48,14 +48,12 @@ dnl ---------------------------------------------------------------------------- dnl check for header and library dnl ---------------------------------------------------------------------------- -ch_LIBEV="$tr_LIBEV" +tr_LIBEV="yes" -AC_CHECK_HEADERS(ev.h, [tr_LIBEV="yes"], [tr_LIBEV="no"]) +AC_CHECK_HEADERS(ev.h, [], [tr_LIBEV="no"]) -if test "x$tr_LIBEV" = xyes; then - AC_CHECK_LIB([rt], [clock_gettime], [LIBEV_LIBS="-lrt" LIBS="-lrt $LIBS"], ) - AC_CHECK_LIB([libev], [ev_now], [LIBEV_LIBS="-lev $LIBEV_LIBS" tr_LIBEV="yes"], ) -fi +AC_CHECK_LIB([rt], [clock_gettime], [LIBEV_LIBS="-lrt" LIBS="-lrt $LIBS"], [tr_LIBEV="no"]) +AC_CHECK_LIB([ev], [ev_now], [LIBEV_LIBS="-lev $LIBEV_LIBS" tr_LIBEV="yes"], [tr_LIBEV="no"]) if test "x$tr_LIBEV" != xyes; then AC_MSG_ERROR([Please install libev from http://software.schmorp.de/pkg/libev.html])