1 /* A Bison parser, made by GNU Bison 2.7.12-4996. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.7.12-4996"
50 #define YYSKELETON_NAME "yacc.c"
62 /* Substitute the variable and function names. */
63 #define yyparse ap_expr_yyparse
64 #define yylex ap_expr_yylex
65 #define yyerror ap_expr_yyerror
66 #define yylval ap_expr_yylval
67 #define yychar ap_expr_yychar
68 #define yydebug ap_expr_yydebug
69 #define yynerrs ap_expr_yynerrs
71 /* Copy the first part of user declarations. */
72 /* Line 371 of yacc.c */
73 #line 31 "util_expr_parse.y"
75 #include "util_expr_private.h"
77 /* Line 371 of yacc.c */
78 #line 79 "util_expr_parse.c"
81 # if defined __cplusplus && 201103L <= __cplusplus
82 # define YY_NULL nullptr
88 /* Enabling verbose error messages. */
89 #ifdef YYERROR_VERBOSE
90 # undef YYERROR_VERBOSE
91 # define YYERROR_VERBOSE 1
93 # define YYERROR_VERBOSE 1
96 /* In a future release of Bison, this section will be replaced
97 by #include "util_expr_parse.h". */
98 #ifndef YY_AP_EXPR_YY_UTIL_EXPR_PARSE_H_INCLUDED
99 # define YY_AP_EXPR_YY_UTIL_EXPR_PARSE_H_INCLUDED
100 /* Enabling traces. */
105 extern int ap_expr_yydebug;
111 /* Put the tokens into the symbol table, so that GDB and other debuggers
124 T_REGEX_BACKREF = 268,
154 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
155 typedef union YYSTYPE
157 /* Line 387 of yacc.c */
158 #line 35 "util_expr_parse.y"
165 /* Line 387 of yacc.c */
166 #line 167 "util_expr_parse.c"
168 # define YYSTYPE_IS_TRIVIAL 1
169 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
170 # define YYSTYPE_IS_DECLARED 1
175 #if defined __STDC__ || defined __cplusplus
176 int ap_expr_yyparse (void *YYPARSE_PARAM);
178 int ap_expr_yyparse ();
180 #else /* ! YYPARSE_PARAM */
181 #if defined __STDC__ || defined __cplusplus
182 int ap_expr_yyparse (ap_expr_parse_ctx_t *ctx);
184 int ap_expr_yyparse ();
186 #endif /* ! YYPARSE_PARAM */
188 #endif /* !YY_AP_EXPR_YY_UTIL_EXPR_PARSE_H_INCLUDED */
190 /* Copy the second part of user declarations. */
191 /* Line 390 of yacc.c */
192 #line 102 "util_expr_parse.y"
194 #include "util_expr_private.h"
195 #define yyscanner ctx->scanner
197 int ap_expr_yylex(YYSTYPE *lvalp, void *scanner);
199 /* Line 390 of yacc.c */
200 #line 201 "util_expr_parse.c"
207 typedef YYTYPE_UINT8 yytype_uint8;
209 typedef unsigned char yytype_uint8;
213 typedef YYTYPE_INT8 yytype_int8;
214 #elif (defined __STDC__ || defined __C99__FUNC__ \
215 || defined __cplusplus || defined _MSC_VER)
216 typedef signed char yytype_int8;
218 typedef short int yytype_int8;
222 typedef YYTYPE_UINT16 yytype_uint16;
224 typedef unsigned short int yytype_uint16;
228 typedef YYTYPE_INT16 yytype_int16;
230 typedef short int yytype_int16;
234 # ifdef __SIZE_TYPE__
235 # define YYSIZE_T __SIZE_TYPE__
236 # elif defined size_t
237 # define YYSIZE_T size_t
238 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
239 || defined __cplusplus || defined _MSC_VER)
240 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
241 # define YYSIZE_T size_t
243 # define YYSIZE_T unsigned int
247 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
250 # if defined YYENABLE_NLS && YYENABLE_NLS
252 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
253 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
257 # define YY_(Msgid) Msgid
261 #ifndef __attribute__
262 /* This feature is available in gcc versions 2.5 and later. */
263 # if (! defined __GNUC__ || __GNUC__ < 2 \
264 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
265 # define __attribute__(Spec) /* empty */
269 /* Suppress unused-variable warnings by "using" E. */
270 #if ! defined lint || defined __GNUC__
271 # define YYUSE(E) ((void) (E))
273 # define YYUSE(E) /* empty */
277 /* Identity function, used to suppress warnings about constant conditions. */
281 #if (defined __STDC__ || defined __C99__FUNC__ \
282 || defined __cplusplus || defined _MSC_VER)
295 #if ! defined yyoverflow || YYERROR_VERBOSE
297 /* The parser invokes alloca or malloc; define the necessary symbols. */
299 # ifdef YYSTACK_USE_ALLOCA
300 # if YYSTACK_USE_ALLOCA
302 # define YYSTACK_ALLOC __builtin_alloca
303 # elif defined __BUILTIN_VA_ARG_INCR
304 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
306 # define YYSTACK_ALLOC __alloca
307 # elif defined _MSC_VER
308 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
309 # define alloca _alloca
311 # define YYSTACK_ALLOC alloca
312 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
313 || defined __cplusplus || defined _MSC_VER)
314 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
315 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
316 # ifndef EXIT_SUCCESS
317 # define EXIT_SUCCESS 0
324 # ifdef YYSTACK_ALLOC
325 /* Pacify GCC's `empty if-body' warning. */
326 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
327 # ifndef YYSTACK_ALLOC_MAXIMUM
328 /* The OS might guarantee only one guard page at the bottom of the stack,
329 and a page size can be as small as 4096 bytes. So we cannot safely
330 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
331 to allow for a few compiler-allocated temporary stack slots. */
332 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
335 # define YYSTACK_ALLOC YYMALLOC
336 # define YYSTACK_FREE YYFREE
337 # ifndef YYSTACK_ALLOC_MAXIMUM
338 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
340 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
341 && ! ((defined YYMALLOC || defined malloc) \
342 && (defined YYFREE || defined free)))
343 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
344 # ifndef EXIT_SUCCESS
345 # define EXIT_SUCCESS 0
349 # define YYMALLOC malloc
350 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
351 || defined __cplusplus || defined _MSC_VER)
352 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
357 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
358 || defined __cplusplus || defined _MSC_VER)
359 void free (void *); /* INFRINGES ON USER NAME SPACE */
363 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
366 #if (! defined yyoverflow \
367 && (! defined __cplusplus \
368 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
370 /* A type that is properly aligned for any stack member. */
373 yytype_int16 yyss_alloc;
377 /* The size of the maximum gap between one aligned stack and the next. */
378 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
380 /* The size of an array large to enough to hold all stacks, each with
382 # define YYSTACK_BYTES(N) \
383 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
384 + YYSTACK_GAP_MAXIMUM)
386 # define YYCOPY_NEEDED 1
388 /* Relocate STACK from its old location to the new one. The
389 local variables YYSIZE and YYSTACKSIZE give the old and new number of
390 elements in the stack, and YYPTR gives the new location of the
391 stack. Advance YYPTR to a properly aligned location for the next
393 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
396 YYSIZE_T yynewbytes; \
397 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
398 Stack = &yyptr->Stack_alloc; \
399 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
400 yyptr += yynewbytes / sizeof (*yyptr); \
406 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
407 /* Copy COUNT objects from SRC to DST. The source and destination do
410 # if defined __GNUC__ && 1 < __GNUC__
411 # define YYCOPY(Dst, Src, Count) \
412 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
414 # define YYCOPY(Dst, Src, Count) \
418 for (yyi = 0; yyi < (Count); yyi++) \
419 (Dst)[yyi] = (Src)[yyi]; \
424 #endif /* !YYCOPY_NEEDED */
426 /* YYFINAL -- State number of the termination state. */
428 /* YYLAST -- Last index in YYTABLE. */
431 /* YYNTOKENS -- Number of terminals. */
433 /* YYNNTS -- Number of nonterminals. */
435 /* YYNRULES -- Number of rules. */
437 /* YYNRULES -- Number of states. */
440 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
442 #define YYMAXUTOK 298
444 #define YYTRANSLATE(YYX) \
445 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
447 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
448 static const yytype_uint8 yytranslate[] =
450 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 44, 45, 2, 2, 48, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 49, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 46, 2, 47, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
475 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
476 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
477 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
478 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
479 35, 36, 37, 38, 39, 40, 41, 42, 43
483 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
485 static const yytype_uint8 yyprhs[] =
487 0, 0, 3, 6, 9, 11, 13, 15, 18, 22,
488 26, 28, 31, 35, 39, 41, 45, 49, 53, 57,
489 61, 65, 69, 73, 77, 81, 85, 89, 93, 97,
490 101, 103, 107, 109, 113, 116, 118, 120, 122, 124,
491 126, 130, 136, 138, 142, 144, 146, 148, 152, 155,
495 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
496 static const yytype_int8 yyrhs[] =
498 51, 0, -1, 5, 52, -1, 6, 56, -1, 7,
499 -1, 3, -1, 4, -1, 38, 52, -1, 52, 36,
500 52, -1, 52, 37, 52, -1, 53, -1, 14, 59,
501 -1, 59, 15, 59, -1, 44, 52, 45, -1, 7,
502 -1, 59, 20, 59, -1, 59, 21, 59, -1, 59,
503 22, 59, -1, 59, 23, 59, -1, 59, 24, 59,
504 -1, 59, 25, 59, -1, 59, 29, 59, -1, 59,
505 30, 59, -1, 59, 31, 59, -1, 59, 32, 59,
506 -1, 59, 33, 59, -1, 59, 34, 59, -1, 59,
507 28, 54, -1, 59, 26, 60, -1, 59, 27, 60,
508 -1, 62, -1, 46, 55, 47, -1, 59, -1, 55,
509 48, 59, -1, 56, 57, -1, 57, -1, 7, -1,
510 10, -1, 58, -1, 61, -1, 18, 9, 19, -1,
511 18, 9, 49, 56, 19, -1, 8, -1, 59, 35,
512 59, -1, 58, -1, 61, -1, 63, -1, 16, 56,
513 17, -1, 16, 17, -1, 11, -1, 12, -1, 13,
514 -1, 9, 44, 59, 45, -1, 9, 44, 59, 45,
518 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
519 static const yytype_uint8 yyrline[] =
521 0, 112, 112, 113, 114, 117, 118, 119, 120, 121,
522 122, 123, 124, 125, 126, 129, 130, 131, 132, 133,
523 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
524 146, 147, 150, 151, 154, 155, 156, 159, 160, 161,
525 164, 165, 168, 169, 170, 171, 172, 173, 174, 177,
530 #if YYDEBUG || YYERROR_VERBOSE || 1
531 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
532 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
533 static const char *const yytname[] =
535 "$end", "error", "$undefined", "\"true\"", "\"false\"",
536 "\"boolean expression\"", "\"string expression\"", "\"error token\"",
537 "\"number\"", "\"identifier\"", "\"cstring\"", "\"regex\"",
538 "\"case-indendent regex\"", "\"regex back reference\"",
539 "\"unary operator\"", "\"binary operator\"", "\"start of string\"",
540 "\"end of string\"", "\"start of variable name\"",
541 "\"end of variable name\"", "\"integer equal\"", "\"integer not equal\"",
542 "\"integer less than\"", "\"integer less or equal\"",
543 "\"integer greater than\"", "\"integer greater or equal\"",
544 "\"regex match\"", "\"regex non-match\"", "\"contained in\"",
545 "\"string equal\"", "\"string not equal\"", "\"string less than\"",
546 "\"string less or equal\"", "\"string greater than\"",
547 "\"string greater or equal\"", "\"string concatenation\"",
548 "\"logical or\"", "\"logical and\"", "\"logical not\"", "\"function\"",
549 "\"listfunction\"", "\"stringpart\"", "\"variable\"", "\"rebackref\"",
550 "'('", "')'", "'{'", "'}'", "','", "':'", "$accept", "root", "expr",
551 "comparison", "wordlist", "words", "string", "strpart", "var", "word",
552 "regex", "backref", "lstfunccall", "strfunccall", YY_NULL
557 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
559 static const yytype_uint16 yytoknum[] =
561 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
562 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
563 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
564 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
565 295, 296, 297, 298, 40, 41, 123, 125, 44, 58
569 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
570 static const yytype_uint8 yyr1[] =
572 0, 50, 51, 51, 51, 52, 52, 52, 52, 52,
573 52, 52, 52, 52, 52, 53, 53, 53, 53, 53,
574 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
575 54, 54, 55, 55, 56, 56, 56, 57, 57, 57,
576 58, 58, 59, 59, 59, 59, 59, 59, 59, 60,
580 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
581 static const yytype_uint8 yyr2[] =
583 0, 2, 2, 2, 1, 1, 1, 2, 3, 3,
584 1, 2, 3, 3, 1, 3, 3, 3, 3, 3,
585 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
586 1, 3, 1, 3, 2, 1, 1, 1, 1, 1,
587 3, 5, 1, 3, 1, 1, 1, 3, 2, 1,
591 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
592 Performed when YYTABLE doesn't specify something else to do. Zero
593 means the default is an error. */
594 static const yytype_uint8 yydefact[] =
596 0, 0, 0, 4, 0, 5, 6, 14, 42, 0,
597 51, 0, 0, 0, 0, 0, 2, 10, 44, 0,
598 45, 46, 36, 37, 3, 35, 38, 39, 1, 0,
599 11, 48, 0, 0, 7, 0, 0, 0, 0, 0,
600 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
601 0, 0, 0, 0, 0, 34, 0, 47, 40, 0,
602 13, 8, 9, 12, 15, 16, 17, 18, 19, 20,
603 49, 50, 28, 29, 0, 0, 27, 30, 21, 22,
604 23, 24, 25, 26, 43, 53, 0, 0, 0, 32,
608 /* YYDEFGOTO[NTERM-NUM]. */
609 static const yytype_int8 yydefgoto[] =
611 -1, 4, 16, 17, 76, 88, 24, 25, 18, 19,
615 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
617 #define YYPACT_NINF -30
618 static const yytype_int8 yypact[] =
620 2, 60, 7, -30, 13, -30, -30, -30, -30, -29,
621 -30, 43, 73, 12, 60, 60, -8, -30, -30, 85,
622 -30, -30, -30, -30, 79, -30, -30, -30, -30, 43,
623 25, -30, 111, -17, -30, 17, 60, 60, 43, 43,
624 43, 43, 43, 43, 43, 114, 114, -4, 43, 43,
625 43, 43, 43, 43, 43, -30, -19, -30, -30, 7,
626 -30, -8, -10, 25, 25, 25, 25, 25, 25, 25,
627 -30, -30, -30, -30, 31, 43, -30, -30, 25, 25,
628 25, 25, 25, 25, 25, -30, 83, 43, 24, 25,
629 -30, 20, -30, 43, -30, 25
632 /* YYPGOTO[NTERM-NUM]. */
633 static const yytype_int8 yypgoto[] =
635 -30, -30, 4, -30, -30, -30, -9, -20, -2, -5,
639 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
640 positive, shift that token. If negative, reduce the rule which
641 number is the opposite. If YYTABLE_NINF, syntax error. */
642 #define YYTABLE_NINF -1
643 static const yytype_uint8 yytable[] =
645 26, 27, 58, 32, 55, 74, 30, 1, 2, 3,
646 26, 27, 55, 28, 22, 29, 54, 23, 34, 35,
647 10, 33, 26, 27, 56, 13, 85, 37, 36, 37,
648 26, 27, 59, 63, 64, 65, 66, 67, 68, 69,
649 61, 62, 75, 78, 79, 80, 81, 82, 83, 84,
650 86, 8, 9, 36, 37, 54, 10, 26, 27, 12,
651 54, 13, 60, 5, 6, 94, 55, 7, 8, 9,
652 89, 92, 93, 10, 11, 87, 12, 0, 13, 73,
653 22, 0, 91, 23, 26, 27, 10, 0, 95, 23,
654 31, 13, 10, 23, 0, 0, 10, 13, 14, 0,
655 38, 13, 90, 0, 15, 39, 40, 41, 42, 43,
656 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
657 54, 23, 0, 0, 10, 70, 71, 0, 57, 13
660 #define yypact_value_is_default(Yystate) \
661 (!!((Yystate) == (-30)))
663 #define yytable_value_is_error(Yytable_value) \
666 static const yytype_int8 yycheck[] =
668 2, 2, 19, 12, 24, 9, 11, 5, 6, 7,
669 12, 12, 32, 0, 7, 44, 35, 10, 14, 15,
670 13, 9, 24, 24, 29, 18, 45, 37, 36, 37,
671 32, 32, 49, 38, 39, 40, 41, 42, 43, 44,
672 36, 37, 46, 48, 49, 50, 51, 52, 53, 54,
673 59, 8, 9, 36, 37, 35, 13, 59, 59, 16,
674 35, 18, 45, 3, 4, 45, 86, 7, 8, 9,
675 75, 47, 48, 13, 14, 44, 16, -1, 18, 46,
676 7, -1, 87, 10, 86, 86, 13, -1, 93, 10,
677 17, 18, 13, 10, -1, -1, 13, 18, 38, -1,
678 15, 18, 19, -1, 44, 20, 21, 22, 23, 24,
679 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
680 35, 10, -1, -1, 13, 11, 12, -1, 17, 18
683 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
684 symbol of state STATE-NUM. */
685 static const yytype_uint8 yystos[] =
687 0, 5, 6, 7, 51, 3, 4, 7, 8, 9,
688 13, 14, 16, 18, 38, 44, 52, 53, 58, 59,
689 61, 63, 7, 10, 56, 57, 58, 61, 0, 44,
690 59, 17, 56, 9, 52, 52, 36, 37, 15, 20,
691 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
692 31, 32, 33, 34, 35, 57, 59, 17, 19, 49,
693 45, 52, 52, 59, 59, 59, 59, 59, 59, 59,
694 11, 12, 60, 60, 9, 46, 54, 62, 59, 59,
695 59, 59, 59, 59, 59, 45, 56, 44, 55, 59,
696 19, 59, 47, 48, 45, 59
699 #define yyerrok (yyerrstatus = 0)
700 #define yyclearin (yychar = YYEMPTY)
704 #define YYACCEPT goto yyacceptlab
705 #define YYABORT goto yyabortlab
706 #define YYERROR goto yyerrorlab
709 /* Like YYERROR except do call yyerror. This remains here temporarily
710 to ease the transition to the new meaning of YYERROR, for GCC.
711 Once GCC version 2 has supplanted version 1, this can go. However,
712 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
713 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
716 #define YYFAIL goto yyerrlab
718 /* This is here to suppress warnings from the GCC cpp's
719 -Wunused-macros. Normally we don't worry about that warning, but
720 some users do, and we want to make it easy for users to remove
721 YYFAIL uses, which will produce warnings from Bison 2.5. */
724 #define YYRECOVERING() (!!yyerrstatus)
726 #define YYBACKUP(Token, Value) \
728 if (yychar == YYEMPTY) \
732 YYPOPSTACK (yylen); \
738 yyerror (ctx, YY_("syntax error: cannot back up")); \
743 /* Error token number */
745 #define YYERRCODE 256
748 /* This macro is provided for backward compatibility. */
749 #ifndef YY_LOCATION_PRINT
750 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
754 /* YYLEX -- calling `yylex' with the right arguments. */
756 # define YYLEX yylex (&yylval, YYLEX_PARAM)
758 # define YYLEX yylex (&yylval, yyscanner)
761 /* Enable debugging if requested. */
765 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
766 # define YYFPRINTF fprintf
769 # define YYDPRINTF(Args) \
775 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
779 YYFPRINTF (stderr, "%s ", Title); \
780 yy_symbol_print (stderr, \
782 YYFPRINTF (stderr, "\n"); \
787 /*--------------------------------.
788 | Print this symbol on YYOUTPUT. |
789 `--------------------------------*/
792 #if (defined __STDC__ || defined __C99__FUNC__ \
793 || defined __cplusplus || defined _MSC_VER)
795 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, ap_expr_parse_ctx_t *ctx)
798 yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx)
801 YYSTYPE const * const yyvaluep;
802 ap_expr_parse_ctx_t *ctx;
805 FILE *yyo = yyoutput;
811 if (yytype < YYNTOKENS)
812 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
820 /*--------------------------------.
821 | Print this symbol on YYOUTPUT. |
822 `--------------------------------*/
824 #if (defined __STDC__ || defined __C99__FUNC__ \
825 || defined __cplusplus || defined _MSC_VER)
827 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, ap_expr_parse_ctx_t *ctx)
830 yy_symbol_print (yyoutput, yytype, yyvaluep, ctx)
833 YYSTYPE const * const yyvaluep;
834 ap_expr_parse_ctx_t *ctx;
837 if (yytype < YYNTOKENS)
838 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
840 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
842 yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx);
843 YYFPRINTF (yyoutput, ")");
846 /*------------------------------------------------------------------.
847 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
849 `------------------------------------------------------------------*/
851 #if (defined __STDC__ || defined __C99__FUNC__ \
852 || defined __cplusplus || defined _MSC_VER)
854 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
857 yy_stack_print (yybottom, yytop)
858 yytype_int16 *yybottom;
862 YYFPRINTF (stderr, "Stack now");
863 for (; yybottom <= yytop; yybottom++)
865 int yybot = *yybottom;
866 YYFPRINTF (stderr, " %d", yybot);
868 YYFPRINTF (stderr, "\n");
871 # define YY_STACK_PRINT(Bottom, Top) \
874 yy_stack_print ((Bottom), (Top)); \
878 /*------------------------------------------------.
879 | Report that the YYRULE is going to be reduced. |
880 `------------------------------------------------*/
882 #if (defined __STDC__ || defined __C99__FUNC__ \
883 || defined __cplusplus || defined _MSC_VER)
885 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, ap_expr_parse_ctx_t *ctx)
888 yy_reduce_print (yyvsp, yyrule, ctx)
891 ap_expr_parse_ctx_t *ctx;
894 int yynrhs = yyr2[yyrule];
896 unsigned long int yylno = yyrline[yyrule];
897 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
899 /* The symbols being reduced. */
900 for (yyi = 0; yyi < yynrhs; yyi++)
902 YYFPRINTF (stderr, " $%d = ", yyi + 1);
903 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
904 &(yyvsp[(yyi + 1) - (yynrhs)])
906 YYFPRINTF (stderr, "\n");
910 # define YY_REDUCE_PRINT(Rule) \
913 yy_reduce_print (yyvsp, Rule, ctx); \
916 /* Nonzero means print parse trace. It is left uninitialized so that
917 multiple parsers can coexist. */
920 # define YYDPRINTF(Args)
921 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
922 # define YY_STACK_PRINT(Bottom, Top)
923 # define YY_REDUCE_PRINT(Rule)
924 #endif /* !YYDEBUG */
927 /* YYINITDEPTH -- initial size of the parser's stacks. */
929 # define YYINITDEPTH 200
932 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
933 if the built-in stack extension method is used).
935 Do not make this value too large; the results are undefined if
936 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
937 evaluated with infinite-precision integer arithmetic. */
940 # define YYMAXDEPTH 10000
947 # if defined __GLIBC__ && defined _STRING_H
948 # define yystrlen strlen
950 /* Return the length of YYSTR. */
951 #if (defined __STDC__ || defined __C99__FUNC__ \
952 || defined __cplusplus || defined _MSC_VER)
954 yystrlen (const char *yystr)
962 for (yylen = 0; yystr[yylen]; yylen++)
970 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
971 # define yystpcpy stpcpy
973 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
975 #if (defined __STDC__ || defined __C99__FUNC__ \
976 || defined __cplusplus || defined _MSC_VER)
978 yystpcpy (char *yydest, const char *yysrc)
981 yystpcpy (yydest, yysrc)
987 const char *yys = yysrc;
989 while ((*yyd++ = *yys++) != '\0')
998 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
999 quotes and backslashes, so that it's suitable for yyerror. The
1000 heuristic is that double-quoting is unnecessary unless the string
1001 contains an apostrophe, a comma, or backslash (other than
1002 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1003 null, do not copy; instead, return the length of what the result
1006 yytnamerr (char *yyres, const char *yystr)
1011 char const *yyp = yystr;
1018 goto do_not_strip_quotes;
1022 goto do_not_strip_quotes;
1035 do_not_strip_quotes: ;
1039 return yystrlen (yystr);
1041 return yystpcpy (yyres, yystr) - yyres;
1045 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1046 about the unexpected token YYTOKEN for the state stack whose top is
1049 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1050 not large enough to hold the message. In that case, also set
1051 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1052 required number of bytes is too large to store. */
1054 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1055 yytype_int16 *yyssp, int yytoken)
1057 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1058 YYSIZE_T yysize = yysize0;
1059 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1060 /* Internationalized format string. */
1061 const char *yyformat = YY_NULL;
1062 /* Arguments of yyformat. */
1063 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1064 /* Number of reported tokens (one for the "unexpected", one per
1068 /* There are many possibilities here to consider:
1069 - Assume YYFAIL is not used. It's too flawed to consider. See
1070 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1071 for details. YYERROR is fine as it does not invoke this
1073 - If this state is a consistent state with a default action, then
1074 the only way this function was invoked is if the default action
1075 is an error action. In that case, don't check for expected
1076 tokens because there are none.
1077 - The only way there can be no lookahead present (in yychar) is if
1078 this state is a consistent state with a default action. Thus,
1079 detecting the absence of a lookahead is sufficient to determine
1080 that there is no unexpected or expected token to report. In that
1081 case, just report a simple "syntax error".
1082 - Don't assume there isn't a lookahead just because this state is a
1083 consistent state with a default action. There might have been a
1084 previous inconsistent state, consistent state with a non-default
1085 action, or user semantic action that manipulated yychar.
1086 - Of course, the expected token list depends on states to have
1087 correct lookahead information, and it depends on the parser not
1088 to perform extra reductions after fetching a lookahead from the
1089 scanner and before detecting a syntax error. Thus, state merging
1090 (from LALR or IELR) and default reductions corrupt the expected
1091 token list. However, the list is correct for canonical LR with
1092 one exception: it will still contain any token that will not be
1093 accepted due to an error action in a later state.
1095 if (yytoken != YYEMPTY)
1097 int yyn = yypact[*yyssp];
1098 yyarg[yycount++] = yytname[yytoken];
1099 if (!yypact_value_is_default (yyn))
1101 /* Start YYX at -YYN if negative to avoid negative indexes in
1102 YYCHECK. In other words, skip the first -YYN actions for
1103 this state because they are default actions. */
1104 int yyxbegin = yyn < 0 ? -yyn : 0;
1105 /* Stay within bounds of both yycheck and yytname. */
1106 int yychecklim = YYLAST - yyn + 1;
1107 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1110 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1111 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1112 && !yytable_value_is_error (yytable[yyx + yyn]))
1114 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1120 yyarg[yycount++] = yytname[yyx];
1122 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1123 if (! (yysize <= yysize1
1124 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1134 # define YYCASE_(N, S) \
1138 YYCASE_(0, YY_("syntax error"));
1139 YYCASE_(1, YY_("syntax error, unexpected %s"));
1140 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1141 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1142 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1143 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1148 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1149 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1154 if (*yymsg_alloc < yysize)
1156 *yymsg_alloc = 2 * yysize;
1157 if (! (yysize <= *yymsg_alloc
1158 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1159 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1163 /* Avoid sprintf, as that infringes on the user's name space.
1164 Don't have undefined behavior even if the translation
1165 produced a string with the wrong number of "%s"s. */
1169 while ((*yyp = *yyformat) != '\0')
1170 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1172 yyp += yytnamerr (yyp, yyarg[yyi++]);
1183 #endif /* YYERROR_VERBOSE */
1185 /*-----------------------------------------------.
1186 | Release the memory associated to this symbol. |
1187 `-----------------------------------------------*/
1190 #if (defined __STDC__ || defined __C99__FUNC__ \
1191 || defined __cplusplus || defined _MSC_VER)
1193 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, ap_expr_parse_ctx_t *ctx)
1196 yydestruct (yymsg, yytype, yyvaluep, ctx)
1200 ap_expr_parse_ctx_t *ctx;
1208 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1220 #ifdef YYPARSE_PARAM
1221 #if (defined __STDC__ || defined __C99__FUNC__ \
1222 || defined __cplusplus || defined _MSC_VER)
1224 yyparse (void *YYPARSE_PARAM)
1227 yyparse (YYPARSE_PARAM)
1228 void *YYPARSE_PARAM;
1230 #else /* ! YYPARSE_PARAM */
1231 #if (defined __STDC__ || defined __C99__FUNC__ \
1232 || defined __cplusplus || defined _MSC_VER)
1234 yyparse (ap_expr_parse_ctx_t *ctx)
1238 ap_expr_parse_ctx_t *ctx;
1242 /* The lookahead symbol. */
1246 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1247 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
1248 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1249 _Pragma ("GCC diagnostic push") \
1250 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1251 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1252 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1253 _Pragma ("GCC diagnostic pop")
1255 /* Default value used for initialization, for pacifying older GCCs
1256 or non-GCC compilers. */
1257 static YYSTYPE yyval_default;
1258 # define YY_INITIAL_VALUE(Value) = Value
1260 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1261 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1262 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1264 #ifndef YY_INITIAL_VALUE
1265 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1268 /* The semantic value of the lookahead symbol. */
1269 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1271 /* Number of syntax errors so far. */
1275 /* Number of tokens to shift before error messages enabled. */
1278 /* The stacks and their tools:
1279 `yyss': related to states.
1280 `yyvs': related to semantic values.
1282 Refer to the stacks through separate pointers, to allow yyoverflow
1283 to reallocate them elsewhere. */
1285 /* The state stack. */
1286 yytype_int16 yyssa[YYINITDEPTH];
1288 yytype_int16 *yyssp;
1290 /* The semantic value stack. */
1291 YYSTYPE yyvsa[YYINITDEPTH];
1295 YYSIZE_T yystacksize;
1299 /* Lookahead token as an internal (translated) token number. */
1301 /* The variables used to return semantic value and location from the
1306 /* Buffer for error messages, and its allocated size. */
1308 char *yymsg = yymsgbuf;
1309 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1312 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1314 /* The number of symbols on the RHS of the reduced rule.
1315 Keep to zero when no symbol should be popped. */
1318 yyssp = yyss = yyssa;
1319 yyvsp = yyvs = yyvsa;
1320 yystacksize = YYINITDEPTH;
1322 YYDPRINTF ((stderr, "Starting parse\n"));
1327 yychar = YYEMPTY; /* Cause a token to be read. */
1330 /*------------------------------------------------------------.
1331 | yynewstate -- Push a new state, which is found in yystate. |
1332 `------------------------------------------------------------*/
1334 /* In all cases, when you get here, the value and location stacks
1335 have just been pushed. So pushing a state here evens the stacks. */
1341 if (yyss + yystacksize - 1 <= yyssp)
1343 /* Get the current used size of the three stacks, in elements. */
1344 YYSIZE_T yysize = yyssp - yyss + 1;
1348 /* Give user a chance to reallocate the stack. Use copies of
1349 these so that the &'s don't force the real ones into
1351 YYSTYPE *yyvs1 = yyvs;
1352 yytype_int16 *yyss1 = yyss;
1354 /* Each stack pointer address is followed by the size of the
1355 data in use in that stack, in bytes. This used to be a
1356 conditional around just the two extra args, but that might
1357 be undefined if yyoverflow is a macro. */
1358 yyoverflow (YY_("memory exhausted"),
1359 &yyss1, yysize * sizeof (*yyssp),
1360 &yyvs1, yysize * sizeof (*yyvsp),
1366 #else /* no yyoverflow */
1367 # ifndef YYSTACK_RELOCATE
1368 goto yyexhaustedlab;
1370 /* Extend the stack our own way. */
1371 if (YYMAXDEPTH <= yystacksize)
1372 goto yyexhaustedlab;
1374 if (YYMAXDEPTH < yystacksize)
1375 yystacksize = YYMAXDEPTH;
1378 yytype_int16 *yyss1 = yyss;
1379 union yyalloc *yyptr =
1380 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1382 goto yyexhaustedlab;
1383 YYSTACK_RELOCATE (yyss_alloc, yyss);
1384 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1385 # undef YYSTACK_RELOCATE
1387 YYSTACK_FREE (yyss1);
1390 #endif /* no yyoverflow */
1392 yyssp = yyss + yysize - 1;
1393 yyvsp = yyvs + yysize - 1;
1395 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1396 (unsigned long int) yystacksize));
1398 if (yyss + yystacksize - 1 <= yyssp)
1402 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1404 if (yystate == YYFINAL)
1414 /* Do appropriate processing given the current state. Read a
1415 lookahead token if we need one and don't already have one. */
1417 /* First try to decide what to do without reference to lookahead token. */
1418 yyn = yypact[yystate];
1419 if (yypact_value_is_default (yyn))
1422 /* Not known => get a lookahead token if don't already have one. */
1424 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1425 if (yychar == YYEMPTY)
1427 YYDPRINTF ((stderr, "Reading a token: "));
1431 if (yychar <= YYEOF)
1433 yychar = yytoken = YYEOF;
1434 YYDPRINTF ((stderr, "Now at end of input.\n"));
1438 yytoken = YYTRANSLATE (yychar);
1439 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1442 /* If the proper action on seeing token YYTOKEN is to reduce or to
1443 detect an error, take that action. */
1445 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1450 if (yytable_value_is_error (yyn))
1456 /* Count tokens shifted since error; after three, turn off error
1461 /* Shift the lookahead token. */
1462 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1464 /* Discard the shifted token. */
1468 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1470 YY_IGNORE_MAYBE_UNINITIALIZED_END
1475 /*-----------------------------------------------------------.
1476 | yydefault -- do the default action for the current state. |
1477 `-----------------------------------------------------------*/
1479 yyn = yydefact[yystate];
1485 /*-----------------------------.
1486 | yyreduce -- Do a reduction. |
1487 `-----------------------------*/
1489 /* yyn is the number of a rule to reduce with. */
1492 /* If YYLEN is nonzero, implement the default value of the action:
1495 Otherwise, the following line sets YYVAL to garbage.
1496 This behavior is undocumented and Bison
1497 users should not rely upon it. Assigning to YYVAL
1498 unconditionally makes the parser a bit smaller, and it avoids a
1499 GCC warning that YYVAL may be used uninitialized. */
1500 yyval = yyvsp[1-yylen];
1503 YY_REDUCE_PRINT (yyn);
1507 /* Line 1787 of yacc.c */
1508 #line 112 "util_expr_parse.y"
1509 { ctx->expr = (yyvsp[(2) - (2)].exVal); }
1513 /* Line 1787 of yacc.c */
1514 #line 113 "util_expr_parse.y"
1515 { ctx->expr = (yyvsp[(2) - (2)].exVal); }
1519 /* Line 1787 of yacc.c */
1520 #line 114 "util_expr_parse.y"
1525 /* Line 1787 of yacc.c */
1526 #line 117 "util_expr_parse.y"
1527 { (yyval.exVal) = ap_expr_make(op_True, NULL, NULL, ctx); }
1531 /* Line 1787 of yacc.c */
1532 #line 118 "util_expr_parse.y"
1533 { (yyval.exVal) = ap_expr_make(op_False, NULL, NULL, ctx); }
1537 /* Line 1787 of yacc.c */
1538 #line 119 "util_expr_parse.y"
1539 { (yyval.exVal) = ap_expr_make(op_Not, (yyvsp[(2) - (2)].exVal), NULL, ctx); }
1543 /* Line 1787 of yacc.c */
1544 #line 120 "util_expr_parse.y"
1545 { (yyval.exVal) = ap_expr_make(op_Or, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1549 /* Line 1787 of yacc.c */
1550 #line 121 "util_expr_parse.y"
1551 { (yyval.exVal) = ap_expr_make(op_And, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1555 /* Line 1787 of yacc.c */
1556 #line 122 "util_expr_parse.y"
1557 { (yyval.exVal) = ap_expr_make(op_Comp, (yyvsp[(1) - (1)].exVal), NULL, ctx); }
1561 /* Line 1787 of yacc.c */
1562 #line 123 "util_expr_parse.y"
1563 { (yyval.exVal) = ap_expr_unary_op_make( (yyvsp[(1) - (2)].cpVal), (yyvsp[(2) - (2)].exVal), ctx); }
1567 /* Line 1787 of yacc.c */
1568 #line 124 "util_expr_parse.y"
1569 { (yyval.exVal) = ap_expr_binary_op_make((yyvsp[(2) - (3)].cpVal), (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1573 /* Line 1787 of yacc.c */
1574 #line 125 "util_expr_parse.y"
1575 { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1579 /* Line 1787 of yacc.c */
1580 #line 126 "util_expr_parse.y"
1585 /* Line 1787 of yacc.c */
1586 #line 129 "util_expr_parse.y"
1587 { (yyval.exVal) = ap_expr_make(op_EQ, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1591 /* Line 1787 of yacc.c */
1592 #line 130 "util_expr_parse.y"
1593 { (yyval.exVal) = ap_expr_make(op_NE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1597 /* Line 1787 of yacc.c */
1598 #line 131 "util_expr_parse.y"
1599 { (yyval.exVal) = ap_expr_make(op_LT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1603 /* Line 1787 of yacc.c */
1604 #line 132 "util_expr_parse.y"
1605 { (yyval.exVal) = ap_expr_make(op_LE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1609 /* Line 1787 of yacc.c */
1610 #line 133 "util_expr_parse.y"
1611 { (yyval.exVal) = ap_expr_make(op_GT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1615 /* Line 1787 of yacc.c */
1616 #line 134 "util_expr_parse.y"
1617 { (yyval.exVal) = ap_expr_make(op_GE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1621 /* Line 1787 of yacc.c */
1622 #line 135 "util_expr_parse.y"
1623 { (yyval.exVal) = ap_expr_make(op_STR_EQ, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1627 /* Line 1787 of yacc.c */
1628 #line 136 "util_expr_parse.y"
1629 { (yyval.exVal) = ap_expr_make(op_STR_NE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1633 /* Line 1787 of yacc.c */
1634 #line 137 "util_expr_parse.y"
1635 { (yyval.exVal) = ap_expr_make(op_STR_LT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1639 /* Line 1787 of yacc.c */
1640 #line 138 "util_expr_parse.y"
1641 { (yyval.exVal) = ap_expr_make(op_STR_LE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1645 /* Line 1787 of yacc.c */
1646 #line 139 "util_expr_parse.y"
1647 { (yyval.exVal) = ap_expr_make(op_STR_GT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1651 /* Line 1787 of yacc.c */
1652 #line 140 "util_expr_parse.y"
1653 { (yyval.exVal) = ap_expr_make(op_STR_GE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1657 /* Line 1787 of yacc.c */
1658 #line 141 "util_expr_parse.y"
1659 { (yyval.exVal) = ap_expr_make(op_IN, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1663 /* Line 1787 of yacc.c */
1664 #line 142 "util_expr_parse.y"
1665 { (yyval.exVal) = ap_expr_make(op_REG, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1669 /* Line 1787 of yacc.c */
1670 #line 143 "util_expr_parse.y"
1671 { (yyval.exVal) = ap_expr_make(op_NRE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1675 /* Line 1787 of yacc.c */
1676 #line 146 "util_expr_parse.y"
1677 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1681 /* Line 1787 of yacc.c */
1682 #line 147 "util_expr_parse.y"
1683 { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1687 /* Line 1787 of yacc.c */
1688 #line 150 "util_expr_parse.y"
1689 { (yyval.exVal) = ap_expr_make(op_ListElement, (yyvsp[(1) - (1)].exVal), NULL, ctx); }
1693 /* Line 1787 of yacc.c */
1694 #line 151 "util_expr_parse.y"
1695 { (yyval.exVal) = ap_expr_make(op_ListElement, (yyvsp[(3) - (3)].exVal), (yyvsp[(1) - (3)].exVal), ctx); }
1699 /* Line 1787 of yacc.c */
1700 #line 154 "util_expr_parse.y"
1701 { (yyval.exVal) = ap_expr_make(op_Concat, (yyvsp[(1) - (2)].exVal), (yyvsp[(2) - (2)].exVal), ctx); }
1705 /* Line 1787 of yacc.c */
1706 #line 155 "util_expr_parse.y"
1707 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1711 /* Line 1787 of yacc.c */
1712 #line 156 "util_expr_parse.y"
1717 /* Line 1787 of yacc.c */
1718 #line 159 "util_expr_parse.y"
1719 { (yyval.exVal) = ap_expr_make(op_String, (yyvsp[(1) - (1)].cpVal), NULL, ctx); }
1723 /* Line 1787 of yacc.c */
1724 #line 160 "util_expr_parse.y"
1725 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1729 /* Line 1787 of yacc.c */
1730 #line 161 "util_expr_parse.y"
1731 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1735 /* Line 1787 of yacc.c */
1736 #line 164 "util_expr_parse.y"
1737 { (yyval.exVal) = ap_expr_var_make((yyvsp[(2) - (3)].cpVal), ctx); }
1741 /* Line 1787 of yacc.c */
1742 #line 165 "util_expr_parse.y"
1743 { (yyval.exVal) = ap_expr_str_func_make((yyvsp[(2) - (5)].cpVal), (yyvsp[(4) - (5)].exVal), ctx); }
1747 /* Line 1787 of yacc.c */
1748 #line 168 "util_expr_parse.y"
1749 { (yyval.exVal) = ap_expr_make(op_Digit, (yyvsp[(1) - (1)].cpVal), NULL, ctx); }
1753 /* Line 1787 of yacc.c */
1754 #line 169 "util_expr_parse.y"
1755 { (yyval.exVal) = ap_expr_make(op_Concat, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1759 /* Line 1787 of yacc.c */
1760 #line 170 "util_expr_parse.y"
1761 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1765 /* Line 1787 of yacc.c */
1766 #line 171 "util_expr_parse.y"
1767 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1771 /* Line 1787 of yacc.c */
1772 #line 172 "util_expr_parse.y"
1773 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1777 /* Line 1787 of yacc.c */
1778 #line 173 "util_expr_parse.y"
1779 { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1783 /* Line 1787 of yacc.c */
1784 #line 174 "util_expr_parse.y"
1785 { (yyval.exVal) = ap_expr_make(op_String, "", NULL, ctx); }
1789 /* Line 1787 of yacc.c */
1790 #line 177 "util_expr_parse.y"
1793 if ((regex = ap_pregcomp(ctx->pool, (yyvsp[(1) - (1)].cpVal),
1794 AP_REG_EXTENDED|AP_REG_NOSUB)) == NULL) {
1795 ctx->error = "Failed to compile regular expression";
1798 (yyval.exVal) = ap_expr_make(op_Regex, regex, NULL, ctx);
1803 /* Line 1787 of yacc.c */
1804 #line 186 "util_expr_parse.y"
1807 if ((regex = ap_pregcomp(ctx->pool, (yyvsp[(1) - (1)].cpVal),
1808 AP_REG_EXTENDED|AP_REG_NOSUB|AP_REG_ICASE)) == NULL) {
1809 ctx->error = "Failed to compile regular expression";
1812 (yyval.exVal) = ap_expr_make(op_Regex, regex, NULL, ctx);
1817 /* Line 1787 of yacc.c */
1818 #line 197 "util_expr_parse.y"
1820 int *n = apr_palloc(ctx->pool, sizeof(int));
1821 *n = (yyvsp[(1) - (1)].num);
1822 (yyval.exVal) = ap_expr_make(op_RegexBackref, n, NULL, ctx);
1827 /* Line 1787 of yacc.c */
1828 #line 204 "util_expr_parse.y"
1829 { (yyval.exVal) = ap_expr_list_func_make((yyvsp[(1) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), ctx); }
1833 /* Line 1787 of yacc.c */
1834 #line 207 "util_expr_parse.y"
1835 { (yyval.exVal) = ap_expr_str_func_make((yyvsp[(1) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), ctx); }
1839 /* Line 1787 of yacc.c */
1840 #line 1841 "util_expr_parse.c"
1843 /* User semantic actions sometimes alter yychar, and that requires
1844 that yytoken be updated with the new translation. We take the
1845 approach of translating immediately before every use of yytoken.
1846 One alternative is translating here after every semantic action,
1847 but that translation would be missed if the semantic action invokes
1848 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1849 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1850 incorrect destructor might then be invoked immediately. In the
1851 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1852 to an incorrect destructor call or verbose syntax error message
1853 before the lookahead is translated. */
1854 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1858 YY_STACK_PRINT (yyss, yyssp);
1862 /* Now `shift' the result of the reduction. Determine what state
1863 that goes to, based on the state we popped back to and the rule
1864 number reduced by. */
1868 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1869 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1870 yystate = yytable[yystate];
1872 yystate = yydefgoto[yyn - YYNTOKENS];
1877 /*------------------------------------.
1878 | yyerrlab -- here on detecting error |
1879 `------------------------------------*/
1881 /* Make sure we have latest lookahead translation. See comments at
1882 user semantic actions for why this is necessary. */
1883 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1885 /* If not already recovering from an error, report this error. */
1889 #if ! YYERROR_VERBOSE
1890 yyerror (ctx, YY_("syntax error"));
1892 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1895 char const *yymsgp = YY_("syntax error");
1896 int yysyntax_error_status;
1897 yysyntax_error_status = YYSYNTAX_ERROR;
1898 if (yysyntax_error_status == 0)
1900 else if (yysyntax_error_status == 1)
1902 if (yymsg != yymsgbuf)
1903 YYSTACK_FREE (yymsg);
1904 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1908 yymsg_alloc = sizeof yymsgbuf;
1909 yysyntax_error_status = 2;
1913 yysyntax_error_status = YYSYNTAX_ERROR;
1917 yyerror (ctx, yymsgp);
1918 if (yysyntax_error_status == 2)
1919 goto yyexhaustedlab;
1921 # undef YYSYNTAX_ERROR
1927 if (yyerrstatus == 3)
1929 /* If just tried and failed to reuse lookahead token after an
1930 error, discard it. */
1932 if (yychar <= YYEOF)
1934 /* Return failure if at end of input. */
1935 if (yychar == YYEOF)
1940 yydestruct ("Error: discarding",
1941 yytoken, &yylval, ctx);
1946 /* Else will try to reuse lookahead token after shifting the error
1951 /*---------------------------------------------------.
1952 | yyerrorlab -- error raised explicitly by YYERROR. |
1953 `---------------------------------------------------*/
1956 /* Pacify compilers like GCC when the user code never invokes
1957 YYERROR and the label yyerrorlab therefore never appears in user
1959 if (/*CONSTCOND*/ 0)
1962 /* Do not reclaim the symbols of the rule which action triggered
1966 YY_STACK_PRINT (yyss, yyssp);
1971 /*-------------------------------------------------------------.
1972 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1973 `-------------------------------------------------------------*/
1975 yyerrstatus = 3; /* Each real token shifted decrements this. */
1979 yyn = yypact[yystate];
1980 if (!yypact_value_is_default (yyn))
1983 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1991 /* Pop the current state because it cannot handle the error token. */
1996 yydestruct ("Error: popping",
1997 yystos[yystate], yyvsp, ctx);
2000 YY_STACK_PRINT (yyss, yyssp);
2003 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2005 YY_IGNORE_MAYBE_UNINITIALIZED_END
2008 /* Shift the error token. */
2009 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2015 /*-------------------------------------.
2016 | yyacceptlab -- YYACCEPT comes here. |
2017 `-------------------------------------*/
2022 /*-----------------------------------.
2023 | yyabortlab -- YYABORT comes here. |
2024 `-----------------------------------*/
2029 #if !defined yyoverflow || YYERROR_VERBOSE
2030 /*-------------------------------------------------.
2031 | yyexhaustedlab -- memory exhaustion comes here. |
2032 `-------------------------------------------------*/
2034 yyerror (ctx, YY_("memory exhausted"));
2040 if (yychar != YYEMPTY)
2042 /* Make sure we have latest lookahead translation. See comments at
2043 user semantic actions for why this is necessary. */
2044 yytoken = YYTRANSLATE (yychar);
2045 yydestruct ("Cleanup: discarding lookahead",
2046 yytoken, &yylval, ctx);
2048 /* Do not reclaim the symbols of the rule which action triggered
2049 this YYABORT or YYACCEPT. */
2051 YY_STACK_PRINT (yyss, yyssp);
2052 while (yyssp != yyss)
2054 yydestruct ("Cleanup: popping",
2055 yystos[*yyssp], yyvsp, ctx);
2060 YYSTACK_FREE (yyss);
2063 if (yymsg != yymsgbuf)
2064 YYSTACK_FREE (yymsg);
2066 /* Make sure YYID is used. */
2067 return YYID (yyresult);
2071 /* Line 2050 of yacc.c */
2072 #line 210 "util_expr_parse.y"
2075 void yyerror(ap_expr_parse_ctx_t *ctx, const char *s)
2077 /* s is allocated on the stack */
2078 ctx->error = apr_pstrdup(ctx->ptemp, s);