Coverage Report

Created: 2023-03-26 06:28

/src/httpd/server/util_expr_parse.c
Line
Count
Source (jump to first uncovered line)
1
/* A Bison parser, made by GNU Bison 3.0.5.  */
2
3
/* Bison implementation for Yacc-like parsers in C
4
5
   Copyright (C) 1984, 1989-1990, 2000-2015, 2018 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 "3.0.5"
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
76.5k
#define yylex           ap_expr_yylex
65
8
#define yyerror         ap_expr_yyerror
66
#define yydebug         ap_expr_yydebug
67
1.53k
#define yynerrs         ap_expr_yynerrs
68
69
70
/* Copy the first part of user declarations.  */
71
#line 31 "util_expr_parse.y" /* yacc.c:339  */
72
73
#include "util_expr_private.h"
74
75
#line 76 "util_expr_parse.c" /* yacc.c:339  */
76
77
# ifndef YY_NULLPTR
78
#  if defined __cplusplus && 201103L <= __cplusplus
79
#   define YY_NULLPTR nullptr
80
#  else
81
24
#   define YY_NULLPTR 0
82
#  endif
83
# endif
84
85
/* Enabling verbose error messages.  */
86
#ifdef YYERROR_VERBOSE
87
# undef YYERROR_VERBOSE
88
# define YYERROR_VERBOSE 1
89
#else
90
# define YYERROR_VERBOSE 1
91
#endif
92
93
/* In a future release of Bison, this section will be replaced
94
   by #include "util_expr_parse.h".  */
95
#ifndef YY_AP_EXPR_YY_UTIL_EXPR_PARSE_H_INCLUDED
96
# define YY_AP_EXPR_YY_UTIL_EXPR_PARSE_H_INCLUDED
97
/* Debug traces.  */
98
#ifndef YYDEBUG
99
# define YYDEBUG 0
100
#endif
101
#if YYDEBUG
102
extern int ap_expr_yydebug;
103
#endif
104
105
/* Token type.  */
106
#ifndef YYTOKENTYPE
107
# define YYTOKENTYPE
108
  enum yytokentype
109
  {
110
    T_TRUE = 258,
111
    T_FALSE = 259,
112
    T_EXPR_BOOL = 260,
113
    T_EXPR_STRING = 261,
114
    T_ERROR = 262,
115
    T_DIGIT = 263,
116
    T_ID = 264,
117
    T_STRING = 265,
118
    T_REGEX = 266,
119
    T_REGSUB = 267,
120
    T_REG_MATCH = 268,
121
    T_REG_SUBST = 269,
122
    T_REG_FLAGS = 270,
123
    T_BACKREF = 271,
124
    T_OP_UNARY = 272,
125
    T_OP_BINARY = 273,
126
    T_STR_BEGIN = 274,
127
    T_STR_END = 275,
128
    T_VAR_BEGIN = 276,
129
    T_VAR_END = 277,
130
    T_VAREXP_BEGIN = 278,
131
    T_VAREXP_END = 279,
132
    T_OP_EQ = 280,
133
    T_OP_NE = 281,
134
    T_OP_LT = 282,
135
    T_OP_LE = 283,
136
    T_OP_GT = 284,
137
    T_OP_GE = 285,
138
    T_OP_REG = 286,
139
    T_OP_NRE = 287,
140
    T_OP_IN = 288,
141
    T_OP_STR_EQ = 289,
142
    T_OP_STR_NE = 290,
143
    T_OP_STR_LT = 291,
144
    T_OP_STR_LE = 292,
145
    T_OP_STR_GT = 293,
146
    T_OP_STR_GE = 294,
147
    T_OP_CONCAT = 295,
148
    T_OP_JOIN = 296,
149
    T_OP_SPLIT = 297,
150
    T_OP_SUB = 298,
151
    T_OP_OR = 299,
152
    T_OP_AND = 300,
153
    T_OP_NOT = 301
154
  };
155
#endif
156
157
/* Value type.  */
158
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
159
160
union YYSTYPE
161
{
162
#line 35 "util_expr_parse.y" /* yacc.c:355  */
163
164
    char      *cpVal;
165
    ap_expr_t *exVal;
166
    int        num;
167
168
#line 169 "util_expr_parse.c" /* yacc.c:355  */
169
};
170
171
typedef union YYSTYPE YYSTYPE;
172
# define YYSTYPE_IS_TRIVIAL 1
173
# define YYSTYPE_IS_DECLARED 1
174
#endif
175
176
177
178
int ap_expr_yyparse (ap_expr_parse_ctx_t *ctx);
179
180
#endif /* !YY_AP_EXPR_YY_UTIL_EXPR_PARSE_H_INCLUDED  */
181
182
/* Copy the second part of user declarations.  */
183
#line 118 "util_expr_parse.y" /* yacc.c:358  */
184
185
#include "util_expr_private.h"
186
76.5k
#define yyscanner ctx->scanner
187
188
int ap_expr_yylex(YYSTYPE *lvalp, void *scanner);
189
190
#line 191 "util_expr_parse.c" /* yacc.c:358  */
191
192
#ifdef short
193
# undef short
194
#endif
195
196
#ifdef YYTYPE_UINT8
197
typedef YYTYPE_UINT8 yytype_uint8;
198
#else
199
typedef unsigned char yytype_uint8;
200
#endif
201
202
#ifdef YYTYPE_INT8
203
typedef YYTYPE_INT8 yytype_int8;
204
#else
205
typedef signed char yytype_int8;
206
#endif
207
208
#ifdef YYTYPE_UINT16
209
typedef YYTYPE_UINT16 yytype_uint16;
210
#else
211
typedef unsigned short int yytype_uint16;
212
#endif
213
214
#ifdef YYTYPE_INT16
215
typedef YYTYPE_INT16 yytype_int16;
216
#else
217
typedef short int yytype_int16;
218
#endif
219
220
#ifndef YYSIZE_T
221
# ifdef __SIZE_TYPE__
222
3.10k
#  define YYSIZE_T __SIZE_TYPE__
223
# elif defined size_t
224
#  define YYSIZE_T size_t
225
# elif ! defined YYSIZE_T
226
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
227
#  define YYSIZE_T size_t
228
# else
229
#  define YYSIZE_T unsigned int
230
# endif
231
#endif
232
233
16
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
234
235
#ifndef YY_
236
# if defined YYENABLE_NLS && YYENABLE_NLS
237
#  if ENABLE_NLS
238
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
239
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
240
#  endif
241
# endif
242
# ifndef YY_
243
8
#  define YY_(Msgid) Msgid
244
# endif
245
#endif
246
247
#ifndef YY_ATTRIBUTE
248
# if (defined __GNUC__                                               \
249
      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
250
     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
251
#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
252
# else
253
#  define YY_ATTRIBUTE(Spec) /* empty */
254
# endif
255
#endif
256
257
#ifndef YY_ATTRIBUTE_PURE
258
# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
259
#endif
260
261
#ifndef YY_ATTRIBUTE_UNUSED
262
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
263
#endif
264
265
#if !defined _Noreturn \
266
     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
267
# if defined _MSC_VER && 1200 <= _MSC_VER
268
#  define _Noreturn __declspec (noreturn)
269
# else
270
#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
271
# endif
272
#endif
273
274
/* Suppress unused-variable warnings by "using" E.  */
275
#if ! defined lint || defined __GNUC__
276
8.69k
# define YYUSE(E) ((void) (E))
277
#else
278
# define YYUSE(E) /* empty */
279
#endif
280
281
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
282
/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
283
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
284
    _Pragma ("GCC diagnostic push") \
285
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
286
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
287
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
288
    _Pragma ("GCC diagnostic pop")
289
#else
290
3.05k
# define YY_INITIAL_VALUE(Value) Value
291
#endif
292
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
293
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
294
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
295
#endif
296
#ifndef YY_INITIAL_VALUE
297
# define YY_INITIAL_VALUE(Value) /* Nothing. */
298
#endif
299
300
301
#if ! defined yyoverflow || YYERROR_VERBOSE
302
303
/* The parser invokes alloca or malloc; define the necessary symbols.  */
304
305
# ifdef YYSTACK_USE_ALLOCA
306
#  if YYSTACK_USE_ALLOCA
307
#   ifdef __GNUC__
308
#    define YYSTACK_ALLOC __builtin_alloca
309
#   elif defined __BUILTIN_VA_ARG_INCR
310
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
311
#   elif defined _AIX
312
#    define YYSTACK_ALLOC __alloca
313
#   elif defined _MSC_VER
314
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
315
#    define alloca _alloca
316
#   else
317
#    define YYSTACK_ALLOC alloca
318
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
319
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
320
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
321
#     ifndef EXIT_SUCCESS
322
#      define EXIT_SUCCESS 0
323
#     endif
324
#    endif
325
#   endif
326
#  endif
327
# endif
328
329
# ifdef YYSTACK_ALLOC
330
   /* Pacify GCC's 'empty if-body' warning.  */
331
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
332
#  ifndef YYSTACK_ALLOC_MAXIMUM
333
    /* The OS might guarantee only one guard page at the bottom of the stack,
334
       and a page size can be as small as 4096 bytes.  So we cannot safely
335
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
336
       to allow for a few compiler-allocated temporary stack slots.  */
337
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
338
#  endif
339
# else
340
0
#  define YYSTACK_ALLOC YYMALLOC
341
0
#  define YYSTACK_FREE YYFREE
342
#  ifndef YYSTACK_ALLOC_MAXIMUM
343
16
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
344
#  endif
345
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
346
       && ! ((defined YYMALLOC || defined malloc) \
347
             && (defined YYFREE || defined free)))
348
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
349
#   ifndef EXIT_SUCCESS
350
#    define EXIT_SUCCESS 0
351
#   endif
352
#  endif
353
#  ifndef YYMALLOC
354
0
#   define YYMALLOC malloc
355
#   if ! defined malloc && ! defined EXIT_SUCCESS
356
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
357
#   endif
358
#  endif
359
#  ifndef YYFREE
360
0
#   define YYFREE free
361
#   if ! defined free && ! defined EXIT_SUCCESS
362
void free (void *); /* INFRINGES ON USER NAME SPACE */
363
#   endif
364
#  endif
365
# endif
366
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
367
368
369
#if (! defined yyoverflow \
370
     && (! defined __cplusplus \
371
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
372
373
/* A type that is properly aligned for any stack member.  */
374
union yyalloc
375
{
376
  yytype_int16 yyss_alloc;
377
  YYSTYPE yyvs_alloc;
378
};
379
380
/* The size of the maximum gap between one aligned stack and the next.  */
381
0
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
382
383
/* The size of an array large to enough to hold all stacks, each with
384
   N elements.  */
385
# define YYSTACK_BYTES(N) \
386
0
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
387
0
      + YYSTACK_GAP_MAXIMUM)
