Coverage Report

Created: 2026-09-14 06:25

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/php-src/Zend/zend_ini_parser.c
Line
Count
Source
1
/* A Bison parser, made by GNU Bison 3.5.1.  */
2
3
/* Bison implementation for Yacc-like parsers in C
4
5
   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6
   Inc.
7
8
   This program is free software: you can redistribute it and/or modify
9
   it under the terms of the GNU General Public License as published by
10
   the Free Software Foundation, either version 3 of the License, or
11
   (at your option) any later version.
12
13
   This program is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
   GNU General Public License for more details.
17
18
   You should have received a copy of the GNU General Public License
19
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20
21
/* As a special exception, you may create a larger work that contains
22
   part or all of the Bison parser skeleton and distribute that work
23
   under terms of your choice, so long as that work isn't itself a
24
   parser generator using the skeleton or a modified version thereof
25
   as a parser skeleton.  Alternatively, if you modify or redistribute
26
   the parser skeleton itself, you may (at your option) remove this
27
   special exception, which will cause the skeleton and the resulting
28
   Bison output files to be licensed under the GNU General Public
29
   License without this special exception.
30
31
   This special exception was added by the Free Software Foundation in
32
   version 2.2 of Bison.  */
33
34
/* C LALR(1) parser skeleton written by Richard Stallman, by
35
   simplifying the original so-called "semantic" parser.  */
36
37
/* All symbols defined below should begin with yy or YY, to avoid
38
   infringing on user name space.  This should be done even for local
39
   variables, as they might otherwise be expanded by user macros.
40
   There are some unavoidable exceptions within include files to
41
   define necessary library symbols; they are noted "INFRINGES ON
42
   USER NAME SPACE" below.  */
43
44
/* Undocumented macros, especially those whose name start with YY_,
45
   are private implementation details.  Do not rely on them.  */
46
47
/* Identify Bison output.  */
48
#define YYBISON 1
49
50
/* Bison version.  */
51
#define YYBISON_VERSION "3.5.1"
52
53
/* Skeleton name.  */
54
#define YYSKELETON_NAME "yacc.c"
55
56
/* Pure parsers.  */
57
#define YYPURE 2
58
59
/* Push parsers.  */
60
#define YYPUSH 0
61
62
/* Pull parsers.  */
63
#define YYPULL 1
64
65
/* Substitute the type names.  */
66
485k
#define YYSTYPE         INI_STYPE
67
/* Substitute the variable and function names.  */
68
#define yyparse         ini_parse
69
5.22M
#define yylex           ini_lex
70
67.5k
#define yyerror         ini_error
71
#define yydebug         ini_debug
72
164k
#define yynerrs         ini_nerrs
73
74
/* First part of user prologue.  */
75
#line 2 "/src/php-src/Zend/zend_ini_parser.y"
76
77
/*
78
   +----------------------------------------------------------------------+
79
   | Zend Engine                                                          |
80
   +----------------------------------------------------------------------+
81
   | Copyright © Zend Technologies Ltd., a subsidiary company of          |
82
   |     Perforce Software, Inc., and Contributors.                       |
83
   +----------------------------------------------------------------------+
84
   | This source file is subject to the Modified BSD License that is      |
85
   | bundled with this package in the file LICENSE, and is available      |
86
   | through the World Wide Web at <https://www.php.net/license/>.        |
87
   |                                                                      |
88
   | SPDX-License-Identifier: BSD-3-Clause                                |
89
   +----------------------------------------------------------------------+
90
   | Authors: Zeev Suraski <zeev@php.net>                                 |
91
   |          Jani Taskinen <jani@php.net>                                |
92
   +----------------------------------------------------------------------+
93
*/
94
95
#define DEBUG_CFG_PARSER 0
96
97
#include "zend.h"
98
#include "zend_API.h"
99
#include "zend_ini.h"
100
#include "zend_constants.h"
101
#include "zend_ini_scanner.h"
102
#include "zend_extensions.h"
103
104
#ifdef ZEND_WIN32
105
#include "win32/syslog.h"
106
#endif
107
108
static int ini_parse(void);
109
110
676k
#define ZEND_INI_PARSER_CB  (CG(ini_parser_param))->ini_parser_cb
111
676k
#define ZEND_INI_PARSER_ARG (CG(ini_parser_param))->arg
112
113
#ifdef _MSC_VER
114
#define YYMALLOC malloc
115
#define YYFREE free
116
#endif
117
118
1.47M
#define ZEND_SYSTEM_INI CG(ini_parser_unbuffered_errors)
119
139k
#define INI_ZVAL_IS_NUMBER 1
120
121
68.7k
static int get_int_val(zval *op) {
122
68.7k
  switch (Z_TYPE_P(op)) {
123
125
    case IS_LONG:
124
125
      return Z_LVAL_P(op);
125
0
    case IS_DOUBLE:
126
0
      return (int)Z_DVAL_P(op);
127
68.6k
    case IS_STRING:
128
68.6k
    {
129
68.6k
      int val = atoi(Z_STRVAL_P(op));
130
68.6k
      zend_string_free(Z_STR_P(op));
131
68.6k
      return val;
132
0
    }
133
0
    default: ZEND_UNREACHABLE();
134
68.7k
  }
135
68.7k
}
136
137
/* {{{ zend_ini_do_op() */
138
static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
139
35.6k
{
140
35.6k
  int i_result;
141
35.6k
  int i_op1, i_op2;
142
35.6k
  int str_len;
143
35.6k
  char str_result[MAX_LENGTH_OF_LONG+1];
144
145
35.6k
  i_op1 = get_int_val(op1);
146
35.6k
  i_op2 = op2 ? get_int_val(op2) : 0;
147
148
35.6k
  switch (type) {
149
7.41k
    case '|':
150
7.41k
      i_result = i_op1 | i_op2;
151
7.41k
      break;
152
7.37k
    case '&':
153
7.37k
      i_result = i_op1 & i_op2;
154
7.37k
      break;
155
18.3k
    case '^':
156
18.3k
      i_result = i_op1 ^ i_op2;
157
18.3k
      break;
158
1.71k
    case '~':
159
1.71k
      i_result = ~i_op1;
160
1.71k
      break;
161
720
    case '!':
162
720
      i_result = !i_op1;
163
720
      break;
164
0
    default:
165
0
      i_result = 0;
166
0
      break;
167
35.6k
  }
168
169
35.6k
  if (INI_SCNG(scanner_mode) != ZEND_INI_SCANNER_TYPED) {
170
33.9k
    str_len = sprintf(str_result, "%d", i_result);
171
33.9k
    ZVAL_NEW_STR(result, zend_string_init(str_result, str_len, ZEND_SYSTEM_INI));
172
33.9k
  } else {
173
1.61k
    ZVAL_LONG(result, i_result);
174
1.61k
  }
175
35.6k
}
176
/* }}} */
177
178
/* {{{ zend_ini_init_string() */
179
static void zend_ini_init_string(zval *result)
180
769k
{
181
769k
  if (ZEND_SYSTEM_INI) {
182
0
    ZVAL_EMPTY_PSTRING(result);
183
769k
  } else {
184
769k
    ZVAL_EMPTY_STRING(result);
185
769k
  }
186
769k
  Z_EXTRA_P(result) = 0;
187
769k
}
188
/* }}} */
189
190
/* {{{ zend_ini_add_string() */
191
static void zend_ini_add_string(zval *result, zval *op1, zval *op2)
192
2.16M
{
193
2.16M
  int length, op1_len;
194
195
2.16M
  if (Z_TYPE_P(op1) != IS_STRING) {
196
    /* ZEND_ASSERT(!Z_REFCOUNTED_P(op1)); */
197
0
    if (ZEND_SYSTEM_INI) {
198
0
      zend_string *tmp_str;
199
0
      zend_string *str = zval_get_tmp_string(op1, &tmp_str);
200
0
      ZVAL_PSTRINGL(op1, ZSTR_VAL(str), ZSTR_LEN(str));
201
0
      zend_tmp_string_release(tmp_str);
202
0
    } else {
203
0
      ZVAL_STR(op1, zval_get_string_func(op1));
204
0
    }
205
0
  }
206
2.16M
  op1_len = (int)Z_STRLEN_P(op1);
207
208
2.16M
  if (Z_TYPE_P(op2) != IS_STRING) {
209
0
    convert_to_string(op2);
210
0
  }
211
2.16M
  length = op1_len + (int)Z_STRLEN_P(op2);
212
213
2.16M
  ZVAL_NEW_STR(result, zend_string_extend(Z_STR_P(op1), length, ZEND_SYSTEM_INI));
214
2.16M
  memcpy(Z_STRVAL_P(result) + op1_len, Z_STRVAL_P(op2), Z_STRLEN_P(op2) + 1);
215
2.16M
}
216
/* }}} */
217
218
/* {{{ zend_ini_get_constant() */
219
static void zend_ini_get_constant(zval *result, zval *name)
220
213k
{
221
213k
  zval *c, tmp;
222
223
  /* If name contains ':' it is not a constant. Bug #26893. */
224
213k
  if (!memchr(Z_STRVAL_P(name), ':', Z_STRLEN_P(name))
225
213k
        && (c = zend_get_constant(Z_STR_P(name))) != 0) {
226
2.11k
    if (Z_TYPE_P(c) != IS_STRING) {
227
2.01k
      ZVAL_COPY_OR_DUP(&tmp, c);
228
2.01k
      if (Z_OPT_TYPE(tmp) == IS_CONSTANT_AST) {
229
0
        zval_update_constant_ex(&tmp, NULL);
230
0
      }
231
2.01k
      convert_to_string(&tmp);
232
2.01k
      c = &tmp;
233
2.01k
    }
234
2.11k
    ZVAL_NEW_STR(result, zend_string_init(Z_STRVAL_P(c), Z_STRLEN_P(c), ZEND_SYSTEM_INI));
235
2.11k
    if (c == &tmp) {
236
2.01k
      zend_string_release(Z_STR(tmp));
237
2.01k
    }
238
2.11k
    zend_string_free(Z_STR_P(name));
239
211k
  } else {
240
211k
    *result = *name;
241
211k
  }
242
213k
}
243
/* }}} */
244
245
/* {{{ zend_ini_get_var() */
246
static void zend_ini_get_var(zval *result, zval *name, zval *fallback)
247
215
{
248
215
  zval *curval;
249
215
  char *envvar;
250
251
  /* Fetch configuration option value */
252
215
  if ((curval = zend_get_configuration_directive(Z_STR_P(name))) != NULL) {
253
0
    ZVAL_NEW_STR(result, zend_string_init(Z_STRVAL_P(curval), Z_STRLEN_P(curval), ZEND_SYSTEM_INI));
254
  /* ..or if not found, try ENV */
255
215
  } else if ((envvar = zend_getenv(Z_STRVAL_P(name), Z_STRLEN_P(name))) != NULL) {
256
0
    ZVAL_NEW_STR(result, zend_string_init(envvar, strlen(envvar), ZEND_SYSTEM_INI));
257
0
    efree(envvar);
258
215
  } else if ((envvar = getenv(Z_STRVAL_P(name))) != NULL) {
259
0
    ZVAL_NEW_STR(result, zend_string_init(envvar, strlen(envvar), ZEND_SYSTEM_INI));
260
  /* ..or if not defined, try fallback value */
261
215
  } else if (fallback) {
262
203
    ZVAL_NEW_STR(result, zend_string_init(Z_STRVAL_P(fallback), strlen(Z_STRVAL_P(fallback)), ZEND_SYSTEM_INI));
263
203
  } else {
264
12
    zend_ini_init_string(result);
265
12
  }
266
267
215
}
268
/* }}} */
269
270
/* {{{ ini_error() */
271
static ZEND_COLD void ini_error(const char *msg)
272
67.5k
{
273
67.5k
  char *error_buf;
274
67.5k
  int error_buf_len;
275
276
67.5k
  const char *const currently_parsed_filename = zend_ini_scanner_get_filename();
277
67.5k
  if (currently_parsed_filename) {
278
67.5k
    error_buf_len = 128 + (int)strlen(msg) + (int)strlen(currently_parsed_filename); /* should be more than enough */
279
67.5k
    error_buf = (char *) emalloc(error_buf_len);
280
281
67.5k
    sprintf(error_buf, "%s in %s on line %" PRIu32 "\n", msg, currently_parsed_filename, zend_ini_scanner_get_lineno());
282
67.5k
  } else {
283
0
    error_buf = estrdup("Invalid configuration directive\n");
284
0
  }
285
286
67.5k
  if (CG(ini_parser_unbuffered_errors)) {
287
#ifdef ZEND_WIN32
288
    syslog(LOG_ALERT, "PHP: %s (%s)", error_buf, GetCommandLine());
289
#endif
290
0
    fprintf(stderr, "PHP:  %s", error_buf);
291
67.5k
  } else {
292
67.5k
    zend_error(E_WARNING, "%s", error_buf);
293
67.5k
  }
294
67.5k
  efree(error_buf);
295
67.5k
}
296
/* }}} */
297
298
/* {{{ zend_parse_ini_file() */
299
ZEND_API zend_result zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg)
300
13
{
301
13
  int retval;
302
13
  zend_ini_parser_param ini_parser_param;
303
304
13
  ini_parser_param.ini_parser_cb = ini_parser_cb;
305
13
  ini_parser_param.arg = arg;
306
13
  CG(ini_parser_param) = &ini_parser_param;
307
308
13
  if (zend_ini_open_file_for_scanning(fh, scanner_mode) == FAILURE) {
309
8
    return FAILURE;
310
8
  }
311
312
5
  CG(ini_parser_unbuffered_errors) = unbuffered_errors;
313
5
  retval = ini_parse();
314
315
5
  shutdown_ini_scanner();
316
317
5
  if (retval == 0) {
318
5
    return SUCCESS;
319
5
  } else {
320
0
    return FAILURE;
321
0
  }
322
5
}
323
/* }}} */
324
325
/* {{{ zend_parse_ini_string() */
326
ZEND_API zend_result zend_parse_ini_string(const char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg)
327
97.1k
{
328
97.1k
  int retval;
329
97.1k
  zend_ini_parser_param ini_parser_param;
330
331
97.1k
  ini_parser_param.ini_parser_cb = ini_parser_cb;
332
97.1k
  ini_parser_param.arg = arg;
333
97.1k
  CG(ini_parser_param) = &ini_parser_param;
334
335
97.1k
  if (zend_ini_prepare_string_for_scanning(str, scanner_mode) == FAILURE) {
336
2
    return FAILURE;
337
2
  }
338
339
97.1k
  CG(ini_parser_unbuffered_errors) = unbuffered_errors;
340
97.1k
  retval = ini_parse();
341
342
97.1k
  shutdown_ini_scanner();
343
344
97.1k
  if (retval == 0) {
345
29.5k
    return SUCCESS;
346
67.5k
  } else {
347
67.5k
    return FAILURE;
348
67.5k
  }
349
97.1k
}
350
/* }}} */
351
352
/* {{{ zval_ini_dtor() */
353
static void zval_ini_dtor(zval *zv)
354
394k
{
355
394k
  if (Z_TYPE_P(zv) == IS_STRING) {
356
391k
    if (ZEND_SYSTEM_INI) {
357
208
      GC_MAKE_PERSISTENT_LOCAL(Z_STR_P(zv));
358
208
    }
359
391k
    zend_string_release(Z_STR_P(zv));
360
391k
  }
361
394k
}
362
/* }}} */
363
364
static inline zend_result convert_to_number(zval *retval, const char *str, const int str_len)
365
816
{
366
816
  uint8_t type;
367
816
  int overflow;
368
816
  zend_long lval;
369
816
  double dval;
370
371
816
  if ((type = is_numeric_string_ex(str, str_len, &lval, &dval, 0, &overflow, NULL)) != 0) {
372
794
    if (type == IS_LONG) {
373
780
      ZVAL_LONG(retval, lval);
374
780
      return SUCCESS;
375
780
    } else if (type == IS_DOUBLE && !overflow) {
376
0
      ZVAL_DOUBLE(retval, dval);
377
0
      return SUCCESS;
378
0
    }
379
794
  }
380
381
36
  return FAILURE;
382
816
}
383
384
static void normalize_value(zval *zv)
385
310k
{
386
310k
  if (INI_SCNG(scanner_mode) != ZEND_INI_SCANNER_TYPED) {
387
303k
    return;
388
303k
  }
389
390
7.59k
  ZEND_ASSERT(Z_EXTRA_P(zv) == 0 || Z_EXTRA_P(zv) == INI_ZVAL_IS_NUMBER);
391
7.59k
  if (Z_EXTRA_P(zv) == INI_ZVAL_IS_NUMBER && Z_TYPE_P(zv) == IS_STRING) {
392
816
    zval number_rv;
393
816
    if (convert_to_number(&number_rv, Z_STRVAL_P(zv), Z_STRLEN_P(zv)) == SUCCESS) {
394
780
      zval_ptr_dtor(zv);
395
780
      ZVAL_COPY_VALUE(zv, &number_rv);
396
780
    }
397
816
  }
398
7.59k
}
399
400
401
#line 402 "/src/php-src/Zend/zend_ini_parser.c"
402
403
# ifndef YY_CAST
404
#  ifdef __cplusplus
405
#   define YY_CAST(Type, Val) static_cast<Type> (Val)
406
#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
407
#  else
408
14.0M
#   define YY_CAST(Type, Val) ((Type) (Val))
409
#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
410
#  endif
411
# endif
412
# ifndef YY_NULLPTR
413
#  if defined __cplusplus
414
#   if 201103L <= __cplusplus
415
#    define YY_NULLPTR nullptr
416
#   else
417
#    define YY_NULLPTR 0
418
#   endif
419
#  else
420
328k
#   define YY_NULLPTR ((void*)0)
421
#  endif
422
# endif
423
424
/* Enabling verbose error messages.  */
425
#ifdef YYERROR_VERBOSE
426
# undef YYERROR_VERBOSE
427
# define YYERROR_VERBOSE 1
428
#else
429
# define YYERROR_VERBOSE 1
430
#endif
431
432
/* Use api.header.include to #include this header
433
   instead of duplicating it here.  */
