]> granicus.if.org Git - apache/blob - server/util_expr_parse.c
Fix alignment in a <highlight> block.
[apache] / server / util_expr_parse.c
1 /* A Bison parser, made by GNU Bison 2.7.1.  */
2
3 /* Bison implementation for Yacc-like parsers in C
4    
5       Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6    
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.
11    
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.
16    
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/>.  */
19
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.
29    
30    This special exception was added by the Free Software Foundation in
31    version 2.2 of Bison.  */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34    simplifying the original so-called "semantic" parser.  */
35
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.  */
42
43 /* Identify Bison output.  */
44 #define YYBISON 1
45
46 /* Bison version.  */
47 #define YYBISON_VERSION "2.7.1"
48
49 /* Skeleton name.  */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers.  */
53 #define YYPURE 1
54
55 /* Push parsers.  */
56 #define YYPUSH 0
57
58 /* Pull parsers.  */
59 #define YYPULL 1
60
61
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
70
71 /* Copy the first part of user declarations.  */
72 /* Line 371 of yacc.c  */
73 #line 31 "util_expr_parse.y"
74
75 #include "util_expr_private.h"
76
77 /* Line 371 of yacc.c  */
78 #line 79 "util_expr_parse.c"
79
80 # ifndef YY_NULL
81 #  if defined __cplusplus && 201103L <= __cplusplus
82 #   define YY_NULL nullptr
83 #  else
84 #   define YY_NULL 0
85 #  endif
86 # endif
87
88 /* Enabling verbose error messages.  */
89 #ifdef YYERROR_VERBOSE
90 # undef YYERROR_VERBOSE
91 # define YYERROR_VERBOSE 1
92 #else
93 # define YYERROR_VERBOSE 1
94 #endif
95
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.  */
101 #ifndef YYDEBUG
102 # define YYDEBUG 0
103 #endif
104 #if YYDEBUG
105 extern int ap_expr_yydebug;
106 #endif
107
108 /* Tokens.  */
109 #ifndef YYTOKENTYPE
110 # define YYTOKENTYPE
111    /* Put the tokens into the symbol table, so that GDB and other debuggers
112       know about them.  */
113    enum yytokentype {
114      T_TRUE = 258,
115      T_FALSE = 259,
116      T_EXPR_BOOL = 260,
117      T_EXPR_STRING = 261,
118      T_ERROR = 262,
119      T_DIGIT = 263,
120      T_ID = 264,
121      T_STRING = 265,
122      T_REGEX = 266,
123      T_REGSUB = 267,
124      T_REG_MATCH = 268,
125      T_REG_SUBST = 269,
126      T_REG_FLAGS = 270,
127      T_BACKREF = 271,
128      T_OP_UNARY = 272,
129      T_OP_BINARY = 273,
130      T_STR_BEGIN = 274,
131      T_STR_END = 275,
132      T_VAR_BEGIN = 276,
133      T_VAR_END = 277,
134      T_VAREXP_BEGIN = 278,
135      T_VAREXP_END = 279,
136      T_OP_EQ = 280,
137      T_OP_NE = 281,
138      T_OP_LT = 282,
139      T_OP_LE = 283,
140      T_OP_GT = 284,
141      T_OP_GE = 285,
142      T_OP_REG = 286,
143      T_OP_NRE = 287,
144      T_OP_IN = 288,
145      T_OP_STR_EQ = 289,
146      T_OP_STR_NE = 290,
147      T_OP_STR_LT = 291,
148      T_OP_STR_LE = 292,
149      T_OP_STR_GT = 293,
150      T_OP_STR_GE = 294,
151      T_OP_CONCAT = 295,
152      T_OP_JOIN = 296,
153      T_OP_SPLIT = 297,
154      T_OP_SUB = 298,
155      T_OP_OR = 299,
156      T_OP_AND = 300,
157      T_OP_NOT = 301
158    };
159 #endif
160
161
162 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
163 typedef union YYSTYPE
164 {
165 /* Line 387 of yacc.c  */
166 #line 35 "util_expr_parse.y"
167
168     char      *cpVal;
169     ap_expr_t *exVal;
170     int        num;
171
172
173 /* Line 387 of yacc.c  */
174 #line 175 "util_expr_parse.c"
175 } YYSTYPE;
176 # define YYSTYPE_IS_TRIVIAL 1
177 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
178 # define YYSTYPE_IS_DECLARED 1
179 #endif
180
181
182 #ifdef YYPARSE_PARAM
183 #if defined __STDC__ || defined __cplusplus
184 int ap_expr_yyparse (void *YYPARSE_PARAM);
185 #else
186 int ap_expr_yyparse ();
187 #endif
188 #else /* ! YYPARSE_PARAM */
189 #if defined __STDC__ || defined __cplusplus
190 int ap_expr_yyparse (ap_expr_parse_ctx_t *ctx);
191 #else
192 int ap_expr_yyparse ();
193 #endif
194 #endif /* ! YYPARSE_PARAM */
195
196 #endif /* !YY_AP_EXPR_YY_UTIL_EXPR_PARSE_H_INCLUDED  */
197
198 /* Copy the second part of user declarations.  */
199 /* Line 390 of yacc.c  */
200 #line 118 "util_expr_parse.y"
201
202 #include "util_expr_private.h"
203 #define yyscanner ctx->scanner
204
205 int ap_expr_yylex(YYSTYPE *lvalp, void *scanner);
206
207 /* Line 390 of yacc.c  */
208 #line 209 "util_expr_parse.c"
209
210 #ifdef short
211 # undef short
212 #endif
213
214 #ifdef YYTYPE_UINT8
215 typedef YYTYPE_UINT8 yytype_uint8;
216 #else
217 typedef unsigned char yytype_uint8;
218 #endif
219
220 #ifdef YYTYPE_INT8
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;
225 #else
226 typedef short int yytype_int8;
227 #endif
228
229 #ifdef YYTYPE_UINT16
230 typedef YYTYPE_UINT16 yytype_uint16;
231 #else
232 typedef unsigned short int yytype_uint16;
233 #endif
234
235 #ifdef YYTYPE_INT16
236 typedef YYTYPE_INT16 yytype_int16;
237 #else
238 typedef short int yytype_int16;
239 #endif
240
241 #ifndef YYSIZE_T
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
250 # else
251 #  define YYSIZE_T unsigned int
252 # endif
253 #endif
254
255 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
256
257 #ifndef YY_
258 # if defined YYENABLE_NLS && YYENABLE_NLS
259 #  if ENABLE_NLS
260 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
261 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
262 #  endif
263 # endif
264 # ifndef YY_
265 #  define YY_(Msgid) Msgid
266 # endif
267 #endif
268
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 */
274 # endif
275 #endif
276
277 /* Suppress unused-variable warnings by "using" E.  */
278 #if ! defined lint || defined __GNUC__
279 # define YYUSE(E) ((void) (E))
280 #else
281 # define YYUSE(E) /* empty */
282 #endif
283
284
285 /* Identity function, used to suppress warnings about constant conditions.  */
286 #ifndef lint
287 # define YYID(N) (N)
288 #else
289 #if (defined __STDC__ || defined __C99__FUNC__ \
290      || defined __cplusplus || defined _MSC_VER)
291 static int
292 YYID (int yyi)
293 #else
294 static int
295 YYID (yyi)
296     int yyi;
297 #endif
298 {
299   return yyi;
300 }
301 #endif
302
303 #if ! defined yyoverflow || YYERROR_VERBOSE
304
305 /* The parser invokes alloca or malloc; define the necessary symbols.  */
306
307 # ifdef YYSTACK_USE_ALLOCA
308 #  if YYSTACK_USE_ALLOCA
309 #   ifdef __GNUC__
310 #    define YYSTACK_ALLOC __builtin_alloca
311 #   elif defined __BUILTIN_VA_ARG_INCR
312 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
313 #   elif defined _AIX
314 #    define YYSTACK_ALLOC __alloca
315 #   elif defined _MSC_VER
316 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
317 #    define alloca _alloca
318 #   else
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
326 #     endif
327 #    endif
328 #   endif
329 #  endif
330 # endif
331
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 */
341 #  endif
342 # else
343 #  define YYSTACK_ALLOC YYMALLOC
344 #  define YYSTACK_FREE YYFREE
345 #  ifndef YYSTACK_ALLOC_MAXIMUM
346 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
347 #  endif
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
354 #   endif
355 #  endif
356 #  ifndef YYMALLOC
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 */
361 #   endif
362 #  endif
363 #  ifndef YYFREE
364 #   define YYFREE free
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 */
368 #   endif
369 #  endif
370 # endif
371 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
372
373
374 #if (! defined yyoverflow \
375      && (! defined __cplusplus \
376          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
377
378 /* A type that is properly aligned for any stack member.  */
379 union yyalloc
380 {
381   yytype_int16 yyss_alloc;
382   YYSTYPE yyvs_alloc;
383 };
384
385 /* The size of the maximum gap between one aligned stack and the next.  */
386 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
387
388 /* The size of an array large to enough to hold all stacks, each with
389    N elements.  */
390 # define YYSTACK_BYTES(N) \
391      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
392       + YYSTACK_GAP_MAXIMUM)
393
394 # define YYCOPY_NEEDED 1
395
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
400    stack.  */
401 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
402     do                                                                  \
403       {                                                                 \
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);                          \
409       }                                                                 \
410     while (YYID (0))
411
412 #endif
413
414 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
415 /* Copy COUNT objects from SRC to DST.  The source and destination do
416    not overlap.  */
417 # ifndef YYCOPY
418 #  if defined __GNUC__ && 1 < __GNUC__
419 #   define YYCOPY(Dst, Src, Count) \
420       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
421 #  else
422 #   define YYCOPY(Dst, Src, Count)              \
423       do                                        \
424         {                                       \
425           YYSIZE_T yyi;                         \
426           for (yyi = 0; yyi < (Count); yyi++)   \
427             (Dst)[yyi] = (Src)[yyi];            \
428         }                                       \
429       while (YYID (0))
430 #  endif
431 # endif
432 #endif /* !YYCOPY_NEEDED */
433
434 /* YYFINAL -- State number of the termination state.  */
435 #define YYFINAL  31
436 /* YYLAST -- Last index in YYTABLE.  */
437 #define YYLAST   277
438
439 /* YYNTOKENS -- Number of terminals.  */
440 #define YYNTOKENS  69
441 /* YYNNTS -- Number of nonterminals.  */
442 #define YYNNTS  18
443 /* YYNRULES -- Number of rules.  */
444 #define YYNRULES  71
445 /* YYNRULES -- Number of states.  */
446 #define YYNSTATES  154
447
448 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
449 #define YYUNDEFTOK  2
450 #define YYMAXUTOK   317
451
452 #define YYTRANSLATE(YYX)                                                \
453   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
454
455 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
456 static const yytype_uint8 yytranslate[] =
457 {
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
490 };
491
492 #if YYDEBUG
493 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
494    YYRHS.  */
495 static const yytype_uint16 yyprhs[] =
496 {
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,
504      255,   257
505 };
506
507 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
508 static const yytype_int8 yyrhs[] =
509 {
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
536 };
537
538 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
539 static const yytype_uint8 yyrline[] =
540 {
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,
548      241,   242
549 };
550 #endif
551
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[] =
556 {
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
583 };
584 #endif
585
586 # ifdef YYPRINT
587 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
588    token YYLEX-NUM.  */
589 static const yytype_uint16 yytoknum[] =
590 {
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
598 };
599 # endif
600
601 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
602 static const yytype_uint8 yyr1[] =
603 {
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,
611       86,    86
612 };
613
614 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
615 static const yytype_uint8 yyr2[] =
616 {
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,
624        1,     1
625 };
626
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[] =
631 {
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,
647       65,    63,     0,    53
648 };
649
650 /* YYDEFGOTO[NTERM-NUM].  */
651 static const yytype_int8 yydefgoto[] =
652 {
653       -1,     4,    28,    19,    20,    21,   124,    29,    22,    23,
654       45,    24,    25,    46,    74,    84,    85,    86
655 };
656
657 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
658    STATE-NUM.  */
659 #define YYPACT_NINF -51
660 static const yytype_int16 yypact[] =
661 {
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,
677      -51,   -51,    35,   -51
678 };
679
680 /* YYPGOTO[NTERM-NUM].  */
681 static const yytype_int8 yypgoto[] =
682 {
683      -51,   -51,    -7,    84,   -51,   -11,   -13,   -24,    -1,   -51,
684      -51,   -51,   -51,   -51,   -35,    69,   -10,    87
685 };
686
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[] =
692 {
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
721 };
722
723 #define yypact_value_is_default(Yystate) \
724   (!!((Yystate) == (-51)))
725
726 #define yytable_value_is_error(Yytable_value) \
727   YYID (0)
728
729 static const yytype_int16 yycheck[] =
730 {
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
759 };
760
761 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
762    symbol of state STATE-NUM.  */
763 static const yytype_uint8 yystos[] =
764 {
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,
780       64,    64,    74,    64
781 };
782
783 #define yyerrok         (yyerrstatus = 0)
784 #define yyclearin       (yychar = YYEMPTY)
785 #define YYEMPTY         (-2)
786 #define YYEOF           0
787
788 #define YYACCEPT        goto yyacceptlab
789 #define YYABORT         goto yyabortlab
790 #define YYERROR         goto yyerrorlab
791
792
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
798    discussed.  */
799
800 #define YYFAIL          goto yyerrlab
801 #if defined YYFAIL
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.  */
806 #endif
807
808 #define YYRECOVERING()  (!!yyerrstatus)
809
810 #define YYBACKUP(Token, Value)                                  \
811 do                                                              \
812   if (yychar == YYEMPTY)                                        \
813     {                                                           \
814       yychar = (Token);                                         \
815       yylval = (Value);                                         \
816       YYPOPSTACK (yylen);                                       \
817       yystate = *yyssp;                                         \
818       goto yybackup;                                            \
819     }                                                           \
820   else                                                          \
821     {                                                           \
822       yyerror (ctx, YY_("syntax error: cannot back up")); \
823       YYERROR;                                                  \
824     }                                                           \
825 while (YYID (0))
826
827 /* Error token number */
828 #define YYTERROR        1
829 #define YYERRCODE       256
830
831
832 /* This macro is provided for backward compatibility. */
833 #ifndef YY_LOCATION_PRINT
834 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
835 #endif
836
837
838 /* YYLEX -- calling `yylex' with the right arguments.  */
839 #ifdef YYLEX_PARAM
840 # define YYLEX yylex (&yylval, YYLEX_PARAM)
841 #else
842 # define YYLEX yylex (&yylval, yyscanner)
843 #endif
844
845 /* Enable debugging if requested.  */
846 #if YYDEBUG
847
848 # ifndef YYFPRINTF
849 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
850 #  define YYFPRINTF fprintf
851 # endif
852
853 # define YYDPRINTF(Args)                        \
854 do {                                            \
855   if (yydebug)                                  \
856     YYFPRINTF Args;                             \
857 } while (YYID (0))
858
859 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
860 do {                                                                      \
861   if (yydebug)                                                            \
862     {                                                                     \
863       YYFPRINTF (stderr, "%s ", Title);                                   \
864       yy_symbol_print (stderr,                                            \
865                   Type, Value, ctx); \
866       YYFPRINTF (stderr, "\n");                                           \
867     }                                                                     \
868 } while (YYID (0))
869
870
871 /*--------------------------------.
872 | Print this symbol on YYOUTPUT.  |
873 `--------------------------------*/
874
875 /*ARGSUSED*/
876 #if (defined __STDC__ || defined __C99__FUNC__ \
877      || defined __cplusplus || defined _MSC_VER)
878 static void
879 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, ap_expr_parse_ctx_t *ctx)
880 #else
881 static void
882 yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx)
883     FILE *yyoutput;
884     int yytype;
885     YYSTYPE const * const yyvaluep;
886     ap_expr_parse_ctx_t *ctx;
887 #endif
888 {
889   FILE *yyo = yyoutput;
890   YYUSE (yyo);
891   if (!yyvaluep)
892     return;
893   YYUSE (ctx);
894 # ifdef YYPRINT
895   if (yytype < YYNTOKENS)
896     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
897 # else
898   YYUSE (yyoutput);
899 # endif
900   YYUSE (yytype);
901 }
902
903
904 /*--------------------------------.
905 | Print this symbol on YYOUTPUT.  |
906 `--------------------------------*/
907
908 #if (defined __STDC__ || defined __C99__FUNC__ \
909      || defined __cplusplus || defined _MSC_VER)
910 static void
911 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, ap_expr_parse_ctx_t *ctx)
912 #else
913 static void
914 yy_symbol_print (yyoutput, yytype, yyvaluep, ctx)
915     FILE *yyoutput;
916     int yytype;
917     YYSTYPE const * const yyvaluep;
918     ap_expr_parse_ctx_t *ctx;
919 #endif
920 {
921   if (yytype < YYNTOKENS)
922     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
923   else
924     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
925
926   yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx);
927   YYFPRINTF (yyoutput, ")");
928 }
929
930 /*------------------------------------------------------------------.
931 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
932 | TOP (included).                                                   |
933 `------------------------------------------------------------------*/
934
935 #if (defined __STDC__ || defined __C99__FUNC__ \
936      || defined __cplusplus || defined _MSC_VER)
937 static void
938 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
939 #else
940 static void
941 yy_stack_print (yybottom, yytop)
942     yytype_int16 *yybottom;
943     yytype_int16 *yytop;
944 #endif
945 {
946   YYFPRINTF (stderr, "Stack now");
947   for (; yybottom <= yytop; yybottom++)
948     {
949       int yybot = *yybottom;
950       YYFPRINTF (stderr, " %d", yybot);
951     }
952   YYFPRINTF (stderr, "\n");
953 }
954
955 # define YY_STACK_PRINT(Bottom, Top)                            \
956 do {                                                            \
957   if (yydebug)                                                  \
958     yy_stack_print ((Bottom), (Top));                           \
959 } while (YYID (0))
960
961
962 /*------------------------------------------------.
963 | Report that the YYRULE is going to be reduced.  |
964 `------------------------------------------------*/
965
966 #if (defined __STDC__ || defined __C99__FUNC__ \
967      || defined __cplusplus || defined _MSC_VER)
968 static void
969 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, ap_expr_parse_ctx_t *ctx)
970 #else
971 static void
972 yy_reduce_print (yyvsp, yyrule, ctx)
973     YYSTYPE *yyvsp;
974     int yyrule;
975     ap_expr_parse_ctx_t *ctx;
976 #endif
977 {
978   int yynrhs = yyr2[yyrule];
979   int yyi;
980   unsigned long int yylno = yyrline[yyrule];
981   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
982              yyrule - 1, yylno);
983   /* The symbols being reduced.  */
984   for (yyi = 0; yyi < yynrhs; yyi++)
985     {
986       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
987       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
988                        &(yyvsp[(yyi + 1) - (yynrhs)])
989                                        , ctx);
990       YYFPRINTF (stderr, "\n");
991     }
992 }
993
994 # define YY_REDUCE_PRINT(Rule)          \
995 do {                                    \
996   if (yydebug)                          \
997     yy_reduce_print (yyvsp, Rule, ctx); \
998 } while (YYID (0))
999
1000 /* Nonzero means print parse trace.  It is left uninitialized so that
1001    multiple parsers can coexist.  */
1002 int yydebug;
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 */
1009
1010
1011 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1012 #ifndef YYINITDEPTH
1013 # define YYINITDEPTH 200
1014 #endif
1015
1016 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1017    if the built-in stack extension method is used).
1018
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.  */
1022
1023 #ifndef YYMAXDEPTH
1024 # define YYMAXDEPTH 10000
1025 #endif
1026
1027
1028 #if YYERROR_VERBOSE
1029
1030 # ifndef yystrlen
1031 #  if defined __GLIBC__ && defined _STRING_H
1032 #   define yystrlen strlen
1033 #  else
1034 /* Return the length of YYSTR.  */
1035 #if (defined __STDC__ || defined __C99__FUNC__ \
1036      || defined __cplusplus || defined _MSC_VER)
1037 static YYSIZE_T
1038 yystrlen (const char *yystr)
1039 #else
1040 static YYSIZE_T
1041 yystrlen (yystr)
1042     const char *yystr;
1043 #endif
1044 {
1045   YYSIZE_T yylen;
1046   for (yylen = 0; yystr[yylen]; yylen++)
1047     continue;
1048   return yylen;
1049 }
1050 #  endif
1051 # endif
1052
1053 # ifndef yystpcpy
1054 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1055 #   define yystpcpy stpcpy
1056 #  else
1057 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1058    YYDEST.  */
1059 #if (defined __STDC__ || defined __C99__FUNC__ \
1060      || defined __cplusplus || defined _MSC_VER)
1061 static char *
1062 yystpcpy (char *yydest, const char *yysrc)
1063 #else
1064 static char *
1065 yystpcpy (yydest, yysrc)
1066     char *yydest;
1067     const char *yysrc;
1068 #endif
1069 {
1070   char *yyd = yydest;
1071   const char *yys = yysrc;
1072
1073   while ((*yyd++ = *yys++) != '\0')
1074     continue;
1075
1076   return yyd - 1;
1077 }
1078 #  endif
1079 # endif
1080
1081 # ifndef yytnamerr
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
1088    would have been.  */
1089 static YYSIZE_T
1090 yytnamerr (char *yyres, const char *yystr)
1091 {
1092   if (*yystr == '"')
1093     {
1094       YYSIZE_T yyn = 0;
1095       char const *yyp = yystr;
1096
1097       for (;;)
1098         switch (*++yyp)
1099           {
1100           case '\'':
1101           case ',':
1102             goto do_not_strip_quotes;
1103
1104           case '\\':
1105             if (*++yyp != '\\')
1106               goto do_not_strip_quotes;
1107             /* Fall through.  */
1108           default:
1109             if (yyres)
1110               yyres[yyn] = *yyp;
1111             yyn++;
1112             break;
1113
1114           case '"':
1115             if (yyres)
1116               yyres[yyn] = '\0';
1117             return yyn;
1118           }
1119     do_not_strip_quotes: ;
1120     }
1121
1122   if (! yyres)
1123     return yystrlen (yystr);
1124
1125   return yystpcpy (yyres, yystr) - yyres;
1126 }
1127 # endif
1128
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
1131    YYSSP.
1132
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.  */
1137 static int
1138 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1139                 yytype_int16 *yyssp, int yytoken)
1140 {
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
1149      "expected"). */
1150   int yycount = 0;
1151
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
1156        function.
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.
1178   */
1179   if (yytoken != YYEMPTY)
1180     {
1181       int yyn = yypact[*yyssp];
1182       yyarg[yycount++] = yytname[yytoken];
1183       if (!yypact_value_is_default (yyn))
1184         {
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;
1192           int yyx;
1193
1194           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1195             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1196                 && !yytable_value_is_error (yytable[yyx + yyn]))
1197               {
1198                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1199                   {
1200                     yycount = 1;
1201                     yysize = yysize0;
1202                     break;
1203                   }
1204                 yyarg[yycount++] = yytname[yyx];
1205                 {
1206                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1207                   if (! (yysize <= yysize1
1208                          && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1209                     return 2;
1210                   yysize = yysize1;
1211                 }
1212               }
1213         }
1214     }
1215
1216   switch (yycount)
1217     {
1218 # define YYCASE_(N, S)                      \
1219       case N:                               \
1220         yyformat = S;                       \
1221       break
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"));
1228 # undef YYCASE_
1229     }
1230
1231   {
1232     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1233     if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1234       return 2;
1235     yysize = yysize1;
1236   }
1237
1238   if (*yymsg_alloc < yysize)
1239     {
1240       *yymsg_alloc = 2 * yysize;
1241       if (! (yysize <= *yymsg_alloc
1242              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1243         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1244       return 1;
1245     }
1246
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.  */
1250   {
1251     char *yyp = *yymsg;
1252     int yyi = 0;
1253     while ((*yyp = *yyformat) != '\0')
1254       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1255         {
1256           yyp += yytnamerr (yyp, yyarg[yyi++]);
1257           yyformat += 2;
1258         }
1259       else
1260         {
1261           yyp++;
1262           yyformat++;
1263         }
1264   }
1265   return 0;
1266 }
1267 #endif /* YYERROR_VERBOSE */
1268
1269 /*-----------------------------------------------.
1270 | Release the memory associated to this symbol.  |
1271 `-----------------------------------------------*/
1272
1273 /*ARGSUSED*/
1274 #if (defined __STDC__ || defined __C99__FUNC__ \
1275      || defined __cplusplus || defined _MSC_VER)
1276 static void
1277 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, ap_expr_parse_ctx_t *ctx)
1278 #else
1279 static void
1280 yydestruct (yymsg, yytype, yyvaluep, ctx)
1281     const char *yymsg;
1282     int yytype;
1283     YYSTYPE *yyvaluep;
1284     ap_expr_parse_ctx_t *ctx;
1285 #endif
1286 {
1287   YYUSE (yyvaluep);
1288   YYUSE (ctx);
1289
1290   if (!yymsg)
1291     yymsg = "Deleting";
1292   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1293
1294   YYUSE (yytype);
1295 }
1296
1297
1298
1299
1300 /*----------.
1301 | yyparse.  |
1302 `----------*/
1303
1304 #ifdef YYPARSE_PARAM
1305 #if (defined __STDC__ || defined __C99__FUNC__ \
1306      || defined __cplusplus || defined _MSC_VER)
1307 int
1308 yyparse (void *YYPARSE_PARAM)
1309 #else
1310 int
1311 yyparse (YYPARSE_PARAM)
1312     void *YYPARSE_PARAM;
1313 #endif
1314 #else /* ! YYPARSE_PARAM */
1315 #if (defined __STDC__ || defined __C99__FUNC__ \
1316      || defined __cplusplus || defined _MSC_VER)
1317 int
1318 yyparse (ap_expr_parse_ctx_t *ctx)
1319 #else
1320 int
1321 yyparse (ctx)
1322     ap_expr_parse_ctx_t *ctx;
1323 #endif
1324 #endif
1325 {
1326 /* The lookahead symbol.  */
1327 int yychar;
1328
1329
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")
1338 #else
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
1343 #endif
1344 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1345 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1346 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1347 #endif
1348 #ifndef YY_INITIAL_VALUE
1349 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1350 #endif
1351
1352 /* The semantic value of the lookahead symbol.  */
1353 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1354
1355     /* Number of syntax errors so far.  */
1356     int yynerrs;
1357
1358     int yystate;
1359     /* Number of tokens to shift before error messages enabled.  */
1360     int yyerrstatus;
1361
1362     /* The stacks and their tools:
1363        `yyss': related to states.
1364        `yyvs': related to semantic values.
1365
1366        Refer to the stacks through separate pointers, to allow yyoverflow
1367        to reallocate them elsewhere.  */
1368
1369     /* The state stack.  */
1370     yytype_int16 yyssa[YYINITDEPTH];
1371     yytype_int16 *yyss;
1372     yytype_int16 *yyssp;
1373
1374     /* The semantic value stack.  */
1375     YYSTYPE yyvsa[YYINITDEPTH];
1376     YYSTYPE *yyvs;
1377     YYSTYPE *yyvsp;
1378
1379     YYSIZE_T yystacksize;
1380
1381   int yyn;
1382   int yyresult;
1383   /* Lookahead token as an internal (translated) token number.  */
1384   int yytoken = 0;
1385   /* The variables used to return semantic value and location from the
1386      action routines.  */
1387   YYSTYPE yyval;
1388
1389 #if YYERROR_VERBOSE
1390   /* Buffer for error messages, and its allocated size.  */
1391   char yymsgbuf[128];
1392   char *yymsg = yymsgbuf;
1393   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1394 #endif
1395
1396 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1397
1398   /* The number of symbols on the RHS of the reduced rule.
1399      Keep to zero when no symbol should be popped.  */
1400   int yylen = 0;
1401
1402   yyssp = yyss = yyssa;
1403   yyvsp = yyvs = yyvsa;
1404   yystacksize = YYINITDEPTH;
1405
1406   YYDPRINTF ((stderr, "Starting parse\n"));
1407
1408   yystate = 0;
1409   yyerrstatus = 0;
1410   yynerrs = 0;
1411   yychar = YYEMPTY; /* Cause a token to be read.  */
1412   goto yysetstate;
1413
1414 /*------------------------------------------------------------.
1415 | yynewstate -- Push a new state, which is found in yystate.  |
1416 `------------------------------------------------------------*/
1417  yynewstate:
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.  */
1420   yyssp++;
1421
1422  yysetstate:
1423   *yyssp = yystate;
1424
1425   if (yyss + yystacksize - 1 <= yyssp)
1426     {
1427       /* Get the current used size of the three stacks, in elements.  */
1428       YYSIZE_T yysize = yyssp - yyss + 1;
1429
1430 #ifdef yyoverflow
1431       {
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
1434            memory.  */
1435         YYSTYPE *yyvs1 = yyvs;
1436         yytype_int16 *yyss1 = yyss;
1437
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),
1445                     &yystacksize);
1446
1447         yyss = yyss1;
1448         yyvs = yyvs1;
1449       }
1450 #else /* no yyoverflow */
1451 # ifndef YYSTACK_RELOCATE
1452       goto yyexhaustedlab;
1453 # else
1454       /* Extend the stack our own way.  */
1455       if (YYMAXDEPTH <= yystacksize)
1456         goto yyexhaustedlab;
1457       yystacksize *= 2;
1458       if (YYMAXDEPTH < yystacksize)
1459         yystacksize = YYMAXDEPTH;
1460
1461       {
1462         yytype_int16 *yyss1 = yyss;
1463         union yyalloc *yyptr =
1464           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1465         if (! yyptr)
1466           goto yyexhaustedlab;
1467         YYSTACK_RELOCATE (yyss_alloc, yyss);
1468         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1469 #  undef YYSTACK_RELOCATE
1470         if (yyss1 != yyssa)
1471           YYSTACK_FREE (yyss1);
1472       }
1473 # endif
1474 #endif /* no yyoverflow */
1475
1476       yyssp = yyss + yysize - 1;
1477       yyvsp = yyvs + yysize - 1;
1478
1479       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1480                   (unsigned long int) yystacksize));
1481
1482       if (yyss + yystacksize - 1 <= yyssp)
1483         YYABORT;
1484     }
1485
1486   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1487
1488   if (yystate == YYFINAL)
1489     YYACCEPT;
1490
1491   goto yybackup;
1492
1493 /*-----------.
1494 | yybackup.  |
1495 `-----------*/
1496 yybackup:
1497
1498   /* Do appropriate processing given the current state.  Read a
1499      lookahead token if we need one and don't already have one.  */
1500
1501   /* First try to decide what to do without reference to lookahead token.  */
1502   yyn = yypact[yystate];
1503   if (yypact_value_is_default (yyn))
1504     goto yydefault;
1505
1506   /* Not known => get a lookahead token if don't already have one.  */
1507
1508   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1509   if (yychar == YYEMPTY)
1510     {
1511       YYDPRINTF ((stderr, "Reading a token: "));
1512       yychar = YYLEX;
1513     }
1514
1515   if (yychar <= YYEOF)
1516     {
1517       yychar = yytoken = YYEOF;
1518       YYDPRINTF ((stderr, "Now at end of input.\n"));
1519     }
1520   else
1521     {
1522       yytoken = YYTRANSLATE (yychar);
1523       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1524     }
1525
1526   /* If the proper action on seeing token YYTOKEN is to reduce or to
1527      detect an error, take that action.  */
1528   yyn += yytoken;
1529   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1530     goto yydefault;
1531   yyn = yytable[yyn];
1532   if (yyn <= 0)
1533     {
1534       if (yytable_value_is_error (yyn))
1535         goto yyerrlab;
1536       yyn = -yyn;
1537       goto yyreduce;
1538     }
1539
1540   /* Count tokens shifted since error; after three, turn off error
1541      status.  */
1542   if (yyerrstatus)
1543     yyerrstatus--;
1544
1545   /* Shift the lookahead token.  */
1546   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1547
1548   /* Discard the shifted token.  */
1549   yychar = YYEMPTY;
1550
1551   yystate = yyn;
1552   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1553   *++yyvsp = yylval;
1554   YY_IGNORE_MAYBE_UNINITIALIZED_END
1555
1556   goto yynewstate;
1557
1558
1559 /*-----------------------------------------------------------.
1560 | yydefault -- do the default action for the current state.  |
1561 `-----------------------------------------------------------*/
1562 yydefault:
1563   yyn = yydefact[yystate];
1564   if (yyn == 0)
1565     goto yyerrlab;
1566   goto yyreduce;
1567
1568
1569 /*-----------------------------.
1570 | yyreduce -- Do a reduction.  |
1571 `-----------------------------*/
1572 yyreduce:
1573   /* yyn is the number of a rule to reduce with.  */
1574   yylen = yyr2[yyn];
1575
1576   /* If YYLEN is nonzero, implement the default value of the action:
1577      `$$ = $1'.
1578
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];
1585
1586
1587   YY_REDUCE_PRINT (yyn);
1588   switch (yyn)
1589     {
1590         case 2:
1591 /* Line 1787 of yacc.c  */
1592 #line 128 "util_expr_parse.y"
1593     { ctx->expr = (yyvsp[(2) - (2)].exVal); }
1594     break;
1595
1596   case 3:
1597 /* Line 1787 of yacc.c  */
1598 #line 129 "util_expr_parse.y"
1599     { ctx->expr = (yyvsp[(2) - (2)].exVal); }
1600     break;
1601
1602   case 4:
1603 /* Line 1787 of yacc.c  */
1604 #line 130 "util_expr_parse.y"
1605     { YYABORT; }
1606     break;
1607
1608   case 5:
1609 /* Line 1787 of yacc.c  */
1610 #line 133 "util_expr_parse.y"
1611     { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1612     break;
1613
1614   case 6:
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); }
1618     break;
1619
1620   case 7:
1621 /* Line 1787 of yacc.c  */
1622 #line 135 "util_expr_parse.y"
1623     { YYABORT; }
1624     break;
1625
1626   case 8:
1627 /* Line 1787 of yacc.c  */
1628 #line 138 "util_expr_parse.y"
1629     { (yyval.exVal) = ap_expr_make(op_True,        NULL, NULL, ctx); }
1630     break;
1631
1632   case 9:
1633 /* Line 1787 of yacc.c  */
1634 #line 139 "util_expr_parse.y"
1635     { (yyval.exVal) = ap_expr_make(op_False,       NULL, NULL, ctx); }
1636     break;
1637
1638   case 10:
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); }
1642     break;
1643
1644   case 11:
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); }
1648     break;
1649
1650   case 12:
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); }
1654     break;
1655
1656   case 13:
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); }
1660     break;
1661
1662   case 14:
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); }
1666     break;
1667
1668   case 15:
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); }
1672     break;
1673
1674   case 16:
1675 /* Line 1787 of yacc.c  */
1676 #line 146 "util_expr_parse.y"
1677     { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1678     break;
1679
1680   case 17:
1681 /* Line 1787 of yacc.c  */
1682 #line 147 "util_expr_parse.y"
1683     { YYABORT; }
1684     break;
1685
1686   case 18:
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); }
1690     break;
1691
1692   case 19:
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); }
1696     break;
1697
1698   case 20:
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); }
1702     break;
1703
1704   case 21:
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); }
1708     break;
1709
1710   case 22:
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); }
1714     break;
1715
1716   case 23:
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); }
1720     break;
1721
1722   case 24:
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); }
1726     break;
1727
1728   case 25:
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); }
1732     break;
1733
1734   case 26:
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); }
1738     break;
1739
1740   case 27:
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); }
1744     break;
1745
1746   case 28:
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); }
1750     break;
1751
1752   case 29:
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); }
1756     break;
1757
1758   case 30:
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); }
1762     break;
1763
1764   case 31:
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); }
1768     break;
1769
1770   case 32:
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); }
1774     break;
1775
1776   case 33:
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); }
1780     break;
1781
1782   case 34:
1783 /* Line 1787 of yacc.c  */
1784 #line 168 "util_expr_parse.y"
1785     { (yyval.exVal) = ap_expr_make(op_String, "", NULL, ctx); }
1786     break;
1787
1788   case 35:
1789 /* Line 1787 of yacc.c  */
1790 #line 169 "util_expr_parse.y"
1791     { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1792     break;
1793
1794   case 36:
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); }
1798     break;
1799
1800   case 37:
1801 /* Line 1787 of yacc.c  */
1802 #line 171 "util_expr_parse.y"
1803     { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1804     break;
1805
1806   case 38:
1807 /* Line 1787 of yacc.c  */
1808 #line 172 "util_expr_parse.y"
1809     { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1810     break;
1811
1812   case 39:
1813 /* Line 1787 of yacc.c  */
1814 #line 173 "util_expr_parse.y"
1815     { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1816     break;
1817
1818   case 40:
1819 /* Line 1787 of yacc.c  */
1820 #line 174 "util_expr_parse.y"
1821     { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1822     break;
1823
1824   case 41:
1825 /* Line 1787 of yacc.c  */
1826 #line 175 "util_expr_parse.y"
1827     { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1828     break;
1829
1830   case 42:
1831 /* Line 1787 of yacc.c  */
1832 #line 178 "util_expr_parse.y"
1833     { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1834     break;
1835
1836   case 43:
1837 /* Line 1787 of yacc.c  */
1838 #line 179 "util_expr_parse.y"
1839     { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1840     break;
1841
1842   case 44:
1843 /* Line 1787 of yacc.c  */
1844 #line 180 "util_expr_parse.y"
1845     { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1846     break;
1847
1848   case 45:
1849 /* Line 1787 of yacc.c  */
1850 #line 181 "util_expr_parse.y"
1851     { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); }
1852     break;
1853
1854   case 46:
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); }
1858     break;
1859
1860   case 47:
1861 /* Line 1787 of yacc.c  */
1862 #line 185 "util_expr_parse.y"
1863     { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
1864     break;
1865
1866   case 48:
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); }
1870     break;
1871
1872   case 49:
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); }
1876     break;
1877
1878   case 50:
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); }
1882     break;
1883
1884   case 51:
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); }
1888     break;
1889
1890   case 52:
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); }
1894     break;
1895
1896   case 53:
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); }
1900     break;
1901
1902   case 54:
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); }
1906     break;
1907
1908   case 55:
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); }
1912     break;
1913
1914   case 56:
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); }
1918     break;
1919
1920   case 57:
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); }
1924     break;
1925
1926   case 58:
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); }
1930     break;
1931
1932   case 59:
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); }
1936     break;
1937
1938   case 60:
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); }
1942     break;
1943
1944   case 61:
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); }
1948     break;
1949
1950   case 62:
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); }
1954     break;
1955
1956   case 63:
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); }
1960     break;
1961
1962   case 64:
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); }
1966     break;
1967
1968   case 65:
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); }
1972     break;
1973
1974   case 66:
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); }
1978     break;
1979
1980   case 67:
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); }
1984     break;
1985
1986   case 68:
1987 /* Line 1787 of yacc.c  */
1988 #line 223 "util_expr_parse.y"
1989     {
1990                 ap_expr_t *e = ap_expr_regex_make((yyvsp[(2) - (3)].cpVal), NULL, (yyvsp[(3) - (3)].cpVal), ctx);
1991                 if (!e) {
1992                     ctx->error = "Failed to compile regular expression";
1993                     YYERROR;
1994                 }
1995                 (yyval.exVal) = e;
1996             }
1997     break;
1998
1999   case 69:
2000 /* Line 1787 of yacc.c  */
2001 #line 232 "util_expr_parse.y"
2002     {
2003                 ap_expr_t *e = ap_expr_regex_make((yyvsp[(2) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), (yyvsp[(4) - (4)].cpVal), ctx);
2004                 if (!e) {
2005                     ctx->error = "Failed to compile regular expression";
2006                     YYERROR;
2007                 }
2008                 (yyval.exVal) = e;
2009             }
2010     break;
2011
2012   case 70:
2013 /* Line 1787 of yacc.c  */
2014 #line 241 "util_expr_parse.y"
2015     { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
2016     break;
2017
2018   case 71:
2019 /* Line 1787 of yacc.c  */
2020 #line 242 "util_expr_parse.y"
2021     { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); }
2022     break;
2023
2024
2025 /* Line 1787 of yacc.c  */
2026 #line 2027 "util_expr_parse.c"
2027       default: break;
2028     }
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);
2041
2042   YYPOPSTACK (yylen);
2043   yylen = 0;
2044   YY_STACK_PRINT (yyss, yyssp);
2045
2046   *++yyvsp = yyval;
2047
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.  */
2051
2052   yyn = yyr1[yyn];
2053
2054   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2055   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2056     yystate = yytable[yystate];
2057   else
2058     yystate = yydefgoto[yyn - YYNTOKENS];
2059
2060   goto yynewstate;
2061
2062
2063 /*------------------------------------.
2064 | yyerrlab -- here on detecting error |
2065 `------------------------------------*/
2066 yyerrlab:
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);
2070
2071   /* If not already recovering from an error, report this error.  */
2072   if (!yyerrstatus)
2073     {
2074       ++yynerrs;
2075 #if ! YYERROR_VERBOSE
2076       yyerror (ctx, YY_("syntax error"));
2077 #else
2078 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2079                                         yyssp, yytoken)
2080       {
2081         char const *yymsgp = YY_("syntax error");
2082         int yysyntax_error_status;
2083         yysyntax_error_status = YYSYNTAX_ERROR;
2084         if (yysyntax_error_status == 0)
2085           yymsgp = yymsg;
2086         else if (yysyntax_error_status == 1)
2087           {
2088             if (yymsg != yymsgbuf)
2089               YYSTACK_FREE (yymsg);
2090             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2091             if (!yymsg)
2092               {
2093                 yymsg = yymsgbuf;
2094                 yymsg_alloc = sizeof yymsgbuf;
2095                 yysyntax_error_status = 2;
2096               }
2097             else
2098               {
2099                 yysyntax_error_status = YYSYNTAX_ERROR;
2100                 yymsgp = yymsg;
2101               }
2102           }
2103         yyerror (ctx, yymsgp);
2104         if (yysyntax_error_status == 2)
2105           goto yyexhaustedlab;
2106       }
2107 # undef YYSYNTAX_ERROR
2108 #endif
2109     }
2110
2111
2112
2113   if (yyerrstatus == 3)
2114     {
2115       /* If just tried and failed to reuse lookahead token after an
2116          error, discard it.  */
2117
2118       if (yychar <= YYEOF)
2119         {
2120           /* Return failure if at end of input.  */
2121           if (yychar == YYEOF)
2122             YYABORT;
2123         }
2124       else
2125         {
2126           yydestruct ("Error: discarding",
2127                       yytoken, &yylval, ctx);
2128           yychar = YYEMPTY;
2129         }
2130     }
2131
2132   /* Else will try to reuse lookahead token after shifting the error
2133      token.  */
2134   goto yyerrlab1;
2135
2136
2137 /*---------------------------------------------------.
2138 | yyerrorlab -- error raised explicitly by YYERROR.  |
2139 `---------------------------------------------------*/
2140 yyerrorlab:
2141
2142   /* Pacify compilers like GCC when the user code never invokes
2143      YYERROR and the label yyerrorlab therefore never appears in user
2144      code.  */
2145   if (/*CONSTCOND*/ 0)
2146      goto yyerrorlab;
2147
2148   /* Do not reclaim the symbols of the rule which action triggered
2149      this YYERROR.  */
2150   YYPOPSTACK (yylen);
2151   yylen = 0;
2152   YY_STACK_PRINT (yyss, yyssp);
2153   yystate = *yyssp;
2154   goto yyerrlab1;
2155
2156
2157 /*-------------------------------------------------------------.
2158 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
2159 `-------------------------------------------------------------*/
2160 yyerrlab1:
2161   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
2162
2163   for (;;)
2164     {
2165       yyn = yypact[yystate];
2166       if (!yypact_value_is_default (yyn))
2167         {
2168           yyn += YYTERROR;
2169           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2170             {
2171               yyn = yytable[yyn];
2172               if (0 < yyn)
2173                 break;
2174             }
2175         }
2176
2177       /* Pop the current state because it cannot handle the error token.  */
2178       if (yyssp == yyss)
2179         YYABORT;
2180
2181
2182       yydestruct ("Error: popping",
2183                   yystos[yystate], yyvsp, ctx);
2184       YYPOPSTACK (1);
2185       yystate = *yyssp;
2186       YY_STACK_PRINT (yyss, yyssp);
2187     }
2188
2189   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2190   *++yyvsp = yylval;
2191   YY_IGNORE_MAYBE_UNINITIALIZED_END
2192
2193
2194   /* Shift the error token.  */
2195   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2196
2197   yystate = yyn;
2198   goto yynewstate;
2199
2200
2201 /*-------------------------------------.
2202 | yyacceptlab -- YYACCEPT comes here.  |
2203 `-------------------------------------*/
2204 yyacceptlab:
2205   yyresult = 0;
2206   goto yyreturn;
2207
2208 /*-----------------------------------.
2209 | yyabortlab -- YYABORT comes here.  |
2210 `-----------------------------------*/
2211 yyabortlab:
2212   yyresult = 1;
2213   goto yyreturn;
2214
2215 #if !defined yyoverflow || YYERROR_VERBOSE
2216 /*-------------------------------------------------.
2217 | yyexhaustedlab -- memory exhaustion comes here.  |
2218 `-------------------------------------------------*/
2219 yyexhaustedlab:
2220   yyerror (ctx, YY_("memory exhausted"));
2221   yyresult = 2;
2222   /* Fall through.  */
2223 #endif
2224
2225 yyreturn:
2226   if (yychar != YYEMPTY)
2227     {
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);
2233     }
2234   /* Do not reclaim the symbols of the rule which action triggered
2235      this YYABORT or YYACCEPT.  */
2236   YYPOPSTACK (yylen);
2237   YY_STACK_PRINT (yyss, yyssp);
2238   while (yyssp != yyss)
2239     {
2240       yydestruct ("Cleanup: popping",
2241                   yystos[*yyssp], yyvsp, ctx);
2242       YYPOPSTACK (1);
2243     }
2244 #ifndef yyoverflow
2245   if (yyss != yyssa)
2246     YYSTACK_FREE (yyss);
2247 #endif
2248 #if YYERROR_VERBOSE
2249   if (yymsg != yymsgbuf)
2250     YYSTACK_FREE (yymsg);
2251 #endif
2252   /* Make sure YYID is used.  */
2253   return YYID (yyresult);
2254 }
2255
2256
2257 /* Line 2050 of yacc.c  */
2258 #line 245 "util_expr_parse.y"
2259
2260
2261 void yyerror(ap_expr_parse_ctx_t *ctx, const char *s)
2262 {
2263     /* s is allocated on the stack */
2264     ctx->error = apr_pstrdup(ctx->ptemp, s);
2265 }
2266