388
389
# define YYCOPY_NEEDED 1
390
391
/* Relocate STACK from its old location to the new one.  The
392
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
393
   elements in the stack, and YYPTR gives the new location of the
394
   stack.  Advance YYPTR to a properly aligned location for the next
395
   stack.  */
396
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
397
0
    do                                                                  \
398
0
      {                                                                 \
399
0
        YYSIZE_T yynewbytes;                                            \
400
0
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
401
0
        Stack = &yyptr->Stack_alloc;                                    \
402
0
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
403
0
        yyptr += yynewbytes / sizeof (*yyptr);                          \
404
0
      }                                                                 \
405
0
    while (0)
406
407
#endif
408
409
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
410
/* Copy COUNT objects from SRC to DST.  The source and destination do
411
   not overlap.  */
412
# ifndef YYCOPY
413
#  if defined __GNUC__ && 1 < __GNUC__
414
#   define YYCOPY(Dst, Src, Count) \
415
0
      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
416
#  else
417
#   define YYCOPY(Dst, Src, Count)              \
418
      do                                        \
419
        {                                       \
420
          YYSIZE_T yyi;                         \
421
          for (yyi = 0; yyi < (Count); yyi++)   \
422
            (Dst)[yyi] = (Src)[yyi];            \
423
        }                                       \
424
      while (0)
425
#  endif
426
# endif
427
#endif /* !YYCOPY_NEEDED */
428
429
/* YYFINAL -- State number of the termination state.  */
430
264k
#define YYFINAL  31
431
/* YYLAST -- Last index in YYTABLE.  */
432
375k
#define YYLAST   274
433
434
/* YYNTOKENS -- Number of terminals.  */
435
262k
#define YYNTOKENS  53
436
/* YYNNTS -- Number of nonterminals.  */
437
#define YYNNTS  18
438
/* YYNRULES -- Number of rules.  */
439
#define YYNRULES  71
440
/* YYNSTATES -- Number of states.  */
441
#define YYNSTATES  154
442
443
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
444
   by yylex, with out-of-bounds checking.  */
445
0
#define YYUNDEFTOK  2
446
75.1k
#define YYMAXUTOK   301
447
448
#define YYTRANSLATE(YYX)                                                \
449
75.1k
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
450
451
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
452
   as returned by yylex, without out-of-bounds checking.  */
453
static const yytype_uint8 yytranslate[] =
454
{
455
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
456
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
457
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
458
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
459
      47,    48,     2,     2,    52,     2,     2,     2,     2,     2,
460
       2,     2,     2,     2,     2,     2,     2,     2,    51,     2,
461
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
462
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
463
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
464
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
465
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
466
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
467
       2,     2,     2,    49,     2,    50,     2,     2,     2,     2,
468
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
469
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
470
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
471
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
472
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
473
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
474
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
475
       2,     2,     2,     2,     2,     2,     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,     1,     2,     3,     4,
481
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
482
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
483
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
484
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
485
      45,    46
486
};
487
488
#if YYDEBUG
489
  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
490
static const yytype_uint8 yyrline[] =
491
{
492
       0,   128,   128,   129,   130,   133,   134,   135,   138,   139,
493
     140,   141,   142,   143,   144,   145,   146,   147,   150,   151,
494
     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
495
     162,   163,   164,   167,   168,   169,   170,   171,   172,   173,
496
     174,   175,   178,   179,   180,   181,   184,   185,   188,   189,
497
     190,   191,   192,   195,   196,   199,   203,   204,   207,   208,
498
     209,   210,   213,   214,   215,   216,   219,   220,   223,   232,
499
     241,   242
500
};
501
#endif
502
503
#if YYDEBUG || YYERROR_VERBOSE || 1
504
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
505
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
506
static const char *const yytname[] =
507
{
508
  "$end", "error", "$undefined", "\"true\"", "\"false\"",
509
  "\"boolean expression\"", "\"string expression\"", "\"error token\"",
510
  "\"number\"", "\"identifier\"", "\"string literal\"",
511
  "\"start of matching regex\"", "\"start of substitution regex\"",
512
  "\"pattern of the regex\"", "\"substitution of the regex\"",
513
  "\"pattern flags of the regex\"", "\"regex back reference\"",
514
  "\"unary operator\"", "\"binary operator\"", "\"start of string\"",
515
  "\"end of string\"", "\"start of variable name\"",
516
  "\"end of variable name\"", "\"start of variable expression\"",
517
  "\"end of variable expression\"", "\"integer equal\"",
518
  "\"integer not equal\"", "\"integer less than\"",
519
  "\"integer less or equal\"", "\"integer greater than\"",
520
  "\"integer greater or equal\"", "\"regex match\"", "\"regex non-match\"",
521
  "\"contained in\"", "\"string equal\"", "\"string not equal\"",
522
  "\"string less than\"", "\"string less or equal\"",
523
  "\"string greater than\"", "\"string greater or equal\"",
524
  "\"string concatenation\"", "\"join operator\"", "\"split operator\"",
525
  "\"substitute operator\"", "\"logical or\"", "\"logical and\"",
526
  "\"logical not\"", "'('", "')'", "'{'", "'}'", "':'", "','", "$accept",
527
  "cond", "comp", "strfunc", "listfunc", "list", "words", "word", "string",
528
  "substr", "var", "regex", "regsub", "regany", "split", "join", "sub",
529
  "expr", YY_NULLPTR
530
};
531
#endif
532
533
# ifdef YYPRINT
534
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
535
   (internal) symbol number NUM (which must be that of a token).  */
536
static const yytype_uint16 yytoknum[] =
537
{
538
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
539
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
540
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
541
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
542
     295,   296,   297,   298,   299,   300,   301,    40,    41,   123,
543
     125,    58,    44
544
};
545
# endif
546
547
#define YYPACT_NINF -38
548
549
#define yypact_value_is_default(Yystate) \
550
263k
  (!!((Yystate) == (-38)))
551
552
#define YYTABLE_NINF -1
553
554
#define yytable_value_is_error(Yytable_value) \
555
0
  0
556
557
  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
558
     STATE-NUM.  */
559
static const yytype_int16 yypact[] =
560
{
561
     148,   126,   101,   -38,     9,   -38,   -38,   -38,   -38,   -33,
562
     -38,   171,    93,    22,   126,    52,    -4,   126,   126,    18,
563
     -38,   -38,   170,   -38,   -38,   -38,   -38,   -38,   136,   -38,
564
     -38,   -38,   171,   171,     1,   -38,    66,     2,    -5,   220,
565
      32,     5,    55,   171,   -38,    13,   -38,    77,    81,    46,
566
     -38,    96,   195,   126,   126,   171,   171,   171,   171,   171,
567
     171,   171,    95,    95,    55,   171,   171,   171,   171,   171,
568
     171,   171,   -38,    83,   -22,   -25,   -38,   -38,   101,   -38,
569
     -38,   171,   135,    57,   -38,   -38,   104,    55,   -14,   110,
570
     -27,   171,   101,   112,   171,   -38,   -38,   117,   -38,     1,
571
       1,     1,     1,     1,     1,     1,   -38,   -38,   -38,     1,
572
       1,     1,     1,     1,     1,     1,   -38,   -38,   171,   116,
573
     -20,   151,   118,   142,   120,   -38,   171,   -38,     1,   251,
574
     171,     1,   -38,   -38,   -38,   -38,   142,   124,   142,   -38,
575
       1,   -38,    27,   -38,    44,   127,    48,   171,   -38,   -38,
576
     -38,   -38,    26,   -38
577
};
578
579
  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
580
     Performed when YYTABLE does not specify something else to do.  Zero
581
     means the default is an error.  */
582
static const yytype_uint8 yydefact[] =
583
{
584
       0,     0,     0,     4,     0,     8,     9,    17,    33,     0,
585
      52,     0,     0,     0,     0,     0,     0,     0,     0,     3,
586
      13,    40,     0,    37,    39,    38,     7,    46,     2,     5,
587
      47,     1,     0,     0,    14,    34,     0,     0,     0,     0,
588
       0,     0,     0,     0,    43,    58,    42,     0,     0,     0,
589
      10,     0,     0,     0,     0,     0,     0,     0,     0,     0,
590
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
591
       0,     0,     6,     0,     0,     0,    35,    48,     0,    50,
592
      51,     0,     0,     0,    70,    71,     0,     0,     0,     0,
593
      66,     0,     0,     0,     0,    16,    41,    11,    12,    15,
594
      18,    19,    20,    21,    22,    23,    30,    31,    32,    24,
595
      25,    26,    27,    28,    29,    36,    54,    53,     0,     0,
596
       0,     0,     0,     0,     0,    45,     0,    44,    60,     0,
597
       0,    56,    67,    49,    55,    68,     0,     0,     0,    62,
598
      64,    45,     0,    69,     0,     0,     0,     0,    61,    57,
599
      63,    65,     0,    53
600
};
601
602
  /* YYPGOTO[NTERM-NUM].  */
603
static const yytype_int8 yypgoto[] =
604
{
605
     -38,    19,   -38,   -38,   -38,   -13,   -37,   -11,    -7,   -24,
606
      -1,    58,    -6,    91,   -38,   -38,   -38,   -38
607
};
608
609
  /* YYDEFGOTO[NTERM-NUM].  */
610
static const yytype_int8 yydefgoto[] =
611
{
612
      -1,    19,    20,    21,    44,   124,    73,    22,    28,    29,
613
      23,    84,    85,    86,    46,    24,    25,     4
614
};
615
616
  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
617
     positive, shift that token.  If negative, reduce the rule whose
618
     number is the opposite.  If YYTABLE_NINF, syntax error.  */