434
#ifndef YY_INI_SRC_PHP_SRC_ZEND_ZEND_INI_PARSER_H_INCLUDED
435
# define YY_INI_SRC_PHP_SRC_ZEND_ZEND_INI_PARSER_H_INCLUDED
436
/* Debug traces.  */
437
#ifndef INI_DEBUG
438
# if defined YYDEBUG
439
#if YYDEBUG
440
#   define INI_DEBUG 1
441
#  else
442
#   define INI_DEBUG 0
443
#  endif
444
# else /* ! defined YYDEBUG */
445
#  define INI_DEBUG 0
446
# endif /* ! defined YYDEBUG */
447
#endif  /* ! defined INI_DEBUG */
448
#if INI_DEBUG
449
extern int ini_debug;
450
#endif
451
452
/* Token type.  */
453
#ifndef INI_TOKENTYPE
454
# define INI_TOKENTYPE
455
  enum ini_tokentype
456
  {
457
    END = 0,
458
    TC_SECTION = 258,
459
    TC_RAW = 259,
460
    TC_CONSTANT = 260,
461
    TC_NUMBER = 261,
462
    TC_STRING = 262,
463
    TC_WHITESPACE = 263,
464
    TC_LABEL = 264,
465
    TC_OFFSET = 265,
466
    TC_DOLLAR_CURLY = 266,
467
    TC_VARNAME = 267,
468
    TC_QUOTED_STRING = 268,
469
    TC_FALLBACK = 269,
470
    BOOL_TRUE = 270,
471
    BOOL_FALSE = 271,
472
    NULL_NULL = 272,
473
    END_OF_LINE = 273
474
  };
475
#endif
476
477
/* Value type.  */
478
#if ! defined INI_STYPE && ! defined INI_STYPE_IS_DECLARED
479
typedef zval INI_STYPE;
480
# define INI_STYPE_IS_TRIVIAL 1
481
# define INI_STYPE_IS_DECLARED 1
482
#endif
483
484
485
486
int ini_parse (void);
487
488
#endif /* !YY_INI_SRC_PHP_SRC_ZEND_ZEND_INI_PARSER_H_INCLUDED  */
489
490
491
492
#ifdef short
493
# undef short
494
#endif
495
496
/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
497
   <limits.h> and (if available) <stdint.h> are included
498
   so that the code can choose integer types of a good width.  */
499
500
#ifndef __PTRDIFF_MAX__
501
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
502
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
503
#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
504
#  define YY_STDINT_H
505
# endif
506
#endif
507
508
/* Narrow types that promote to a signed type and that can represent a
509
   signed or unsigned integer of at least N bits.  In tables they can
510
   save space and decrease cache pressure.  Promoting to a signed type
511
   helps avoid bugs in integer arithmetic.  */
512
513
#ifdef __INT_LEAST8_MAX__
514
typedef __INT_LEAST8_TYPE__ yytype_int8;
515
#elif defined YY_STDINT_H
516
typedef int_least8_t yytype_int8;
517
#else
518
typedef signed char yytype_int8;
519
#endif
520
521
#ifdef __INT_LEAST16_MAX__
522
typedef __INT_LEAST16_TYPE__ yytype_int16;
523
#elif defined YY_STDINT_H
524
typedef int_least16_t yytype_int16;
525
#else
526
typedef short yytype_int16;
527
#endif
528
529
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
530
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
531
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
532
       && UINT_LEAST8_MAX <= INT_MAX)
533
typedef uint_least8_t yytype_uint8;
534
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
535
typedef unsigned char yytype_uint8;
536
#else
537
typedef short yytype_uint8;
538
#endif
539
540
#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
541
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
542
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
543
       && UINT_LEAST16_MAX <= INT_MAX)
544
typedef uint_least16_t yytype_uint16;
545
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
546
typedef unsigned short yytype_uint16;
547
#else
548
typedef int yytype_uint16;
549
#endif
550
551
#ifndef YYPTRDIFF_T
552
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
553
687k
#  define YYPTRDIFF_T __PTRDIFF_TYPE__
554
#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
555
# elif defined PTRDIFF_MAX
556
#  ifndef ptrdiff_t
557
#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
558
#  endif
559
#  define YYPTRDIFF_T ptrdiff_t
560
#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
561
# else
562
#  define YYPTRDIFF_T long
563
#  define YYPTRDIFF_MAXIMUM LONG_MAX
564
# endif
565
#endif
566
567
#ifndef YYSIZE_T
568
# ifdef __SIZE_TYPE__
569
#  define YYSIZE_T __SIZE_TYPE__
570
# elif defined size_t
571
#  define YYSIZE_T size_t
572
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
573
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
574
#  define YYSIZE_T size_t
575
# else
576
#  define YYSIZE_T unsigned
577
# endif
578
#endif
579
580
#define YYSIZE_MAXIMUM                                  \
581
260k
  YY_CAST (YYPTRDIFF_T,                                 \
582
           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
583
            ? YYPTRDIFF_MAXIMUM                         \
584
            : YY_CAST (YYSIZE_T, -1)))
585
586
0
#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
587
588
/* Stored state numbers (used for stacks). */
589
typedef yytype_int8 yy_state_t;
590
591
/* State numbers in computations.  */
592
typedef int yy_state_fast_t;
593
594
#ifndef YY_
595
# if defined YYENABLE_NLS && YYENABLE_NLS
596
#  if ENABLE_NLS
597
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
598
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
599
#  endif
600
# endif
601
# ifndef YY_
602
67.5k
#  define YY_(Msgid) Msgid
603
# endif
604
#endif
605
606
#ifndef YY_ATTRIBUTE_PURE
607
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
608
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
609
# else
610
#  define YY_ATTRIBUTE_PURE
611
# endif
612
#endif
613
614
#ifndef YY_ATTRIBUTE_UNUSED
615
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
616
#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
617
# else
618
#  define YY_ATTRIBUTE_UNUSED
619
# endif
620
#endif
621
622
/* Suppress unused-variable warnings by "using" E.  */
623
#if ! defined lint || defined __GNUC__
624
297k
# define YYUSE(E) ((void) (E))
625
#else
626
# define YYUSE(E) /* empty */
627
#endif
628
629
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
630
/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
631
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
632
    _Pragma ("GCC diagnostic push")                                     \
633
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
634
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
635
# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
636
    _Pragma ("GCC diagnostic pop")
637
#else
638
194k
# define YY_INITIAL_VALUE(Value) Value
639
#endif
640
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
641
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
642
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
643
#endif
644
#ifndef YY_INITIAL_VALUE
645
# define YY_INITIAL_VALUE(Value) /* Nothing. */
646
#endif
647
648
#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
649
# define YY_IGNORE_USELESS_CAST_BEGIN                          \
650
    _Pragma ("GCC diagnostic push")                            \
651
    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
