1 /* A Bison parser, made by GNU Bison 2.7.1. */
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.1"
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
134 T_VAREXP_BEGIN = 278,
162 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
163 typedef union YYSTYPE
165 /* Line 387 of yacc.c */
166 #line 35 "util_expr_parse.y"
173 /* Line 387 of yacc.c */
174 #line 175 "util_expr_parse.c"
176 # define YYSTYPE_IS_TRIVIAL 1
177 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
178 # define YYSTYPE_IS_DECLARED 1
183 #if defined __STDC__ || defined __cplusplus
184 int ap_expr_yyparse (void *YYPARSE_PARAM);
186 int ap_expr_yyparse ();
188 #else /* ! YYPARSE_PARAM */
189 #if defined __STDC__ || defined __cplusplus
190 int ap_expr_yyparse (ap_expr_parse_ctx_t *ctx);
192 int ap_expr_yyparse ();
194 #endif /* ! YYPARSE_PARAM */
196 #endif /* !YY_AP_EXPR_YY_UTIL_EXPR_PARSE_H_INCLUDED */
198 /* Copy the second part of user declarations. */
199 /* Line 390 of yacc.c */
200 #line 118 "util_expr_parse.y"
202 #include "util_expr_private.h"
203 #define yyscanner ctx->scanner
205 int ap_expr_yylex(YYSTYPE *lvalp, void *scanner);
207 /* Line 390 of yacc.c */
208 #line 209 "util_expr_parse.c"
215 typedef YYTYPE_UINT8 yytype_uint8;
217 typedef unsigned char yytype_uint8;
221 typedef YYTYPE_INT8 yytype_int8;
222 #elif (defined __STDC__ || defined __C99__FUNC__ \
223 || defined __cplusplus || defined _MSC_VER)
224 typedef signed char yytype_int8;
226 typedef short int yytype_int8;
230 typedef YYTYPE_UINT16 yytype_uint16;
232 typedef unsigned short int yytype_uint16;
236 typedef YYTYPE_INT16 yytype_int16;
238 typedef short int yytype_int16;
242 # ifdef __SIZE_TYPE__
243 # define YYSIZE_T __SIZE_TYPE__
244 # elif defined size_t
245 # define YYSIZE_T size_t
246 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
247 || defined __cplusplus || defined _MSC_VER)
248 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
249 # define YYSIZE_T size_t
251 # define YYSIZE_T unsigned int
255 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
258 # if defined YYENABLE_NLS && YYENABLE_NLS
260 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
261 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
265 # define YY_(Msgid) Msgid
269 #ifndef __attribute__
270 /* This feature is available in gcc versions 2.5 and later. */
271 # if (! defined __GNUC__ || __GNUC__ < 2 \
272 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
273 # define __attribute__(Spec) /* empty */
277 /* Suppress unused-variable warnings by "using" E. */
278 #if ! defined lint || defined __GNUC__
279 # define YYUSE(E) ((void) (E))
281 # define YYUSE(E) /* empty */
285 /* Identity function, used to suppress warnings about constant conditions. */
289 #if (defined __STDC__ || defined __C99__FUNC__ \
290 || defined __cplusplus || defined _MSC_VER)
303 #if ! defined yyoverflow || YYERROR_VERBOSE
305 /* The parser invokes alloca or malloc; define the necessary symbols. */
307 # ifdef YYSTACK_USE_ALLOCA
308 # if YYSTACK_USE_ALLOCA
310 # define YYSTACK_ALLOC __builtin_alloca
311 # elif defined __BUILTIN_VA_ARG_INCR
312 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
314 # define YYSTACK_ALLOC __alloca
315 # elif defined _MSC_VER
316 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
317 # define alloca _alloca
319 # define YYSTACK_ALLOC alloca
320 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
321 || defined __cplusplus || defined _MSC_VER)
322 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
323 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
324 # ifndef EXIT_SUCCESS
325 # define EXIT_SUCCESS 0
332 # ifdef YYSTACK_ALLOC
333 /* Pacify GCC's `empty if-body' warning. */
334 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
335 # ifndef YYSTACK_ALLOC_MAXIMUM
336 /* The OS might guarantee only one guard page at the bottom of the stack,
337 and a page size can be as small as 4096 bytes. So we cannot safely
338 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
339 to allow for a few compiler-allocated temporary stack slots. */
340 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
343 # define YYSTACK_ALLOC YYMALLOC
344 # define YYSTACK_FREE YYFREE
345 # ifndef YYSTACK_ALLOC_MAXIMUM
346 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
348 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
349 && ! ((defined YYMALLOC || defined malloc) \
350 && (defined YYFREE || defined free)))
351 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
352 # ifndef EXIT_SUCCESS
353 # define EXIT_SUCCESS 0
357 # define YYMALLOC malloc
358 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
359 || defined __cplusplus || defined _MSC_VER)
360 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
365 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
366 || defined __cplusplus || defined _MSC_VER)
367 void free (void *); /* INFRINGES ON USER NAME SPACE */
371 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
374 #if (! defined yyoverflow \
375 && (! defined __cplusplus \
376 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
378 /* A type that is properly aligned for any stack member. */
381 yytype_int16 yyss_alloc;
385 /* The size of the maximum gap between one aligned stack and the next. */
386 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
388 /* The size of an array large to enough to hold all stacks, each with
390 # define YYSTACK_BYTES(N) \
391 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
392 + YYSTACK_GAP_MAXIMUM)
394 # define YYCOPY_NEEDED 1
396 /* Relocate STACK from its old location to the new one. The
397 local variables YYSIZE and YYSTACKSIZE give the old and new number of
398 elements in the stack, and YYPTR gives the new location of the
399 stack. Advance YYPTR to a properly aligned location for the next
401 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
404 YYSIZE_T yynewbytes; \
405 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
406 Stack = &yyptr->Stack_alloc; \
407 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
408 yyptr += yynewbytes / sizeof (*yyptr); \
414 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
415 /* Copy COUNT objects from SRC to DST. The source and destination do
418 # if defined __GNUC__ && 1 < __GNUC__
419 # define YYCOPY(Dst, Src, Count) \
420 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
422 # define YYCOPY(Dst, Src, Count) \
426 for (yyi = 0; yyi < (Count); yyi++) \
427 (Dst)[yyi] = (Src)[yyi]; \
432 #endif /* !YYCOPY_NEEDED */
434 /* YYFINAL -- State number of the termination state. */
436 /* YYLAST -- Last index in YYTABLE. */
439 /* YYNTOKENS -- Number of terminals. */
441 /* YYNNTS -- Number of nonterminals. */
443 /* YYNRULES -- Number of rules. */
445 /* YYNRULES -- Number of states. */
446 #define YYNSTATES 154
448 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
450 #define YYMAXUTOK 317
452 #define YYTRANSLATE(YYX) \
453 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
455 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
456 static const yytype_uint8 yytranslate[] =
458 0, 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 63, 64, 2, 2, 68, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 67, 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, 65, 2, 66, 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, 2, 2, 2, 2,
476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
480 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
484 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
485 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
486 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
487 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
488 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
489 55, 56, 57, 58, 59, 60, 61, 62
493 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
495 static const yytype_uint16 yyprhs[] =
497 0, 0, 3, 6, 9, 11, 13, 16, 18, 20,
498 22, 25, 29, 33, 35, 38, 42, 46, 48, 52,
499 56, 60, 64, 68, 72, 76, 80, 84, 88, 92,
500 96, 100, 104, 108, 110, 113, 117, 121, 123, 125,
501 127, 129, 133, 135, 137, 141, 145, 147, 149, 153,
502 159, 163, 167, 169, 174, 179, 184, 189, 196, 199,
503 204, 209, 216, 221, 228, 233, 240, 242, 246, 250,
507 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
508 static const yytype_int8 yyrhs[] =
510 70, 0, -1, 6, 71, -1, 5, 72, -1, 7,
511 -1, 76, -1, 71, 76, -1, 7, -1, 3, -1,
512 4, -1, 46, 72, -1, 72, 44, 72, -1, 72,
513 45, 72, -1, 73, -1, 17, 74, -1, 74, 18,
514 74, -1, 63, 72, 64, -1, 7, -1, 74, 25,
515 74, -1, 74, 26, 74, -1, 74, 27, 74, -1,
516 74, 28, 74, -1, 74, 29, 74, -1, 74, 30,
517 74, -1, 74, 34, 74, -1, 74, 35, 74, -1,
518 74, 36, 74, -1, 74, 37, 74, -1, 74, 38,
519 74, -1, 74, 39, 74, -1, 74, 31, 84, -1,
520 74, 32, 84, -1, 74, 33, 75, -1, 8, -1,
521 19, 20, -1, 19, 71, 20, -1, 74, 40, 74,
522 -1, 77, -1, 80, -1, 81, -1, 78, -1, 63,
523 74, 64, -1, 82, -1, 79, -1, 65, 83, 66,
524 -1, 63, 75, 64, -1, 10, -1, 77, -1, 21,
525 9, 22, -1, 21, 9, 67, 71, 22, -1, 23,
526 72, 24, -1, 23, 74, 24, -1, 16, -1, 9,
527 63, 74, 64, -1, 9, 63, 83, 64, -1, 9,
528 63, 74, 64, -1, 43, 85, 68, 74, -1, 43,
529 63, 85, 68, 74, 64, -1, 41, 75, -1, 41,
530 63, 75, 64, -1, 41, 75, 68, 74, -1, 41,
531 63, 75, 68, 74, 64, -1, 42, 86, 68, 75,
532 -1, 42, 63, 86, 68, 75, 64, -1, 42, 86,
533 68, 74, -1, 42, 63, 86, 68, 74, 64, -1,
534 74, -1, 74, 68, 83, -1, 11, 13, 15, -1,
535 12, 13, 71, 15, -1, 84, -1, 85, -1
538 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
539 static const yytype_uint8 yyrline[] =
541 0, 128, 128, 129, 130, 133, 134, 135, 138, 139,
542 140, 141, 142, 143, 144, 145, 146, 147, 150, 151,
543 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
544 162, 163, 164, 167, 168, 169, 170, 171, 172, 173,
545 174, 175, 178, 179, 180, 181, 184, 185, 188, 189,
546 190, 191, 192, 195, 196, 199, 203, 204, 207, 208,
547 209, 210, 213, 214, 215, 216, 219, 220, 223, 232,
552 #if YYDEBUG || YYERROR_VERBOSE || 1
553 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
554 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
555 static const char *const yytname[] =
557 "$end", "error", "$undefined", "\"true\"", "\"false\"",
558 "\"boolean expression\"", "\"string expression\"", "\"error token\"",
559 "\"number\"", "\"identifier\"", "\"string literal\"",
560 "\"start of matching regex\"", "\"start of substitution regex\"",
561 "\"pattern of the regex\"", "\"substitution of the regex\"",
562 "\"pattern flags of the regex\"", "\"regex back reference\"",
563 "\"unary operator\"", "\"binary operator\"", "\"start of string\"",
564 "\"end of string\"", "\"start of variable name\"",
565 "\"end of variable name\"", "\"start of variable expression\"",
566 "\"end of variable expression\"", "\"integer equal\"",
567 "\"integer not equal\"", "\"integer less than\"",
568 "\"integer less or equal\"", "\"integer greater than\"",
569 "\"integer greater or equal\"", "\"regex match\"", "\"regex non-match\"",
570 "\"contained in\"", "\"string equal\"", "\"string not equal\"",
571 "\"string less than\"", "\"string less or equal\"",
572 "\"string greater than\"", "\"string greater or equal\"",
573 "\"string concatenation\"", "\"join operator\"", "\"split operator\"",
574 "\"substitute operator\"", "\"logical or\"", "\"logical and\"",
575 "\"logical not\"", "\"condition\"", "\"comparison\"",
576 "\"string function\"", "\"list function\"", "\"list\"", "\"words\"",
577 "\"word\"", "\"string\"", "\"substring\"", "\"variable\"",
578 "\"match regex\"", "\"substitution regex\"", "\"any regex\"",
579 "\"split\"", "\"join\"", "\"sub\"", "'('", "')'", "'{'", "'}'", "':'",
580 "','", "$accept", "expr", "string", "cond", "comp", "word", "list",
581 "substr", "var", "strfunc", "listfunc", "sub", "join", "split", "words",
582 "regex", "regsub", "regany", YY_NULL
587 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
589 static const yytype_uint16 yytoknum[] =
591 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
592 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
593 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
594 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
595 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
596 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
597 315, 316, 317, 40, 41, 123, 125, 58, 44
601 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
602 static const yytype_uint8 yyr1[] =
604 0, 69, 70, 70, 70, 71, 71, 71, 72, 72,
605 72, 72, 72, 72, 72, 72, 72, 72, 73, 73,
606 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
607 73, 73, 73, 74, 74, 74, 74, 74, 74, 74,
608 74, 74, 75, 75, 75, 75, 76, 76, 77, 77,
609 77, 77, 77, 78, 78, 79, 80, 80, 81, 81,
610 81, 81, 82, 82, 82, 82, 83, 83, 84, 85,
614 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
615 static const yytype_uint8 yyr2[] =
617 0, 2, 2, 2, 1, 1, 2, 1, 1, 1,
618 2, 3, 3, 1, 2, 3, 3, 1, 3, 3,
619 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
620 3, 3, 3, 1, 2, 3, 3, 1, 1, 1,
621 1, 3, 1, 1, 3, 3, 1, 1, 3, 5,
622 3, 3, 1, 4, 4, 4, 4, 6, 2, 4,
623 4, 6, 4, 6, 4, 6, 1, 3, 3, 4,
627 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
628 Performed when YYTABLE doesn't specify something else to do. Zero
629 means the default is an error. */
630 static const yytype_uint8 yydefact[] =
632 0, 0, 0, 4, 0, 8, 9, 17, 33, 0,
633 52, 0, 0, 0, 0, 0, 0, 0, 0, 3,
634 13, 0, 37, 40, 38, 39, 7, 46, 2, 5,
635 47, 1, 0, 0, 14, 34, 0, 0, 0, 0,
636 0, 0, 0, 0, 58, 43, 42, 0, 0, 0,
637 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
638 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
639 0, 0, 6, 0, 0, 0, 35, 48, 0, 50,
640 51, 0, 0, 0, 70, 71, 0, 0, 0, 66,
641 0, 0, 0, 0, 0, 16, 41, 11, 12, 15,
642 18, 19, 20, 21, 22, 23, 30, 31, 32, 24,
643 25, 26, 27, 28, 29, 36, 53, 0, 54, 0,
644 0, 0, 0, 0, 0, 45, 0, 44, 60, 0,
645 0, 56, 67, 49, 55, 68, 0, 0, 0, 64,
646 62, 45, 0, 69, 0, 0, 0, 0, 61, 57,
650 /* YYDEFGOTO[NTERM-NUM]. */
651 static const yytype_int8 yydefgoto[] =
653 -1, 4, 28, 19, 20, 21, 124, 29, 22, 23,
654 45, 24, 25, 46, 74, 84, 85, 86
657 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
659 #define YYPACT_NINF -51
660 static const yytype_int16 yypact[] =
662 154, 126, 254, -51, 23, -51, -51, -51, -51, -38,
663 -51, 53, 161, 25, 126, 0, 5, 126, 126, 34,
664 -51, 220, -51, -51, -51, -51, -51, -51, 169, -51,
665 -51, -51, 53, 53, -4, -51, 10, 6, -5, 196,
666 18, 4, 1, 53, -15, -51, -51, 73, 76, 32,
667 -51, 112, 173, 126, 126, 53, 53, 53, 53, 53,
668 53, 53, 93, 93, 1, 53, 53, 53, 53, 53,
669 53, 53, -51, -27, 43, 44, -51, -51, 254, -51,
670 -51, 53, 96, 81, -51, -51, 52, 1, -50, -16,
671 51, 53, 254, 54, 53, -51, -51, 79, -51, -4,
672 -4, -4, -4, -4, -4, -4, -51, -51, -51, -4,
673 -4, -4, -4, -4, -4, -4, -51, 53, -51, 142,
674 47, 111, 71, 132, 80, -51, 53, -51, -4, 253,
675 53, -4, -51, -51, -51, -51, 132, 83, 132, -4,
676 -51, -51, 49, -51, 50, 57, 86, 53, -51, -51,
680 /* YYPGOTO[NTERM-NUM]. */
681 static const yytype_int8 yypgoto[] =
683 -51, -51, -7, 84, -51, -11, -13, -24, -1, -51,
684 -51, -51, -51, -51, -35, 69, -10, 87
687 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
688 positive, shift that token. If negative, reduce the rule which
689 number is the opposite. If YYTABLE_NINF, syntax error. */
690 #define YYTABLE_NINF -1
691 static const yytype_uint8 yytable[] =
693 34, 30, 44, 39, 72, 36, 49, 52, 90, 40,
694 40, 30, 72, 71, 125, 82, 47, 47, 126, 79,
695 27, 73, 75, 31, 71, 32, 10, 30, 77, 88,
696 76, 13, 89, 14, 37, 30, 71, 116, 93, 53,
697 54, 117, 41, 41, 99, 100, 101, 102, 103, 104,
698 105, 108, 117, 91, 109, 110, 111, 112, 113, 114,
699 115, 8, 9, 42, 87, 43, 43, 83, 48, 10,
700 120, 119, 12, 78, 13, 71, 14, 30, 53, 54,
701 128, 81, 132, 131, 71, 129, 92, 71, 47, 71,
702 71, 30, 82, 47, 15, 72, 16, 71, 38, 153,
703 94, 50, 51, 117, 82, 72, 89, 118, 96, 121,
704 140, 134, 139, 148, 149, 142, 33, 127, 30, 144,
705 123, 150, 130, 146, 54, 145, 135, 75, 30, 5,
706 6, 106, 107, 7, 8, 9, 152, 97, 98, 136,
707 8, 137, 10, 11, 141, 12, 147, 13, 10, 14,
708 151, 12, 27, 13, 0, 14, 53, 54, 10, 1,
709 2, 3, 0, 13, 133, 14, 0, 15, 26, 16,
710 122, 27, 17, 15, 41, 16, 95, 10, 0, 27,
711 0, 35, 13, 0, 14, 10, 0, 0, 0, 18,
712 13, 55, 14, 0, 0, 138, 0, 43, 56, 57,
713 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
714 68, 69, 70, 71, 55, 0, 0, 0, 0, 0,
715 80, 56, 57, 58, 59, 60, 61, 62, 63, 64,
716 65, 66, 67, 68, 69, 70, 71, 96, 55, 0,
717 0, 0, 0, 0, 0, 56, 57, 58, 59, 60,
718 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
719 71, 26, 0, 27, 27, 0, 0, 0, 143, 10,
720 10, 0, 0, 0, 13, 13, 14, 14
723 #define yypact_value_is_default(Yystate) \
724 (!!((Yystate) == (-51)))
726 #define yytable_value_is_error(Yytable_value) \
729 static const yytype_int16 yycheck[] =
731 11, 2, 15, 14, 28, 12, 16, 18, 43, 9,
732 9, 12, 36, 40, 64, 11, 12, 12, 68, 24,
733 10, 32, 33, 0, 40, 63, 16, 28, 22, 42,
734 20, 21, 43, 23, 9, 36, 40, 64, 48, 44,
735 45, 68, 42, 42, 55, 56, 57, 58, 59, 60,
736 61, 64, 68, 68, 65, 66, 67, 68, 69, 70,
737 71, 8, 9, 63, 63, 65, 65, 63, 63, 16,
738 81, 78, 19, 67, 21, 40, 23, 78, 44, 45,
739 91, 63, 117, 94, 40, 92, 13, 40, 12, 40,
740 40, 92, 11, 12, 41, 119, 43, 40, 14, 64,
741 68, 17, 18, 68, 11, 129, 117, 64, 64, 13,
742 123, 64, 123, 64, 64, 126, 63, 66, 119, 130,
743 68, 64, 68, 136, 45, 136, 15, 138, 129, 3,
744 4, 62, 63, 7, 8, 9, 147, 53, 54, 68,
745 8, 9, 16, 17, 64, 19, 63, 21, 16, 23,
746 64, 19, 10, 21, -1, 23, 44, 45, 16, 5,
747 6, 7, -1, 21, 22, 23, -1, 41, 7, 43,
748 83, 10, 46, 41, 42, 43, 64, 16, -1, 10,
749 -1, 20, 21, -1, 23, 16, -1, -1, -1, 63,
750 21, 18, 23, -1, -1, 63, -1, 65, 25, 26,
751 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
752 37, 38, 39, 40, 18, -1, -1, -1, -1, -1,
753 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
754 34, 35, 36, 37, 38, 39, 40, 64, 18, -1,
755 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
756 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
757 40, 7, -1, 10, 10, -1, -1, -1, 15, 16,
758 16, -1, -1, -1, 21, 21, 23, 23
761 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
762 symbol of state STATE-NUM. */
763 static const yytype_uint8 yystos[] =
765 0, 5, 6, 7, 70, 3, 4, 7, 8, 9,
766 16, 17, 19, 21, 23, 41, 43, 46, 63, 72,
767 73, 74, 77, 78, 80, 81, 7, 10, 71, 76,
768 77, 0, 63, 63, 74, 20, 71, 9, 72, 74,
769 9, 42, 63, 65, 75, 79, 82, 12, 63, 85,
770 72, 72, 74, 44, 45, 18, 25, 26, 27, 28,
771 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
772 39, 40, 76, 74, 83, 74, 20, 22, 67, 24,
773 24, 63, 11, 63, 84, 85, 86, 63, 75, 74,
774 83, 68, 13, 85, 68, 64, 64, 72, 72, 74,
775 74, 74, 74, 74, 74, 74, 84, 84, 75, 74,
776 74, 74, 74, 74, 74, 74, 64, 68, 64, 71,
777 74, 13, 86, 68, 75, 64, 68, 66, 74, 71,
778 68, 74, 83, 22, 64, 15, 68, 9, 63, 74,
779 75, 64, 74, 15, 74, 74, 75, 63, 64, 64,
783 #define yyerrok (yyerrstatus = 0)
784 #define yyclearin (yychar = YYEMPTY)
788 #define YYACCEPT goto yyacceptlab
789 #define YYABORT goto yyabortlab
790 #define YYERROR goto yyerrorlab
793 /* Like YYERROR except do call yyerror. This remains here temporarily
794 to ease the transition to the new meaning of YYERROR, for GCC.
795 Once GCC version 2 has supplanted version 1, this can go. However,
796 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
797 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
800 #define YYFAIL goto yyerrlab
802 /* This is here to suppress warnings from the GCC cpp's
803 -Wunused-macros. Normally we don't worry about that warning, but
804 some users do, and we want to make it easy for users to remove
805 YYFAIL uses, which will produce warnings from Bison 2.5. */
808 #define YYRECOVERING() (!!yyerrstatus)
810 #define YYBACKUP(Token, Value) \
812 if (yychar == YYEMPTY) \
816 YYPOPSTACK (yylen); \
822 yyerror (ctx, YY_("syntax error: cannot back up")); \
827 /* Error token number */
829 #define YYERRCODE 256
832 /* This macro is provided for backward compatibility. */
833 #ifndef YY_LOCATION_PRINT
834 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
838 /* YYLEX -- calling `yylex' with the right arguments. */
840 # define YYLEX yylex (&yylval, YYLEX_PARAM)
842 # define YYLEX yylex (&yylval, yyscanner)
845 /* Enable debugging if requested. */
849 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
850 # define YYFPRINTF fprintf
853 # define YYDPRINTF(Args) \
859 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
863 YYFPRINTF (stderr, "%s ", Title); \
864 yy_symbol_print (stderr, \
866 YYFPRINTF (stderr, "\n"); \
871 /*--------------------------------.
872 | Print this symbol on YYOUTPUT. |
873 `--------------------------------*/
876 #if (defined __STDC__ || defined __C99__FUNC__ \
877 || defined __cplusplus || defined _MSC_VER)
879 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, ap_expr_parse_ctx_t *ctx)
882 yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx)
885 YYSTYPE const * const yyvaluep;
886 ap_expr_parse_ctx_t *ctx;
889 FILE *yyo = yyoutput;
895 if (yytype < YYNTOKENS)
896 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
904 /*--------------------------------.
905 | Print this symbol on YYOUTPUT. |
906 `--------------------------------*/
908 #if (defined __STDC__ || defined __C99__FUNC__ \
909 || defined __cplusplus || defined _MSC_VER)
911 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, ap_expr_parse_ctx_t *ctx)
914 yy_symbol_print (yyoutput, yytype, yyvaluep, ctx)
917 YYSTYPE const * const yyvaluep;
918 ap_expr_parse_ctx_t *ctx;
921 if (yytype < YYNTOKENS)
922 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
924 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
926 yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx);
927 YYFPRINTF (yyoutput, ")");
930 /*------------------------------------------------------------------.
931 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
933 `------------------------------------------------------------------*/
935 #if (defined __STDC__ || defined __C99__FUNC__ \
936 || defined __cplusplus || defined _MSC_VER)
938 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
941 yy_stack_print (yybottom, yytop)
942 yytype_int16 *yybottom;
946 YYFPRINTF (stderr, "Stack now");
947 for (; yybottom <= yytop; yybottom++)
949 int yybot = *yybottom;
950 YYFPRINTF (stderr, " %d", yybot);
952 YYFPRINTF (stderr, "\n");
955 # define YY_STACK_PRINT(Bottom, Top) \
958 yy_stack_print ((Bottom), (Top)); \
962 /*------------------------------------------------.
963 | Report that the YYRULE is going to be reduced. |
964 `------------------------------------------------*/
966 #if (defined __STDC__ || defined __C99__FUNC__ \
967 || defined __cplusplus || defined _MSC_VER)
969 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, ap_expr_parse_ctx_t *ctx)
972 yy_reduce_print (yyvsp, yyrule, ctx)
975 ap_expr_parse_ctx_t *ctx;
978 int yynrhs = yyr2[yyrule];
980 unsigned long int yylno = yyrline[yyrule];
981 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
983 /* The symbols being reduced. */
984 for (yyi = 0; yyi < yynrhs; yyi++)
986 YYFPRINTF (stderr, " $%d = ", yyi + 1);
987 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
988 &(yyvsp[(yyi + 1) - (yynrhs)])
990 YYFPRINTF (stderr, "\n");
994 # define YY_REDUCE_PRINT(Rule) \
997 yy_reduce_print (yyvsp, Rule, ctx); \
1000 /* Nonzero means print parse trace. It is left uninitialized so that
1001 multiple parsers can coexist. */
1003 #else /* !YYDEBUG */
1004 # define YYDPRINTF(Args)
1005 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1006 # define YY_STACK_PRINT(Bottom, Top)
1007 # define YY_REDUCE_PRINT(Rule)
1008 #endif /* !YYDEBUG */
1011 /* YYINITDEPTH -- initial size of the parser's stacks. */
1013 # define YYINITDEPTH 200
1016 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1017 if the built-in stack extension method is used).
1019 Do not make this value too large; the results are undefined if
1020 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1021 evaluated with infinite-precision integer arithmetic. */
1024 # define YYMAXDEPTH 10000
1031 # if defined __GLIBC__ && defined _STRING_H
1032 # define yystrlen strlen
1034 /* Return the length of YYSTR. */
1035 #if (defined __STDC__ || defined __C99__FUNC__ \
1036 || defined __cplusplus || defined _MSC_VER)
1038 yystrlen (const char *yystr)
1046 for (yylen = 0; yystr[yylen]; yylen++)
1054 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1055 # define yystpcpy stpcpy
1057 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1059 #if (defined __STDC__ || defined __C99__FUNC__ \
1060 || defined __cplusplus || defined _MSC_VER)
1062 yystpcpy (char *yydest, const char *yysrc)
1065 yystpcpy (yydest, yysrc)
1071 const char *yys = yysrc;
1073 while ((*yyd++ = *yys++) != '\0')
1082 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1083 quotes and backslashes, so that it's suitable for yyerror. The
1084 heuristic is that double-quoting is unnecessary unless the string
1085 contains an apostrophe, a comma, or backslash (other than
1086 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1087 null, do not copy; instead, return the length of what the result
1090 yytnamerr (char *yyres, const char *yystr)
1095 char const *yyp = yystr;
1102 goto do_not_strip_quotes;
1106 goto do_not_strip_quotes;
1119 do_not_strip_quotes: ;
1123 return yystrlen (yystr);
1125 return yystpcpy (yyres, yystr) - yyres;
1129 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1130 about the unexpected token YYTOKEN for the state stack whose top is
1133 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1134 not large enough to hold the message. In that case, also set
1135 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1136 required number of bytes is too large to store. */
1138 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1139 yytype_int16 *yyssp, int yytoken)
1141 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1142 YYSIZE_T yysize = yysize0;
1143 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1144 /* Internationalized format string. */
1145 const char *yyformat = YY_NULL;
1146 /* Arguments of yyformat. */
1147 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1148 /* Number of reported tokens (one for the "unexpected", one per
1152 /* There are many possibilities here to consider:
1153 - Assume YYFAIL is not used. It's too flawed to consider. See
1154 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1155 for details. YYERROR is fine as it does not invoke this
1157 - If this state is a consistent state with a default action, then
1158 the only way this function was invoked is if the default action
1159 is an error action. In that case, don't check for expected
1160 tokens because there are none.
1161 - The only way there can be no lookahead present (in yychar) is if
1162 this state is a consistent state with a default action. Thus,
1163 detecting the absence of a lookahead is sufficient to determine
1164 that there is no unexpected or expected token to report. In that
1165 case, just report a simple "syntax error".
1166 - Don't assume there isn't a lookahead just because this state is a
1167 consistent state with a default action. There might have been a
1168 previous inconsistent state, consistent state with a non-default
1169 action, or user semantic action that manipulated yychar.
1170 - Of course, the expected token list depends on states to have
1171 correct lookahead information, and it depends on the parser not
1172 to perform extra reductions after fetching a lookahead from the
1173 scanner and before detecting a syntax error. Thus, state merging
1174 (from LALR or IELR) and default reductions corrupt the expected
1175 token list. However, the list is correct for canonical LR with
1176 one exception: it will still contain any token that will not be
1177 accepted due to an error action in a later state.
1179 if (yytoken != YYEMPTY)
1181 int yyn = yypact[*yyssp];
1182 yyarg[yycount++] = yytname[yytoken];
1183 if (!yypact_value_is_default (yyn))
1185 /* Start YYX at -YYN if negative to avoid negative indexes in
1186 YYCHECK. In other words, skip the first -YYN actions for
1187 this state because they are default actions. */
1188 int yyxbegin = yyn < 0 ? -yyn : 0;
1189 /* Stay within bounds of both yycheck and yytname. */
1190 int yychecklim = YYLAST - yyn + 1;
1191 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1194 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1195 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1196 && !yytable_value_is_error (yytable[yyx + yyn]))
1198 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1204 yyarg[yycount++] = yytname[yyx];
1206 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1207 if (! (yysize <= yysize1
1208 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1218 # define YYCASE_(N, S) \
1222 YYCASE_(0, YY_("syntax error"));
1223 YYCASE_(1, YY_("syntax error, unexpected %s"));
1224 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1225 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1226 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1227 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1232 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1233 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1238 if (*yymsg_alloc < yysize)
1240 *yymsg_alloc = 2 * yysize;
1241 if (! (yysize <= *yymsg_alloc
1242 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1243 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1247 /* Avoid sprintf, as that infringes on the user's name space.
1248 Don't have undefined behavior even if the translation
1249 produced a string with the wrong number of "%s"s. */
1253 while ((*yyp = *yyformat) != '\0')
1254 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1256 yyp += yytnamerr (yyp, yyarg[yyi++]);
1267 #endif /* YYERROR_VERBOSE */
1269 /*-----------------------------------------------.
1270 | Release the memory associated to this symbol. |
1271 `-----------------------------------------------*/
1274 #if (defined __STDC__ || defined __C99__FUNC__ \
1275 || defined __cplusplus || defined _MSC_VER)
1277 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, ap_expr_parse_ctx_t *ctx)
1280 yydestruct (yymsg, yytype, yyvaluep, ctx)
1284 ap_expr_parse_ctx_t *ctx;
1292 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1304 #ifdef YYPARSE_PARAM
1305 #if (defined __STDC__ || defined __C99__FUNC__ \
1306 || defined __cplusplus || defined _MSC_VER)
1308 yyparse (void *YYPARSE_PARAM)
1311 yyparse (YYPARSE_PARAM)
1312 void *YYPARSE_PARAM;
1314 #else /* ! YYPARSE_PARAM */
1315 #if (defined __STDC__ || defined __C99__FUNC__ \
1316 || defined __cplusplus || defined _MSC_VER)
1318 yyparse (ap_expr_parse_ctx_t *ctx)
1322 ap_expr_parse_ctx_t *ctx;
1326 /* The lookahead symbol. */
1330 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1331 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
1332 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1333 _Pragma ("GCC diagnostic push") \
1334 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1335 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1336 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1337 _Pragma ("GCC diagnostic pop")
1339 /* Default value used for initialization, for pacifying older GCCs
1340 or non-GCC compilers. */
1341 static YYSTYPE yyval_default;
1342 # define YY_INITIAL_VALUE(Value) = Value
1344 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1345 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1346 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1348 #ifndef YY_INITIAL_VALUE
1349 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1352 /* The semantic value of the lookahead symbol. */
1353 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1355 /* Number of syntax errors so far. */
1359 /* Number of tokens to shift before error messages enabled. */
1362 /* The stacks and their tools:
1363 `yyss': related to states.
1364 `yyvs': related to semantic values.
1366 Refer to the stacks through separate pointers, to allow yyoverflow
1367 to reallocate them elsewhere. */
1369 /* The state stack. */
1370 yytype_int16 yyssa[YYINITDEPTH];
1372 yytype_int16 *yyssp;
1374 /* The semantic value stack. */
1375 YYSTYPE yyvsa[YYINITDEPTH];
1379 YYSIZE_T yystacksize;
1383 /* Lookahead token as an internal (translated) token number. */
1385 /* The variables used to return semantic value and location from the
1390 /* Buffer for error messages, and its allocated size. */
1392 char *yymsg = yymsgbuf;
1393 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1396 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1398 /* The number of symbols on the RHS of the reduced rule.
1399 Keep to zero when no symbol should be popped. */
1402 yyssp = yyss = yyssa;
1403 yyvsp = yyvs = yyvsa;
1404 yystacksize = YYINITDEPTH;
1406 YYDPRINTF ((stderr, "Starting parse\n"));
1411 yychar = YYEMPTY; /* Cause a token to be read. */
1414 /*------------------------------------------------------------.
1415 | yynewstate -- Push a new state, which is found in yystate. |
1416 `------------------------------------------------------------*/
1418 /* In all cases, when you get here, the value and location stacks
1419 have just been pushed. So pushing a state here evens the stacks. */
1425 if (yyss + yystacksize - 1 <= yyssp)
1427 /* Get the current used size of the three stacks, in elements. */
1428 YYSIZE_T yysize = yyssp - yyss + 1;
1432 /* Give user a chance to reallocate the stack. Use copies of
1433 these so that the &'s don't force the real ones into
1435 YYSTYPE *yyvs1 = yyvs;
1436 yytype_int16 *yyss1 = yyss;
1438 /* Each stack pointer address is followed by the size of the
1439 data in use in that stack, in bytes. This used to be a
1440 conditional around just the two extra args, but that might
1441 be undefined if yyoverflow is a macro. */
1442 yyoverflow (YY_("memory exhausted"),
1443 &yyss1, yysize * sizeof (*yyssp),
1444 &yyvs1, yysize * sizeof (*yyvsp),
1450 #else /* no yyoverflow */
1451 # ifndef YYSTACK_RELOCATE
1452 goto yyexhaustedlab;
1454 /* Extend the stack our own way. */
1455 if (YYMAXDEPTH <= yystacksize)
1456 goto yyexhaustedlab;
1458 if (YYMAXDEPTH < yystacksize)
1459 yystacksize = YYMAXDEPTH;
1462 yytype_int16 *yyss1 = yyss;
1463 union yyalloc *yyptr =
1464 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1466 goto yyexhaustedlab;
1467 YYSTACK_RELOCATE (yyss_alloc, yyss);
1468 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1469 # undef YYSTACK_RELOCATE
1471 YYSTACK_FREE (yyss1);
1474 #endif /* no yyoverflow */
1476 yyssp = yyss + yysize - 1;
1477 yyvsp = yyvs + yysize - 1;
1479 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1480 (unsigned long int) yystacksize));
1482 if (yyss + yystacksize - 1 <= yyssp)
1486 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1488 if (yystate == YYFINAL)
1498 /* Do appropriate processing given the current state. Read a
1499 lookahead token if we need one and don't already have one. */
1501 /* First try to decide what to do without reference to lookahead token. */
1502 yyn = yypact[yystate];
1503 if (yypact_value_is_default (yyn))
1506 /* Not known => get a lookahead token if don't already have one. */
1508 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1509 if (yychar == YYEMPTY)
1511 YYDPRINTF ((stderr, "Reading a token: "));
1515 if (yychar <= YYEOF)
1517 yychar = yytoken = YYEOF;
1518 YYDPRINTF ((stderr, "Now at end of input.\n"));
1522 yytoken = YYTRANSLATE (yychar);
1523 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1526 /* If the proper action on seeing token YYTOKEN is to reduce or to
1527 detect an error, take that action. */
1529 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1534 if (yytable_value_is_error (yyn))
1540 /* Count tokens shifted since error; after three, turn off error
1545 /* Shift the lookahead token. */
1546 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1548 /* Discard the shifted token. */
1552 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1554 YY_IGNORE_MAYBE_UNINITIALIZED_END
1559 /*-----------------------------------------------------------.
1560 | yydefault -- do the default action for the current state. |
1561 `-----------------------------------------------------------*/
1563 yyn = yydefact[yystate];
1569 /*-----------------------------.
1570 | yyreduce -- Do a reduction. |
1571 `-----------------------------*/
1573 /* yyn is the number of a rule to reduce with. */
1576 /* If YYLEN is nonzero, implement the default value of the action:
1579 Otherwise, the following line sets YYVAL to garbage.
1580 This behavior is undocumented and Bison
1581 users should not rely upon it. Assigning to YYVAL
1582 unconditionally makes the parser a bit smaller, and it avoids a
1583 GCC warning that YYVAL may be used uninitialized. */
1584 yyval = yyvsp[1-yylen];
1587 YY_REDUCE_PRINT (yyn);
1591 /* Line 1787 of yacc.c */
1592 #line 128 "util_expr_parse.y"
1593 { ctx->expr = (yyvsp[(2) - (2)].exVal); }
1597 /* Line 1787 of yacc.c */
1598 #line 129 "util_expr_parse.y"
1599 { ctx->expr = (yyvsp[(2) - (2)].exVal); }
1603 /* Line 1787 of yacc.c */
1604 #line 130 "util_expr_parse.y"
1609 /* Line 1787 of yacc.c */
1610 #line 133 "util_expr_parse.y"
1611 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1615 /* Line 1787 of yacc.c */
1616 #line 134 "util_expr_parse.y"
1617 { (yyval.exVal) = ap_expr_concat_make((yyvsp[(1) - (2)].exVal), (yyvsp[(2) - (2)].exVal), ctx); }
1621 /* Line 1787 of yacc.c */
1622 #line 135 "util_expr_parse.y"
1627 /* Line 1787 of yacc.c */
1628 #line 138 "util_expr_parse.y"
1629 { (yyval.exVal) = ap_expr_make(op_True, NULL, NULL, ctx); }
1633 /* Line 1787 of yacc.c */
1634 #line 139 "util_expr_parse.y"
1635 { (yyval.exVal) = ap_expr_make(op_False, NULL, NULL, ctx); }
1639 /* Line 1787 of yacc.c */
1640 #line 140 "util_expr_parse.y"
1641 { (yyval.exVal) = ap_expr_make(op_Not, (yyvsp[(2) - (2)].exVal), NULL, ctx); }
1645 /* Line 1787 of yacc.c */
1646 #line 141 "util_expr_parse.y"
1647 { (yyval.exVal) = ap_expr_make(op_Or, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1651 /* Line 1787 of yacc.c */
1652 #line 142 "util_expr_parse.y"
1653 { (yyval.exVal) = ap_expr_make(op_And, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1657 /* Line 1787 of yacc.c */
1658 #line 143 "util_expr_parse.y"
1659 { (yyval.exVal) = ap_expr_make(op_Comp, (yyvsp[(1) - (1)].exVal), NULL, ctx); }
1663 /* Line 1787 of yacc.c */
1664 #line 144 "util_expr_parse.y"
1665 { (yyval.exVal) = ap_expr_unary_op_make( (yyvsp[(1) - (2)].cpVal), (yyvsp[(2) - (2)].exVal), ctx); }
1669 /* Line 1787 of yacc.c */
1670 #line 145 "util_expr_parse.y"
1671 { (yyval.exVal) = ap_expr_binary_op_make((yyvsp[(2) - (3)].cpVal), (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[(2) - (3)].exVal); }
1681 /* Line 1787 of yacc.c */
1682 #line 147 "util_expr_parse.y"
1687 /* Line 1787 of yacc.c */
1688 #line 150 "util_expr_parse.y"
1689 { (yyval.exVal) = ap_expr_make(op_EQ, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1693 /* Line 1787 of yacc.c */
1694 #line 151 "util_expr_parse.y"
1695 { (yyval.exVal) = ap_expr_make(op_NE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1699 /* Line 1787 of yacc.c */
1700 #line 152 "util_expr_parse.y"
1701 { (yyval.exVal) = ap_expr_make(op_LT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1705 /* Line 1787 of yacc.c */
1706 #line 153 "util_expr_parse.y"
1707 { (yyval.exVal) = ap_expr_make(op_LE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1711 /* Line 1787 of yacc.c */
1712 #line 154 "util_expr_parse.y"
1713 { (yyval.exVal) = ap_expr_make(op_GT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1717 /* Line 1787 of yacc.c */
1718 #line 155 "util_expr_parse.y"
1719 { (yyval.exVal) = ap_expr_make(op_GE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1723 /* Line 1787 of yacc.c */
1724 #line 156 "util_expr_parse.y"
1725 { (yyval.exVal) = ap_expr_make(op_STR_EQ, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1729 /* Line 1787 of yacc.c */
1730 #line 157 "util_expr_parse.y"
1731 { (yyval.exVal) = ap_expr_make(op_STR_NE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1735 /* Line 1787 of yacc.c */
1736 #line 158 "util_expr_parse.y"
1737 { (yyval.exVal) = ap_expr_make(op_STR_LT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1741 /* Line 1787 of yacc.c */
1742 #line 159 "util_expr_parse.y"
1743 { (yyval.exVal) = ap_expr_make(op_STR_LE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1747 /* Line 1787 of yacc.c */
1748 #line 160 "util_expr_parse.y"
1749 { (yyval.exVal) = ap_expr_make(op_STR_GT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1753 /* Line 1787 of yacc.c */
1754 #line 161 "util_expr_parse.y"
1755 { (yyval.exVal) = ap_expr_make(op_STR_GE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1759 /* Line 1787 of yacc.c */
1760 #line 162 "util_expr_parse.y"
1761 { (yyval.exVal) = ap_expr_make(op_REG, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1765 /* Line 1787 of yacc.c */
1766 #line 163 "util_expr_parse.y"
1767 { (yyval.exVal) = ap_expr_make(op_NRE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1771 /* Line 1787 of yacc.c */
1772 #line 164 "util_expr_parse.y"
1773 { (yyval.exVal) = ap_expr_make(op_IN, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1777 /* Line 1787 of yacc.c */
1778 #line 167 "util_expr_parse.y"
1779 { (yyval.exVal) = ap_expr_make(op_Digit, (yyvsp[(1) - (1)].cpVal), NULL, ctx); }
1783 /* Line 1787 of yacc.c */
1784 #line 168 "util_expr_parse.y"
1785 { (yyval.exVal) = ap_expr_make(op_String, "", NULL, ctx); }
1789 /* Line 1787 of yacc.c */
1790 #line 169 "util_expr_parse.y"
1791 { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1795 /* Line 1787 of yacc.c */
1796 #line 170 "util_expr_parse.y"
1797 { (yyval.exVal) = ap_expr_make(op_Concat, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1801 /* Line 1787 of yacc.c */
1802 #line 171 "util_expr_parse.y"
1803 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1807 /* Line 1787 of yacc.c */
1808 #line 172 "util_expr_parse.y"
1809 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1813 /* Line 1787 of yacc.c */
1814 #line 173 "util_expr_parse.y"
1815 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1819 /* Line 1787 of yacc.c */
1820 #line 174 "util_expr_parse.y"
1821 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1825 /* Line 1787 of yacc.c */
1826 #line 175 "util_expr_parse.y"
1827 { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1831 /* Line 1787 of yacc.c */
1832 #line 178 "util_expr_parse.y"
1833 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1837 /* Line 1787 of yacc.c */
1838 #line 179 "util_expr_parse.y"
1839 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1843 /* Line 1787 of yacc.c */
1844 #line 180 "util_expr_parse.y"
1845 { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1849 /* Line 1787 of yacc.c */
1850 #line 181 "util_expr_parse.y"
1851 { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1855 /* Line 1787 of yacc.c */
1856 #line 184 "util_expr_parse.y"
1857 { (yyval.exVal) = ap_expr_make(op_String, (yyvsp[(1) - (1)].cpVal), NULL, ctx); }
1861 /* Line 1787 of yacc.c */
1862 #line 185 "util_expr_parse.y"
1863 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1867 /* Line 1787 of yacc.c */
1868 #line 188 "util_expr_parse.y"
1869 { (yyval.exVal) = ap_expr_var_make((yyvsp[(2) - (3)].cpVal), ctx); }
1873 /* Line 1787 of yacc.c */
1874 #line 189 "util_expr_parse.y"
1875 { (yyval.exVal) = ap_expr_str_func_make((yyvsp[(2) - (5)].cpVal), (yyvsp[(4) - (5)].exVal), ctx); }
1879 /* Line 1787 of yacc.c */
1880 #line 190 "util_expr_parse.y"
1881 { (yyval.exVal) = ap_expr_make(op_Bool, (yyvsp[(2) - (3)].exVal), NULL, ctx); }
1885 /* Line 1787 of yacc.c */
1886 #line 191 "util_expr_parse.y"
1887 { (yyval.exVal) = ap_expr_make(op_Word, (yyvsp[(2) - (3)].exVal), NULL, ctx); }
1891 /* Line 1787 of yacc.c */
1892 #line 192 "util_expr_parse.y"
1893 { (yyval.exVal) = ap_expr_backref_make((yyvsp[(1) - (1)].num), ctx); }
1897 /* Line 1787 of yacc.c */
1898 #line 195 "util_expr_parse.y"
1899 { (yyval.exVal) = ap_expr_str_func_make((yyvsp[(1) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), ctx); }
1903 /* Line 1787 of yacc.c */
1904 #line 196 "util_expr_parse.y"
1905 { (yyval.exVal) = ap_expr_str_func_make((yyvsp[(1) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), ctx); }
1909 /* Line 1787 of yacc.c */
1910 #line 199 "util_expr_parse.y"
1911 { (yyval.exVal) = ap_expr_list_func_make((yyvsp[(1) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), ctx); }
1915 /* Line 1787 of yacc.c */
1916 #line 203 "util_expr_parse.y"
1917 { (yyval.exVal) = ap_expr_make(op_Sub, (yyvsp[(4) - (4)].exVal), (yyvsp[(2) - (4)].exVal), ctx); }
1921 /* Line 1787 of yacc.c */
1922 #line 204 "util_expr_parse.y"
1923 { (yyval.exVal) = ap_expr_make(op_Sub, (yyvsp[(5) - (6)].exVal), (yyvsp[(3) - (6)].exVal), ctx); }
1927 /* Line 1787 of yacc.c */
1928 #line 207 "util_expr_parse.y"
1929 { (yyval.exVal) = ap_expr_make(op_Join, (yyvsp[(2) - (2)].exVal), NULL, ctx); }
1933 /* Line 1787 of yacc.c */
1934 #line 208 "util_expr_parse.y"
1935 { (yyval.exVal) = ap_expr_make(op_Join, (yyvsp[(3) - (4)].exVal), NULL, ctx); }
1939 /* Line 1787 of yacc.c */
1940 #line 209 "util_expr_parse.y"
1941 { (yyval.exVal) = ap_expr_make(op_Join, (yyvsp[(2) - (4)].exVal), (yyvsp[(4) - (4)].exVal), ctx); }
1945 /* Line 1787 of yacc.c */
1946 #line 210 "util_expr_parse.y"
1947 { (yyval.exVal) = ap_expr_make(op_Join, (yyvsp[(3) - (6)].exVal), (yyvsp[(5) - (6)].exVal), ctx); }
1951 /* Line 1787 of yacc.c */
1952 #line 213 "util_expr_parse.y"
1953 { (yyval.exVal) = ap_expr_make(op_Split, (yyvsp[(4) - (4)].exVal), (yyvsp[(2) - (4)].exVal), ctx); }
1957 /* Line 1787 of yacc.c */
1958 #line 214 "util_expr_parse.y"
1959 { (yyval.exVal) = ap_expr_make(op_Split, (yyvsp[(5) - (6)].exVal), (yyvsp[(3) - (6)].exVal), ctx); }
1963 /* Line 1787 of yacc.c */
1964 #line 215 "util_expr_parse.y"
1965 { (yyval.exVal) = ap_expr_make(op_Split, (yyvsp[(4) - (4)].exVal), (yyvsp[(2) - (4)].exVal), ctx); }
1969 /* Line 1787 of yacc.c */
1970 #line 216 "util_expr_parse.y"
1971 { (yyval.exVal) = ap_expr_make(op_Split, (yyvsp[(5) - (6)].exVal), (yyvsp[(3) - (6)].exVal), ctx); }
1975 /* Line 1787 of yacc.c */
1976 #line 219 "util_expr_parse.y"
1977 { (yyval.exVal) = ap_expr_make(op_ListElement, (yyvsp[(1) - (1)].exVal), NULL, ctx); }
1981 /* Line 1787 of yacc.c */
1982 #line 220 "util_expr_parse.y"
1983 { (yyval.exVal) = ap_expr_make(op_ListElement, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); }
1987 /* Line 1787 of yacc.c */
1988 #line 223 "util_expr_parse.y"
1990 ap_expr_t *e = ap_expr_regex_make((yyvsp[(2) - (3)].cpVal), NULL, (yyvsp[(3) - (3)].cpVal), ctx);
1992 ctx->error = "Failed to compile regular expression";
2000 /* Line 1787 of yacc.c */
2001 #line 232 "util_expr_parse.y"
2003 ap_expr_t *e = ap_expr_regex_make((yyvsp[(2) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), (yyvsp[(4) - (4)].cpVal), ctx);
2005 ctx->error = "Failed to compile regular expression";
2013 /* Line 1787 of yacc.c */
2014 #line 241 "util_expr_parse.y"
2015 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
2019 /* Line 1787 of yacc.c */
2020 #line 242 "util_expr_parse.y"
2021 { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
2025 /* Line 1787 of yacc.c */
2026 #line 2027 "util_expr_parse.c"
2029 /* User semantic actions sometimes alter yychar, and that requires
2030 that yytoken be updated with the new translation. We take the
2031 approach of translating immediately before every use of yytoken.
2032 One alternative is translating here after every semantic action,
2033 but that translation would be missed if the semantic action invokes
2034 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2035 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2036 incorrect destructor might then be invoked immediately. In the
2037 case of YYERROR or YYBACKUP, subsequent parser actions might lead
2038 to an incorrect destructor call or verbose syntax error message
2039 before the lookahead is translated. */
2040 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2044 YY_STACK_PRINT (yyss, yyssp);
2048 /* Now `shift' the result of the reduction. Determine what state
2049 that goes to, based on the state we popped back to and the rule
2050 number reduced by. */
2054 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2055 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2056 yystate = yytable[yystate];
2058 yystate = yydefgoto[yyn - YYNTOKENS];
2063 /*------------------------------------.
2064 | yyerrlab -- here on detecting error |
2065 `------------------------------------*/
2067 /* Make sure we have latest lookahead translation. See comments at
2068 user semantic actions for why this is necessary. */
2069 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2071 /* If not already recovering from an error, report this error. */
2075 #if ! YYERROR_VERBOSE
2076 yyerror (ctx, YY_("syntax error"));
2078 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2081 char const *yymsgp = YY_("syntax error");
2082 int yysyntax_error_status;
2083 yysyntax_error_status = YYSYNTAX_ERROR;
2084 if (yysyntax_error_status == 0)
2086 else if (yysyntax_error_status == 1)
2088 if (yymsg != yymsgbuf)
2089 YYSTACK_FREE (yymsg);
2090 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2094 yymsg_alloc = sizeof yymsgbuf;
2095 yysyntax_error_status = 2;
2099 yysyntax_error_status = YYSYNTAX_ERROR;
2103 yyerror (ctx, yymsgp);
2104 if (yysyntax_error_status == 2)
2105 goto yyexhaustedlab;
2107 # undef YYSYNTAX_ERROR
2113 if (yyerrstatus == 3)
2115 /* If just tried and failed to reuse lookahead token after an
2116 error, discard it. */
2118 if (yychar <= YYEOF)
2120 /* Return failure if at end of input. */
2121 if (yychar == YYEOF)
2126 yydestruct ("Error: discarding",
2127 yytoken, &yylval, ctx);
2132 /* Else will try to reuse lookahead token after shifting the error
2137 /*---------------------------------------------------.
2138 | yyerrorlab -- error raised explicitly by YYERROR. |
2139 `---------------------------------------------------*/
2142 /* Pacify compilers like GCC when the user code never invokes
2143 YYERROR and the label yyerrorlab therefore never appears in user
2145 if (/*CONSTCOND*/ 0)
2148 /* Do not reclaim the symbols of the rule which action triggered
2152 YY_STACK_PRINT (yyss, yyssp);
2157 /*-------------------------------------------------------------.
2158 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2159 `-------------------------------------------------------------*/
2161 yyerrstatus = 3; /* Each real token shifted decrements this. */
2165 yyn = yypact[yystate];
2166 if (!yypact_value_is_default (yyn))
2169 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2177 /* Pop the current state because it cannot handle the error token. */
2182 yydestruct ("Error: popping",
2183 yystos[yystate], yyvsp, ctx);
2186 YY_STACK_PRINT (yyss, yyssp);
2189 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2191 YY_IGNORE_MAYBE_UNINITIALIZED_END
2194 /* Shift the error token. */
2195 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2201 /*-------------------------------------.
2202 | yyacceptlab -- YYACCEPT comes here. |
2203 `-------------------------------------*/
2208 /*-----------------------------------.
2209 | yyabortlab -- YYABORT comes here. |
2210 `-----------------------------------*/
2215 #if !defined yyoverflow || YYERROR_VERBOSE
2216 /*-------------------------------------------------.
2217 | yyexhaustedlab -- memory exhaustion comes here. |
2218 `-------------------------------------------------*/
2220 yyerror (ctx, YY_("memory exhausted"));
2226 if (yychar != YYEMPTY)
2228 /* Make sure we have latest lookahead translation. See comments at
2229 user semantic actions for why this is necessary. */
2230 yytoken = YYTRANSLATE (yychar);
2231 yydestruct ("Cleanup: discarding lookahead",
2232 yytoken, &yylval, ctx);
2234 /* Do not reclaim the symbols of the rule which action triggered
2235 this YYABORT or YYACCEPT. */
2237 YY_STACK_PRINT (yyss, yyssp);
2238 while (yyssp != yyss)
2240 yydestruct ("Cleanup: popping",
2241 yystos[*yyssp], yyvsp, ctx);
2246 YYSTACK_FREE (yyss);
2249 if (yymsg != yymsgbuf)
2250 YYSTACK_FREE (yymsg);
2252 /* Make sure YYID is used. */
2253 return YYID (yyresult);
2257 /* Line 2050 of yacc.c */
2258 #line 245 "util_expr_parse.y"
2261 void yyerror(ap_expr_parse_ctx_t *ctx, const char *s)
2263 /* s is allocated on the stack */
2264 ctx->error = apr_pstrdup(ctx->ptemp, s);