619
static const yytype_uint8 yytable[] =
620
{
621
      34,    30,    45,    39,    72,    36,    89,    52,    47,    31,
622
      49,    30,    72,    71,    32,    71,    82,    47,    71,    79,
623
      71,    74,    75,    96,    77,   118,   117,    30,   134,    88,
624
     118,    37,    90,    38,   125,    30,    50,    51,   126,    53,
625
      54,    71,    93,    48,    99,   100,   101,   102,   103,   104,
626
     105,   108,    83,    78,   109,   110,   111,   112,   113,   114,
627
     115,    40,    53,    54,    40,    91,    71,    71,    82,    47,
628
     120,   119,    97,    98,   153,   148,    27,    30,   118,    81,
629
     128,   132,    10,   131,    71,   129,    76,    13,    71,    14,
630
      92,    30,   149,    47,    41,    72,   151,    41,    94,    42,
631
      26,    43,    87,    27,    43,    72,    82,    90,    26,    10,
632
     139,    27,   140,    35,    13,   142,    14,    10,    30,   144,
633
     106,   107,    13,   145,    14,   146,    27,    75,    30,     5,
634
       6,   116,    10,     7,     8,     9,   152,    13,   133,    14,
635
      53,    54,    10,    11,    95,    12,    27,    13,   121,    14,
636
       8,   137,    10,     1,     2,     3,   123,    13,    10,    14,
637
     127,    12,    54,    13,   130,    14,   135,    15,   141,    16,
638
     136,   147,    17,    18,   122,   150,     0,     0,     0,     8,
639
       9,     0,     0,    15,    41,    16,     0,    10,    55,   138,
640
      12,    43,    13,     0,    14,    56,    57,    58,    59,    60,
641
      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
642
      71,     0,    15,    55,    16,     0,     0,     0,    33,     0,
643
      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
644
      66,    67,    68,    69,    70,    71,     0,     0,    55,     0,
645
       0,     0,     0,    96,    80,    56,    57,    58,    59,    60,
646
      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
647
      71,    27,     0,     0,     0,     0,   143,    10,     0,     0,
648
       0,     0,    13,     0,    14
649
};
650
651
static const yytype_int16 yycheck[] =
652
{
653
      11,     2,    15,    14,    28,    12,    43,    18,    12,     0,
654
      16,    12,    36,    40,    47,    40,    11,    12,    40,    24,
655
      40,    32,    33,    48,    22,    52,    48,    28,    48,    42,
656
      52,     9,    43,    14,    48,    36,    17,    18,    52,    44,
657
      45,    40,    48,    47,    55,    56,    57,    58,    59,    60,
658
      61,    64,    47,    51,    65,    66,    67,    68,    69,    70,
659
      71,     9,    44,    45,     9,    52,    40,    40,    11,    12,
660
      81,    78,    53,    54,    48,    48,    10,    78,    52,    47,
661
      91,   118,    16,    94,    40,    92,    20,    21,    40,    23,
662
      13,    92,    48,    12,    42,   119,    48,    42,    52,    47,
663
       7,    49,    47,    10,    49,   129,    11,   118,     7,    16,
664
     123,    10,   123,    20,    21,   126,    23,    16,   119,   130,
665
      62,    63,    21,   136,    23,   136,    10,   138,   129,     3,
666
       4,    48,    16,     7,     8,     9,   147,    21,    22,    23,
667
      44,    45,    16,    17,    48,    19,    10,    21,    13,    23,
668
       8,     9,    16,     5,     6,     7,    52,    21,    16,    23,
669
      50,    19,    45,    21,    52,    23,    15,    41,    48,    43,
670
      52,    47,    46,    47,    83,    48,    -1,    -1,    -1,     8,
671
       9,    -1,    -1,    41,    42,    43,    -1,    16,    18,    47,
672
      19,    49,    21,    -1,    23,    25,    26,    27,    28,    29,
673
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
674
      40,    -1,    41,    18,    43,    -1,    -1,    -1,    47,    -1,
675
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
676
      35,    36,    37,    38,    39,    40,    -1,    -1,    18,    -1,
677
      -1,    -1,    -1,    48,    24,    25,    26,    27,    28,    29,
678
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
679
      40,    10,    -1,    -1,    -1,    -1,    15,    16,    -1,    -1,
680
      -1,    -1,    21,    -1,    23
681
};
682
683
  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
684
     symbol of state STATE-NUM.  */
685
static const yytype_uint8 yystos[] =
686
{
687
       0,     5,     6,     7,    70,     3,     4,     7,     8,     9,
688
      16,    17,    19,    21,    23,    41,    43,    46,    47,    54,
689
      55,    56,    60,    63,    68,    69,     7,    10,    61,    62,
690
      63,     0,    47,    47,    60,    20,    61,     9,    54,    60,
691
       9,    42,    47,    49,    57,    58,    67,    12,    47,    65,
692
      54,    54,    60,    44,    45,    18,    25,    26,    27,    28,
693
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
694
      39,    40,    62,    59,    60,    60,    20,    22,    51,    24,
695
      24,    47,    11,    47,    64,    65,    66,    47,    58,    59,
696
      60,    52,    13,    65,    52,    48,    48,    54,    54,    60,
697
      60,    60,    60,    60,    60,    60,    64,    64,    58,    60,
698
      60,    60,    60,    60,    60,    60,    48,    48,    52,    61,
699
      60,    13,    66,    52,    58,    48,    52,    50,    60,    61,
700
      52,    60,    59,    22,    48,    15,    52,     9,    47,    58,
701
      60,    48,    60,    15,    60,    58,    60,    47,    48,    48,
702
      48,    48,    60,    48
703
};
704
705
  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
706
static const yytype_uint8 yyr1[] =
707
{
708
       0,    53,    70,    70,    70,    61,    61,    61,    54,    54,
709
      54,    54,    54,    54,    54,    54,    54,    54,    55,    55,
710
      55,    55,    55,    55,    55,    55,    55,    55,    55,    55,
711
      55,    55,    55,    60,    60,    60,    60,    60,    60,    60,
712
      60,    60,    58,    58,    58,    58,    62,    62,    63,    63,
713
      63,    63,    63,    56,    56,    57,    69,    69,    68,    68,
714
      68,    68,    67,    67,    67,    67,    59,    59,    64,    65,
715
      66,    66
716
};
717
718
  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
719
static const yytype_uint8 yyr2[] =
720
{
721
       0,     2,     2,     2,     1,     1,     2,     1,     1,     1,
722
       2,     3,     3,     1,     2,     3,     3,     1,     3,     3,
723
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
724
       3,     3,     3,     1,     2,     3,     3,     1,     1,     1,
725
       1,     3,     1,     1,     3,     3,     1,     1,     3,     5,
726
       3,     3,     1,     4,     4,     4,     4,     6,     2,     4,
727
       4,     6,     4,     6,     4,     6,     1,     3,     3,     4,
728
       1,     1
729
};
730
731
732
#define yyerrok         (yyerrstatus = 0)
733
#define yyclearin       (yychar = YYEMPTY)
734
157k
#define YYEMPTY         (-2)
735
80.5k
#define YYEOF           0
736
737
1.36k
#define YYACCEPT        goto yyacceptlab
738
168
#define YYABORT         goto yyabortlab
739
0
#define YYERROR         goto yyerrorlab
740
741
742
#define YYRECOVERING()  (!!yyerrstatus)
743
744
#define YYBACKUP(Token, Value)                                  \
745
do                                                              \
746
  if (yychar == YYEMPTY)                                        \
747
    {                                                           \
748
      yychar = (Token);                                         \
749
      yylval = (Value);                                         \
750
      YYPOPSTACK (yylen);                                       \
751
      yystate = *yyssp;                                         \
752
      goto yybackup;                                            \
753
    }                                                           \
754
  else                                                          \
755
    {                                                           \
756
      yyerror (ctx, YY_("syntax error: cannot back up")); \
757
      YYERROR;                                                  \
758
    }                                                           \
759
while (0)
760
761
/* Error token number */
762
464
#define YYTERROR        1
763
#define YYERRCODE       256
764
765
766
767
/* Enable debugging if requested.  */
768
#if YYDEBUG
769
770
# ifndef YYFPRINTF
771
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
772
#  define YYFPRINTF fprintf
773
# endif
774
775
# define YYDPRINTF(Args)                        \
776
do {                                            \
777
  if (yydebug)                                  \
778
    YYFPRINTF Args;                             \
779
} while (0)
780
781
/* This macro is provided for backward compatibility. */
782
#ifndef YY_LOCATION_PRINT
783
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
784
#endif
785
786
787
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
788
do {                                                                      \
789
  if (yydebug)                                                            \
790
    {                                                                     \
791
      YYFPRINTF (stderr, "%s ", Title);                                   \
792
      yy_symbol_print (stderr,                                            \
793
                  Type, Value, ctx); \
794
      YYFPRINTF (stderr, "\n");                                           \
795
    }                                                                     \
796
} while (0)
797
798
799
/*----------------------------------------.
800
| Print this symbol's value on YYOUTPUT.  |
801
`----------------------------------------*/
802
803
static void
804
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, ap_expr_parse_ctx_t *ctx)
805
{
806
  FILE *yyo = yyoutput;
807
  YYUSE (yyo);
808
  YYUSE (ctx);
809
  if (!yyvaluep)
810
    return;
811
# ifdef YYPRINT
812
  if (yytype < YYNTOKENS)
813
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
814
# endif
815
  YYUSE (yytype);
816
}
817
818
819
/*--------------------------------.
820
| Print this symbol on YYOUTPUT.  |
821
`--------------------------------*/
822
823
static void
824
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, ap_expr_parse_ctx_t *ctx)
825
{
826
  YYFPRINTF (yyoutput, "%s %s (",
827
             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
828
829
  yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx);
830
  YYFPRINTF (yyoutput, ")");
831
}
832
833
/*------------------------------------------------------------------.
834
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
835
| TOP (included).                                                   |
836
`------------------------------------------------------------------*/
837
838
static void
839
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
840
{
841
  YYFPRINTF (stderr, "Stack now");
842
  for (; yybottom <= yytop; yybottom++)
843
    {
844
      int yybot = *yybottom;
845
      YYFPRINTF (stderr, " %d", yybot);
846
    }
847
  YYFPRINTF (stderr, "\n");
848
}
849
850
# define YY_STACK_PRINT(Bottom, Top)                            \
851
do {                                                            \
852
  if (yydebug)                                                  \
853
    yy_stack_print ((Bottom), (Top));                           \
854
} while (0)
855
856
857
/*------------------------------------------------.
858
| Report that the YYRULE is going to be reduced.  |
859
`------------------------------------------------*/
860
861
static void
862
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, ap_expr_parse_ctx_t *ctx)
863
{
864
  unsigned long int yylno = yyrline[yyrule];
865
  int yynrhs = yyr2[yyrule];
866
  int yyi;
867
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
868
             yyrule - 1, yylno);
869
  /* The symbols being reduced.  */
870
  for (yyi = 0; yyi < yynrhs; yyi++)