652
# define YY_IGNORE_USELESS_CAST_END            \
653
    _Pragma ("GCC diagnostic pop")
654
#endif
655
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
656
# define YY_IGNORE_USELESS_CAST_BEGIN
657
# define YY_IGNORE_USELESS_CAST_END
658
#endif
659
660
661
13.5M
#define YY_ASSERT(E) ((void) (0 && (E)))
662
663
#if ! defined yyoverflow || YYERROR_VERBOSE
664
665
/* The parser invokes alloca or malloc; define the necessary symbols.  */
666
667
# ifdef YYSTACK_USE_ALLOCA
668
#  if YYSTACK_USE_ALLOCA
669
#   ifdef __GNUC__
670
#    define YYSTACK_ALLOC __builtin_alloca
671
#   elif defined __BUILTIN_VA_ARG_INCR
672
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
673
#   elif defined _AIX
674
#    define YYSTACK_ALLOC __alloca
675
#   elif defined _MSC_VER
676
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
677
#    define alloca _alloca
678
#   else
679
#    define YYSTACK_ALLOC alloca
680
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
681
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
682
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
683
#     ifndef EXIT_SUCCESS
684
#      define EXIT_SUCCESS 0
685
#     endif
686
#    endif
687
#   endif
688
#  endif
689
# endif
690
691
# ifdef YYSTACK_ALLOC
692
   /* Pacify GCC's 'empty if-body' warning.  */
693
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
694
#  ifndef YYSTACK_ALLOC_MAXIMUM
695
    /* The OS might guarantee only one guard page at the bottom of the stack,
696
       and a page size can be as small as 4096 bytes.  So we cannot safely
697
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
698
       to allow for a few compiler-allocated temporary stack slots.  */
699
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
700
#  endif
701
# else
702
#  define YYSTACK_ALLOC YYMALLOC
703
0
#  define YYSTACK_FREE YYFREE
704
#  ifndef YYSTACK_ALLOC_MAXIMUM
705
260k
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
706
#  endif
707
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
708
       && ! ((defined YYMALLOC || defined malloc) \
709
             && (defined YYFREE || defined free)))
710
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
711
#   ifndef EXIT_SUCCESS
712
#    define EXIT_SUCCESS 0
713
#   endif
714
#  endif
715
#  ifndef YYMALLOC
716
#   define YYMALLOC malloc
717
#   if ! defined malloc && ! defined EXIT_SUCCESS
718
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
719
#   endif
720
#  endif
721
#  ifndef YYFREE
722
0
#   define YYFREE free
723
#   if ! defined free && ! defined EXIT_SUCCESS
724
void free (void *); /* INFRINGES ON USER NAME SPACE */
725
#   endif
726
#  endif
727
# endif
728
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
729
730
731
#if (! defined yyoverflow \
732
     && (! defined __cplusplus \
733
         || (defined INI_STYPE_IS_TRIVIAL && INI_STYPE_IS_TRIVIAL)))
734
735
/* A type that is properly aligned for any stack member.  */
736
union yyalloc
737
{
738
  yy_state_t yyss_alloc;
739
  YYSTYPE yyvs_alloc;
740
};
741
742
/* The size of the maximum gap between one aligned stack and the next.  */
743
0
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
744
745
/* The size of an array large to enough to hold all stacks, each with
746
   N elements.  */
747
# define YYSTACK_BYTES(N) \
748
     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
749
      + YYSTACK_GAP_MAXIMUM)
750
751
# define YYCOPY_NEEDED 1
752
753
/* Relocate STACK from its old location to the new one.  The
754
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
755
   elements in the stack, and YYPTR gives the new location of the
756
   stack.  Advance YYPTR to a properly aligned location for the next
757
   stack.  */
758
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
759
0
    do                                                                  \
760
0
      {                                                                 \
761
0
        YYPTRDIFF_T yynewbytes;                                         \
762
0
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
763
0
        Stack = &yyptr->Stack_alloc;                                    \
764
0
        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
765
0
        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
766
0
      }                                                                 \
767
0
    while (0)
768
769
#endif
770
771
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
772
/* Copy COUNT objects from SRC to DST.  The source and destination do
773
   not overlap.  */
774
# ifndef YYCOPY
775
#  if defined __GNUC__ && 1 < __GNUC__
776
#   define YYCOPY(Dst, Src, Count) \
777
0
      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
778
#  else
779
#   define YYCOPY(Dst, Src, Count)              \
780
      do                                        \
781
        {                                       \
782
          YYPTRDIFF_T yyi;                      \
783
          for (yyi = 0; yyi < (Count); yyi++)   \
784
            (Dst)[yyi] = (Src)[yyi];            \
785
        }                                       \
786
      while (0)
787
#  endif
788
# endif
789
#endif /* !YYCOPY_NEEDED */
790
791
/* YYFINAL -- State number of the termination state.  */
792
13.5M
#define YYFINAL  2
793
/* YYLAST -- Last index in YYTABLE.  */
794
19.7M
#define YYLAST   143
795
796
/* YYNTOKENS -- Number of terminals.  */
797
8.35M
#define YYNTOKENS  45
798
/* YYNNTS -- Number of nonterminals.  */
799
#define YYNNTS  14
800
/* YYNRULES -- Number of rules.  */
801
#define YYNRULES  53
802
/* YYNSTATES -- Number of states.  */
803
#define YYNSTATES  76
804
805
0
#define YYUNDEFTOK  2
806
6.29M
#define YYMAXUTOK   273
807
808
809
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
810
   as returned by yylex, with out-of-bounds checking.  */
811
#define YYTRANSLATE(YYX)                                                \
812
6.36M
  (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
813
814
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
815
   as returned by yylex.  */
816
static const yytype_int8 yytranslate[] =
817
{
818
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
819
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
820
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
821
       2,     2,     2,    41,    23,     2,    31,    30,    40,    24,
822
      43,    44,    29,    26,    21,    27,    22,    28,     2,     2,
823
       2,     2,     2,     2,     2,     2,     2,     2,    20,     2,
824
      33,    19,    34,    35,    36,     2,     2,     2,     2,     2,
825
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
826
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
827
       2,     2,     2,    42,    25,     2,     2,     2,     2,     2,
828
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
829
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
830
       2,     2,     2,    37,    39,    38,    32,     2,     2,     2,
831
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
832
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
833
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
834
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
835
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
836
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
837
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
838
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
839
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
840
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
841
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
842
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
843
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
844
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
845
      15,    16,    17,    18
846
};
847
848
#if INI_DEBUG
849
  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
850
static const yytype_int16 yyrline[] =
851
{
852
       0,   360,   360,   361,   365,   372,   383,   392,   393,   397,
853
     398,   402,   403,   404,   405,   406,   410,   411,   415,   416,
854
     417,   421,   422,   423,   424,   425,   426,   430,   431,   432,
855
     433,   434,   435,   439,   440,   441,   442,   443,   444,   445,
856
     449,   450,   455,   456,   460,   461,   462,   463,   464,   468,
857
     469,   470,   475,   476
858
};
859
#endif
860
861
#if INI_DEBUG || YYERROR_VERBOSE || 1
862
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
863
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
864
static const char *const yytname[] =
865
{
866
  "\"end of file\"", "error", "$undefined", "TC_SECTION", "TC_RAW",
867
  "TC_CONSTANT", "TC_NUMBER", "TC_STRING", "TC_WHITESPACE", "TC_LABEL",
868
  "TC_OFFSET", "TC_DOLLAR_CURLY", "TC_VARNAME", "TC_QUOTED_STRING",
869
  "TC_FALLBACK", "BOOL_TRUE", "BOOL_FALSE", "NULL_NULL", "END_OF_LINE",
870
  "'='", "':'", "','", "'.'", "'\"'", "'\\''", "'^'", "'+'", "'-'", "'/'",
871
  "'*'", "'%'", "'$'", "'~'", "'<'", "'>'", "'?'", "'@'", "'{'", "'}'",
872
  "'|'", "'&'", "'!'", "']'", "'('", "')'", "$accept", "statement_list",
873
  "statement", "section_string_or_value", "string_or_value",
874
  "option_offset", "encapsed_list", "var_string_list_section",
875
  "var_string_list", "expr", "cfg_var_ref", "fallback", "constant_literal",
876
  "constant_string", YY_NULLPTR
877
};
878
#endif
879
880
# ifdef YYPRINT
881
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
882
   (internal) symbol number NUM (which must be that of a token).  */
883
static const yytype_int16 yytoknum[] =
884
{
885
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
886
     265,   266,   267,   268,   269,   270,   271,   272,   273,    61,
887
      58,    44,    46,    34,    39,    94,    43,    45,    47,    42,
888
      37,    36,   126,    60,    62,    63,    64,   123,   125,   124,
889
      38,    33,    93,    40,    41
890
};
891
# endif
892
893
13.7M
#define YYPACT_NINF (-46)
894
895
#define yypact_value_is_default(Yyn) \
896
13.7M
  ((Yyn) == YYPACT_NINF)
897
898
#define YYTABLE_NINF (-1)
899
900
#define yytable_value_is_error(Yyn) \
901
0
  0
902
903
  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
904
     STATE-NUM.  */
905
static const yytype_int8 yypact[] =
906
{
907
     -46,   118,   -46,    73,   -17,    81,   -46,   -46,   -46,   -46,
908
     -46,   -46,   -46,     0,   -46,   -34,    94,   -46,   -46,    -1,
909
     -46,   -46,   -46,   -46,   -46,   -46,   -31,   102,   -46,   -46,
910
       6,    59,   -46,   -46,   -46,   -46,   -46,   -46,   -46,   -46,
911
      28,    28,    28,   -46,   102,    25,    80,     2,   -46,   -46,
912
     -46,    81,   -46,   -46,   -46,   -46,   109,   -46,   -46,    72,
913
      28,    28,    28,   -46,    -1,   120,   102,   -20,   -46,   -46,
914
     -46,   -46,   -46,   -46,   -46,   -46
915
};
916
917
  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
918
     Performed when YYTABLE does not specify something else to do.  Zero
919
     means the default is an error.  */
920
static const yytype_int8 yydefact[] =
921
{
922
       3,     0,     1,    10,     7,    17,     8,     2,    45,    44,
923
      46,    47,    48,     0,    20,     0,     9,    21,    22,     0,
924
      50,    49,    51,    52,    53,    20,     0,    16,    27,    28,
925
       0,     0,     4,    20,    24,    25,    12,    13,    14,    15,
926
       0,     0,     0,     5,    33,    11,     0,     0,    20,    30,
927
      31,    43,    40,    19,    23,    18,     0,    37,    38,     0,
928
       0,     0,     0,    29,     0,     0,    42,     0,    26,    39,
929
      36,    34,    35,     6,    32,    41
930
};
931
932
  /* YYPGOTO[NTERM-NUM].  */
933
static const yytype_int8 yypgoto[] =
934
{
935
     -46,   -46,   -46,   -46,   -45,   -46,     4,   -46,    -4,    14,
936
      -3,   -46,     7,   -18
937
};
938
939
  /* YYDEFGOTO[NTERM-NUM].  */
940
static const yytype_int8 yydefgoto[] =
941
{
942
      -1,     1,     7,    15,    43,    26,    31,    16,    44,    45,
943
      28,    67,    18,    29
944
};
945
946
  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
947
     positive, shift that token.  If negative, reduce the rule whose
948
     number is the opposite.  If YYTABLE_NINF, syntax error.  */
949
static const yytype_int8 yytable[] =
950
{
951
      17,    27,    19,    20,    21,    22,    23,    24,    32,    50,
952
      13,    47,    30,    34,    36,    37,    38,    39,    75,    73,
953
      51,    64,    25,    35,    49,     0,    50,     0,    55,    46,
954
       0,    40,    20,    21,    22,    23,    24,    56,     0,    13,
955
      41,    49,    42,    55,    52,     0,     0,    66,    50,     0,
956
      60,    25,    65,    55,    57,    58,    59,     0,     0,     0,
957
      40,     0,    55,    49,    61,    62,     0,     0,     0,    41,
958
      13,    42,    53,     0,    70,    71,    72,     8,     9,    10,
959
      11,    12,    54,     0,    13,    20,    21,    22,    23,    24,
960
       0,    13,    13,    53,     0,     0,    14,    60,     8,     9,
961
      10,    11,    12,    63,    25,    13,    20,    21,    22,    23,
962
      24,    61,    62,    13,     0,     0,    69,    33,     2,     0,
963
      13,     3,    53,     0,     0,    48,     0,     4,     5,     0,
964
       0,    13,    68,    53,     0,     0,     6,     0,     0,     0,
965
       0,     0,     0,    74
966
};
967
968
static const yytype_int8 yycheck[] =
969
{
970
       3,     5,    19,     4,     5,     6,     7,     8,    42,    27,
971
      11,    42,    12,    16,    15,    16,    17,    18,    38,    64,
972
      14,    19,    23,    16,    27,    -1,    44,    -1,    31,    25,
973
      -1,    32,     4,     5,     6,     7,     8,    33,    -1,    11,
974
      41,    44,    43,    46,    38,    -1,    -1,    51,    66,    -1,
975
      25,    23,    48,    56,    40,    41,    42,    -1,    -1,    -1,
976
      32,    -1,    65,    66,    39,    40,    -1,    -1,    -1,    41,
977
      11,    43,    13,    -1,    60,    61,    62,     4,     5,     6,
978
       7,     8,    23,    -1,    11,     4,     5,     6,     7,     8,
979
      -1,    11,    11,    13,    -1,    -1,    23,    25,     4,     5,
980
       6,     7,     8,    23,    23,    11,     4,     5,     6,     7,
981
       8,    39,    40,    11,    -1,    -1,    44,    23,     0,    -1,
982
      11,     3,    13,    -1,    -1,    23,    -1,     9,    10,    -1,
983
      -1,    11,    23,    13,    -1,    -1,    18,    -1,    -1,    -1,
984
      -1,    -1,    -1,    23
985
};
986
987
  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
988
     symbol of state STATE-NUM.  */
989
static const yytype_int8 yystos[] =
990
{
991
       0,    46,     0,     3,     9,    10,    18,    47,     4,     5,
992
       6,     7,     8,    11,    23,    48,    52,    55,    57,    19,
993
       4,     5,     6,     7,     8,    23,    50,    53,    55,    58,
994
      12,    51,    42,    23,    55,    57,    15,    16,    17,    18,
995
      32,    41,    43,    49,    53,    54,    51,    42,    23,    55,
996
      58,    14,    38,    13,    23,    55,    51,    54,    54,    54,
997
      25,    39,    40,    23,    19,    51,    53,    56,    23,    44,
998
      54,    54,    54,    49,    23,    38
999
};
1000
1001
  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
1002
static const yytype_int8 yyr1[] =
1003
{
1004
       0,    45,    46,    46,    47,    47,    47,    47,    47,    48,
1005
      48,    49,    49,    49,    49,    49,    50,    50,    51,    51,
1006
      51,    52,    52,    52,    52,    52,    52,    53,    53,    53,
1007
      53,    53,    53,    54,    54,    54,    54,    54,    54,    54,
1008
      55,    55,    56,    56,    57,    57,    57,    57,    57,    58,
1009
      58,    58,    58,    58
1010
};
1011
1012
  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
1013
static const yytype_int8 yyr2[] =
1014
{
1015
       0,     2,     2,     0,     3,     3,     5,     1,     1,     1,
1016
       0,     1,     1,     1,     1,     1,     1,     0,     2,     2,
1017
       0,     1,     1,     3,     2,     2,     4,     1,     1,     3,
1018
       2,     2,     4,     1,     3,     3,     3,     2,     2,     3,
1019
       3,     5,     1,     0,     1,     1,     1,     1,     1,     1,
1020
       1,     1,     1,     1
1021
};
1022
1023
1024
#define yyerrok         (yyerrstatus = 0)
1025
#define yyclearin       (yychar = YYEMPTY)
1026
11.7M
#define YYEMPTY         (-2)
1027
6.37M
#define YYEOF           0
1028
1029
29.5k
#define YYACCEPT        goto yyacceptlab
1030
67.5k
#define YYABORT         goto yyabortlab
1031
0
#define YYERROR         goto yyerrorlab
1032
1033
1034
#define YYRECOVERING()  (!!yyerrstatus)
1035
1036
#define YYBACKUP(Token, Value)                                    \
1037
  do                                                              \
1038
    if (yychar == YYEMPTY)                                        \
1039
      {                                                           \
1040
        yychar = (Token);                                         \
1041
        yylval = (Value);                                         \
1042
        YYPOPSTACK (yylen);                                       \
1043
        yystate = *yyssp;                                         \
1044
        goto yybackup;                                            \
1045
      }                                                           \
1046
    else                                                          \
1047
      {                                                           \
1048
        yyerror (YY_("syntax error: cannot back up")); \
1049
        YYERROR;                                                  \
1050
      }                                                           \
1051
  while (0)
1052
1053
/* Error token number */
1054
1.81M
#define YYTERROR        1
1055
#define YYERRCODE       256
1056
1057
1058
1059
/* Enable debugging if requested.  */
1060
#if INI_DEBUG
1061
1062
# ifndef YYFPRINTF
1063
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1064
#  define YYFPRINTF fprintf
1065
# endif
1066
1067
# define YYDPRINTF(Args)                        \
1068
do {                                            \
1069
  if (yydebug)                                  \
1070
    YYFPRINTF Args;                             \
1071
} while (0)
1072
1073
/* This macro is provided for backward compatibility. */
1074
#ifndef YY_LOCATION_PRINT
1075
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1076
#endif
1077
1078
1079
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
1080
do {                                                                      \
1081
  if (yydebug)                                                            \
1082
    {                                                                     \
1083
      YYFPRINTF (stderr, "%s ", Title);                                   \
1084
      yy_symbol_print (stderr,                                            \
1085
                  Type, Value); \
1086
      YYFPRINTF (stderr, "\n");                                           \
1087
    }                                                                     \
1088
} while (0)
1089
1090
1091
/*-----------------------------------.
1092
| Print this symbol's value on YYO.  |
1093
`-----------------------------------*/
1094
1095
static void
1096
yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1097
{
1098
  FILE *yyoutput = yyo;
1099
  YYUSE (yyoutput);
1100
  if (!yyvaluep)
1101
    return;
1102
# ifdef YYPRINT
1103
  if (yytype < YYNTOKENS)
1104
    YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1105
# endif
1106
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1107
  YYUSE (yytype);
1108
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1109
}
1110
1111
1112
/*---------------------------.
1113
| Print this symbol on YYO.  |
1114
`---------------------------*/
1115
1116
static void
1117
yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1118
{
1119
  YYFPRINTF (yyo, "%s %s (",
1120
             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1121
1122
  yy_symbol_value_print (yyo, yytype, yyvaluep);
1123
  YYFPRINTF (yyo, ")");
1124
}
1125
1126
/*------------------------------------------------------------------.
1127
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1128
| TOP (included).                                                   |
1129
`------------------------------------------------------------------*/
1130
1131
static void
1132
yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1133
{
1134
  YYFPRINTF (stderr, "Stack now");
1135
  for (; yybottom <= yytop; yybottom++)
1136
    {
1137
      int yybot = *yybottom;
1138
      YYFPRINTF (stderr, " %d", yybot);
1139
    }
1140
  YYFPRINTF (stderr, "\n");
1141
}
1142
1143
# define YY_STACK_PRINT(Bottom, Top)                            \
1144
do {                                                            \
1145
  if (yydebug)                                                  \
1146
    yy_stack_print ((Bottom), (Top));                           \
1147
} while (0)
1148
1149
1150
/*------------------------------------------------.
1151
| Report that the YYRULE is going to be reduced.  |
1152
`------------------------------------------------*/
1153
1154
static void
1155
yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule)
1156
{
1157
  int yylno = yyrline[yyrule];
1158
  int yynrhs = yyr2[yyrule];
1159
  int yyi;
1160
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1161
             yyrule - 1, yylno);
1162
  /* The symbols being reduced.  */
1163
  for (yyi = 0; yyi < yynrhs; yyi++)
1164
    {
1165
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1166
      yy_symbol_print (stderr,
1167
                       yystos[+yyssp[yyi + 1 - yynrhs]],
1168
                       &yyvsp[(yyi + 1) - (yynrhs)]
1169
                                              );
1170
      YYFPRINTF (stderr, "\n");
1171
    }
1172
}
1173
1174
# define YY_REDUCE_PRINT(Rule)          \
1175
do {                                    \
1176
  if (yydebug)                          \
1177
    yy_reduce_print (yyssp, yyvsp, Rule); \
1178
} while (0)
1179
1180
/* Nonzero means print parse trace.  It is left uninitialized so that
1181
   multiple parsers can coexist.  */
1182
int yydebug;
1183
#else /* !INI_DEBUG */
1184
# define YYDPRINTF(Args)
1185
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1186
# define YY_STACK_PRINT(Bottom, Top)
1187
# define YY_REDUCE_PRINT(Rule)
1188
#endif /* !INI_DEBUG */
1189
1190
1191
/* YYINITDEPTH -- initial size of the parser's stacks.  */
1192
#ifndef YYINITDEPTH
1193
97.1k
# define YYINITDEPTH 200
1194
#endif
1195
1196
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1197
   if the built-in stack extension method is used).
1198
1199
   Do not make this value too large; the results are undefined if
1200
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1201
   evaluated with infinite-precision integer arithmetic.  */
1202
1203
#ifndef YYMAXDEPTH
1204
0
# define YYMAXDEPTH 10000
1205
#endif
1206
1207
1208
#if YYERROR_VERBOSE
1209
1210
# ifndef yystrlen
1211
#  if defined __GLIBC__ && defined _STRING_H
1212
262k
#   define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
1213
#  else
1214
/* Return the length of YYSTR.  */
1215
static YYPTRDIFF_T
1216
yystrlen (const char *yystr)
1217
{
1218
  YYPTRDIFF_T yylen;
1219
  for (yylen = 0; yystr[yylen]; yylen++)
1220
    continue;
1221
  return yylen;
1222
}
1223
#  endif
1224
# endif
1225
1226
# ifndef yystpcpy
1227
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1228
89.1k
#   define yystpcpy stpcpy
1229
#  else
1230
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1231
   YYDEST.  */
1232
static char *
1233
yystpcpy (char *yydest, const char *yysrc)
1234
{
1235
  char *yyd = yydest;
1236
  const char *yys = yysrc;
1237
1238
  while ((*yyd++ = *yys++) != '\0')
1239
    continue;
1240
1241
  return yyd - 1;
1242
}
1243
#  endif
1244
# endif
1245
1246
# ifndef yytnamerr
1247
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1248
   quotes and backslashes, so that it's suitable for yyerror.  The
1249
   heuristic is that double-quoting is unnecessary unless the string
1250
   contains an apostrophe, a comma, or backslash (other than
1251
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1252
   null, do not copy; instead, return the length of what the result
1253
   would have been.  */
1254
static YYPTRDIFF_T
1255
yytnamerr (char *yyres, const char *yystr)
1256
381k
{
1257
381k
  if (*yystr == '"')
1258
97.2k
    {
1259
97.2k
      YYPTRDIFF_T yyn = 0;
1260
97.2k
      char const *yyp = yystr;
1261
1262
97.2k
      for (;;)
1263
1.16M
        switch (*++yyp)
1264
1.16M
          {
1265
0
          case '\'':
1266
0
          case ',':
1267
0
            goto do_not_strip_quotes;
1268
1269
0
          case '\\':
1270
0
            if (*++yyp != '\\')
1271
0
              goto do_not_strip_quotes;
1272
0
            else
1273
0
              goto append;
1274
1275
0
          append:
1276
1.07M
          default:
1277
1.07M
            if (yyres)
1278
346k
              yyres[yyn] = *yyp;
1279
1.07M
            yyn++;
1280
1.07M
            break;
1281
1282
97.2k
          case '"':
1283
97.2k
            if (yyres)
1284
31.4k
              yyres[yyn] = '\0';
1285
97.2k
            return yyn;
1286
1.16M
          }
1287
0
    do_not_strip_quotes: ;
1288
0
    }
1289
1290
284k
  if (yyres)
1291
89.1k
    return yystpcpy (yyres, yystr) - yyres;
1292
194k
  else
1293
194k
    return yystrlen (yystr);
1294
284k
}
1295
# endif
1296
1297
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1298
   about the unexpected token YYTOKEN for the state stack whose top is
1299
   YYSSP.
1300
1301
   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
1302
   not large enough to hold the message.  In that case, also set
1303
   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
1304
   required number of bytes is too large to store.  */
1305
static int
1306
yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
1307
                yy_state_t *yyssp, int yytoken)