871
    {
872
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
873
      yy_symbol_print (stderr,
874
                       yystos[yyssp[yyi + 1 - yynrhs]],
875
                       &(yyvsp[(yyi + 1) - (yynrhs)])
876
                                              , ctx);
877
      YYFPRINTF (stderr, "\n");
878
    }
879
}
880
881
# define YY_REDUCE_PRINT(Rule)          \
882
do {                                    \
883
  if (yydebug)                          \
884
    yy_reduce_print (yyssp, yyvsp, Rule, ctx); \
885
} while (0)
886
887
/* Nonzero means print parse trace.  It is left uninitialized so that
888
   multiple parsers can coexist.  */
889
int yydebug;
890
#else /* !YYDEBUG */
891
# define YYDPRINTF(Args)
892
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
893
# define YY_STACK_PRINT(Bottom, Top)
894
# define YY_REDUCE_PRINT(Rule)
895
#endif /* !YYDEBUG */
896
897
898
/* YYINITDEPTH -- initial size of the parser's stacks.  */
899
#ifndef YYINITDEPTH
900
1.52k
# define YYINITDEPTH 200
901
#endif
902
903
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
904
   if the built-in stack extension method is used).
905
906
   Do not make this value too large; the results are undefined if
907
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
908
   evaluated with infinite-precision integer arithmetic.  */
909
910
#ifndef YYMAXDEPTH
911
0
# define YYMAXDEPTH 10000
912
#endif
913
914
915
#if YYERROR_VERBOSE
916
917
# ifndef yystrlen
918
#  if defined __GLIBC__ && defined _STRING_H
919
16
#   define yystrlen strlen
920
#  else
921
/* Return the length of YYSTR.  */
922
static YYSIZE_T
923
yystrlen (const char *yystr)
924
{
925
  YYSIZE_T yylen;
926
  for (yylen = 0; yystr[yylen]; yylen++)
927
    continue;
928
  return yylen;
929
}
930
#  endif
931
# endif
932
933
# ifndef yystpcpy
934
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
935
8
#   define yystpcpy stpcpy
936
#  else
937
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
938
   YYDEST.  */
939
static char *
940
yystpcpy (char *yydest, const char *yysrc)
941
{
942
  char *yyd = yydest;
943
  const char *yys = yysrc;
944
945
  while ((*yyd++ = *yys++) != '\0')
946
    continue;
947
948
  return yyd - 1;
949
}
950
#  endif
951
# endif
952
953
# ifndef yytnamerr
954
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
955
   quotes and backslashes, so that it's suitable for yyerror.  The
956
   heuristic is that double-quoting is unnecessary unless the string
957
   contains an apostrophe, a comma, or backslash (other than
958
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
959
   null, do not copy; instead, return the length of what the result
960
   would have been.  */
961
static YYSIZE_T
962
yytnamerr (char *yyres, const char *yystr)
963
32
{
964
32
  if (*yystr == '"')
965
16
    {
966
16
      YYSIZE_T yyn = 0;
967
16
      char const *yyp = yystr;
968
969
16
      for (;;)
970
192
        switch (*++yyp)
971
192
          {
972
0
          case '\'':
973
0
          case ',':
974
0
            goto do_not_strip_quotes;
975
976
0
          case '\\':
977
0
            if (*++yyp != '\\')
978
0
              goto do_not_strip_quotes;
979
            /* Fall through.  */
980
176
          default:
981
176
            if (yyres)
982
88
              yyres[yyn] = *yyp;
983
176
            yyn++;
984
176
            break;
985
986
16
          case '"':
987
16
            if (yyres)
988
8
              yyres[yyn] = '\0';
989
16
            return yyn;
990
192
          }
991
0
    do_not_strip_quotes: ;
992
0
    }
993
994
16
  if (! yyres)
995
8
    return yystrlen (yystr);
996
997
8
  return yystpcpy (yyres, yystr) - yyres;
998
16
}
999
# endif
1000
1001
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1002
   about the unexpected token YYTOKEN for the state stack whose top is
1003
   YYSSP.
1004
1005
   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
1006
   not large enough to hold the message.  In that case, also set
1007
   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
1008
   required number of bytes is too large to store.  */
1009
static int
1010
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1011
                yytype_int16 *yyssp, int yytoken)