1308
67.5k
{
1309
67.5k
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1310
  /* Internationalized format string. */
1311
67.5k
  const char *yyformat = YY_NULLPTR;
1312
  /* Arguments of yyformat: reported tokens (one for the "unexpected",
1313
     one per "expected"). */
1314
67.5k
  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1315
  /* Actual size of YYARG. */
1316
67.5k
  int yycount = 0;
1317
  /* Cumulated lengths of YYARG.  */
1318
67.5k
  YYPTRDIFF_T yysize = 0;
1319
1320
  /* There are many possibilities here to consider:
1321
     - If this state is a consistent state with a default action, then
1322
       the only way this function was invoked is if the default action
1323
       is an error action.  In that case, don't check for expected
1324
       tokens because there are none.
1325
     - The only way there can be no lookahead present (in yychar) is if
1326
       this state is a consistent state with a default action.  Thus,
1327
       detecting the absence of a lookahead is sufficient to determine
1328
       that there is no unexpected or expected token to report.  In that
1329
       case, just report a simple "syntax error".
1330
     - Don't assume there isn't a lookahead just because this state is a
1331
       consistent state with a default action.  There might have been a
1332
       previous inconsistent state, consistent state with a non-default
1333
       action, or user semantic action that manipulated yychar.
1334
     - Of course, the expected token list depends on states to have
1335
       correct lookahead information, and it depends on the parser not
1336
       to perform extra reductions after fetching a lookahead from the
1337
       scanner and before detecting a syntax error.  Thus, state merging
1338
       (from LALR or IELR) and default reductions corrupt the expected
1339
       token list.  However, the list is correct for canonical LR with
1340
       one exception: it will still contain any token that will not be
1341
       accepted due to an error action in a later state.
1342
  */
1343
67.5k
  if (yytoken != YYEMPTY)
1344
67.5k
    {
1345
67.5k
      int yyn = yypact[+*yyssp];
1346
67.5k
      YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1347
67.5k
      yysize = yysize0;
1348
67.5k
      yyarg[yycount++] = yytname[yytoken];
1349
67.5k
      if (!yypact_value_is_default (yyn))
1350
67.5k
        {
1351
          /* Start YYX at -YYN if negative to avoid negative indexes in
1352
             YYCHECK.  In other words, skip the first -YYN actions for
1353
             this state because they are default actions.  */
1354
67.5k
          int yyxbegin = yyn < 0 ? -yyn : 0;
1355
          /* Stay within bounds of both yycheck and yytname.  */
1356
67.5k
          int yychecklim = YYLAST - yyn + 1;
1357
67.5k
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1358
67.5k
          int yyx;
1359
1360
1.32M
          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1361
1.29M
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1362
0
                && !yytable_value_is_error (yytable[yyx + yyn]))
1363
228k
              {
1364
228k
                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1365
35.0k
                  {
1366
35.0k
                    yycount = 1;
1367
35.0k
                    yysize = yysize0;
1368
35.0k
                    break;
1369
35.0k
                  }
1370
193k
                yyarg[yycount++] = yytname[yyx];
1371
193k
                {
1372
193k
                  YYPTRDIFF_T yysize1
1373
193k
                    = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1374
193k
                  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1375
193k
                    yysize = yysize1;
1376
0
                  else
1377
0
                    return 2;
1378
193k
                }
1379
193k
              }
1380
67.5k
        }
1381
67.5k
    }
1382
1383
67.5k
  switch (yycount)
1384
67.5k
    {
1385
0
# define YYCASE_(N, S)                      \
1386
67.5k
      case N:                               \
1387
67.5k
        yyformat = S;                       \
1388
67.5k
      break
1389
0
    default: /* Avoid compiler warnings. */
1390
0
      YYCASE_(0, YY_("syntax error"));
1391
35.0k
      YYCASE_(1, YY_("syntax error, unexpected %s"));
1392
21.6k
      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1393
1.38k
      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1394
9.25k
      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1395
67.5k
      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1396
67.5k
# undef YYCASE_
1397
67.5k
    }
1398
1399
67.5k
  {
1400
    /* Don't count the "%s"s in the final size, but reserve room for
1401
       the terminator.  */
1402
67.5k
    YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
1403
67.5k
    if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1404
67.5k
      yysize = yysize1;
1405
0
    else
1406
0
      return 2;
1407
67.5k
  }
1408
1409
67.5k
  if (*yymsg_alloc < yysize)