1012
8
{
1013
8
  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1014
8
  YYSIZE_T yysize = yysize0;
1015
8
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1016
  /* Internationalized format string. */
1017
8
  const char *yyformat = YY_NULLPTR;
1018
  /* Arguments of yyformat. */
1019
8
  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1020
  /* Number of reported tokens (one for the "unexpected", one per
1021
     "expected"). */
1022
8
  int yycount = 0;
1023
1024
  /* There are many possibilities here to consider:
1025
     - If this state is a consistent state with a default action, then
1026
       the only way this function was invoked is if the default action
1027
       is an error action.  In that case, don't check for expected
1028
       tokens because there are none.
1029
     - The only way there can be no lookahead present (in yychar) is if
1030
       this state is a consistent state with a default action.  Thus,
1031
       detecting the absence of a lookahead is sufficient to determine
1032
       that there is no unexpected or expected token to report.  In that
1033
       case, just report a simple "syntax error".
1034
     - Don't assume there isn't a lookahead just because this state is a
1035
       consistent state with a default action.  There might have been a
1036
       previous inconsistent state, consistent state with a non-default
1037
       action, or user semantic action that manipulated yychar.
1038
     - Of course, the expected token list depends on states to have
1039
       correct lookahead information, and it depends on the parser not
1040
       to perform extra reductions after fetching a lookahead from the
1041
       scanner and before detecting a syntax error.  Thus, state merging
1042
       (from LALR or IELR) and default reductions corrupt the expected
1043
       token list.  However, the list is correct for canonical LR with
1044
       one exception: it will still contain any token that will not be
1045
       accepted due to an error action in a later state.
1046
  */
1047
8
  if (yytoken != YYEMPTY)
1048
8
    {
1049
8
      int yyn = yypact[*yyssp];
1050
8
      yyarg[yycount++] = yytname[yytoken];
1051
8
      if (!yypact_value_is_default (yyn))
1052
8
        {
1053
          /* Start YYX at -YYN if negative to avoid negative indexes in
1054
             YYCHECK.  In other words, skip the first -YYN actions for
1055
             this state because they are default actions.  */
1056
8
          int yyxbegin = yyn < 0 ? -yyn : 0;
1057
          /* Stay within bounds of both yycheck and yytname.  */
1058
8
          int yychecklim = YYLAST - yyn + 1;
1059
8
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1060
8
          int yyx;
1061
1062
432
          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1063
424
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1064
424
                && !yytable_value_is_error (yytable[yyx + yyn]))
1065
8
              {
1066
8
                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1067
0
                  {
1068
0
                    yycount = 1;
1069
0
                    yysize = yysize0;
1070
0
                    break;
1071
0
                  }
1072
8
                yyarg[yycount++] = yytname[yyx];
1073
8
                {
1074
8
                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1075
8
                  if (! (yysize <= yysize1
1076
8
                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1077
0
                    return 2;
1078
8
                  yysize = yysize1;
1079
8
                }
1080
8
              }
1081
8
        }
1082
8
    }
1083
1084
8
  switch (yycount)
1085
8
    {
1086
0
# define YYCASE_(N, S)                      \
1087
8
      case N:                               \
1088
8
        yyformat = S;                       \
1089
8
      break
1090
0
    default: /* Avoid compiler warnings. */
1091
0
      YYCASE_(0, YY_("syntax error"));
1092
0
      YYCASE_(1, YY_("syntax error, unexpected %s"));
1093
8
      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1094
0
      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1095
0
      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1096
8
      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1097
8
# undef YYCASE_
1098
8
    }
1099
1100
8
  {
1101
8
    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1102
8
    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1103
0
      return 2;
1104
8
    yysize = yysize1;
1105
8
  }
1106
1107
8
  if (*yymsg_alloc < yysize)
1108
0
    {
1109
0
      *yymsg_alloc = 2 * yysize;
1110
0
      if (! (yysize <= *yymsg_alloc
1111
0
             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1112
0
        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1113
0
      return 1;
1114
0
    }
1115
1116
  /* Avoid sprintf, as that infringes on the user's name space.
1117
     Don't have undefined behavior even if the translation
1118
     produced a string with the wrong number of "%s"s.  */
1119
8
  {
1120
8
    char *yyp = *yymsg;
1121
8
    int yyi = 0;
1122
320
    while ((*yyp = *yyformat) != '\0')
1123
312
      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1124
16
        {
1125
16
          yyp += yytnamerr (yyp, yyarg[yyi++]);
1126
16
          yyformat += 2;
1127
16
        }
1128
296
      else
1129
296
        {
1130
296
          yyp++;
1131
296
          yyformat++;
1132
296
        }
1133
8
  }
1134
8
  return 0;
1135
8
}
1136
#endif /* YYERROR_VERBOSE */
1137
1138
/*-----------------------------------------------.
1139
| Release the memory associated to this symbol.  |
1140
`-----------------------------------------------*/
1141
1142
static void
1143
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, ap_expr_parse_ctx_t *ctx)
1144
2.89k
{
1145
2.89k
  YYUSE (yyvaluep);
1146
2.89k
  YYUSE (ctx);
1147
2.89k
  if (!yymsg)
1148
0
    yymsg = "Deleting";
1149
2.89k
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1150
1151
2.89k
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1152
2.89k
  YYUSE (yytype);
1153
2.89k
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1154
2.89k
}
1155
1156
1157
1158
1159
/*----------.
1160
| yyparse.  |
1161
`----------*/
1162
1163
int
1164
yyparse (ap_expr_parse_ctx_t *ctx)
1165
1.52k
{
1166
/* The lookahead symbol.  */
1167
1.52k
int yychar;
1168
1169
1170
/* The semantic value of the lookahead symbol.  */
1171
/* Default value used for initialization, for pacifying older GCCs
1172
   or non-GCC compilers.  */
1173
1.52k
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1174
1.52k
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1175
1176
    /* Number of syntax errors so far.  */
1177
1.52k
    int yynerrs;
1178
1179
1.52k
    int yystate;
1180
    /* Number of tokens to shift before error messages enabled.  */
1181
1.52k
    int yyerrstatus;
1182
1183
    /* The stacks and their tools:
1184
       'yyss': related to states.
1185
       'yyvs': related to semantic values.
1186
1187
       Refer to the stacks through separate pointers, to allow yyoverflow
1188
       to reallocate them elsewhere.  */
1189
1190
    /* The state stack.  */
1191
1.52k
    yytype_int16 yyssa[YYINITDEPTH];
1192
1.52k
    yytype_int16 *yyss;
1193
1.52k
    yytype_int16 *yyssp;
1194
1195
    /* The semantic value stack.  */
1196
1.52k
    YYSTYPE yyvsa[YYINITDEPTH];
1197
1.52k
    YYSTYPE *yyvs;
1198
1.52k
    YYSTYPE *yyvsp;
1199
1200
1.52k
    YYSIZE_T yystacksize;
1201
1202
1.52k
  int yyn;
1203
1.52k
  int yyresult;
1204
  /* Lookahead token as an internal (translated) token number.  */
1205
1.52k
  int yytoken = 0;
1206
  /* The variables used to return semantic value and location from the
1207
     action routines.  */
1208
1.52k
  YYSTYPE yyval;
1209
1210
1.52k
#if YYERROR_VERBOSE
1211
  /* Buffer for error messages, and its allocated size.  */
1212
1.52k
  char yymsgbuf[128];
1213
1.52k
  char *yymsg = yymsgbuf;
1214
1.52k
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1215
1.52k
#endif
1216
1217
191k
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1218
1219
  /* The number of symbols on the RHS of the reduced rule.
1220
     Keep to zero when no symbol should be popped.  */
1221
1.52k
  int yylen = 0;
1222
1223
1.52k
  yyssp = yyss = yyssa;
1224
1.52k
  yyvsp = yyvs = yyvsa;
1225
1.52k
  yystacksize = YYINITDEPTH;
1226
1227
1.52k
  YYDPRINTF ((stderr, "Starting parse\n"));
1228
1229
1.52k
  yystate = 0;
1230
1.52k
  yyerrstatus = 0;
1231
1.52k
  yynerrs = 0;
1232
1.52k
  yychar = YYEMPTY; /* Cause a token to be read.  */
1233
1.52k
  goto yysetstate;
1234
1235
/*------------------------------------------------------------.
1236
| yynewstate -- Push a new state, which is found in yystate.  |
1237
`------------------------------------------------------------*/
1238
263k
 yynewstate:
1239
  /* In all cases, when you get here, the value and location stacks
1240
     have just been pushed.  So pushing a state here evens the stacks.  */
1241
263k
  yyssp++;
1242
1243
264k
 yysetstate:
1244
264k
  *yyssp = yystate;
1245
1246
264k
  if (yyss + yystacksize - 1 <= yyssp)
1247
0
    {
1248
      /* Get the current used size of the three stacks, in elements.  */
1249
0
      YYSIZE_T yysize = yyssp - yyss + 1;
1250
1251
#ifdef yyoverflow
1252
      {
1253
        /* Give user a chance to reallocate the stack.  Use copies of
1254
           these so that the &'s don't force the real ones into
1255
           memory.  */
1256
        YYSTYPE *yyvs1 = yyvs;
1257
        yytype_int16 *yyss1 = yyss;
1258
1259
        /* Each stack pointer address is followed by the size of the
1260
           data in use in that stack, in bytes.  This used to be a
1261
           conditional around just the two extra args, but that might
1262
           be undefined if yyoverflow is a macro.  */
1263
        yyoverflow (YY_("memory exhausted"),
1264
                    &yyss1, yysize * sizeof (*yyssp),
1265
                    &yyvs1, yysize * sizeof (*yyvsp),
1266
                    &yystacksize);
1267
1268
        yyss = yyss1;
1269
        yyvs = yyvs1;
1270
      }
1271
#else /* no yyoverflow */
1272
# ifndef YYSTACK_RELOCATE
1273
      goto yyexhaustedlab;
1274
# else
1275
      /* Extend the stack our own way.  */
1276
0
      if (YYMAXDEPTH <= yystacksize)
1277
0
        goto yyexhaustedlab;
1278
0
      yystacksize *= 2;
1279
0
      if (YYMAXDEPTH < yystacksize)
1280
0
        yystacksize = YYMAXDEPTH;
1281
1282
0
      {
1283
0
        yytype_int16 *yyss1 = yyss;
1284
0
        union yyalloc *yyptr =
1285
0
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1286
0
        if (! yyptr)
1287
0
          goto yyexhaustedlab;
1288
0
        YYSTACK_RELOCATE (yyss_alloc, yyss);
1289
0
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1290
0
#  undef YYSTACK_RELOCATE
1291
0
        if (yyss1 != yyssa)
1292
0
          YYSTACK_FREE (yyss1);
1293
0
      }
1294
0
# endif
1295
0
#endif /* no yyoverflow */
1296
1297
0
      yyssp = yyss + yysize - 1;
1298
0
      yyvsp = yyvs + yysize - 1;
1299
1300
0
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1301
0
                  (unsigned long int) yystacksize));
1302
1303
0
      if (yyss + yystacksize - 1 <= yyssp)
1304
0
        YYABORT;
1305
0
    }
1306
1307
264k
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1308
1309
264k
  if (yystate == YYFINAL)
1310
1.36k
    YYACCEPT;
1311
1312
263k
  goto yybackup;
1313
1314
/*-----------.
1315
| yybackup.  |
1316
`-----------*/
1317
263k
yybackup:
1318
1319
  /* Do appropriate processing given the current state.  Read a
1320
     lookahead token if we need one and don't already have one.  */
1321
1322
  /* First try to decide what to do without reference to lookahead token.  */
1323
263k
  yyn = yypact[yystate];
1324
263k
  if (yypact_value_is_default (yyn))
1325
185k
    goto yydefault;
1326
1327
  /* Not known => get a lookahead token if don't already have one.  */
1328
1329
  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1330
77.8k
  if (yychar == YYEMPTY)
1331
76.5k
    {
1332
76.5k
      YYDPRINTF ((stderr, "Reading a token: "));
1333
76.5k
      yychar = yylex (&yylval, yyscanner);
1334
76.5k
    }
1335
1336
77.8k
  if (yychar <= YYEOF)
1337
2.72k
    {
1338
2.72k
      yychar = yytoken = YYEOF;
1339
2.72k
      YYDPRINTF ((stderr, "Now at end of input.\n"));
1340
2.72k
    }
1341
75.1k
  else
1342
75.1k
    {
1343
75.1k
      yytoken = YYTRANSLATE (yychar);
1344
75.1k
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1345
75.1k
    }
1346
1347
  /* If the proper action on seeing token YYTOKEN is to reduce or to
1348
     detect an error, take that action.  */
1349
77.8k
  yyn += yytoken;
1350
77.8k
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1351
1.37k
    goto yydefault;
1352
76.5k
  yyn = yytable[yyn];
1353
76.5k
  if (yyn <= 0)
1354
0
    {
1355
0
      if (yytable_value_is_error (yyn))
1356
0
        goto yyerrlab;
1357
0
      yyn = -yyn;
1358
0
      goto yyreduce;
1359
0
    }
1360
1361
  /* Count tokens shifted since error; after three, turn off error
1362
     status.  */
1363
76.5k
  if (yyerrstatus)
1364
0
    yyerrstatus--;
1365
1366
  /* Shift the lookahead token.  */
1367
76.5k
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1368
1369
  /* Discard the shifted token.  */
1370
76.5k
  yychar = YYEMPTY;
1371
1372
76.5k
  yystate = yyn;
1373
76.5k
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1374
76.5k
  *++yyvsp = yylval;
1375
76.5k
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1376
1377
76.5k
  goto yynewstate;
1378
1379
1380
/*-----------------------------------------------------------.
1381
| yydefault -- do the default action for the current state.  |
1382
`-----------------------------------------------------------*/
1383
186k
yydefault:
1384
186k
  yyn = yydefact[yystate];
1385
186k
  if (yyn == 0)
1386
8
    goto yyerrlab;
1387
186k
  goto yyreduce;
1388
1389
1390
/*-----------------------------.
1391
| yyreduce -- Do a reduction.  |
1392
`-----------------------------*/
1393
186k
yyreduce:
1394
  /* yyn is the number of a rule to reduce with.  */
1395
186k
  yylen = yyr2[yyn];
1396
1397
  /* If YYLEN is nonzero, implement the default value of the action:
1398
     '$$ = $1'.
1399
1400
     Otherwise, the following line sets YYVAL to garbage.
1401
     This behavior is undocumented and Bison
1402
     users should not rely upon it.  Assigning to YYVAL
1403
     unconditionally makes the parser a bit smaller, and it avoids a
1404
     GCC warning that YYVAL may be used uninitialized.  */
1405
186k
  yyval = yyvsp[1-yylen];
1406
1407
1408
186k
  YY_REDUCE_PRINT (yyn);
1409
186k
  switch (yyn)
1410
186k
    {
1411
1.36k
        case 2:
1412
1.36k
#line 128 "util_expr_parse.y" /* yacc.c:1648  */
1413
1.36k
    { ctx->expr = (yyvsp[0].exVal); }
1414
1.36k
#line 1415 "util_expr_parse.c" /* yacc.c:1648  */
1415
1.36k
    break;
1416
1417
0
  case 3:
1418
0
#line 129 "util_expr_parse.y" /* yacc.c:1648  */
1419
0
    { ctx->expr = (yyvsp[0].exVal); }
1420
0
#line 1421 "util_expr_parse.c" /* yacc.c:1648  */
1421
0
    break;
1422
1423
0
  case 4:
1424
0
#line 130 "util_expr_parse.y" /* yacc.c:1648  */
1425
0
    { YYABORT; }
1426
0
#line 1427 "util_expr_parse.c" /* yacc.c:1648  */
1427
0
    break;
1428
1429
1.36k
  case 5:
1430
1.36k
#line 133 "util_expr_parse.y" /* yacc.c:1648  */
1431
1.36k
    { (yyval.exVal) = (yyvsp[0].exVal); }
1432
1.36k
#line 1433 "util_expr_parse.c" /* yacc.c:1648  */
1433
1.36k
    break;
1434
1435
72.0k
  case 6:
1436
72.0k
#line 134 "util_expr_parse.y" /* yacc.c:1648  */
1437
72.0k
    { (yyval.exVal) = ap_expr_concat_make((yyvsp[-1].exVal), (yyvsp[0].exVal), ctx); }
1438
72.0k
#line 1439 "util_expr_parse.c" /* yacc.c:1648  */
1439
72.0k
    break;
1440
1441
160
  case 7:
1442
160
#line 135 "util_expr_parse.y" /* yacc.c:1648  */
1443
160
    { YYABORT; }
1444
0
#line 1445 "util_expr_parse.c" /* yacc.c:1648  */
1445
0
    break;
1446
1447
0
  case 8:
1448
0
#line 138 "util_expr_parse.y" /* yacc.c:1648  */
1449
0
    { (yyval.exVal) = ap_expr_make(op_True,        NULL, NULL, ctx); }
1450
0
#line 1451 "util_expr_parse.c" /* yacc.c:1648  */
1451
0
    break;
1452
1453
0
  case 9:
1454
0
#line 139 "util_expr_parse.y" /* yacc.c:1648  */
1455
0
    { (yyval.exVal) = ap_expr_make(op_False,       NULL, NULL, ctx); }
1456
0
#line 1457 "util_expr_parse.c" /* yacc.c:1648  */
1457
0
    break;
1458
1459
0
  case 10:
1460
0
#line 140 "util_expr_parse.y" /* yacc.c:1648  */
1461
0
    { (yyval.exVal) = ap_expr_make(op_Not,         (yyvsp[0].exVal),   NULL, ctx); }
1462
0
#line 1463 "util_expr_parse.c" /* yacc.c:1648  */
1463
0
    break;
1464
1465
0
  case 11:
1466
0
#line 141 "util_expr_parse.y" /* yacc.c:1648  */
1467
0
    { (yyval.exVal) = ap_expr_make(op_Or,          (yyvsp[-2].exVal),   (yyvsp[0].exVal),   ctx); }
1468
0
#line 1469 "util_expr_parse.c" /* yacc.c:1648  */
1469
0
    break;
1470
1471
0
  case 12:
1472
0
#line 142 "util_expr_parse.y" /* yacc.c:1648  */
1473
0
    { (yyval.exVal) = ap_expr_make(op_And,         (yyvsp[-2].exVal),   (yyvsp[0].exVal),   ctx); }
1474
0
#line 1475 "util_expr_parse.c" /* yacc.c:1648  */
1475
0
    break;
1476
1477
0
  case 13:
1478
0
#line 143 "util_expr_parse.y" /* yacc.c:1648  */
1479
0
    { (yyval.exVal) = ap_expr_make(op_Comp,        (yyvsp[0].exVal),   NULL, ctx); }
1480
0
#line 1481 "util_expr_parse.c" /* yacc.c:1648  */
1481
0
    break;
1482
1483
0
  case 14:
1484
0
#line 144 "util_expr_parse.y" /* yacc.c:1648  */
1485
0
    { (yyval.exVal) = ap_expr_unary_op_make(       (yyvsp[-1].cpVal),   (yyvsp[0].exVal),   ctx); }
1486
0
#line 1487 "util_expr_parse.c" /* yacc.c:1648  */
1487
0
    break;
1488
1489
0
  case 15:
1490
0
#line 145 "util_expr_parse.y" /* yacc.c:1648  */
1491
0
    { (yyval.exVal) = ap_expr_binary_op_make((yyvsp[-1].cpVal),   (yyvsp[-2].exVal),   (yyvsp[0].exVal),   ctx); }
1492
0
#line 1493 "util_expr_parse.c" /* yacc.c:1648  */
1493
0
    break;
1494
1495
0
  case 16:
1496
0
#line 146 "util_expr_parse.y" /* yacc.c:1648  */
1497
0
    { (yyval.exVal) = (yyvsp[-1].exVal); }
1498
0
#line 1499 "util_expr_parse.c" /* yacc.c:1648  */
1499
0
    break;
1500
1501
0
  case 17:
1502
0
#line 147 "util_expr_parse.y" /* yacc.c:1648  */
1503
0
    { YYABORT; }
1504
0
#line 1505 "util_expr_parse.c" /* yacc.c:1648  */
1505
0
    break;
1506
1507
0
  case 18:
1508
0
#line 150 "util_expr_parse.y" /* yacc.c:1648  */
1509
0
    { (yyval.exVal) = ap_expr_make(op_EQ,      (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1510
0
#line 1511 "util_expr_parse.c" /* yacc.c:1648  */
1511
0
    break;
1512
1513
0
  case 19:
1514
0
#line 151 "util_expr_parse.y" /* yacc.c:1648  */
1515
0
    { (yyval.exVal) = ap_expr_make(op_NE,      (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1516
0
#line 1517 "util_expr_parse.c" /* yacc.c:1648  */
1517
0
    break;
1518
1519
0
  case 20:
1520
0
#line 152 "util_expr_parse.y" /* yacc.c:1648  */
1521
0
    { (yyval.exVal) = ap_expr_make(op_LT,      (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1522
0
#line 1523 "util_expr_parse.c" /* yacc.c:1648  */
1523
0
    break;
1524
1525
0
  case 21:
1526
0
#line 153 "util_expr_parse.y" /* yacc.c:1648  */
1527
0
    { (yyval.exVal) = ap_expr_make(op_LE,      (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1528
0
#line 1529 "util_expr_parse.c" /* yacc.c:1648  */
1529
0
    break;
1530
1531
0
  case 22:
1532
0
#line 154 "util_expr_parse.y" /* yacc.c:1648  */
1533
0
    { (yyval.exVal) = ap_expr_make(op_GT,      (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1534
0
#line 1535 "util_expr_parse.c" /* yacc.c:1648  */
1535
0
    break;
1536
1537
0
  case 23:
1538
0
#line 155 "util_expr_parse.y" /* yacc.c:1648  */
1539
0
    { (yyval.exVal) = ap_expr_make(op_GE,      (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1540
0
#line 1541 "util_expr_parse.c" /* yacc.c:1648  */
1541
0
    break;
1542
1543
0
  case 24:
1544
0
#line 156 "util_expr_parse.y" /* yacc.c:1648  */
1545
0
    { (yyval.exVal) = ap_expr_make(op_STR_EQ,  (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1546
0
#line 1547 "util_expr_parse.c" /* yacc.c:1648  */
1547
0
    break;
1548
1549
0
  case 25:
1550
0
#line 157 "util_expr_parse.y" /* yacc.c:1648  */
1551
0
    { (yyval.exVal) = ap_expr_make(op_STR_NE,  (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1552
0
#line 1553 "util_expr_parse.c" /* yacc.c:1648  */
1553
0
    break;
1554
1555
0
  case 26:
1556
0
#line 158 "util_expr_parse.y" /* yacc.c:1648  */
1557
0
    { (yyval.exVal) = ap_expr_make(op_STR_LT,  (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1558
0
#line 1559 "util_expr_parse.c" /* yacc.c:1648  */
1559
0
    break;
1560
1561
0
  case 27:
1562
0
#line 159 "util_expr_parse.y" /* yacc.c:1648  */
1563
0
    { (yyval.exVal) = ap_expr_make(op_STR_LE,  (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1564
0
#line 1565 "util_expr_parse.c" /* yacc.c:1648  */
1565
0
    break;
1566
1567
0
  case 28:
1568
0
#line 160 "util_expr_parse.y" /* yacc.c:1648  */
1569
0
    { (yyval.exVal) = ap_expr_make(op_STR_GT,  (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1570
0
#line 1571 "util_expr_parse.c" /* yacc.c:1648  */
1571
0
    break;
1572
1573
0
  case 29:
1574
0
#line 161 "util_expr_parse.y" /* yacc.c:1648  */
1575
0
    { (yyval.exVal) = ap_expr_make(op_STR_GE,  (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1576
0
#line 1577 "util_expr_parse.c" /* yacc.c:1648  */
1577
0
    break;
1578
1579
0
  case 30:
1580
0
#line 162 "util_expr_parse.y" /* yacc.c:1648  */
1581
0
    { (yyval.exVal) = ap_expr_make(op_REG,     (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1582
0
#line 1583 "util_expr_parse.c" /* yacc.c:1648  */
1583
0
    break;
1584
1585
0
  case 31:
1586
0
#line 163 "util_expr_parse.y" /* yacc.c:1648  */
1587
0
    { (yyval.exVal) = ap_expr_make(op_NRE,     (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1588
0
#line 1589 "util_expr_parse.c" /* yacc.c:1648  */
1589
0
    break;
1590
1591
0
  case 32:
1592
0
#line 164 "util_expr_parse.y" /* yacc.c:1648  */
1593
0
    { (yyval.exVal) = ap_expr_make(op_IN,      (yyvsp[-2].exVal), (yyvsp[0].exVal), ctx); }
1594
0
#line 1595 "util_expr_parse.c" /* yacc.c:1648  */
1595
0
    break;
1596
1597
0
  case 33:
1598
0
#line 167 "util_expr_parse.y" /* yacc.c:1648  */
1599
0
    { (yyval.exVal) = ap_expr_make(op_Digit,  (yyvsp[0].cpVal), NULL, ctx); }
1600
0
#line 1601 "util_expr_parse.c" /* yacc.c:1648  */
1601
0
    break;
1602
1603
0
  case 34:
1604
0
#line 168 "util_expr_parse.y" /* yacc.c:1648  */
1605
0
    { (yyval.exVal) = ap_expr_make(op_String, "", NULL, ctx); }
1606
0
#line 1607 "util_expr_parse.c" /* yacc.c:1648  */
1607
0
    break;
1608
1609
0
  case 35:
1610
0
#line 169 "util_expr_parse.y" /* yacc.c:1648  */
1611
0
    { (yyval.exVal) = (yyvsp[-1].exVal); }
1612
0
#line 1613 "util_expr_parse.c" /* yacc.c:1648  */
1613
0
    break;
1614
1615
0
  case 36:
1616
0
#line 170 "util_expr_parse.y" /* yacc.c:1648  */
1617
0
    { (yyval.exVal) = ap_expr_make(op_Concat, (yyvsp[-2].exVal), (yyvsp[0].exVal),   ctx); }
1618
0
#line 1619 "util_expr_parse.c" /* yacc.c:1648  */
1619
0
    break;
1620
1621
0
  case 37:
1622
0
#line 171 "util_expr_parse.y" /* yacc.c:1648  */
1623
0
    { (yyval.exVal) = (yyvsp[0].exVal); }
1624
0
#line 1625 "util_expr_parse.c" /* yacc.c:1648  */
1625
0
    break;
1626
1627
0
  case 38:
1628
0
#line 172 "util_expr_parse.y" /* yacc.c:1648  */
1629
0
    { (yyval.exVal) = (yyvsp[0].exVal); }
1630
0
#line 1631 "util_expr_parse.c" /* yacc.c:1648  */
1631
0
    break;
1632
1633
0
  case 39:
1634
0
#line 173 "util_expr_parse.y" /* yacc.c:1648  */
1635
0
    { (yyval.exVal) = (yyvsp[0].exVal); }
1636
0
#line 1637 "util_expr_parse.c" /* yacc.c:1648  */
1637
0
    break;
1638
1639
0
  case 40:
1640
0
#line 174 "util_expr_parse.y" /* yacc.c:1648  */
1641
0
    { (yyval.exVal) = (yyvsp[0].exVal); }
1642
0
#line 1643 "util_expr_parse.c" /* yacc.c:1648  */
1643
0
    break;
1644
1645
0
  case 41:
1646
0
#line 175 "util_expr_parse.y" /* yacc.c:1648  */
1647
0
    { (yyval.exVal) = (yyvsp[-1].exVal); }
1648
0
#line 1649 "util_expr_parse.c" /* yacc.c:1648  */
1649
0
    break;
1650
1651
0
  case 42:
1652
0
#line 178 "util_expr_parse.y" /* yacc.c:1648  */
1653
0
    { (yyval.exVal) = (yyvsp[0].exVal); }
1654
0
#line 1655 "util_expr_parse.c" /* yacc.c:1648  */
1655
0
    break;
1656
1657
0
  case 43:
1658
0
#line 179 "util_expr_parse.y" /* yacc.c:1648  */
1659
0
    { (yyval.exVal) = (yyvsp[0].exVal); }
1660
0
#line 1661 "util_expr_parse.c" /* yacc.c:1648  */
1661
0
    break;
1662
1663
0
  case 44:
1664
0
#line 180 "util_expr_parse.y" /* yacc.c:1648  */
1665
0
    { (yyval.exVal) = (yyvsp[-1].exVal); }
1666
0
#line 1667 "util_expr_parse.c" /* yacc.c:1648  */
1667
0
    break;
1668
1669
0
  case 45:
1670
0
#line 181 "util_expr_parse.y" /* yacc.c:1648  */
1671
0
    { (yyval.exVal) = (yyvsp[-1].exVal); }
1672
0
#line 1673 "util_expr_parse.c" /* yacc.c:1648  */
1673
0
    break;
1674
1675
35.0k
  case 46:
1676
35.0k
#line 184 "util_expr_parse.y" /* yacc.c:1648  */
1677
35.0k
    { (yyval.exVal) = ap_expr_make(op_String, (yyvsp[0].cpVal), NULL, ctx); }
1678
35.0k
#line 1679 "util_expr_parse.c" /* yacc.c:1648  */
1679
35.0k
    break;
1680
1681
38.4k
  case 47:
1682
38.4k
#line 185 "util_expr_parse.y" /* yacc.c:1648  */
1683
38.4k
    { (yyval.exVal) = (yyvsp[0].exVal); }
1684
38.4k
#line 1685 "util_expr_parse.c" /* yacc.c:1648  */
1685
38.4k
    break;
1686
1687
0
  case 48:
1688
0
#line 188 "util_expr_parse.y" /* yacc.c:1648  */
1689
0
    { (yyval.exVal) = ap_expr_var_make((yyvsp[-1].cpVal), ctx); }
1690
0
#line 1691 "util_expr_parse.c" /* yacc.c:1648  */
1691
0
    break;
1692
1693
0
  case 49:
1694
0
#line 189 "util_expr_parse.y" /* yacc.c:1648  */
1695
0
    { (yyval.exVal) = ap_expr_str_func_make((yyvsp[-3].cpVal), (yyvsp[-1].exVal), ctx); }
1696
0
#line 1697 "util_expr_parse.c" /* yacc.c:1648  */
1697
0
    break;
1698
1699
0
  case 50:
1700
0
#line 190 "util_expr_parse.y" /* yacc.c:1648  */
1701
0
    { (yyval.exVal) = ap_expr_make(op_Bool, (yyvsp[-1].exVal), NULL, ctx); }
1702
0
#line 1703 "util_expr_parse.c" /* yacc.c:1648  */
1703
0
    break;
1704
1705
0
  case 51:
1706
0
#line 191 "util_expr_parse.y" /* yacc.c:1648  */
1707
0
    { (yyval.exVal) = ap_expr_make(op_Word, (yyvsp[-1].exVal), NULL, ctx); }
1708
0
#line 1709 "util_expr_parse.c" /* yacc.c:1648  */
1709
0
    break;
1710
1711
38.4k
  case 52:
1712
38.4k
#line 192 "util_expr_parse.y" /* yacc.c:1648  */
1713
38.4k
    { (yyval.exVal) = ap_expr_backref_make((yyvsp[0].num), ctx); }
1714
38.4k
#line 1715 "util_expr_parse.c" /* yacc.c:1648  */
1715
38.4k
    break;
1716
1717
0
  case 53:
1718
0
#line 195 "util_expr_parse.y" /* yacc.c:1648  */
1719
0
    { (yyval.exVal) = ap_expr_str_func_make((yyvsp[-3].cpVal), (yyvsp[-1].exVal), ctx); }
1720
0
#line 1721 "util_expr_parse.c" /* yacc.c:1648  */
1721
0
    break;
1722
1723
0
  case 54:
1724
0
#line 196 "util_expr_parse.y" /* yacc.c:1648  */
1725
0
    { (yyval.exVal) = ap_expr_str_func_make((yyvsp[-3].cpVal), (yyvsp[-1].exVal), ctx); }
1726
0
#line 1727 "util_expr_parse.c" /* yacc.c:1648  */
1727
0
    break;
1728
1729
0
  case 55:
1730
0
#line 199 "util_expr_parse.y" /* yacc.c:1648  */
1731
0
    { (yyval.exVal) = ap_expr_list_func_make((yyvsp[-3].cpVal), (yyvsp[-1].exVal), ctx); }
1732
0
#line 1733 "util_expr_parse.c" /* yacc.c:1648  */
1733
0
    break;
1734
1735
0
  case 56:
1736
0
#line 203 "util_expr_parse.y" /* yacc.c:1648  */
1737
0
    { (yyval.exVal) = ap_expr_make(op_Sub, (yyvsp[0].exVal), (yyvsp[-2].exVal), ctx); }
1738
0
#line 1739 "util_expr_parse.c" /* yacc.c:1648  */
1739
0
    break;
1740
1741
0
  case 57:
1742
0
#line 204 "util_expr_parse.y" /* yacc.c:1648  */
1743
0
    { (yyval.exVal) = ap_expr_make(op_Sub, (yyvsp[-1].exVal), (yyvsp[-3].exVal), ctx); }
1744
0
#line 1745 "util_expr_parse.c" /* yacc.c:1648  */
1745
0
    break;
1746
1747
0
  case 58:
1748
0
#line 207 "util_expr_parse.y" /* yacc.c:1648  */
1749
0
    { (yyval.exVal) = ap_expr_make(op_Join, (yyvsp[0].exVal), NULL, ctx); }
1750
0
#line 1751 "util_expr_parse.c" /* yacc.c:1648  */
1751
0
    break;
1752
1753
0
  case 59:
1754
0
#line 208 "util_expr_parse.y" /* yacc.c:1648  */
1755
0
    { (yyval.exVal) = ap_expr_make(op_Join, (yyvsp[-1].exVal), NULL, ctx); }
1756
0
#line 1757 "util_expr_parse.c" /* yacc.c:1648  */
1757
0
    break;
1758
1759
0
  case 60:
1760
0
#line 209 "util_expr_parse.y" /* yacc.c:1648  */
1761
0
    { (yyval.exVal) = ap_expr_make(op_Join, (yyvsp[-2].exVal), (yyvsp[0].exVal),   ctx); }
1762
0
#line 1763 "util_expr_parse.c" /* yacc.c:1648  */
1763
0
    break;
1764
1765
0
  case 61:
1766
0
#line 210 "util_expr_parse.y" /* yacc.c:1648  */
1767
0
    { (yyval.exVal) = ap_expr_make(op_Join, (yyvsp[-3].exVal), (yyvsp[-1].exVal),   ctx); }
1768
0
#line 1769 "util_expr_parse.c" /* yacc.c:1648  */
1769
0
    break;
1770
1771
0
  case 62:
1772
0
#line 213 "util_expr_parse.y" /* yacc.c:1648  */
1773
0
    { (yyval.exVal) = ap_expr_make(op_Split, (yyvsp[0].exVal), (yyvsp[-2].exVal), ctx); }
1774
0
#line 1775 "util_expr_parse.c" /* yacc.c:1648  */
1775
0
    break;
1776
1777
0
  case 63:
1778
0
#line 214 "util_expr_parse.y" /* yacc.c:1648  */
1779
0
    { (yyval.exVal) = ap_expr_make(op_Split, (yyvsp[-1].exVal), (yyvsp[-3].exVal), ctx); }
1780
0
#line 1781 "util_expr_parse.c" /* yacc.c:1648  */
1781
0
    break;
1782
1783
0
  case 64:
1784
0
#line 215 "util_expr_parse.y" /* yacc.c:1648  */
1785
0
    { (yyval.exVal) = ap_expr_make(op_Split, (yyvsp[0].exVal), (yyvsp[-2].exVal), ctx); }
1786
0
#line 1787 "util_expr_parse.c" /* yacc.c:1648  */
1787
0
    break;
1788
1789
0
  case 65:
1790
0
#line 216 "util_expr_parse.y" /* yacc.c:1648  */
1791
0
    { (yyval.exVal) = ap_expr_make(op_Split, (yyvsp[-1].exVal), (yyvsp[-3].exVal), ctx); }
1792
0
#line 1793 "util_expr_parse.c" /* yacc.c:1648  */
1793
0
    break;
1794
1795
0
  case 66:
1796
0
#line 219 "util_expr_parse.y" /* yacc.c:1648  */
1797
0
    { (yyval.exVal) = ap_expr_make(op_ListElement, (yyvsp[0].exVal), NULL, ctx); }
1798
0
#line 1799 "util_expr_parse.c" /* yacc.c:1648  */
1799
0
    break;
1800
1801
0
  case 67:
1802
0
#line 220 "util_expr_parse.y" /* yacc.c:1648  */
1803
0
    { (yyval.exVal) = ap_expr_make(op_ListElement, (yyvsp[-2].exVal), (yyvsp[0].exVal),   ctx); }
1804
0
#line 1805 "util_expr_parse.c" /* yacc.c:1648  */
1805
0
    break;
1806
1807
0
  case 68:
1808
0
#line 223 "util_expr_parse.y" /* yacc.c:1648  */
1809
0
    {
1810
0
                ap_expr_t *e = ap_expr_regex_make((yyvsp[-1].cpVal), NULL, (yyvsp[0].cpVal), ctx);
1811
0
                if (!e) {
1812
0
                    ctx->error = "Failed to compile regular expression";
1813
0
                    YYERROR;
1814
0
                }
1815
0
                (yyval.exVal) = e;
1816
0
            }
1817
0
#line 1818 "util_expr_parse.c" /* yacc.c:1648  */
1818
0
    break;
1819
1820
0
  case 69:
1821
0
#line 232 "util_expr_parse.y" /* yacc.c:1648  */
1822
0
    {
1823
0
                ap_expr_t *e = ap_expr_regex_make((yyvsp[-2].cpVal), (yyvsp[-1].exVal), (yyvsp[0].cpVal), ctx);
1824
0
                if (!e) {
1825
0
                    ctx->error = "Failed to compile regular expression";
1826
0
                    YYERROR;
1827
0
                }
1828
0
                (yyval.exVal) = e;
1829
0
            }
1830
0
#line 1831 "util_expr_parse.c" /* yacc.c:1648  */
1831
0
    break;
1832
1833
0
  case 70:
1834
0
#line 241 "util_expr_parse.y" /* yacc.c:1648  */
1835
0
    { (yyval.exVal) = (yyvsp[0].exVal); }
1836
0
#line 1837 "util_expr_parse.c" /* yacc.c:1648  */
1837
0
    break;
1838
1839
0
  case 71:
1840
0
#line 242 "util_expr_parse.y" /* yacc.c:1648  */
1841
0
    { (yyval.exVal) = (yyvsp[0].exVal); }
1842
0
#line 1843 "util_expr_parse.c" /* yacc.c:1648  */
1843
0
    break;
1844
1845
1846
0
#line 1847 "util_expr_parse.c" /* yacc.c:1648  */
1847
0
      default: break;
1848
186k
    }
1849
  /* User semantic actions sometimes alter yychar, and that requires
1850
     that yytoken be updated with the new translation.  We take the
1851
     approach of translating immediately before every use of yytoken.
1852
     One alternative is translating here after every semantic action,
1853
     but that translation would be missed if the semantic action invokes
1854
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1855
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1856
     incorrect destructor might then be invoked immediately.  In the
1857
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
1858
     to an incorrect destructor call or verbose syntax error message
1859
     before the lookahead is translated.  */
1860
186k
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1861
1862
186k
  YYPOPSTACK (yylen);
1863
186k
  yylen = 0;
1864
186k
  YY_STACK_PRINT (yyss, yyssp);
1865
1866
186k
  *++yyvsp = yyval;
1867
1868
  /* Now 'shift' the result of the reduction.  Determine what state
1869
     that goes to, based on the state we popped back to and the rule
1870
     number reduced by.  */
1871
1872
186k
  yyn = yyr1[yyn];
1873
1874
186k
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1875
186k
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1876
110k
    yystate = yytable[yystate];
1877
76.1k
  else
1878
76.1k
    yystate = yydefgoto[yyn - YYNTOKENS];
1879
1880
186k
  goto yynewstate;
1881
1882
1883
/*--------------------------------------.
1884
| yyerrlab -- here on detecting error.  |
1885
`--------------------------------------*/
1886
8
yyerrlab:
1887
  /* Make sure we have latest lookahead translation.  See comments at
1888
     user semantic actions for why this is necessary.  */
1889
8
  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1890
1891
  /* If not already recovering from an error, report this error.  */
1892
8
  if (!yyerrstatus)
1893
8
    {
1894
8
      ++yynerrs;
1895
#if ! YYERROR_VERBOSE
1896
      yyerror (ctx, YY_("syntax error"));
1897
#else
1898
8
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1899
8
                                        yyssp, yytoken)
1900
8
      {
1901
8
        char const *yymsgp = YY_("syntax error");
1902
8
        int yysyntax_error_status;
1903
8
        yysyntax_error_status = YYSYNTAX_ERROR;
1904
8
        if (yysyntax_error_status == 0)
1905
8
          yymsgp = yymsg;
1906
0
        else if (yysyntax_error_status == 1)
1907
0
          {
1908
0
            if (yymsg != yymsgbuf)
1909
0
              YYSTACK_FREE (yymsg);
1910
0
            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1911
0
            if (!yymsg)
1912
0
              {
1913
0
                yymsg = yymsgbuf;
1914
0
                yymsg_alloc = sizeof yymsgbuf;
1915
0
                yysyntax_error_status = 2;
1916
0
              }
1917
0
            else
1918
0
              {
1919
0
                yysyntax_error_status = YYSYNTAX_ERROR;
1920
0
                yymsgp = yymsg;
1921
0
              }
1922
0
          }
1923
8
        yyerror (ctx, yymsgp);
1924
8
        if (yysyntax_error_status == 2)
1925
0
          goto yyexhaustedlab;
1926
8
      }
1927
8
# undef YYSYNTAX_ERROR
1928
8
#endif
1929
8
    }
1930
1931
1932
1933
8
  if (yyerrstatus == 3)
1934
0
    {
1935
      /* If just tried and failed to reuse lookahead token after an
1936
         error, discard it.  */
1937
1938
0
      if (yychar <= YYEOF)
1939
0
        {
1940
          /* Return failure if at end of input.  */
1941
0
          if (yychar == YYEOF)
1942
0
            YYABORT;
1943
0
        }
1944
0
      else
1945
0
        {
1946
0
          yydestruct ("Error: discarding",
1947
0
                      yytoken, &yylval, ctx);
1948
0
          yychar = YYEMPTY;
1949
0
        }
1950
0
    }
1951
1952
  /* Else will try to reuse lookahead token after shifting the error
1953
     token.  */
1954
8
  goto yyerrlab1;
1955
1956
1957
/*---------------------------------------------------.
1958
| yyerrorlab -- error raised explicitly by YYERROR.  |
1959
`---------------------------------------------------*/
1960
8
yyerrorlab:
1961
1962
  /* Pacify compilers like GCC when the user code never invokes
1963
     YYERROR and the label yyerrorlab therefore never appears in user
1964
     code.  */
1965
0
  if (/*CONSTCOND*/ 0)
1966
0
     goto yyerrorlab;
1967
1968
  /* Do not reclaim the symbols of the rule whose action triggered
1969
     this YYERROR.  */
1970
0
  YYPOPSTACK (yylen);
1971
0
  yylen = 0;
1972
0
  YY_STACK_PRINT (yyss, yyssp);
1973
0
  yystate = *yyssp;
1974
0
  goto yyerrlab1;
1975
1976
1977
/*-------------------------------------------------------------.
1978
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
1979
`-------------------------------------------------------------*/
1980
8
yyerrlab1:
1981
8
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1982
1983
8
  for (;;)
1984
16
    {
1985
16
      yyn = yypact[yystate];
1986
16
      if (!yypact_value_is_default (yyn))
1987
16
        {
1988
16
          yyn += YYTERROR;
1989
16
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1990
0
            {
1991
0
              yyn = yytable[yyn];
1992
0
              if (0 < yyn)
1993
0
                break;
1994
0
            }
1995
16
        }
1996
1997
      /* Pop the current state because it cannot handle the error token.  */
1998
16
      if (yyssp == yyss)
1999
8
        YYABORT;
2000
2001
2002
8
      yydestruct ("Error: popping",
2003
8
                  yystos[yystate], yyvsp, ctx);
2004
8
      YYPOPSTACK (1);
2005
8
      yystate = *yyssp;
2006
8
      YY_STACK_PRINT (yyss, yyssp);
2007
8
    }
2008
2009
0
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2010
0
  *++yyvsp = yylval;
2011
0
  YY_IGNORE_MAYBE_UNINITIALIZED_END
2012
2013
2014
  /* Shift the error token.  */
2015
0
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2016
2017
0
  yystate = yyn;
2018
0
  goto yynewstate;
2019
2020
2021
/*-------------------------------------.
2022
| yyacceptlab -- YYACCEPT comes here.  |
2023
`-------------------------------------*/
2024
1.36k
yyacceptlab:
2025
1.36k
  yyresult = 0;
2026
1.36k
  goto yyreturn;
2027
2028
/*-----------------------------------.
2029
| yyabortlab -- YYABORT comes here.  |
2030
`-----------------------------------*/
2031
168
yyabortlab:
2032
168
  yyresult = 1;
2033
168
  goto yyreturn;
2034
2035
0
#if !defined yyoverflow || YYERROR_VERBOSE
2036
/*-------------------------------------------------.
2037
| yyexhaustedlab -- memory exhaustion comes here.  |
2038
`-------------------------------------------------*/
2039
0
yyexhaustedlab:
2040
0
  yyerror (ctx, YY_("memory exhausted"));
2041
0
  yyresult = 2;
2042
  /* Fall through.  */
2043
0
#endif
2044
2045
1.52k
yyreturn:
2046
1.52k
  if (yychar != YYEMPTY)
2047
8
    {
2048
      /* Make sure we have latest lookahead translation.  See comments at
2049
         user semantic actions for why this is necessary.  */
2050
8
      yytoken = YYTRANSLATE (yychar);
2051
8
      yydestruct ("Cleanup: discarding lookahead",
2052
8
                  yytoken, &yylval, ctx);
2053
8
    }
2054
  /* Do not reclaim the symbols of the rule whose action triggered
2055
     this YYABORT or YYACCEPT.  */
2056
1.52k
  YYPOPSTACK (yylen);
2057
1.52k
  YY_STACK_PRINT (yyss, yyssp);
2058
4.41k
  while (yyssp != yyss)
2059
2.88k
    {
2060
2.88k
      yydestruct ("Cleanup: popping",
2061
2.88k
                  yystos[*yyssp], yyvsp, ctx);
2062
2.88k
      YYPOPSTACK (1);
2063
2.88k
    }
2064
1.52k
#ifndef yyoverflow
2065
1.52k
  if (yyss != yyssa)
2066
0
    YYSTACK_FREE (yyss);
2067
1.52k
#endif
2068
1.52k
#if YYERROR_VERBOSE
2069
1.52k
  if (yymsg != yymsgbuf)
2070
0
    YYSTACK_FREE (yymsg);
2071
1.52k
#endif
2072
1.52k
  return yyresult;
2073
0
}
2074
#line 245 "util_expr_parse.y" /* yacc.c:1907  */
2075
2076
2077
void yyerror(ap_expr_parse_ctx_t *ctx, const char *s)
2078
8
{
2079
    /* s is allocated on the stack */
2080
8
    ctx->error = apr_pstrdup(ctx->ptemp, s);
2081
8
}
2082