1410
0
    {
1411
0
      *yymsg_alloc = 2 * yysize;
1412
0
      if (! (yysize <= *yymsg_alloc
1413
0
             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1414
0
        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1415
0
      return 1;
1416
0
    }
1417
1418
  /* Avoid sprintf, as that infringes on the user's name space.
1419
     Don't have undefined behavior even if the translation
1420
     produced a string with the wrong number of "%s"s.  */
1421
67.5k
  {
1422
67.5k
    char *yyp = *yymsg;
1423
67.5k
    int yyi = 0;
1424
2.34M
    while ((*yyp = *yyformat) != '\0')
1425
2.28M
      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1426
120k
        {
1427
120k
          yyp += yytnamerr (yyp, yyarg[yyi++]);
1428
120k
          yyformat += 2;
1429
120k
        }
1430
2.16M
      else
1431
2.16M
        {
1432
2.16M
          ++yyp;
1433
2.16M
          ++yyformat;
1434
2.16M
        }
1435
67.5k
  }
1436
67.5k
  return 0;
1437
67.5k
}
1438
#endif /* YYERROR_VERBOSE */
1439
1440
/*-----------------------------------------------.
1441
| Release the memory associated to this symbol.  |
1442
`-----------------------------------------------*/
1443
1444
static void
1445
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1446
297k
{
1447
297k
  YYUSE (yyvaluep);
1448
297k
  if (!yymsg)
1449
0
    yymsg = "Deleting";
1450
297k
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1451
1452
297k
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1453
297k
  switch (yytype)
1454
297k
    {
1455
7
    case 4: /* TC_RAW  */
1456
7
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1457
7
            { zval_ini_dtor(&(*yyvaluep)); }
1458
7
#line 1459 "/src/php-src/Zend/zend_ini_parser.c"
1459
7
        break;
1460
1461
89
    case 5: /* TC_CONSTANT  */
1462
89
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1463
89
            { zval_ini_dtor(&(*yyvaluep)); }
1464
89
#line 1465 "/src/php-src/Zend/zend_ini_parser.c"
1465
89
        break;
1466
1467
147
    case 6: /* TC_NUMBER  */
1468
147
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1469
147
            { zval_ini_dtor(&(*yyvaluep)); }
1470
147
#line 1471 "/src/php-src/Zend/zend_ini_parser.c"
1471
147
        break;
1472
1473
241
    case 7: /* TC_STRING  */
1474
241
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1475
241
            { zval_ini_dtor(&(*yyvaluep)); }
1476
241
#line 1477 "/src/php-src/Zend/zend_ini_parser.c"
1477
241
        break;
1478
1479
0
    case 8: /* TC_WHITESPACE  */
1480
0
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1481
0
            { zval_ini_dtor(&(*yyvaluep)); }
1482
0
#line 1483 "/src/php-src/Zend/zend_ini_parser.c"
1483
0
        break;
1484
1485
8.58k
    case 9: /* TC_LABEL  */
1486
8.58k
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1487
8.58k
            { zval_ini_dtor(&(*yyvaluep)); }
1488
8.58k
#line 1489 "/src/php-src/Zend/zend_ini_parser.c"
1489
8.58k
        break;
1490
1491
13.6k
    case 10: /* TC_OFFSET  */
1492
13.6k
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1493
13.6k
            { zval_ini_dtor(&(*yyvaluep)); }
1494
13.6k
#line 1495 "/src/php-src/Zend/zend_ini_parser.c"
1495
13.6k
        break;
1496
1497
2.63k
    case 12: /* TC_VARNAME  */
1498
2.63k
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1499
2.63k
            { zval_ini_dtor(&(*yyvaluep)); }
1500
2.63k
#line 1501 "/src/php-src/Zend/zend_ini_parser.c"
1501
2.63k
        break;
1502
1503
1.30k
    case 15: /* BOOL_TRUE  */
1504
1.30k
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1505
1.30k
            { zval_ini_dtor(&(*yyvaluep)); }
1506
1.30k
#line 1507 "/src/php-src/Zend/zend_ini_parser.c"
1507
1.30k
        break;
1508
1509
555
    case 16: /* BOOL_FALSE  */
1510
555
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1511
555
            { zval_ini_dtor(&(*yyvaluep)); }
1512
555
#line 1513 "/src/php-src/Zend/zend_ini_parser.c"
1513
555
        break;
1514
1515
2
    case 17: /* NULL_NULL  */
1516
2
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1517
2
            { zval_ini_dtor(&(*yyvaluep)); }
1518
2
#line 1519 "/src/php-src/Zend/zend_ini_parser.c"
1519
2
        break;
1520
1521
9.65k
    case 48: /* section_string_or_value  */
1522
9.65k
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1523
9.65k
            { zval_ini_dtor(&(*yyvaluep)); }
1524
9.65k
#line 1525 "/src/php-src/Zend/zend_ini_parser.c"
1525
9.65k
        break;
1526
1527
0
    case 49: /* string_or_value  */
1528
0
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1529
0
            { zval_ini_dtor(&(*yyvaluep)); }
1530
0
#line 1531 "/src/php-src/Zend/zend_ini_parser.c"
1531
0
        break;
1532
1533
11.3k
    case 50: /* option_offset  */
1534
11.3k
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1535
11.3k
            { zval_ini_dtor(&(*yyvaluep)); }
1536
11.3k
#line 1537 "/src/php-src/Zend/zend_ini_parser.c"
1537
11.3k
        break;
1538
1539
9.89k
    case 51: /* encapsed_list  */
1540
9.89k
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1541
9.89k
            { zval_ini_dtor(&(*yyvaluep)); }
1542
9.89k
#line 1543 "/src/php-src/Zend/zend_ini_parser.c"
1543
9.89k
        break;
1544
1545
1.26k
    case 52: /* var_string_list_section  */
1546
1.26k
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1547
1.26k
            { zval_ini_dtor(&(*yyvaluep)); }
1548
1.26k
#line 1549 "/src/php-src/Zend/zend_ini_parser.c"
1549
1.26k
        break;
1550
1551
9.33k
    case 53: /* var_string_list  */
1552
9.33k
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1553
9.33k
            { zval_ini_dtor(&(*yyvaluep)); }
1554
9.33k
#line 1555 "/src/php-src/Zend/zend_ini_parser.c"
1555
9.33k
        break;
1556
1557
961
    case 54: /* expr  */
1558
961
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1559
961
            { zval_ini_dtor(&(*yyvaluep)); }
1560
961
#line 1561 "/src/php-src/Zend/zend_ini_parser.c"
1561
961
        break;
1562
1563
0
    case 55: /* cfg_var_ref  */
1564
0
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1565
0
            { zval_ini_dtor(&(*yyvaluep)); }
1566
0
#line 1567 "/src/php-src/Zend/zend_ini_parser.c"
1567
0
        break;
1568
1569
704
    case 56: /* fallback  */
1570
704
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1571
704
            { zval_ini_dtor(&(*yyvaluep)); }
1572
704
#line 1573 "/src/php-src/Zend/zend_ini_parser.c"
1573
704
        break;
1574
1575
0
    case 57: /* constant_literal  */
1576
0
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1577
0
            { zval_ini_dtor(&(*yyvaluep)); }
1578
0
#line 1579 "/src/php-src/Zend/zend_ini_parser.c"
1579
0
        break;
1580
1581
0
    case 58: /* constant_string  */
1582
0
#line 355 "/src/php-src/Zend/zend_ini_parser.y"
1583
0
            { zval_ini_dtor(&(*yyvaluep)); }
1584
0
#line 1585 "/src/php-src/Zend/zend_ini_parser.c"
1585
0
        break;
1586
1587
227k
      default:
1588
227k
        break;
1589
297k
    }
1590
297k
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1591
297k
}
1592
1593
1594
1595
1596
/*----------.
1597
| yyparse.  |
1598
`----------*/
1599
1600
int
1601
yyparse (void)
1602
97.1k
{
1603
/* The lookahead symbol.  */
1604
97.1k
int yychar;
1605
1606
1607
/* The semantic value of the lookahead symbol.  */
1608
/* Default value used for initialization, for pacifying older GCCs
1609
   or non-GCC compilers.  */
1610
97.1k
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1611
97.1k
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1612
1613
    /* Number of syntax errors so far.  */
1614
97.1k
    int yynerrs;
1615
1616
97.1k
    yy_state_fast_t yystate;
1617
    /* Number of tokens to shift before error messages enabled.  */
1618
97.1k
    int yyerrstatus;
1619
1620
    /* The stacks and their tools:
1621
       'yyss': related to states.
1622
       'yyvs': related to semantic values.
1623
1624
       Refer to the stacks through separate pointers, to allow yyoverflow
1625
       to reallocate them elsewhere.  */
1626
1627
    /* The state stack.  */
1628
97.1k
    yy_state_t yyssa[YYINITDEPTH];
1629
97.1k
    yy_state_t *yyss;
1630
97.1k
    yy_state_t *yyssp;
1631
1632
    /* The semantic value stack.  */
1633
97.1k
    YYSTYPE yyvsa[YYINITDEPTH];
1634
97.1k
    YYSTYPE *yyvs;
1635
97.1k
    YYSTYPE *yyvsp;
1636
1637
97.1k
    YYPTRDIFF_T yystacksize;
1638
1639
97.1k
  int yyn;
1640
97.1k
  int yyresult;
1641
  /* Lookahead token as an internal (translated) token number.  */
1642
97.1k
  int yytoken = 0;
1643
  /* The variables used to return semantic value and location from the
1644
     action routines.  */
1645
97.1k
  YYSTYPE yyval;
1646
1647
97.1k
#if YYERROR_VERBOSE
1648
  /* Buffer for error messages, and its allocated size.  */
1649
97.1k
  char yymsgbuf[128];
1650
97.1k
  char *yymsg = yymsgbuf;
1651
97.1k
  YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
1652
97.1k
#endif
1653
1654
8.58M
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1655
1656
  /* The number of symbols on the RHS of the reduced rule.
1657
     Keep to zero when no symbol should be popped.  */
1658
97.1k
  int yylen = 0;
1659
1660
97.1k
  yyssp = yyss = yyssa;
1661
97.1k
  yyvsp = yyvs = yyvsa;
1662
97.1k
  yystacksize = YYINITDEPTH;
1663
1664
97.1k
  YYDPRINTF ((stderr, "Starting parse\n"));
1665
1666
97.1k
  yystate = 0;
1667
97.1k
  yyerrstatus = 0;
1668
97.1k
  yynerrs = 0;
1669
97.1k
  yychar = YYEMPTY; /* Cause a token to be read.  */
1670
97.1k
  goto yysetstate;
1671
1672
1673
/*------------------------------------------------------------.
1674
| yynewstate -- push a new state, which is found in yystate.  |
1675
`------------------------------------------------------------*/
1676
13.4M
yynewstate:
1677
  /* In all cases, when you get here, the value and location stacks
1678
     have just been pushed.  So pushing a state here evens the stacks.  */
1679
13.4M
  yyssp++;
1680
1681
1682
/*--------------------------------------------------------------------.
1683
| yysetstate -- set current state (the top of the stack) to yystate.  |
1684
`--------------------------------------------------------------------*/
1685
13.5M
yysetstate:
1686
13.5M
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1687
13.5M
  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1688
13.5M
  YY_IGNORE_USELESS_CAST_BEGIN
1689
13.5M
  *yyssp = YY_CAST (yy_state_t, yystate);
1690
13.5M
  YY_IGNORE_USELESS_CAST_END
1691
1692
13.5M
  if (yyss + yystacksize - 1 <= yyssp)
1693
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1694
    goto yyexhaustedlab;
1695
#else
1696
0
    {
1697
      /* Get the current used size of the three stacks, in elements.  */
1698
0
      YYPTRDIFF_T yysize = yyssp - yyss + 1;
1699
1700
# if defined yyoverflow
1701
      {
1702
        /* Give user a chance to reallocate the stack.  Use copies of
1703
           these so that the &'s don't force the real ones into
1704
           memory.  */
1705
        yy_state_t *yyss1 = yyss;
1706
        YYSTYPE *yyvs1 = yyvs;
1707
1708
        /* Each stack pointer address is followed by the size of the
1709
           data in use in that stack, in bytes.  This used to be a
1710
           conditional around just the two extra args, but that might
1711
           be undefined if yyoverflow is a macro.  */
1712
        yyoverflow (YY_("memory exhausted"),
1713
                    &yyss1, yysize * YYSIZEOF (*yyssp),
1714
                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
1715
                    &yystacksize);
1716
        yyss = yyss1;
1717
        yyvs = yyvs1;
1718
      }
1719
# else /* defined YYSTACK_RELOCATE */
1720
      /* Extend the stack our own way.  */
1721
0
      if (YYMAXDEPTH <= yystacksize)
1722
0
        goto yyexhaustedlab;
1723
0
      yystacksize *= 2;
1724
0
      if (YYMAXDEPTH < yystacksize)
1725
0
        yystacksize = YYMAXDEPTH;
1726
1727
0
      {
1728
0
        yy_state_t *yyss1 = yyss;
1729
0
        union yyalloc *yyptr =
1730
0
          YY_CAST (union yyalloc *,
1731
0
                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1732
0
        if (! yyptr)
1733
0
          goto yyexhaustedlab;
1734
0
        YYSTACK_RELOCATE (yyss_alloc, yyss);
1735
0
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1736
0
# undef YYSTACK_RELOCATE
1737
0
        if (yyss1 != yyssa)
1738
0
          YYSTACK_FREE (yyss1);
1739
0
      }
1740
0
# endif
1741
1742
0
      yyssp = yyss + yysize - 1;
1743
0
      yyvsp = yyvs + yysize - 1;
1744
1745
0
      YY_IGNORE_USELESS_CAST_BEGIN
1746
0
      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1747
0
                  YY_CAST (long, yystacksize)));
1748
0
      YY_IGNORE_USELESS_CAST_END
1749
1750
0
      if (yyss + yystacksize - 1 <= yyssp)
1751
0
        YYABORT;
1752
0
    }
1753
13.5M
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1754
1755
13.5M
  if (yystate == YYFINAL)
1756
29.5k
    YYACCEPT;
1757
1758
13.4M
  goto yybackup;
1759
1760
1761
/*-----------.
1762
| yybackup.  |
1763
`-----------*/
1764
13.4M
yybackup:
1765
  /* Do appropriate processing given the current state.  Read a
1766
     lookahead token if we need one and don't already have one.  */
1767
1768
  /* First try to decide what to do without reference to lookahead token.  */
1769
13.4M
  yyn = yypact[yystate];
1770
13.4M
  if (yypact_value_is_default (yyn))
1771
7.22M
    goto yydefault;
1772
1773
  /* Not known => get a lookahead token if don't already have one.  */
1774
1775
  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1776
6.26M
  if (yychar == YYEMPTY)
1777
5.22M
    {
1778
5.22M
      YYDPRINTF ((stderr, "Reading a token: "));
1779
5.22M
      yychar = yylex (&yylval);
1780
5.22M
    }
1781
1782
6.26M
  if (yychar <= YYEOF)
1783
104k
    {
1784
104k
      yychar = yytoken = YYEOF;
1785
104k
      YYDPRINTF ((stderr, "Now at end of input.\n"));
1786
104k
    }
1787
6.16M
  else
1788
6.16M
    {
1789
6.16M
      yytoken = YYTRANSLATE (yychar);
1790
6.16M
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1791
6.16M
    }
1792
1793
  /* If the proper action on seeing token YYTOKEN is to reduce or to
1794
     detect an error, take that action.  */
1795
6.26M
  yyn += yytoken;
1796
6.26M
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1797
1.10M
    goto yydefault;
1798
5.16M
  yyn = yytable[yyn];
1799
5.16M
  if (yyn <= 0)
1800
0
    {
1801
0
      if (yytable_value_is_error (yyn))
1802
0
        goto yyerrlab;
1803
0
      yyn = -yyn;
1804
0
      goto yyreduce;
1805
0
    }
1806
1807
  /* Count tokens shifted since error; after three, turn off error
1808
     status.  */
1809
5.16M
  if (yyerrstatus)
1810
0
    yyerrstatus--;
1811
1812
  /* Shift the lookahead token.  */
1813
5.16M
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1814
5.16M
  yystate = yyn;
1815
5.16M
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1816
5.16M
  *++yyvsp = yylval;
1817
5.16M
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1818
1819
  /* Discard the shifted token.  */
1820
5.16M
  yychar = YYEMPTY;
1821
5.16M
  goto yynewstate;
1822
1823
1824
/*-----------------------------------------------------------.
1825
| yydefault -- do the default action for the current state.  |
1826
`-----------------------------------------------------------*/
1827
8.32M
yydefault:
1828
8.32M
  yyn = yydefact[yystate];
1829
8.32M
  if (yyn == 0)
1830
67.5k
    goto yyerrlab;
1831
8.26M
  goto yyreduce;
1832
1833
1834
/*-----------------------------.
1835
| yyreduce -- do a reduction.  |
1836
`-----------------------------*/
1837
8.26M
yyreduce:
1838
  /* yyn is the number of a rule to reduce with.  */
1839
8.26M
  yylen = yyr2[yyn];
1840
1841
  /* If YYLEN is nonzero, implement the default value of the action:
1842
     '$$ = $1'.
1843
1844
     Otherwise, the following line sets YYVAL to garbage.
1845
     This behavior is undocumented and Bison
1846
     users should not rely upon it.  Assigning to YYVAL
1847
     unconditionally makes the parser a bit smaller, and it avoids a
1848
     GCC warning that YYVAL may be used uninitialized.  */
1849
8.26M
  yyval = yyvsp[1-yylen];
1850
1851
1852
8.26M
  YY_REDUCE_PRINT (yyn);
1853
8.26M
  switch (yyn)
1854
8.26M
    {
1855
97.1k
  case 3:
1856
97.1k
#line 361 "/src/php-src/Zend/zend_ini_parser.y"
1857
97.1k
                       { (void) ini_nerrs; }
1858
97.1k
#line 1859 "/src/php-src/Zend/zend_ini_parser.c"
1859
97.1k
    break;
1860
1861
6.54k
  case 4:
1862
6.54k
#line 365 "/src/php-src/Zend/zend_ini_parser.y"
1863
6.54k
                                                       {
1864
#if DEBUG_CFG_PARSER
1865
      printf("SECTION: [%s]\n", Z_STRVAL(yyvsp[-1]));
1866
#endif
1867
6.54k
      ZEND_INI_PARSER_CB(&yyvsp[-1], NULL, NULL, ZEND_INI_PARSER_SECTION, ZEND_INI_PARSER_ARG);
1868
6.54k
      zend_string_release(Z_STR(yyvsp[-1]));
1869
6.54k
    }
1870
6.54k
#line 1871 "/src/php-src/Zend/zend_ini_parser.c"
1871
6.54k
    break;
1872
1873
314k
  case 5:
1874
314k
#line 372 "/src/php-src/Zend/zend_ini_parser.y"
1875
314k
                                             {
1876
#if DEBUG_CFG_PARSER
1877
      printf("NORMAL: '%s' = '%s'\n", Z_STRVAL(yyvsp[-2]), Z_STRVAL(yyvsp[0]));
1878
#endif
1879
314k
      ZEND_INI_PARSER_CB(&yyvsp[-2], &yyvsp[0], NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG);
1880
314k
      if (ZEND_SYSTEM_INI) {
1881
208
        GC_MAKE_PERSISTENT_LOCAL(Z_STR(yyvsp[-2]));
1882
208
      }
1883
314k
      zend_string_release(Z_STR(yyvsp[-2]));
1884
314k
      zval_ini_dtor(&yyvsp[0]);
1885
314k
    }
1886
314k
#line 1887 "/src/php-src/Zend/zend_ini_parser.c"
1887
314k
    break;
1888
1889
5.07k
  case 6:
1890
5.07k
#line 383 "/src/php-src/Zend/zend_ini_parser.y"
1891
5.07k
                                                                {
1892
#if DEBUG_CFG_PARSER
1893
      printf("OFFSET: '%s'[%s] = '%s'\n", Z_STRVAL(yyvsp[-4]), Z_STRVAL(yyvsp[-3]), Z_STRVAL(yyvsp[0]));
1894
#endif
1895
5.07k
      ZEND_INI_PARSER_CB(&yyvsp[-4], &yyvsp[0], &yyvsp[-3], ZEND_INI_PARSER_POP_ENTRY, ZEND_INI_PARSER_ARG);
1896
5.07k
      zend_string_release(Z_STR(yyvsp[-4]));
1897
5.07k
      zval_ini_dtor(&yyvsp[-3]);
1898
5.07k
      zval_ini_dtor(&yyvsp[0]);
1899
5.07k
    }
1900
5.07k
#line 1901 "/src/php-src/Zend/zend_ini_parser.c"
1901
5.07k
    break;
1902
1903
350k
  case 7:
1904
350k
#line 392 "/src/php-src/Zend/zend_ini_parser.y"
1905
350k
                                { ZEND_INI_PARSER_CB(&yyvsp[0], NULL, NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG); zend_string_release(Z_STR(yyvsp[0])); }
1906
350k
#line 1907 "/src/php-src/Zend/zend_ini_parser.c"
1907
350k
    break;
1908
1909
14.4k
  case 9:
1910
14.4k
#line 397 "/src/php-src/Zend/zend_ini_parser.y"
1911
14.4k
                                                        { yyval = yyvsp[0]; }
1912
14.4k
#line 1913 "/src/php-src/Zend/zend_ini_parser.c"
1913
14.4k
    break;
1914
1915
1.76k
  case 10:
1916
1.76k
#line 398 "/src/php-src/Zend/zend_ini_parser.y"
1917
1.76k
                                                                { zend_ini_init_string(&yyval); }
1918
1.76k
#line 1919 "/src/php-src/Zend/zend_ini_parser.c"
1919
1.76k
    break;
1920
1921
310k
  case 11:
1922
310k
#line 402 "/src/php-src/Zend/zend_ini_parser.y"
1923
310k
                                                                        { yyval = yyvsp[0]; normalize_value(&yyval); }
1924
310k
#line 1925 "/src/php-src/Zend/zend_ini_parser.c"
1925
310k
    break;
1926
1927
615
  case 12:
1928
615
#line 403 "/src/php-src/Zend/zend_ini_parser.y"
1929
615
                                                                        { yyval = yyvsp[0]; }
1930
615
#line 1931 "/src/php-src/Zend/zend_ini_parser.c"
1931
615
    break;
1932
1933
1.85k
  case 13:
1934
1.85k
#line 404 "/src/php-src/Zend/zend_ini_parser.y"
1935
1.85k
                                                                        { yyval = yyvsp[0]; }
1936
1.85k
#line 1937 "/src/php-src/Zend/zend_ini_parser.c"
1937
1.85k
    break;
1938
1939
996
  case 14:
1940
996
#line 405 "/src/php-src/Zend/zend_ini_parser.y"
1941
996
                                                                        { yyval = yyvsp[0]; }
1942
996
#line 1943 "/src/php-src/Zend/zend_ini_parser.c"
1943
996
    break;
1944
1945
5.18k
  case 15:
1946
5.18k
#line 406 "/src/php-src/Zend/zend_ini_parser.y"
1947
5.18k
                                                                        { zend_ini_init_string(&yyval); }
1948
5.18k
#line 1949 "/src/php-src/Zend/zend_ini_parser.c"
1949
5.18k
    break;
1950
1951
14.8k
  case 16:
1952
14.8k
#line 410 "/src/php-src/Zend/zend_ini_parser.y"
1953
14.8k
                                                                { yyval = yyvsp[0]; }
1954
14.8k
#line 1955 "/src/php-src/Zend/zend_ini_parser.c"
1955
14.8k
    break;
1956
1957
1.56k
  case 17:
1958
1.56k
#line 411 "/src/php-src/Zend/zend_ini_parser.y"
1959
1.56k
                                                                { zend_ini_init_string(&yyval); }
1960
1.56k
#line 1961 "/src/php-src/Zend/zend_ini_parser.c"
1961
1.56k
    break;
1962
1963
0
  case 18:
1964
0
#line 415 "/src/php-src/Zend/zend_ini_parser.y"
1965
0
                                                        { zend_ini_add_string(&yyval, &yyvsp[-1], &yyvsp[0]); zend_string_free(Z_STR(yyvsp[0])); }
1966
0
#line 1967 "/src/php-src/Zend/zend_ini_parser.c"
1967
0
    break;
1968
1969
466k
  case 19:
1970
466k
#line 416 "/src/php-src/Zend/zend_ini_parser.y"
1971
466k
                                                { zend_ini_add_string(&yyval, &yyvsp[-1], &yyvsp[0]); zend_string_free(Z_STR(yyvsp[0])); }
1972
466k
#line 1973 "/src/php-src/Zend/zend_ini_parser.c"
1973
466k
    break;
1974
1975
761k
  case 20:
1976
761k
#line 417 "/src/php-src/Zend/zend_ini_parser.y"
1977
761k
                                                                { zend_ini_init_string(&yyval); }
1978
761k
#line 1979 "/src/php-src/Zend/zend_ini_parser.c"
1979
761k
    break;
1980
1981
111
  case 21:
1982
111
#line 421 "/src/php-src/Zend/zend_ini_parser.y"
1983
111
                                                                        { yyval = yyvsp[0]; }
1984
111
#line 1985 "/src/php-src/Zend/zend_ini_parser.c"
1985
111
    break;
1986
1987
14.1k
  case 22:
1988
14.1k
#line 422 "/src/php-src/Zend/zend_ini_parser.y"
1989
14.1k
                                                                { yyval = yyvsp[0]; }
1990
14.1k
#line 1991 "/src/php-src/Zend/zend_ini_parser.c"
1991
14.1k
    break;
1992
1993
1.44k
  case 23:
1994
1.44k
#line 423 "/src/php-src/Zend/zend_ini_parser.y"
1995
1.44k
                                                        { yyval = yyvsp[-1]; }
1996
1.44k
#line 1997 "/src/php-src/Zend/zend_ini_parser.c"
1997
1.44k
    break;
1998
1999
13
  case 24:
2000
13
#line 424 "/src/php-src/Zend/zend_ini_parser.y"
2001
13
                                                        { zend_ini_add_string(&yyval, &yyvsp[-1], &yyvsp[0]); zend_string_free(Z_STR(yyvsp[0])); }
2002
13
#line 2003 "/src/php-src/Zend/zend_ini_parser.c"
2003
13
    break;
2004
2005
66.1k
  case 25:
2006
66.1k
#line 425 "/src/php-src/Zend/zend_ini_parser.y"
2007
66.1k
                                                                { zend_ini_add_string(&yyval, &yyvsp[-1], &yyvsp[0]); zend_string_free(Z_STR(yyvsp[0])); }
2008
66.1k
#line 2009 "/src/php-src/Zend/zend_ini_parser.c"
2009
66.1k
    break;
2010
2011
35.7k
  case 26:
2012
35.7k
#line 426 "/src/php-src/Zend/zend_ini_parser.y"
2013
35.7k
                                                               { zend_ini_add_string(&yyval, &yyvsp[-3], &yyvsp[-1]); zend_string_free(Z_STR(yyvsp[-1])); }
2014
35.7k
#line 2015 "/src/php-src/Zend/zend_ini_parser.c"
2015
35.7k
    break;
2016
2017
8
  case 27:
2018
8
#line 430 "/src/php-src/Zend/zend_ini_parser.y"
2019
8
                                                                        { yyval = yyvsp[0]; }
2020
8
#line 2021 "/src/php-src/Zend/zend_ini_parser.c"
2021
8
    break;
2022
2023
322k
  case 28:
2024
322k
#line 431 "/src/php-src/Zend/zend_ini_parser.y"
2025
322k
                                                                { yyval = yyvsp[0]; }
2026
322k
#line 2027 "/src/php-src/Zend/zend_ini_parser.c"
2027
322k
    break;
2028
2029
47.1k
  case 29:
2030
47.1k
#line 432 "/src/php-src/Zend/zend_ini_parser.y"
2031
47.1k
                                                        { yyval = yyvsp[-1]; }
2032
47.1k
#line 2033 "/src/php-src/Zend/zend_ini_parser.c"
2033
47.1k
    break;
2034
2035
83
  case 30:
2036
83
#line 433 "/src/php-src/Zend/zend_ini_parser.y"
2037
83
                                                { zend_ini_add_string(&yyval, &yyvsp[-1], &yyvsp[0]); zend_string_free(Z_STR(yyvsp[0])); }
2038
83
#line 2039 "/src/php-src/Zend/zend_ini_parser.c"
2039
83
    break;
2040
2041
927k
  case 31:
2042
927k
#line 434 "/src/php-src/Zend/zend_ini_parser.y"
2043
927k
                                                { zend_ini_add_string(&yyval, &yyvsp[-1], &yyvsp[0]); zend_string_free(Z_STR(yyvsp[0])); }
2044
927k
#line 2045 "/src/php-src/Zend/zend_ini_parser.c"
2045
927k
    break;
2046
2047
666k
  case 32:
2048
666k
#line 435 "/src/php-src/Zend/zend_ini_parser.y"
2049
666k
                                                       { zend_ini_add_string(&yyval, &yyvsp[-3], &yyvsp[-1]); zend_string_free(Z_STR(yyvsp[-1])); }
2050
666k
#line 2051 "/src/php-src/Zend/zend_ini_parser.c"
2051
666k
    break;
2052
2053
344k
  case 33:
2054
344k
#line 439 "/src/php-src/Zend/zend_ini_parser.y"
2055
344k
                                                                { yyval = yyvsp[0]; }
2056
344k
#line 2057 "/src/php-src/Zend/zend_ini_parser.c"
2057
344k
    break;
2058
2059
7.41k
  case 34:
2060
7.41k
#line 440 "/src/php-src/Zend/zend_ini_parser.y"
2061
7.41k
                                                                { zend_ini_do_op('|', &yyval, &yyvsp[-2], &yyvsp[0]); }
2062
7.41k
#line 2063 "/src/php-src/Zend/zend_ini_parser.c"
2063
7.41k
    break;
2064
2065
7.37k
  case 35:
2066
7.37k
#line 441 "/src/php-src/Zend/zend_ini_parser.y"
2067
7.37k
                                                                { zend_ini_do_op('&', &yyval, &yyvsp[-2], &yyvsp[0]); }
2068
7.37k
#line 2069 "/src/php-src/Zend/zend_ini_parser.c"
2069
7.37k
    break;
2070
2071
18.3k
  case 36:
2072
18.3k
#line 442 "/src/php-src/Zend/zend_ini_parser.y"
2073
18.3k
                                                                { zend_ini_do_op('^', &yyval, &yyvsp[-2], &yyvsp[0]); }
2074
18.3k
#line 2075 "/src/php-src/Zend/zend_ini_parser.c"
2075
18.3k
    break;
2076
2077
1.71k
  case 37:
2078
1.71k
#line 443 "/src/php-src/Zend/zend_ini_parser.y"
2079
1.71k
                                                                        { zend_ini_do_op('~', &yyval, &yyvsp[0], NULL); }
2080
1.71k
#line 2081 "/src/php-src/Zend/zend_ini_parser.c"
2081
1.71k
    break;
2082
2083
720
  case 38:
2084
720
#line 444 "/src/php-src/Zend/zend_ini_parser.y"
2085
720
                                                                        { zend_ini_do_op('!', &yyval, &yyvsp[0], NULL); }
2086
720
#line 2087 "/src/php-src/Zend/zend_ini_parser.c"
2087
720
    break;
2088
2089
227
  case 39:
2090
227
#line 445 "/src/php-src/Zend/zend_ini_parser.y"
2091
227
                                                                { yyval = yyvsp[-1]; }
2092
227
#line 2093 "/src/php-src/Zend/zend_ini_parser.c"
2093
227
    break;
2094
2095
12
  case 40:
2096
12
#line 449 "/src/php-src/Zend/zend_ini_parser.y"
2097
12
                                                                        { zend_ini_get_var(&yyval, &yyvsp[-1], NULL); zend_string_free(Z_STR(yyvsp[-1])); }
2098
12
#line 2099 "/src/php-src/Zend/zend_ini_parser.c"
2099
12
    break;
2100
2101
203
  case 41:
2102
203
#line 450 "/src/php-src/Zend/zend_ini_parser.y"
2103
203
                                                                        { zend_ini_get_var(&yyval, &yyvsp[-3], &yyvsp[-1]); zend_string_free(Z_STR(yyvsp[-3])); zend_string_free(Z_STR(yyvsp[-1])); }
2104
203
#line 2105 "/src/php-src/Zend/zend_ini_parser.c"
2105
203
    break;
2106
2107
727
  case 42:
2108
727
#line 455 "/src/php-src/Zend/zend_ini_parser.y"
2109
727
                                { yyval = yyvsp[0]; }
2110
727
#line 2111 "/src/php-src/Zend/zend_ini_parser.c"
2111
727
    break;
2112
2113
180
  case 43:
2114
180
#line 456 "/src/php-src/Zend/zend_ini_parser.y"
2115
180
                                        { zend_ini_init_string(&yyval); }
2116
180
#line 2117 "/src/php-src/Zend/zend_ini_parser.c"
2117
180
    break;
2118
2119
3.67k
  case 44:
2120
3.67k
#line 460 "/src/php-src/Zend/zend_ini_parser.y"
2121
3.67k
                                                                        { yyval = yyvsp[0]; }
2122
3.67k
#line 2123 "/src/php-src/Zend/zend_ini_parser.c"
2123
3.67k
    break;
2124
2125
26.6k
  case 45:
2126
26.6k
#line 461 "/src/php-src/Zend/zend_ini_parser.y"
2127
26.6k
                                                                        { yyval = yyvsp[0]; /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
2128
26.6k
#line 2129 "/src/php-src/Zend/zend_ini_parser.c"
2129
26.6k
    break;
2130
2131
2.55k
  case 46:
2132
2.55k
#line 462 "/src/php-src/Zend/zend_ini_parser.y"
2133
2.55k
                                                                        { yyval = yyvsp[0]; /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ }
2134
2.55k
#line 2135 "/src/php-src/Zend/zend_ini_parser.c"
2135
2.55k
    break;
2136
2137
47.4k
  case 47:
2138
47.4k
#line 463 "/src/php-src/Zend/zend_ini_parser.y"
2139
47.4k
                                                                        { yyval = yyvsp[0]; /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ }
2140
47.4k
#line 2141 "/src/php-src/Zend/zend_ini_parser.c"
2141
47.4k
    break;
2142
2143
0
  case 48:
2144
0
#line 464 "/src/php-src/Zend/zend_ini_parser.y"
2145
0
                                                                { yyval = yyvsp[0]; /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ }
2146
0
#line 2147 "/src/php-src/Zend/zend_ini_parser.c"
2147
0
    break;
2148
2149
213k
  case 49:
2150
213k
#line 468 "/src/php-src/Zend/zend_ini_parser.y"
2151
213k
                                                                        { zend_ini_get_constant(&yyval, &yyvsp[0]); }
2152
213k
#line 2153 "/src/php-src/Zend/zend_ini_parser.c"
2153
213k
    break;
2154
2155
164k
  case 50:
2156
164k
#line 469 "/src/php-src/Zend/zend_ini_parser.y"
2157
164k
                                                                        { yyval = yyvsp[0]; /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
2158
164k
#line 2159 "/src/php-src/Zend/zend_ini_parser.c"
2159
164k
    break;
2160
2161
124k
  case 51:
2162
124k
#line 470 "/src/php-src/Zend/zend_ini_parser.y"
2163
124k
                          {
2164
124k
      yyval = yyvsp[0];
2165
124k
      Z_EXTRA(yyval) = INI_ZVAL_IS_NUMBER;
2166
      /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/
2167
124k
    }
2168
124k
#line 2169 "/src/php-src/Zend/zend_ini_parser.c"
2169
124k
    break;
2170
2171
606k
  case 52:
2172
606k
#line 475 "/src/php-src/Zend/zend_ini_parser.y"
2173
606k
                                                                        { yyval = yyvsp[0]; /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ }
2174
606k
#line 2175 "/src/php-src/Zend/zend_ini_parser.c"
2175
606k
    break;
2176
2177
140k
  case 53:
2178
140k
#line 476 "/src/php-src/Zend/zend_ini_parser.y"
2179
140k
                                                                { yyval = yyvsp[0]; /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ }
2180
140k
#line 2181 "/src/php-src/Zend/zend_ini_parser.c"
2181
140k
    break;
2182
2183
2184
0
#line 2185 "/src/php-src/Zend/zend_ini_parser.c"
2185
2186
2.11M
      default: break;
2187
8.26M
    }
2188
  /* User semantic actions sometimes alter yychar, and that requires
2189
     that yytoken be updated with the new translation.  We take the
2190
     approach of translating immediately before every use of yytoken.
2191
     One alternative is translating here after every semantic action,
2192
     but that translation would be missed if the semantic action invokes
2193
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2194
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
2195
     incorrect destructor might then be invoked immediately.  In the
2196
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
2197
     to an incorrect destructor call or verbose syntax error message
2198
     before the lookahead is translated.  */
2199
8.26M
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2200
2201
8.26M
  YYPOPSTACK (yylen);
2202
8.26M
  yylen = 0;
2203
8.26M
  YY_STACK_PRINT (yyss, yyssp);
2204
2205
8.26M
  *++yyvsp = yyval;
2206
2207
  /* Now 'shift' the result of the reduction.  Determine what state
2208
     that goes to, based on the state we popped back to and the rule
2209
     number reduced by.  */
2210
8.26M
  {
2211
8.26M
    const int yylhs = yyr1[yyn] - YYNTOKENS;
2212
8.26M
    const int yyi = yypgoto[yylhs] + *yyssp;
2213
8.26M
    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
2214
8.26M
               ? yytable[yyi]
2215
8.26M
               : yydefgoto[yylhs]);
2216
8.26M
  }
2217
2218
8.26M
  goto yynewstate;
2219
2220
2221
/*--------------------------------------.
2222
| yyerrlab -- here on detecting error.  |
2223
`--------------------------------------*/
2224
67.5k
yyerrlab:
2225
  /* Make sure we have latest lookahead translation.  See comments at
2226
     user semantic actions for why this is necessary.  */
2227
67.5k
  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2228
2229
  /* If not already recovering from an error, report this error.  */
2230
67.5k
  if (!yyerrstatus)
2231
67.5k
    {
2232
67.5k
      ++yynerrs;
2233
#if ! YYERROR_VERBOSE
2234
      yyerror (YY_("syntax error"));
2235
#else
2236
67.5k
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2237
67.5k
                                        yyssp, yytoken)
2238
67.5k
      {
2239
67.5k
        char const *yymsgp = YY_("syntax error");
2240
67.5k
        int yysyntax_error_status;
2241
67.5k
        yysyntax_error_status = YYSYNTAX_ERROR;
2242
67.5k
        if (yysyntax_error_status == 0)
2243
67.5k
          yymsgp = yymsg;
2244
0
        else if (yysyntax_error_status == 1)
2245
0
          {
2246
0
            if (yymsg != yymsgbuf)
2247
0
              YYSTACK_FREE (yymsg);
2248
0
            yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
2249
0
            if (!yymsg)
2250
0
              {
2251
0
                yymsg = yymsgbuf;
2252
0
                yymsg_alloc = sizeof yymsgbuf;
2253
0
                yysyntax_error_status = 2;
2254
0
              }
2255
0
            else
2256
0
              {
2257
0
                yysyntax_error_status = YYSYNTAX_ERROR;
2258
0
                yymsgp = yymsg;
2259
0
              }
2260
0
          }
2261
67.5k
        yyerror (yymsgp);
2262
67.5k
        if (yysyntax_error_status == 2)
2263
0
          goto yyexhaustedlab;
2264
67.5k
      }
2265
67.5k
# undef YYSYNTAX_ERROR
2266
67.5k
#endif
2267
67.5k
    }
2268
2269
2270
2271
67.5k
  if (yyerrstatus == 3)
2272
0
    {
2273
      /* If just tried and failed to reuse lookahead token after an
2274
         error, discard it.  */
2275
2276
0
      if (yychar <= YYEOF)
2277
0
        {
2278
          /* Return failure if at end of input.  */
2279
0
          if (yychar == YYEOF)
2280
0
            YYABORT;
2281
0
        }
2282
0
      else
2283
0
        {
2284
0
          yydestruct ("Error: discarding",
2285
0
                      yytoken, &yylval);
2286
0
          yychar = YYEMPTY;
2287
0
        }
2288
0
    }
2289
2290
  /* Else will try to reuse lookahead token after shifting the error
2291
     token.  */
2292
67.5k
  goto yyerrlab1;
2293
2294
2295
/*---------------------------------------------------.
2296
| yyerrorlab -- error raised explicitly by YYERROR.  |
2297
`---------------------------------------------------*/
2298
67.5k
yyerrorlab:
2299
  /* Pacify compilers when the user code never invokes YYERROR and the
2300
     label yyerrorlab therefore never appears in user code.  */
2301
0
  if (0)
2302
0
    YYERROR;
2303
2304
  /* Do not reclaim the symbols of the rule whose action triggered
2305
     this YYERROR.  */
2306
0
  YYPOPSTACK (yylen);
2307
0
  yylen = 0;
2308
0
  YY_STACK_PRINT (yyss, yyssp);
2309
0
  yystate = *yyssp;
2310
0
  goto yyerrlab1;
2311
2312
2313
/*-------------------------------------------------------------.
2314
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
2315
`-------------------------------------------------------------*/
2316
67.5k
yyerrlab1:
2317
67.5k
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
2318
2319
67.5k
  for (;;)
2320
238k
    {
2321
238k
      yyn = yypact[yystate];
2322
238k
      if (!yypact_value_is_default (yyn))
2323
160k
        {
2324
160k
          yyn += YYTERROR;
2325
160k
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2326
0
            {
2327
0
              yyn = yytable[yyn];
2328
0
              if (0 < yyn)
2329
0
                break;
2330
0
            }
2331
160k
        }
2332
2333
      /* Pop the current state because it cannot handle the error token.  */
2334
238k
      if (yyssp == yyss)
2335
67.5k
        YYABORT;
2336
2337
2338
170k
      yydestruct ("Error: popping",
2339
170k
                  yystos[yystate], yyvsp);
2340
170k
      YYPOPSTACK (1);
2341
170k
      yystate = *yyssp;
2342
170k
      YY_STACK_PRINT (yyss, yyssp);
2343
170k
    }
2344
2345
0
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2346
0
  *++yyvsp = yylval;
2347
0
  YY_IGNORE_MAYBE_UNINITIALIZED_END
2348
2349
2350
  /* Shift the error token.  */
2351
0
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2352
2353
0
  yystate = yyn;
2354
0
  goto yynewstate;
2355
2356
2357
/*-------------------------------------.
2358
| yyacceptlab -- YYACCEPT comes here.  |
2359
`-------------------------------------*/
2360
29.5k
yyacceptlab:
2361
29.5k
  yyresult = 0;
2362
29.5k
  goto yyreturn;
2363
2364
2365
/*-----------------------------------.
2366
| yyabortlab -- YYABORT comes here.  |
2367
`-----------------------------------*/
2368
67.5k
yyabortlab:
2369
67.5k
  yyresult = 1;
2370
67.5k
  goto yyreturn;
2371
2372
2373
0
#if !defined yyoverflow || YYERROR_VERBOSE
2374
/*-------------------------------------------------.
2375
| yyexhaustedlab -- memory exhaustion comes here.  |
2376
`-------------------------------------------------*/
2377
0
yyexhaustedlab:
2378
0
  yyerror (YY_("memory exhausted"));
2379
0
  yyresult = 2;
2380
  /* Fall through.  */
2381
0
#endif
2382
2383
2384
/*-----------------------------------------------------.
2385
| yyreturn -- parsing is finished, return the result.  |
2386
`-----------------------------------------------------*/
2387
97.1k
yyreturn:
2388
97.1k
  if (yychar != YYEMPTY)
2389
67.5k
    {
2390
      /* Make sure we have latest lookahead translation.  See comments at
2391
         user semantic actions for why this is necessary.  */
2392
67.5k
      yytoken = YYTRANSLATE (yychar);
2393
67.5k
      yydestruct ("Cleanup: discarding lookahead",
2394
67.5k
                  yytoken, &yylval);
2395
67.5k
    }
2396
  /* Do not reclaim the symbols of the rule whose action triggered
2397
     this YYABORT or YYACCEPT.  */
2398
97.1k
  YYPOPSTACK (yylen);
2399
97.1k
  YY_STACK_PRINT (yyss, yyssp);
2400
156k
  while (yyssp != yyss)
2401
59.1k
    {
2402
59.1k
      yydestruct ("Cleanup: popping",
2403
59.1k
                  yystos[+*yyssp], yyvsp);
2404
59.1k
      YYPOPSTACK (1);
2405
59.1k
    }
2406
97.1k
#ifndef yyoverflow
2407
97.1k
  if (yyss != yyssa)
2408
0
    YYSTACK_FREE (yyss);
2409
97.1k
#endif
2410
97.1k
#if YYERROR_VERBOSE
2411
97.1k
  if (yymsg != yymsgbuf)
2412
0
    YYSTACK_FREE (yymsg);
2413
97.1k
#endif
2414
97.1k
  return yyresult;
2415
0
}