Annotation of embedaddon/php/Zend/zend_ini_parser.c, revision 1.1
1.1 ! misho 1:
! 2: /* A Bison parser, made by GNU Bison 2.4.1. */
! 3:
! 4: /* Skeleton implementation for Bison's Yacc-like parsers in C
! 5:
! 6: Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
! 7: Free Software Foundation, Inc.
! 8:
! 9: This program is free software: you can redistribute it and/or modify
! 10: it under the terms of the GNU General Public License as published by
! 11: the Free Software Foundation, either version 3 of the License, or
! 12: (at your option) any later version.
! 13:
! 14: This program is distributed in the hope that it will be useful,
! 15: but WITHOUT ANY WARRANTY; without even the implied warranty of
! 16: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! 17: GNU General Public License for more details.
! 18:
! 19: You should have received a copy of the GNU General Public License
! 20: along with this program. If not, see <http://www.gnu.org/licenses/>. */
! 21:
! 22: /* As a special exception, you may create a larger work that contains
! 23: part or all of the Bison parser skeleton and distribute that work
! 24: under terms of your choice, so long as that work isn't itself a
! 25: parser generator using the skeleton or a modified version thereof
! 26: as a parser skeleton. Alternatively, if you modify or redistribute
! 27: the parser skeleton itself, you may (at your option) remove this
! 28: special exception, which will cause the skeleton and the resulting
! 29: Bison output files to be licensed under the GNU General Public
! 30: License without this special exception.
! 31:
! 32: This special exception was added by the Free Software Foundation in
! 33: version 2.2 of Bison. */
! 34:
! 35: /* C LALR(1) parser skeleton written by Richard Stallman, by
! 36: simplifying the original so-called "semantic" parser. */
! 37:
! 38: /* All symbols defined below should begin with yy or YY, to avoid
! 39: infringing on user name space. This should be done even for local
! 40: variables, as they might otherwise be expanded by user macros.
! 41: There are some unavoidable exceptions within include files to
! 42: define necessary library symbols; they are noted "INFRINGES ON
! 43: USER NAME SPACE" below. */
! 44:
! 45: /* Identify Bison output. */
! 46: #define YYBISON 1
! 47:
! 48: /* Bison version. */
! 49: #define YYBISON_VERSION "2.4.1"
! 50:
! 51: /* Skeleton name. */
! 52: #define YYSKELETON_NAME "yacc.c"
! 53:
! 54: /* Pure parsers. */
! 55: #define YYPURE 1
! 56:
! 57: /* Push parsers. */
! 58: #define YYPUSH 0
! 59:
! 60: /* Pull parsers. */
! 61: #define YYPULL 1
! 62:
! 63: /* Using locations. */
! 64: #define YYLSP_NEEDED 0
! 65:
! 66: /* Substitute the variable and function names. */
! 67: #define yyparse ini_parse
! 68: #define yylex ini_lex
! 69: #define yyerror ini_error
! 70: #define yylval ini_lval
! 71: #define yychar ini_char
! 72: #define yydebug ini_debug
! 73: #define yynerrs ini_nerrs
! 74:
! 75:
! 76: /* Copy the first part of user declarations. */
! 77:
! 78:
! 79: /*
! 80: +----------------------------------------------------------------------+
! 81: | Zend Engine |
! 82: +----------------------------------------------------------------------+
! 83: | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
! 84: +----------------------------------------------------------------------+
! 85: | This source file is subject to version 2.00 of the Zend license, |
! 86: | that is bundled with this package in the file LICENSE, and is |
! 87: | available through the world-wide-web at the following url: |
! 88: | http://www.zend.com/license/2_00.txt. |
! 89: | If you did not receive a copy of the Zend license and are unable to |
! 90: | obtain it through the world-wide-web, please send a note to |
! 91: | license@zend.com so we can mail you a copy immediately. |
! 92: +----------------------------------------------------------------------+
! 93: | Authors: Zeev Suraski <zeev@zend.com> |
! 94: | Jani Taskinen <jani@php.net> |
! 95: +----------------------------------------------------------------------+
! 96: */
! 97:
! 98: /* $Id: zend_ini_parser.y 321634 2012-01-01 13:15:04Z felipe $ */
! 99:
! 100: #define DEBUG_CFG_PARSER 0
! 101:
! 102: #include "zend.h"
! 103: #include "zend_API.h"
! 104: #include "zend_ini.h"
! 105: #include "zend_constants.h"
! 106: #include "zend_ini_scanner.h"
! 107: #include "zend_extensions.h"
! 108:
! 109: #define YYERROR_VERBOSE
! 110: #define YYSTYPE zval
! 111:
! 112: #ifdef ZTS
! 113: #define YYPARSE_PARAM tsrm_ls
! 114: #define YYLEX_PARAM tsrm_ls
! 115: int ini_parse(void *arg);
! 116: #else
! 117: int ini_parse(void);
! 118: #endif
! 119:
! 120: #define ZEND_INI_PARSER_CB (CG(ini_parser_param))->ini_parser_cb
! 121: #define ZEND_INI_PARSER_ARG (CG(ini_parser_param))->arg
! 122:
! 123: /* {{{ zend_ini_do_op()
! 124: */
! 125: static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
! 126: {
! 127: int i_result;
! 128: int i_op1, i_op2;
! 129: char str_result[MAX_LENGTH_OF_LONG];
! 130:
! 131: i_op1 = atoi(Z_STRVAL_P(op1));
! 132: free(Z_STRVAL_P(op1));
! 133: if (op2) {
! 134: i_op2 = atoi(Z_STRVAL_P(op2));
! 135: free(Z_STRVAL_P(op2));
! 136: } else {
! 137: i_op2 = 0;
! 138: }
! 139:
! 140: switch (type) {
! 141: case '|':
! 142: i_result = i_op1 | i_op2;
! 143: break;
! 144: case '&':
! 145: i_result = i_op1 & i_op2;
! 146: break;
! 147: case '~':
! 148: i_result = ~i_op1;
! 149: break;
! 150: case '!':
! 151: i_result = !i_op1;
! 152: break;
! 153: default:
! 154: i_result = 0;
! 155: break;
! 156: }
! 157:
! 158: Z_STRLEN_P(result) = zend_sprintf(str_result, "%d", i_result);
! 159: Z_STRVAL_P(result) = (char *) malloc(Z_STRLEN_P(result)+1);
! 160: memcpy(Z_STRVAL_P(result), str_result, Z_STRLEN_P(result));
! 161: Z_STRVAL_P(result)[Z_STRLEN_P(result)] = 0;
! 162: Z_TYPE_P(result) = IS_STRING;
! 163: }
! 164: /* }}} */
! 165:
! 166: /* {{{ zend_ini_init_string()
! 167: */
! 168: static void zend_ini_init_string(zval *result)
! 169: {
! 170: Z_STRVAL_P(result) = malloc(1);
! 171: Z_STRVAL_P(result)[0] = 0;
! 172: Z_STRLEN_P(result) = 0;
! 173: Z_TYPE_P(result) = IS_STRING;
! 174: }
! 175: /* }}} */
! 176:
! 177: /* {{{ zend_ini_add_string()
! 178: */
! 179: static void zend_ini_add_string(zval *result, zval *op1, zval *op2)
! 180: {
! 181: int length = Z_STRLEN_P(op1) + Z_STRLEN_P(op2);
! 182:
! 183: Z_STRVAL_P(result) = (char *) realloc(Z_STRVAL_P(op1), length+1);
! 184: memcpy(Z_STRVAL_P(result)+Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2));
! 185: Z_STRVAL_P(result)[length] = 0;
! 186: Z_STRLEN_P(result) = length;
! 187: Z_TYPE_P(result) = IS_STRING;
! 188: }
! 189: /* }}} */
! 190:
! 191: /* {{{ zend_ini_get_constant()
! 192: */
! 193: static void zend_ini_get_constant(zval *result, zval *name TSRMLS_DC)
! 194: {
! 195: zval z_constant;
! 196:
! 197: /* If name contains ':' it is not a constant. Bug #26893. */
! 198: if (!memchr(Z_STRVAL_P(name), ':', Z_STRLEN_P(name))
! 199: && zend_get_constant(Z_STRVAL_P(name), Z_STRLEN_P(name), &z_constant TSRMLS_CC)) {
! 200: /* z_constant is emalloc()'d */
! 201: convert_to_string(&z_constant);
! 202: Z_STRVAL_P(result) = zend_strndup(Z_STRVAL(z_constant), Z_STRLEN(z_constant));
! 203: Z_STRLEN_P(result) = Z_STRLEN(z_constant);
! 204: Z_TYPE_P(result) = Z_TYPE(z_constant);
! 205: zval_dtor(&z_constant);
! 206: free(Z_STRVAL_P(name));
! 207: } else {
! 208: *result = *name;
! 209: }
! 210: }
! 211: /* }}} */
! 212:
! 213: /* {{{ zend_ini_get_var()
! 214: */
! 215: static void zend_ini_get_var(zval *result, zval *name TSRMLS_DC)
! 216: {
! 217: zval curval;
! 218: char *envvar;
! 219:
! 220: /* Fetch configuration option value */
! 221: if (zend_get_configuration_directive(Z_STRVAL_P(name), Z_STRLEN_P(name)+1, &curval) == SUCCESS) {
! 222: Z_STRVAL_P(result) = zend_strndup(Z_STRVAL(curval), Z_STRLEN(curval));
! 223: Z_STRLEN_P(result) = Z_STRLEN(curval);
! 224: /* ..or if not found, try ENV */
! 225: } else if ((envvar = zend_getenv(Z_STRVAL_P(name), Z_STRLEN_P(name) TSRMLS_CC)) != NULL ||
! 226: (envvar = getenv(Z_STRVAL_P(name))) != NULL) {
! 227: Z_STRVAL_P(result) = strdup(envvar);
! 228: Z_STRLEN_P(result) = strlen(envvar);
! 229: } else {
! 230: zend_ini_init_string(result);
! 231: }
! 232: }
! 233: /* }}} */
! 234:
! 235: /* {{{ ini_error()
! 236: */
! 237: static void ini_error(char *msg)
! 238: {
! 239: char *error_buf;
! 240: int error_buf_len;
! 241: char *currently_parsed_filename;
! 242: TSRMLS_FETCH();
! 243:
! 244: currently_parsed_filename = zend_ini_scanner_get_filename(TSRMLS_C);
! 245: if (currently_parsed_filename) {
! 246: error_buf_len = 128 + strlen(msg) + strlen(currently_parsed_filename); /* should be more than enough */
! 247: error_buf = (char *) emalloc(error_buf_len);
! 248:
! 249: sprintf(error_buf, "%s in %s on line %d\n", msg, currently_parsed_filename, zend_ini_scanner_get_lineno(TSRMLS_C));
! 250: } else {
! 251: error_buf = estrdup("Invalid configuration directive\n");
! 252: }
! 253:
! 254: if (CG(ini_parser_unbuffered_errors)) {
! 255: #ifdef PHP_WIN32
! 256: MessageBox(NULL, error_buf, "PHP Error", MB_OK|MB_TOPMOST|0x00200000L);
! 257: #else
! 258: fprintf(stderr, "PHP: %s", error_buf);
! 259: #endif
! 260: } else {
! 261: zend_error(E_WARNING, "%s", error_buf);
! 262: }
! 263: efree(error_buf);
! 264: }
! 265: /* }}} */
! 266:
! 267: /* {{{ zend_parse_ini_file()
! 268: */
! 269: ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg TSRMLS_DC)
! 270: {
! 271: int retval;
! 272: zend_ini_parser_param ini_parser_param;
! 273:
! 274: ini_parser_param.ini_parser_cb = ini_parser_cb;
! 275: ini_parser_param.arg = arg;
! 276: CG(ini_parser_param) = &ini_parser_param;
! 277:
! 278: if (zend_ini_open_file_for_scanning(fh, scanner_mode TSRMLS_CC) == FAILURE) {
! 279: return FAILURE;
! 280: }
! 281:
! 282: CG(ini_parser_unbuffered_errors) = unbuffered_errors;
! 283: retval = ini_parse(TSRMLS_C);
! 284: zend_file_handle_dtor(fh TSRMLS_CC);
! 285:
! 286: shutdown_ini_scanner(TSRMLS_C);
! 287:
! 288: if (retval == 0) {
! 289: return SUCCESS;
! 290: } else {
! 291: return FAILURE;
! 292: }
! 293: }
! 294: /* }}} */
! 295:
! 296: /* {{{ zend_parse_ini_string()
! 297: */
! 298: ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg TSRMLS_DC)
! 299: {
! 300: int retval;
! 301: zend_ini_parser_param ini_parser_param;
! 302:
! 303: ini_parser_param.ini_parser_cb = ini_parser_cb;
! 304: ini_parser_param.arg = arg;
! 305: CG(ini_parser_param) = &ini_parser_param;
! 306:
! 307: if (zend_ini_prepare_string_for_scanning(str, scanner_mode TSRMLS_CC) == FAILURE) {
! 308: return FAILURE;
! 309: }
! 310:
! 311: CG(ini_parser_unbuffered_errors) = unbuffered_errors;
! 312: retval = ini_parse(TSRMLS_C);
! 313:
! 314: shutdown_ini_scanner(TSRMLS_C);
! 315:
! 316: if (retval == 0) {
! 317: return SUCCESS;
! 318: } else {
! 319: return FAILURE;
! 320: }
! 321: }
! 322: /* }}} */
! 323:
! 324:
! 325:
! 326:
! 327: /* Enabling traces. */
! 328: #ifndef YYDEBUG
! 329: # define YYDEBUG 0
! 330: #endif
! 331:
! 332: /* Enabling verbose error messages. */
! 333: #ifdef YYERROR_VERBOSE
! 334: # undef YYERROR_VERBOSE
! 335: # define YYERROR_VERBOSE 1
! 336: #else
! 337: # define YYERROR_VERBOSE 0
! 338: #endif
! 339:
! 340: /* Enabling the token table. */
! 341: #ifndef YYTOKEN_TABLE
! 342: # define YYTOKEN_TABLE 0
! 343: #endif
! 344:
! 345:
! 346: /* Tokens. */
! 347: #ifndef YYTOKENTYPE
! 348: # define YYTOKENTYPE
! 349: /* Put the tokens into the symbol table, so that GDB and other debuggers
! 350: know about them. */
! 351: enum yytokentype {
! 352: TC_SECTION = 258,
! 353: TC_RAW = 259,
! 354: TC_CONSTANT = 260,
! 355: TC_NUMBER = 261,
! 356: TC_STRING = 262,
! 357: TC_WHITESPACE = 263,
! 358: TC_LABEL = 264,
! 359: TC_OFFSET = 265,
! 360: TC_DOLLAR_CURLY = 266,
! 361: TC_VARNAME = 267,
! 362: TC_QUOTED_STRING = 268,
! 363: BOOL_TRUE = 269,
! 364: BOOL_FALSE = 270,
! 365: END_OF_LINE = 271
! 366: };
! 367: #endif
! 368: /* Tokens. */
! 369: #define TC_SECTION 258
! 370: #define TC_RAW 259
! 371: #define TC_CONSTANT 260
! 372: #define TC_NUMBER 261
! 373: #define TC_STRING 262
! 374: #define TC_WHITESPACE 263
! 375: #define TC_LABEL 264
! 376: #define TC_OFFSET 265
! 377: #define TC_DOLLAR_CURLY 266
! 378: #define TC_VARNAME 267
! 379: #define TC_QUOTED_STRING 268
! 380: #define BOOL_TRUE 269
! 381: #define BOOL_FALSE 270
! 382: #define END_OF_LINE 271
! 383:
! 384:
! 385:
! 386:
! 387: #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
! 388: typedef int YYSTYPE;
! 389: # define YYSTYPE_IS_TRIVIAL 1
! 390: # define yystype YYSTYPE /* obsolescent; will be withdrawn */
! 391: # define YYSTYPE_IS_DECLARED 1
! 392: #endif
! 393:
! 394:
! 395: /* Copy the second part of user declarations. */
! 396:
! 397:
! 398:
! 399: #ifdef short
! 400: # undef short
! 401: #endif
! 402:
! 403: #ifdef YYTYPE_UINT8
! 404: typedef YYTYPE_UINT8 yytype_uint8;
! 405: #else
! 406: typedef unsigned char yytype_uint8;
! 407: #endif
! 408:
! 409: #ifdef YYTYPE_INT8
! 410: typedef YYTYPE_INT8 yytype_int8;
! 411: #elif (defined __STDC__ || defined __C99__FUNC__ \
! 412: || defined __cplusplus || defined _MSC_VER)
! 413: typedef signed char yytype_int8;
! 414: #else
! 415: typedef short int yytype_int8;
! 416: #endif
! 417:
! 418: #ifdef YYTYPE_UINT16
! 419: typedef YYTYPE_UINT16 yytype_uint16;
! 420: #else
! 421: typedef unsigned short int yytype_uint16;
! 422: #endif
! 423:
! 424: #ifdef YYTYPE_INT16
! 425: typedef YYTYPE_INT16 yytype_int16;
! 426: #else
! 427: typedef short int yytype_int16;
! 428: #endif
! 429:
! 430: #ifndef YYSIZE_T
! 431: # ifdef __SIZE_TYPE__
! 432: # define YYSIZE_T __SIZE_TYPE__
! 433: # elif defined size_t
! 434: # define YYSIZE_T size_t
! 435: # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
! 436: || defined __cplusplus || defined _MSC_VER)
! 437: # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
! 438: # define YYSIZE_T size_t
! 439: # else
! 440: # define YYSIZE_T unsigned int
! 441: # endif
! 442: #endif
! 443:
! 444: #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
! 445:
! 446: #ifndef YY_
! 447: # if YYENABLE_NLS
! 448: # if ENABLE_NLS
! 449: # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
! 450: # define YY_(msgid) dgettext ("bison-runtime", msgid)
! 451: # endif
! 452: # endif
! 453: # ifndef YY_
! 454: # define YY_(msgid) msgid
! 455: # endif
! 456: #endif
! 457:
! 458: /* Suppress unused-variable warnings by "using" E. */
! 459: #if ! defined lint || defined __GNUC__
! 460: # define YYUSE(e) ((void) (e))
! 461: #else
! 462: # define YYUSE(e) /* empty */
! 463: #endif
! 464:
! 465: /* Identity function, used to suppress warnings about constant conditions. */
! 466: #ifndef lint
! 467: # define YYID(n) (n)
! 468: #else
! 469: #if (defined __STDC__ || defined __C99__FUNC__ \
! 470: || defined __cplusplus || defined _MSC_VER)
! 471: static int
! 472: YYID (int yyi)
! 473: #else
! 474: static int
! 475: YYID (yyi)
! 476: int yyi;
! 477: #endif
! 478: {
! 479: return yyi;
! 480: }
! 481: #endif
! 482:
! 483: #if ! defined yyoverflow || YYERROR_VERBOSE
! 484:
! 485: /* The parser invokes alloca or malloc; define the necessary symbols. */
! 486:
! 487: # ifdef YYSTACK_USE_ALLOCA
! 488: # if YYSTACK_USE_ALLOCA
! 489: # ifdef __GNUC__
! 490: # define YYSTACK_ALLOC __builtin_alloca
! 491: # elif defined __BUILTIN_VA_ARG_INCR
! 492: # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
! 493: # elif defined _AIX
! 494: # define YYSTACK_ALLOC __alloca
! 495: # elif defined _MSC_VER
! 496: # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
! 497: # define alloca _alloca
! 498: # else
! 499: # define YYSTACK_ALLOC alloca
! 500: # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
! 501: || defined __cplusplus || defined _MSC_VER)
! 502: # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
! 503: # ifndef _STDLIB_H
! 504: # define _STDLIB_H 1
! 505: # endif
! 506: # endif
! 507: # endif
! 508: # endif
! 509: # endif
! 510:
! 511: # ifdef YYSTACK_ALLOC
! 512: /* Pacify GCC's `empty if-body' warning. */
! 513: # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
! 514: # ifndef YYSTACK_ALLOC_MAXIMUM
! 515: /* The OS might guarantee only one guard page at the bottom of the stack,
! 516: and a page size can be as small as 4096 bytes. So we cannot safely
! 517: invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
! 518: to allow for a few compiler-allocated temporary stack slots. */
! 519: # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
! 520: # endif
! 521: # else
! 522: # define YYSTACK_ALLOC YYMALLOC
! 523: # define YYSTACK_FREE YYFREE
! 524: # ifndef YYSTACK_ALLOC_MAXIMUM
! 525: # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
! 526: # endif
! 527: # if (defined __cplusplus && ! defined _STDLIB_H \
! 528: && ! ((defined YYMALLOC || defined malloc) \
! 529: && (defined YYFREE || defined free)))
! 530: # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
! 531: # ifndef _STDLIB_H
! 532: # define _STDLIB_H 1
! 533: # endif
! 534: # endif
! 535: # ifndef YYMALLOC
! 536: # define YYMALLOC malloc
! 537: # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
! 538: || defined __cplusplus || defined _MSC_VER)
! 539: void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
! 540: # endif
! 541: # endif
! 542: # ifndef YYFREE
! 543: # define YYFREE free
! 544: # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
! 545: || defined __cplusplus || defined _MSC_VER)
! 546: void free (void *); /* INFRINGES ON USER NAME SPACE */
! 547: # endif
! 548: # endif
! 549: # endif
! 550: #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
! 551:
! 552:
! 553: #if (! defined yyoverflow \
! 554: && (! defined __cplusplus \
! 555: || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
! 556:
! 557: /* A type that is properly aligned for any stack member. */
! 558: union yyalloc
! 559: {
! 560: yytype_int16 yyss_alloc;
! 561: YYSTYPE yyvs_alloc;
! 562: };
! 563:
! 564: /* The size of the maximum gap between one aligned stack and the next. */
! 565: # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
! 566:
! 567: /* The size of an array large to enough to hold all stacks, each with
! 568: N elements. */
! 569: # define YYSTACK_BYTES(N) \
! 570: ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
! 571: + YYSTACK_GAP_MAXIMUM)
! 572:
! 573: /* Copy COUNT objects from FROM to TO. The source and destination do
! 574: not overlap. */
! 575: # ifndef YYCOPY
! 576: # if defined __GNUC__ && 1 < __GNUC__
! 577: # define YYCOPY(To, From, Count) \
! 578: __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
! 579: # else
! 580: # define YYCOPY(To, From, Count) \
! 581: do \
! 582: { \
! 583: YYSIZE_T yyi; \
! 584: for (yyi = 0; yyi < (Count); yyi++) \
! 585: (To)[yyi] = (From)[yyi]; \
! 586: } \
! 587: while (YYID (0))
! 588: # endif
! 589: # endif
! 590:
! 591: /* Relocate STACK from its old location to the new one. The
! 592: local variables YYSIZE and YYSTACKSIZE give the old and new number of
! 593: elements in the stack, and YYPTR gives the new location of the
! 594: stack. Advance YYPTR to a properly aligned location for the next
! 595: stack. */
! 596: # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
! 597: do \
! 598: { \
! 599: YYSIZE_T yynewbytes; \
! 600: YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
! 601: Stack = &yyptr->Stack_alloc; \
! 602: yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
! 603: yyptr += yynewbytes / sizeof (*yyptr); \
! 604: } \
! 605: while (YYID (0))
! 606:
! 607: #endif
! 608:
! 609: /* YYFINAL -- State number of the termination state. */
! 610: #define YYFINAL 2
! 611: /* YYLAST -- Last index in YYTABLE. */
! 612: #define YYLAST 109
! 613:
! 614: /* YYNTOKENS -- Number of terminals. */
! 615: #define YYNTOKENS 43
! 616: /* YYNNTS -- Number of nonterminals. */
! 617: #define YYNNTS 13
! 618: /* YYNRULES -- Number of rules. */
! 619: #define YYNRULES 48
! 620: /* YYNRULES -- Number of states. */
! 621: #define YYNSTATES 69
! 622:
! 623: /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
! 624: #define YYUNDEFTOK 2
! 625: #define YYMAXUTOK 271
! 626:
! 627: #define YYTRANSLATE(YYX) \
! 628: ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
! 629:
! 630: /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
! 631: static const yytype_uint8 yytranslate[] =
! 632: {
! 633: 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 634: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 635: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 636: 2, 2, 2, 39, 21, 2, 29, 28, 38, 22,
! 637: 41, 42, 27, 24, 19, 25, 20, 26, 2, 2,
! 638: 2, 2, 2, 2, 2, 2, 2, 2, 18, 2,
! 639: 31, 17, 32, 33, 34, 2, 2, 2, 2, 2,
! 640: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 641: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 642: 2, 2, 2, 40, 23, 2, 2, 2, 2, 2,
! 643: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 644: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 645: 2, 2, 2, 35, 37, 36, 30, 2, 2, 2,
! 646: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 647: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 648: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 649: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 650: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 651: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 652: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 653: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 654: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 655: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 656: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 657: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 658: 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
! 659: 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
! 660: 15, 16
! 661: };
! 662:
! 663: #if YYDEBUG
! 664: /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
! 665: YYRHS. */
! 666: static const yytype_uint8 yyprhs[] =
! 667: {
! 668: 0, 0, 3, 6, 7, 11, 15, 21, 23, 25,
! 669: 27, 28, 30, 32, 34, 36, 38, 39, 42, 45,
! 670: 46, 48, 50, 54, 57, 60, 65, 67, 69, 73,
! 671: 76, 79, 84, 86, 90, 94, 97, 100, 104, 108,
! 672: 110, 112, 114, 116, 118, 120, 122, 124, 126
! 673: };
! 674:
! 675: /* YYRHS -- A `-1'-separated list of the rules' RHS. */
! 676: static const yytype_int8 yyrhs[] =
! 677: {
! 678: 44, 0, -1, 44, 45, -1, -1, 3, 46, 40,
! 679: -1, 9, 17, 47, -1, 10, 48, 40, 17, 47,
! 680: -1, 9, -1, 16, -1, 50, -1, -1, 52, -1,
! 681: 14, -1, 15, -1, 16, -1, 51, -1, -1, 49,
! 682: 53, -1, 49, 13, -1, -1, 53, -1, 54, -1,
! 683: 21, 49, 21, -1, 50, 53, -1, 50, 54, -1,
! 684: 50, 21, 49, 21, -1, 53, -1, 55, -1, 21,
! 685: 49, 21, -1, 51, 53, -1, 51, 55, -1, 51,
! 686: 21, 49, 21, -1, 51, -1, 52, 37, 52, -1,
! 687: 52, 38, 52, -1, 30, 52, -1, 39, 52, -1,
! 688: 41, 52, 42, -1, 11, 12, 36, -1, 5, -1,
! 689: 4, -1, 6, -1, 7, -1, 8, -1, 5, -1,
! 690: 4, -1, 6, -1, 7, -1, 8, -1
! 691: };
! 692:
! 693: /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
! 694: static const yytype_uint16 yyrline[] =
! 695: {
! 696: 0, 273, 273, 274, 278, 285, 293, 302, 303, 307,
! 697: 308, 312, 313, 314, 315, 319, 320, 324, 325, 326,
! 698: 330, 331, 332, 333, 334, 335, 339, 340, 341, 342,
! 699: 343, 344, 348, 349, 350, 351, 352, 353, 357, 361,
! 700: 362, 363, 364, 365, 369, 370, 371, 372, 373
! 701: };
! 702: #endif
! 703:
! 704: #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
! 705: /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
! 706: First, the terminals, then, starting at YYNTOKENS, nonterminals. */
! 707: static const char *const yytname[] =
! 708: {
! 709: "$end", "error", "$undefined", "TC_SECTION", "TC_RAW", "TC_CONSTANT",
! 710: "TC_NUMBER", "TC_STRING", "TC_WHITESPACE", "TC_LABEL", "TC_OFFSET",
! 711: "TC_DOLLAR_CURLY", "TC_VARNAME", "TC_QUOTED_STRING", "BOOL_TRUE",
! 712: "BOOL_FALSE", "END_OF_LINE", "'='", "':'", "','", "'.'", "'\"'", "'\\''",
! 713: "'^'", "'+'", "'-'", "'/'", "'*'", "'%'", "'$'", "'~'", "'<'", "'>'",
! 714: "'?'", "'@'", "'{'", "'}'", "'|'", "'&'", "'!'", "']'", "'('", "')'",
! 715: "$accept", "statement_list", "statement", "section_string_or_value",
! 716: "string_or_value", "option_offset", "encapsed_list",
! 717: "var_string_list_section", "var_string_list", "expr", "cfg_var_ref",
! 718: "constant_literal", "constant_string", 0
! 719: };
! 720: #endif
! 721:
! 722: # ifdef YYPRINT
! 723: /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
! 724: token YYLEX-NUM. */
! 725: static const yytype_uint16 yytoknum[] =
! 726: {
! 727: 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
! 728: 265, 266, 267, 268, 269, 270, 271, 61, 58, 44,
! 729: 46, 34, 39, 94, 43, 45, 47, 42, 37, 36,
! 730: 126, 60, 62, 63, 64, 123, 125, 124, 38, 33,
! 731: 93, 40, 41
! 732: };
! 733: # endif
! 734:
! 735: /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
! 736: static const yytype_uint8 yyr1[] =
! 737: {
! 738: 0, 43, 44, 44, 45, 45, 45, 45, 45, 46,
! 739: 46, 47, 47, 47, 47, 48, 48, 49, 49, 49,
! 740: 50, 50, 50, 50, 50, 50, 51, 51, 51, 51,
! 741: 51, 51, 52, 52, 52, 52, 52, 52, 53, 54,
! 742: 54, 54, 54, 54, 55, 55, 55, 55, 55
! 743: };
! 744:
! 745: /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
! 746: static const yytype_uint8 yyr2[] =
! 747: {
! 748: 0, 2, 2, 0, 3, 3, 5, 1, 1, 1,
! 749: 0, 1, 1, 1, 1, 1, 0, 2, 2, 0,
! 750: 1, 1, 3, 2, 2, 4, 1, 1, 3, 2,
! 751: 2, 4, 1, 3, 3, 2, 2, 3, 3, 1,
! 752: 1, 1, 1, 1, 1, 1, 1, 1, 1
! 753: };
! 754:
! 755: /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
! 756: STATE-NUM when YYTABLE doesn't specify something else to do. Zero
! 757: means the default is an error. */
! 758: static const yytype_uint8 yydefact[] =
! 759: {
! 760: 3, 0, 1, 10, 7, 16, 8, 2, 40, 39,
! 761: 41, 42, 43, 0, 19, 0, 9, 20, 21, 0,
! 762: 45, 44, 46, 47, 48, 19, 0, 15, 26, 27,
! 763: 0, 0, 4, 19, 23, 24, 12, 13, 14, 0,
! 764: 0, 0, 5, 32, 11, 0, 0, 19, 29, 30,
! 765: 38, 18, 22, 17, 0, 35, 36, 0, 0, 0,
! 766: 28, 0, 0, 25, 37, 33, 34, 6, 31
! 767: };
! 768:
! 769: /* YYDEFGOTO[NTERM-NUM]. */
! 770: static const yytype_int8 yydefgoto[] =
! 771: {
! 772: -1, 1, 7, 15, 42, 26, 31, 16, 43, 44,
! 773: 28, 18, 29
! 774: };
! 775:
! 776: /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
! 777: STATE-NUM. */
! 778: #define YYPACT_NINF -36
! 779: static const yytype_int8 yypact[] =
! 780: {
! 781: -36, 93, -36, 39, -5, 65, -36, -36, -36, -36,
! 782: -36, -36, -36, 8, -36, -18, 73, -36, -36, 0,
! 783: -36, -36, -36, -36, -36, -36, -15, 84, -36, -36,
! 784: -9, 41, -36, -36, -36, -36, -36, -36, -36, 27,
! 785: 27, 27, -36, 84, -35, 42, 12, -36, -36, -36,
! 786: -36, -36, -36, -36, 54, -36, -36, 45, 27, 27,
! 787: -36, 0, 86, -36, -36, -36, -36, -36, -36
! 788: };
! 789:
! 790: /* YYPGOTO[NTERM-NUM]. */
! 791: static const yytype_int8 yypgoto[] =
! 792: {
! 793: -36, -36, -36, -36, -12, -36, -24, -36, 51, -22,
! 794: -3, 48, -17
! 795: };
! 796:
! 797: /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
! 798: positive, shift that token. If negative, reduce the rule which
! 799: number is the opposite. If zero, do what YYDEFACT says.
! 800: If YYTABLE_NINF, syntax error. */
! 801: #define YYTABLE_NINF -1
! 802: static const yytype_uint8 yytable[] =
! 803: {
! 804: 17, 45, 58, 59, 20, 21, 22, 23, 24, 54,
! 805: 49, 13, 19, 34, 36, 37, 38, 55, 56, 57,
! 806: 30, 25, 32, 62, 48, 46, 49, 50, 53, 61,
! 807: 39, 20, 21, 22, 23, 24, 65, 66, 13, 40,
! 808: 48, 41, 53, 8, 9, 10, 11, 12, 25, 67,
! 809: 13, 53, 13, 13, 51, 51, 27, 39, 0, 53,
! 810: 14, 0, 52, 60, 35, 13, 40, 51, 41, 20,
! 811: 21, 22, 23, 24, 0, 63, 13, 8, 9, 10,
! 812: 11, 12, 58, 59, 13, 0, 25, 64, 20, 21,
! 813: 22, 23, 24, 2, 33, 13, 3, 13, 0, 51,
! 814: 0, 0, 4, 5, 0, 47, 0, 68, 0, 6
! 815: };
! 816:
! 817: static const yytype_int8 yycheck[] =
! 818: {
! 819: 3, 25, 37, 38, 4, 5, 6, 7, 8, 33,
! 820: 27, 11, 17, 16, 14, 15, 16, 39, 40, 41,
! 821: 12, 21, 40, 47, 27, 40, 43, 36, 31, 17,
! 822: 30, 4, 5, 6, 7, 8, 58, 59, 11, 39,
! 823: 43, 41, 45, 4, 5, 6, 7, 8, 21, 61,
! 824: 11, 54, 11, 11, 13, 13, 5, 30, -1, 62,
! 825: 21, -1, 21, 21, 16, 11, 39, 13, 41, 4,
! 826: 5, 6, 7, 8, -1, 21, 11, 4, 5, 6,
! 827: 7, 8, 37, 38, 11, -1, 21, 42, 4, 5,
! 828: 6, 7, 8, 0, 21, 11, 3, 11, -1, 13,
! 829: -1, -1, 9, 10, -1, 21, -1, 21, -1, 16
! 830: };
! 831:
! 832: /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
! 833: symbol of state STATE-NUM. */
! 834: static const yytype_uint8 yystos[] =
! 835: {
! 836: 0, 44, 0, 3, 9, 10, 16, 45, 4, 5,
! 837: 6, 7, 8, 11, 21, 46, 50, 53, 54, 17,
! 838: 4, 5, 6, 7, 8, 21, 48, 51, 53, 55,
! 839: 12, 49, 40, 21, 53, 54, 14, 15, 16, 30,
! 840: 39, 41, 47, 51, 52, 49, 40, 21, 53, 55,
! 841: 36, 13, 21, 53, 49, 52, 52, 52, 37, 38,
! 842: 21, 17, 49, 21, 42, 52, 52, 47, 21
! 843: };
! 844:
! 845: #define yyerrok (yyerrstatus = 0)
! 846: #define yyclearin (yychar = YYEMPTY)
! 847: #define YYEMPTY (-2)
! 848: #define YYEOF 0
! 849:
! 850: #define YYACCEPT goto yyacceptlab
! 851: #define YYABORT goto yyabortlab
! 852: #define YYERROR goto yyerrorlab
! 853:
! 854:
! 855: /* Like YYERROR except do call yyerror. This remains here temporarily
! 856: to ease the transition to the new meaning of YYERROR, for GCC.
! 857: Once GCC version 2 has supplanted version 1, this can go. */
! 858:
! 859: #define YYFAIL goto yyerrlab
! 860:
! 861: #define YYRECOVERING() (!!yyerrstatus)
! 862:
! 863: #define YYBACKUP(Token, Value) \
! 864: do \
! 865: if (yychar == YYEMPTY && yylen == 1) \
! 866: { \
! 867: yychar = (Token); \
! 868: yylval = (Value); \
! 869: yytoken = YYTRANSLATE (yychar); \
! 870: YYPOPSTACK (1); \
! 871: goto yybackup; \
! 872: } \
! 873: else \
! 874: { \
! 875: yyerror (YY_("syntax error: cannot back up")); \
! 876: YYERROR; \
! 877: } \
! 878: while (YYID (0))
! 879:
! 880:
! 881: #define YYTERROR 1
! 882: #define YYERRCODE 256
! 883:
! 884:
! 885: /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
! 886: If N is 0, then set CURRENT to the empty location which ends
! 887: the previous symbol: RHS[0] (always defined). */
! 888:
! 889: #define YYRHSLOC(Rhs, K) ((Rhs)[K])
! 890: #ifndef YYLLOC_DEFAULT
! 891: # define YYLLOC_DEFAULT(Current, Rhs, N) \
! 892: do \
! 893: if (YYID (N)) \
! 894: { \
! 895: (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
! 896: (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
! 897: (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
! 898: (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
! 899: } \
! 900: else \
! 901: { \
! 902: (Current).first_line = (Current).last_line = \
! 903: YYRHSLOC (Rhs, 0).last_line; \
! 904: (Current).first_column = (Current).last_column = \
! 905: YYRHSLOC (Rhs, 0).last_column; \
! 906: } \
! 907: while (YYID (0))
! 908: #endif
! 909:
! 910:
! 911: /* YY_LOCATION_PRINT -- Print the location on the stream.
! 912: This macro was not mandated originally: define only if we know
! 913: we won't break user code: when these are the locations we know. */
! 914:
! 915: #ifndef YY_LOCATION_PRINT
! 916: # if YYLTYPE_IS_TRIVIAL
! 917: # define YY_LOCATION_PRINT(File, Loc) \
! 918: fprintf (File, "%d.%d-%d.%d", \
! 919: (Loc).first_line, (Loc).first_column, \
! 920: (Loc).last_line, (Loc).last_column)
! 921: # else
! 922: # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
! 923: # endif
! 924: #endif
! 925:
! 926:
! 927: /* YYLEX -- calling `yylex' with the right arguments. */
! 928:
! 929: #ifdef YYLEX_PARAM
! 930: # define YYLEX yylex (&yylval, YYLEX_PARAM)
! 931: #else
! 932: # define YYLEX yylex (&yylval)
! 933: #endif
! 934:
! 935: /* Enable debugging if requested. */
! 936: #if YYDEBUG
! 937:
! 938: # ifndef YYFPRINTF
! 939: # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
! 940: # define YYFPRINTF fprintf
! 941: # endif
! 942:
! 943: # define YYDPRINTF(Args) \
! 944: do { \
! 945: if (yydebug) \
! 946: YYFPRINTF Args; \
! 947: } while (YYID (0))
! 948:
! 949: # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
! 950: do { \
! 951: if (yydebug) \
! 952: { \
! 953: YYFPRINTF (stderr, "%s ", Title); \
! 954: yy_symbol_print (stderr, \
! 955: Type, Value); \
! 956: YYFPRINTF (stderr, "\n"); \
! 957: } \
! 958: } while (YYID (0))
! 959:
! 960:
! 961: /*--------------------------------.
! 962: | Print this symbol on YYOUTPUT. |
! 963: `--------------------------------*/
! 964:
! 965: /*ARGSUSED*/
! 966: #if (defined __STDC__ || defined __C99__FUNC__ \
! 967: || defined __cplusplus || defined _MSC_VER)
! 968: static void
! 969: yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
! 970: #else
! 971: static void
! 972: yy_symbol_value_print (yyoutput, yytype, yyvaluep)
! 973: FILE *yyoutput;
! 974: int yytype;
! 975: YYSTYPE const * const yyvaluep;
! 976: #endif
! 977: {
! 978: if (!yyvaluep)
! 979: return;
! 980: # ifdef YYPRINT
! 981: if (yytype < YYNTOKENS)
! 982: YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
! 983: # else
! 984: YYUSE (yyoutput);
! 985: # endif
! 986: switch (yytype)
! 987: {
! 988: default:
! 989: break;
! 990: }
! 991: }
! 992:
! 993:
! 994: /*--------------------------------.
! 995: | Print this symbol on YYOUTPUT. |
! 996: `--------------------------------*/
! 997:
! 998: #if (defined __STDC__ || defined __C99__FUNC__ \
! 999: || defined __cplusplus || defined _MSC_VER)
! 1000: static void
! 1001: yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
! 1002: #else
! 1003: static void
! 1004: yy_symbol_print (yyoutput, yytype, yyvaluep)
! 1005: FILE *yyoutput;
! 1006: int yytype;
! 1007: YYSTYPE const * const yyvaluep;
! 1008: #endif
! 1009: {
! 1010: if (yytype < YYNTOKENS)
! 1011: YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
! 1012: else
! 1013: YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
! 1014:
! 1015: yy_symbol_value_print (yyoutput, yytype, yyvaluep);
! 1016: YYFPRINTF (yyoutput, ")");
! 1017: }
! 1018:
! 1019: /*------------------------------------------------------------------.
! 1020: | yy_stack_print -- Print the state stack from its BOTTOM up to its |
! 1021: | TOP (included). |
! 1022: `------------------------------------------------------------------*/
! 1023:
! 1024: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1025: || defined __cplusplus || defined _MSC_VER)
! 1026: static void
! 1027: yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
! 1028: #else
! 1029: static void
! 1030: yy_stack_print (yybottom, yytop)
! 1031: yytype_int16 *yybottom;
! 1032: yytype_int16 *yytop;
! 1033: #endif
! 1034: {
! 1035: YYFPRINTF (stderr, "Stack now");
! 1036: for (; yybottom <= yytop; yybottom++)
! 1037: {
! 1038: int yybot = *yybottom;
! 1039: YYFPRINTF (stderr, " %d", yybot);
! 1040: }
! 1041: YYFPRINTF (stderr, "\n");
! 1042: }
! 1043:
! 1044: # define YY_STACK_PRINT(Bottom, Top) \
! 1045: do { \
! 1046: if (yydebug) \
! 1047: yy_stack_print ((Bottom), (Top)); \
! 1048: } while (YYID (0))
! 1049:
! 1050:
! 1051: /*------------------------------------------------.
! 1052: | Report that the YYRULE is going to be reduced. |
! 1053: `------------------------------------------------*/
! 1054:
! 1055: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1056: || defined __cplusplus || defined _MSC_VER)
! 1057: static void
! 1058: yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
! 1059: #else
! 1060: static void
! 1061: yy_reduce_print (yyvsp, yyrule)
! 1062: YYSTYPE *yyvsp;
! 1063: int yyrule;
! 1064: #endif
! 1065: {
! 1066: int yynrhs = yyr2[yyrule];
! 1067: int yyi;
! 1068: unsigned long int yylno = yyrline[yyrule];
! 1069: YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
! 1070: yyrule - 1, yylno);
! 1071: /* The symbols being reduced. */
! 1072: for (yyi = 0; yyi < yynrhs; yyi++)
! 1073: {
! 1074: YYFPRINTF (stderr, " $%d = ", yyi + 1);
! 1075: yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
! 1076: &(yyvsp[(yyi + 1) - (yynrhs)])
! 1077: );
! 1078: YYFPRINTF (stderr, "\n");
! 1079: }
! 1080: }
! 1081:
! 1082: # define YY_REDUCE_PRINT(Rule) \
! 1083: do { \
! 1084: if (yydebug) \
! 1085: yy_reduce_print (yyvsp, Rule); \
! 1086: } while (YYID (0))
! 1087:
! 1088: /* Nonzero means print parse trace. It is left uninitialized so that
! 1089: multiple parsers can coexist. */
! 1090: int yydebug;
! 1091: #else /* !YYDEBUG */
! 1092: # define YYDPRINTF(Args)
! 1093: # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
! 1094: # define YY_STACK_PRINT(Bottom, Top)
! 1095: # define YY_REDUCE_PRINT(Rule)
! 1096: #endif /* !YYDEBUG */
! 1097:
! 1098:
! 1099: /* YYINITDEPTH -- initial size of the parser's stacks. */
! 1100: #ifndef YYINITDEPTH
! 1101: # define YYINITDEPTH 200
! 1102: #endif
! 1103:
! 1104: /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
! 1105: if the built-in stack extension method is used).
! 1106:
! 1107: Do not make this value too large; the results are undefined if
! 1108: YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
! 1109: evaluated with infinite-precision integer arithmetic. */
! 1110:
! 1111: #ifndef YYMAXDEPTH
! 1112: # define YYMAXDEPTH 10000
! 1113: #endif
! 1114:
! 1115:
! 1116:
! 1117: #if YYERROR_VERBOSE
! 1118:
! 1119: # ifndef yystrlen
! 1120: # if defined __GLIBC__ && defined _STRING_H
! 1121: # define yystrlen strlen
! 1122: # else
! 1123: /* Return the length of YYSTR. */
! 1124: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1125: || defined __cplusplus || defined _MSC_VER)
! 1126: static YYSIZE_T
! 1127: yystrlen (const char *yystr)
! 1128: #else
! 1129: static YYSIZE_T
! 1130: yystrlen (yystr)
! 1131: const char *yystr;
! 1132: #endif
! 1133: {
! 1134: YYSIZE_T yylen;
! 1135: for (yylen = 0; yystr[yylen]; yylen++)
! 1136: continue;
! 1137: return yylen;
! 1138: }
! 1139: # endif
! 1140: # endif
! 1141:
! 1142: # ifndef yystpcpy
! 1143: # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
! 1144: # define yystpcpy stpcpy
! 1145: # else
! 1146: /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
! 1147: YYDEST. */
! 1148: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1149: || defined __cplusplus || defined _MSC_VER)
! 1150: static char *
! 1151: yystpcpy (char *yydest, const char *yysrc)
! 1152: #else
! 1153: static char *
! 1154: yystpcpy (yydest, yysrc)
! 1155: char *yydest;
! 1156: const char *yysrc;
! 1157: #endif
! 1158: {
! 1159: char *yyd = yydest;
! 1160: const char *yys = yysrc;
! 1161:
! 1162: while ((*yyd++ = *yys++) != '\0')
! 1163: continue;
! 1164:
! 1165: return yyd - 1;
! 1166: }
! 1167: # endif
! 1168: # endif
! 1169:
! 1170: # ifndef yytnamerr
! 1171: /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
! 1172: quotes and backslashes, so that it's suitable for yyerror. The
! 1173: heuristic is that double-quoting is unnecessary unless the string
! 1174: contains an apostrophe, a comma, or backslash (other than
! 1175: backslash-backslash). YYSTR is taken from yytname. If YYRES is
! 1176: null, do not copy; instead, return the length of what the result
! 1177: would have been. */
! 1178: static YYSIZE_T
! 1179: yytnamerr (char *yyres, const char *yystr)
! 1180: {
! 1181: if (*yystr == '"')
! 1182: {
! 1183: YYSIZE_T yyn = 0;
! 1184: char const *yyp = yystr;
! 1185:
! 1186: for (;;)
! 1187: switch (*++yyp)
! 1188: {
! 1189: case '\'':
! 1190: case ',':
! 1191: goto do_not_strip_quotes;
! 1192:
! 1193: case '\\':
! 1194: if (*++yyp != '\\')
! 1195: goto do_not_strip_quotes;
! 1196: /* Fall through. */
! 1197: default:
! 1198: if (yyres)
! 1199: yyres[yyn] = *yyp;
! 1200: yyn++;
! 1201: break;
! 1202:
! 1203: case '"':
! 1204: if (yyres)
! 1205: yyres[yyn] = '\0';
! 1206: return yyn;
! 1207: }
! 1208: do_not_strip_quotes: ;
! 1209: }
! 1210:
! 1211: if (! yyres)
! 1212: return yystrlen (yystr);
! 1213:
! 1214: return yystpcpy (yyres, yystr) - yyres;
! 1215: }
! 1216: # endif
! 1217:
! 1218: /* Copy into YYRESULT an error message about the unexpected token
! 1219: YYCHAR while in state YYSTATE. Return the number of bytes copied,
! 1220: including the terminating null byte. If YYRESULT is null, do not
! 1221: copy anything; just return the number of bytes that would be
! 1222: copied. As a special case, return 0 if an ordinary "syntax error"
! 1223: message will do. Return YYSIZE_MAXIMUM if overflow occurs during
! 1224: size calculation. */
! 1225: static YYSIZE_T
! 1226: yysyntax_error (char *yyresult, int yystate, int yychar)
! 1227: {
! 1228: int yyn = yypact[yystate];
! 1229:
! 1230: if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
! 1231: return 0;
! 1232: else
! 1233: {
! 1234: int yytype = YYTRANSLATE (yychar);
! 1235: YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
! 1236: YYSIZE_T yysize = yysize0;
! 1237: YYSIZE_T yysize1;
! 1238: int yysize_overflow = 0;
! 1239: enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
! 1240: char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
! 1241: int yyx;
! 1242:
! 1243: # if 0
! 1244: /* This is so xgettext sees the translatable formats that are
! 1245: constructed on the fly. */
! 1246: YY_("syntax error, unexpected %s");
! 1247: YY_("syntax error, unexpected %s, expecting %s");
! 1248: YY_("syntax error, unexpected %s, expecting %s or %s");
! 1249: YY_("syntax error, unexpected %s, expecting %s or %s or %s");
! 1250: YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
! 1251: # endif
! 1252: char *yyfmt;
! 1253: char const *yyf;
! 1254: static char const yyunexpected[] = "syntax error, unexpected %s";
! 1255: static char const yyexpecting[] = ", expecting %s";
! 1256: static char const yyor[] = " or %s";
! 1257: char yyformat[sizeof yyunexpected
! 1258: + sizeof yyexpecting - 1
! 1259: + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
! 1260: * (sizeof yyor - 1))];
! 1261: char const *yyprefix = yyexpecting;
! 1262:
! 1263: /* Start YYX at -YYN if negative to avoid negative indexes in
! 1264: YYCHECK. */
! 1265: int yyxbegin = yyn < 0 ? -yyn : 0;
! 1266:
! 1267: /* Stay within bounds of both yycheck and yytname. */
! 1268: int yychecklim = YYLAST - yyn + 1;
! 1269: int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
! 1270: int yycount = 1;
! 1271:
! 1272: yyarg[0] = yytname[yytype];
! 1273: yyfmt = yystpcpy (yyformat, yyunexpected);
! 1274:
! 1275: for (yyx = yyxbegin; yyx < yyxend; ++yyx)
! 1276: if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
! 1277: {
! 1278: if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
! 1279: {
! 1280: yycount = 1;
! 1281: yysize = yysize0;
! 1282: yyformat[sizeof yyunexpected - 1] = '\0';
! 1283: break;
! 1284: }
! 1285: yyarg[yycount++] = yytname[yyx];
! 1286: yysize1 = yysize + yytnamerr (0, yytname[yyx]);
! 1287: yysize_overflow |= (yysize1 < yysize);
! 1288: yysize = yysize1;
! 1289: yyfmt = yystpcpy (yyfmt, yyprefix);
! 1290: yyprefix = yyor;
! 1291: }
! 1292:
! 1293: yyf = YY_(yyformat);
! 1294: yysize1 = yysize + yystrlen (yyf);
! 1295: yysize_overflow |= (yysize1 < yysize);
! 1296: yysize = yysize1;
! 1297:
! 1298: if (yysize_overflow)
! 1299: return YYSIZE_MAXIMUM;
! 1300:
! 1301: if (yyresult)
! 1302: {
! 1303: /* Avoid sprintf, as that infringes on the user's name space.
! 1304: Don't have undefined behavior even if the translation
! 1305: produced a string with the wrong number of "%s"s. */
! 1306: char *yyp = yyresult;
! 1307: int yyi = 0;
! 1308: while ((*yyp = *yyf) != '\0')
! 1309: {
! 1310: if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
! 1311: {
! 1312: yyp += yytnamerr (yyp, yyarg[yyi++]);
! 1313: yyf += 2;
! 1314: }
! 1315: else
! 1316: {
! 1317: yyp++;
! 1318: yyf++;
! 1319: }
! 1320: }
! 1321: }
! 1322: return yysize;
! 1323: }
! 1324: }
! 1325: #endif /* YYERROR_VERBOSE */
! 1326:
! 1327:
! 1328: /*-----------------------------------------------.
! 1329: | Release the memory associated to this symbol. |
! 1330: `-----------------------------------------------*/
! 1331:
! 1332: /*ARGSUSED*/
! 1333: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1334: || defined __cplusplus || defined _MSC_VER)
! 1335: static void
! 1336: yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
! 1337: #else
! 1338: static void
! 1339: yydestruct (yymsg, yytype, yyvaluep)
! 1340: const char *yymsg;
! 1341: int yytype;
! 1342: YYSTYPE *yyvaluep;
! 1343: #endif
! 1344: {
! 1345: YYUSE (yyvaluep);
! 1346:
! 1347: if (!yymsg)
! 1348: yymsg = "Deleting";
! 1349: YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
! 1350:
! 1351: switch (yytype)
! 1352: {
! 1353:
! 1354: default:
! 1355: break;
! 1356: }
! 1357: }
! 1358:
! 1359: /* Prevent warnings from -Wmissing-prototypes. */
! 1360: #ifdef YYPARSE_PARAM
! 1361: #if defined __STDC__ || defined __cplusplus
! 1362: int yyparse (void *YYPARSE_PARAM);
! 1363: #else
! 1364: int yyparse ();
! 1365: #endif
! 1366: #else /* ! YYPARSE_PARAM */
! 1367: #if defined __STDC__ || defined __cplusplus
! 1368: int yyparse (void);
! 1369: #else
! 1370: int yyparse ();
! 1371: #endif
! 1372: #endif /* ! YYPARSE_PARAM */
! 1373:
! 1374:
! 1375:
! 1376:
! 1377:
! 1378: /*-------------------------.
! 1379: | yyparse or yypush_parse. |
! 1380: `-------------------------*/
! 1381:
! 1382: #ifdef YYPARSE_PARAM
! 1383: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1384: || defined __cplusplus || defined _MSC_VER)
! 1385: int
! 1386: yyparse (void *YYPARSE_PARAM)
! 1387: #else
! 1388: int
! 1389: yyparse (YYPARSE_PARAM)
! 1390: void *YYPARSE_PARAM;
! 1391: #endif
! 1392: #else /* ! YYPARSE_PARAM */
! 1393: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1394: || defined __cplusplus || defined _MSC_VER)
! 1395: int
! 1396: yyparse (void)
! 1397: #else
! 1398: int
! 1399: yyparse ()
! 1400:
! 1401: #endif
! 1402: #endif
! 1403: {
! 1404: /* The lookahead symbol. */
! 1405: int yychar;
! 1406:
! 1407: /* The semantic value of the lookahead symbol. */
! 1408: YYSTYPE yylval;
! 1409:
! 1410: /* Number of syntax errors so far. */
! 1411: int yynerrs;
! 1412:
! 1413: int yystate;
! 1414: /* Number of tokens to shift before error messages enabled. */
! 1415: int yyerrstatus;
! 1416:
! 1417: /* The stacks and their tools:
! 1418: `yyss': related to states.
! 1419: `yyvs': related to semantic values.
! 1420:
! 1421: Refer to the stacks thru separate pointers, to allow yyoverflow
! 1422: to reallocate them elsewhere. */
! 1423:
! 1424: /* The state stack. */
! 1425: yytype_int16 yyssa[YYINITDEPTH];
! 1426: yytype_int16 *yyss;
! 1427: yytype_int16 *yyssp;
! 1428:
! 1429: /* The semantic value stack. */
! 1430: YYSTYPE yyvsa[YYINITDEPTH];
! 1431: YYSTYPE *yyvs;
! 1432: YYSTYPE *yyvsp;
! 1433:
! 1434: YYSIZE_T yystacksize;
! 1435:
! 1436: int yyn;
! 1437: int yyresult;
! 1438: /* Lookahead token as an internal (translated) token number. */
! 1439: int yytoken;
! 1440: /* The variables used to return semantic value and location from the
! 1441: action routines. */
! 1442: YYSTYPE yyval;
! 1443:
! 1444: #if YYERROR_VERBOSE
! 1445: /* Buffer for error messages, and its allocated size. */
! 1446: char yymsgbuf[128];
! 1447: char *yymsg = yymsgbuf;
! 1448: YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
! 1449: #endif
! 1450:
! 1451: #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
! 1452:
! 1453: /* The number of symbols on the RHS of the reduced rule.
! 1454: Keep to zero when no symbol should be popped. */
! 1455: int yylen = 0;
! 1456:
! 1457: yytoken = 0;
! 1458: yyss = yyssa;
! 1459: yyvs = yyvsa;
! 1460: yystacksize = YYINITDEPTH;
! 1461:
! 1462: YYDPRINTF ((stderr, "Starting parse\n"));
! 1463:
! 1464: yystate = 0;
! 1465: yyerrstatus = 0;
! 1466: yynerrs = 0;
! 1467: yychar = YYEMPTY; /* Cause a token to be read. */
! 1468:
! 1469: /* Initialize stack pointers.
! 1470: Waste one element of value and location stack
! 1471: so that they stay on the same level as the state stack.
! 1472: The wasted elements are never initialized. */
! 1473: yyssp = yyss;
! 1474: yyvsp = yyvs;
! 1475:
! 1476: goto yysetstate;
! 1477:
! 1478: /*------------------------------------------------------------.
! 1479: | yynewstate -- Push a new state, which is found in yystate. |
! 1480: `------------------------------------------------------------*/
! 1481: yynewstate:
! 1482: /* In all cases, when you get here, the value and location stacks
! 1483: have just been pushed. So pushing a state here evens the stacks. */
! 1484: yyssp++;
! 1485:
! 1486: yysetstate:
! 1487: *yyssp = yystate;
! 1488:
! 1489: if (yyss + yystacksize - 1 <= yyssp)
! 1490: {
! 1491: /* Get the current used size of the three stacks, in elements. */
! 1492: YYSIZE_T yysize = yyssp - yyss + 1;
! 1493:
! 1494: #ifdef yyoverflow
! 1495: {
! 1496: /* Give user a chance to reallocate the stack. Use copies of
! 1497: these so that the &'s don't force the real ones into
! 1498: memory. */
! 1499: YYSTYPE *yyvs1 = yyvs;
! 1500: yytype_int16 *yyss1 = yyss;
! 1501:
! 1502: /* Each stack pointer address is followed by the size of the
! 1503: data in use in that stack, in bytes. This used to be a
! 1504: conditional around just the two extra args, but that might
! 1505: be undefined if yyoverflow is a macro. */
! 1506: yyoverflow (YY_("memory exhausted"),
! 1507: &yyss1, yysize * sizeof (*yyssp),
! 1508: &yyvs1, yysize * sizeof (*yyvsp),
! 1509: &yystacksize);
! 1510:
! 1511: yyss = yyss1;
! 1512: yyvs = yyvs1;
! 1513: }
! 1514: #else /* no yyoverflow */
! 1515: # ifndef YYSTACK_RELOCATE
! 1516: goto yyexhaustedlab;
! 1517: # else
! 1518: /* Extend the stack our own way. */
! 1519: if (YYMAXDEPTH <= yystacksize)
! 1520: goto yyexhaustedlab;
! 1521: yystacksize *= 2;
! 1522: if (YYMAXDEPTH < yystacksize)
! 1523: yystacksize = YYMAXDEPTH;
! 1524:
! 1525: {
! 1526: yytype_int16 *yyss1 = yyss;
! 1527: union yyalloc *yyptr =
! 1528: (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
! 1529: if (! yyptr)
! 1530: goto yyexhaustedlab;
! 1531: YYSTACK_RELOCATE (yyss_alloc, yyss);
! 1532: YYSTACK_RELOCATE (yyvs_alloc, yyvs);
! 1533: # undef YYSTACK_RELOCATE
! 1534: if (yyss1 != yyssa)
! 1535: YYSTACK_FREE (yyss1);
! 1536: }
! 1537: # endif
! 1538: #endif /* no yyoverflow */
! 1539:
! 1540: yyssp = yyss + yysize - 1;
! 1541: yyvsp = yyvs + yysize - 1;
! 1542:
! 1543: YYDPRINTF ((stderr, "Stack size increased to %lu\n",
! 1544: (unsigned long int) yystacksize));
! 1545:
! 1546: if (yyss + yystacksize - 1 <= yyssp)
! 1547: YYABORT;
! 1548: }
! 1549:
! 1550: YYDPRINTF ((stderr, "Entering state %d\n", yystate));
! 1551:
! 1552: if (yystate == YYFINAL)
! 1553: YYACCEPT;
! 1554:
! 1555: goto yybackup;
! 1556:
! 1557: /*-----------.
! 1558: | yybackup. |
! 1559: `-----------*/
! 1560: yybackup:
! 1561:
! 1562: /* Do appropriate processing given the current state. Read a
! 1563: lookahead token if we need one and don't already have one. */
! 1564:
! 1565: /* First try to decide what to do without reference to lookahead token. */
! 1566: yyn = yypact[yystate];
! 1567: if (yyn == YYPACT_NINF)
! 1568: goto yydefault;
! 1569:
! 1570: /* Not known => get a lookahead token if don't already have one. */
! 1571:
! 1572: /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
! 1573: if (yychar == YYEMPTY)
! 1574: {
! 1575: YYDPRINTF ((stderr, "Reading a token: "));
! 1576: yychar = YYLEX;
! 1577: }
! 1578:
! 1579: if (yychar <= YYEOF)
! 1580: {
! 1581: yychar = yytoken = YYEOF;
! 1582: YYDPRINTF ((stderr, "Now at end of input.\n"));
! 1583: }
! 1584: else
! 1585: {
! 1586: yytoken = YYTRANSLATE (yychar);
! 1587: YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
! 1588: }
! 1589:
! 1590: /* If the proper action on seeing token YYTOKEN is to reduce or to
! 1591: detect an error, take that action. */
! 1592: yyn += yytoken;
! 1593: if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
! 1594: goto yydefault;
! 1595: yyn = yytable[yyn];
! 1596: if (yyn <= 0)
! 1597: {
! 1598: if (yyn == 0 || yyn == YYTABLE_NINF)
! 1599: goto yyerrlab;
! 1600: yyn = -yyn;
! 1601: goto yyreduce;
! 1602: }
! 1603:
! 1604: /* Count tokens shifted since error; after three, turn off error
! 1605: status. */
! 1606: if (yyerrstatus)
! 1607: yyerrstatus--;
! 1608:
! 1609: /* Shift the lookahead token. */
! 1610: YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
! 1611:
! 1612: /* Discard the shifted token. */
! 1613: yychar = YYEMPTY;
! 1614:
! 1615: yystate = yyn;
! 1616: *++yyvsp = yylval;
! 1617:
! 1618: goto yynewstate;
! 1619:
! 1620:
! 1621: /*-----------------------------------------------------------.
! 1622: | yydefault -- do the default action for the current state. |
! 1623: `-----------------------------------------------------------*/
! 1624: yydefault:
! 1625: yyn = yydefact[yystate];
! 1626: if (yyn == 0)
! 1627: goto yyerrlab;
! 1628: goto yyreduce;
! 1629:
! 1630:
! 1631: /*-----------------------------.
! 1632: | yyreduce -- Do a reduction. |
! 1633: `-----------------------------*/
! 1634: yyreduce:
! 1635: /* yyn is the number of a rule to reduce with. */
! 1636: yylen = yyr2[yyn];
! 1637:
! 1638: /* If YYLEN is nonzero, implement the default value of the action:
! 1639: `$$ = $1'.
! 1640:
! 1641: Otherwise, the following line sets YYVAL to garbage.
! 1642: This behavior is undocumented and Bison
! 1643: users should not rely upon it. Assigning to YYVAL
! 1644: unconditionally makes the parser a bit smaller, and it avoids a
! 1645: GCC warning that YYVAL may be used uninitialized. */
! 1646: yyval = yyvsp[1-yylen];
! 1647:
! 1648:
! 1649: YY_REDUCE_PRINT (yyn);
! 1650: switch (yyn)
! 1651: {
! 1652: case 4:
! 1653:
! 1654: {
! 1655: #if DEBUG_CFG_PARSER
! 1656: printf("SECTION: [%s]\n", Z_STRVAL((yyvsp[(2) - (3)])));
! 1657: #endif
! 1658: ZEND_INI_PARSER_CB(&(yyvsp[(2) - (3)]), NULL, NULL, ZEND_INI_PARSER_SECTION, ZEND_INI_PARSER_ARG TSRMLS_CC);
! 1659: free(Z_STRVAL((yyvsp[(2) - (3)])));
! 1660: }
! 1661: break;
! 1662:
! 1663: case 5:
! 1664:
! 1665: {
! 1666: #if DEBUG_CFG_PARSER
! 1667: printf("NORMAL: '%s' = '%s'\n", Z_STRVAL((yyvsp[(1) - (3)])), Z_STRVAL((yyvsp[(3) - (3)])));
! 1668: #endif
! 1669: ZEND_INI_PARSER_CB(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG TSRMLS_CC);
! 1670: free(Z_STRVAL((yyvsp[(1) - (3)])));
! 1671: free(Z_STRVAL((yyvsp[(3) - (3)])));
! 1672: }
! 1673: break;
! 1674:
! 1675: case 6:
! 1676:
! 1677: {
! 1678: #if DEBUG_CFG_PARSER
! 1679: printf("OFFSET: '%s'[%s] = '%s'\n", Z_STRVAL((yyvsp[(1) - (5)])), Z_STRVAL((yyvsp[(2) - (5)])), Z_STRVAL((yyvsp[(5) - (5)])));
! 1680: #endif
! 1681: ZEND_INI_PARSER_CB(&(yyvsp[(1) - (5)]), &(yyvsp[(5) - (5)]), &(yyvsp[(2) - (5)]), ZEND_INI_PARSER_POP_ENTRY, ZEND_INI_PARSER_ARG TSRMLS_CC);
! 1682: free(Z_STRVAL((yyvsp[(1) - (5)])));
! 1683: free(Z_STRVAL((yyvsp[(2) - (5)])));
! 1684: free(Z_STRVAL((yyvsp[(5) - (5)])));
! 1685: }
! 1686: break;
! 1687:
! 1688: case 7:
! 1689:
! 1690: { ZEND_INI_PARSER_CB(&(yyvsp[(1) - (1)]), NULL, NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG TSRMLS_CC); free(Z_STRVAL((yyvsp[(1) - (1)]))); }
! 1691: break;
! 1692:
! 1693: case 9:
! 1694:
! 1695: { (yyval) = (yyvsp[(1) - (1)]); }
! 1696: break;
! 1697:
! 1698: case 10:
! 1699:
! 1700: { zend_ini_init_string(&(yyval)); }
! 1701: break;
! 1702:
! 1703: case 11:
! 1704:
! 1705: { (yyval) = (yyvsp[(1) - (1)]); }
! 1706: break;
! 1707:
! 1708: case 12:
! 1709:
! 1710: { (yyval) = (yyvsp[(1) - (1)]); }
! 1711: break;
! 1712:
! 1713: case 13:
! 1714:
! 1715: { (yyval) = (yyvsp[(1) - (1)]); }
! 1716: break;
! 1717:
! 1718: case 14:
! 1719:
! 1720: { zend_ini_init_string(&(yyval)); }
! 1721: break;
! 1722:
! 1723: case 15:
! 1724:
! 1725: { (yyval) = (yyvsp[(1) - (1)]); }
! 1726: break;
! 1727:
! 1728: case 16:
! 1729:
! 1730: { zend_ini_init_string(&(yyval)); }
! 1731: break;
! 1732:
! 1733: case 17:
! 1734:
! 1735: { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); free(Z_STRVAL((yyvsp[(2) - (2)]))); }
! 1736: break;
! 1737:
! 1738: case 18:
! 1739:
! 1740: { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); free(Z_STRVAL((yyvsp[(2) - (2)]))); }
! 1741: break;
! 1742:
! 1743: case 19:
! 1744:
! 1745: { zend_ini_init_string(&(yyval)); }
! 1746: break;
! 1747:
! 1748: case 20:
! 1749:
! 1750: { (yyval) = (yyvsp[(1) - (1)]); }
! 1751: break;
! 1752:
! 1753: case 21:
! 1754:
! 1755: { (yyval) = (yyvsp[(1) - (1)]); }
! 1756: break;
! 1757:
! 1758: case 22:
! 1759:
! 1760: { (yyval) = (yyvsp[(2) - (3)]); }
! 1761: break;
! 1762:
! 1763: case 23:
! 1764:
! 1765: { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); free(Z_STRVAL((yyvsp[(2) - (2)]))); }
! 1766: break;
! 1767:
! 1768: case 24:
! 1769:
! 1770: { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); free(Z_STRVAL((yyvsp[(2) - (2)]))); }
! 1771: break;
! 1772:
! 1773: case 25:
! 1774:
! 1775: { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)])); free(Z_STRVAL((yyvsp[(3) - (4)]))); }
! 1776: break;
! 1777:
! 1778: case 26:
! 1779:
! 1780: { (yyval) = (yyvsp[(1) - (1)]); }
! 1781: break;
! 1782:
! 1783: case 27:
! 1784:
! 1785: { (yyval) = (yyvsp[(1) - (1)]); }
! 1786: break;
! 1787:
! 1788: case 28:
! 1789:
! 1790: { (yyval) = (yyvsp[(2) - (3)]); }
! 1791: break;
! 1792:
! 1793: case 29:
! 1794:
! 1795: { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); free(Z_STRVAL((yyvsp[(2) - (2)]))); }
! 1796: break;
! 1797:
! 1798: case 30:
! 1799:
! 1800: { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); free(Z_STRVAL((yyvsp[(2) - (2)]))); }
! 1801: break;
! 1802:
! 1803: case 31:
! 1804:
! 1805: { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)])); free(Z_STRVAL((yyvsp[(3) - (4)]))); }
! 1806: break;
! 1807:
! 1808: case 32:
! 1809:
! 1810: { (yyval) = (yyvsp[(1) - (1)]); }
! 1811: break;
! 1812:
! 1813: case 33:
! 1814:
! 1815: { zend_ini_do_op('|', &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); }
! 1816: break;
! 1817:
! 1818: case 34:
! 1819:
! 1820: { zend_ini_do_op('&', &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); }
! 1821: break;
! 1822:
! 1823: case 35:
! 1824:
! 1825: { zend_ini_do_op('~', &(yyval), &(yyvsp[(2) - (2)]), NULL); }
! 1826: break;
! 1827:
! 1828: case 36:
! 1829:
! 1830: { zend_ini_do_op('!', &(yyval), &(yyvsp[(2) - (2)]), NULL); }
! 1831: break;
! 1832:
! 1833: case 37:
! 1834:
! 1835: { (yyval) = (yyvsp[(2) - (3)]); }
! 1836: break;
! 1837:
! 1838: case 38:
! 1839:
! 1840: { zend_ini_get_var(&(yyval), &(yyvsp[(2) - (3)]) TSRMLS_CC); free(Z_STRVAL((yyvsp[(2) - (3)]))); }
! 1841: break;
! 1842:
! 1843: case 39:
! 1844:
! 1845: { (yyval) = (yyvsp[(1) - (1)]); }
! 1846: break;
! 1847:
! 1848: case 40:
! 1849:
! 1850: { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
! 1851: break;
! 1852:
! 1853: case 41:
! 1854:
! 1855: { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ }
! 1856: break;
! 1857:
! 1858: case 42:
! 1859:
! 1860: { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ }
! 1861: break;
! 1862:
! 1863: case 43:
! 1864:
! 1865: { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ }
! 1866: break;
! 1867:
! 1868: case 44:
! 1869:
! 1870: { zend_ini_get_constant(&(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
! 1871: break;
! 1872:
! 1873: case 45:
! 1874:
! 1875: { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
! 1876: break;
! 1877:
! 1878: case 46:
! 1879:
! 1880: { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ }
! 1881: break;
! 1882:
! 1883: case 47:
! 1884:
! 1885: { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ }
! 1886: break;
! 1887:
! 1888: case 48:
! 1889:
! 1890: { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ }
! 1891: break;
! 1892:
! 1893:
! 1894:
! 1895: default: break;
! 1896: }
! 1897: YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
! 1898:
! 1899: YYPOPSTACK (yylen);
! 1900: yylen = 0;
! 1901: YY_STACK_PRINT (yyss, yyssp);
! 1902:
! 1903: *++yyvsp = yyval;
! 1904:
! 1905: /* Now `shift' the result of the reduction. Determine what state
! 1906: that goes to, based on the state we popped back to and the rule
! 1907: number reduced by. */
! 1908:
! 1909: yyn = yyr1[yyn];
! 1910:
! 1911: yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
! 1912: if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
! 1913: yystate = yytable[yystate];
! 1914: else
! 1915: yystate = yydefgoto[yyn - YYNTOKENS];
! 1916:
! 1917: goto yynewstate;
! 1918:
! 1919:
! 1920: /*------------------------------------.
! 1921: | yyerrlab -- here on detecting error |
! 1922: `------------------------------------*/
! 1923: yyerrlab:
! 1924: /* If not already recovering from an error, report this error. */
! 1925: if (!yyerrstatus)
! 1926: {
! 1927: ++yynerrs;
! 1928: #if ! YYERROR_VERBOSE
! 1929: yyerror (YY_("syntax error"));
! 1930: #else
! 1931: {
! 1932: YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
! 1933: if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
! 1934: {
! 1935: YYSIZE_T yyalloc = 2 * yysize;
! 1936: if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
! 1937: yyalloc = YYSTACK_ALLOC_MAXIMUM;
! 1938: if (yymsg != yymsgbuf)
! 1939: YYSTACK_FREE (yymsg);
! 1940: yymsg = (char *) YYSTACK_ALLOC (yyalloc);
! 1941: if (yymsg)
! 1942: yymsg_alloc = yyalloc;
! 1943: else
! 1944: {
! 1945: yymsg = yymsgbuf;
! 1946: yymsg_alloc = sizeof yymsgbuf;
! 1947: }
! 1948: }
! 1949:
! 1950: if (0 < yysize && yysize <= yymsg_alloc)
! 1951: {
! 1952: (void) yysyntax_error (yymsg, yystate, yychar);
! 1953: yyerror (yymsg);
! 1954: }
! 1955: else
! 1956: {
! 1957: yyerror (YY_("syntax error"));
! 1958: if (yysize != 0)
! 1959: goto yyexhaustedlab;
! 1960: }
! 1961: }
! 1962: #endif
! 1963: }
! 1964:
! 1965:
! 1966:
! 1967: if (yyerrstatus == 3)
! 1968: {
! 1969: /* If just tried and failed to reuse lookahead token after an
! 1970: error, discard it. */
! 1971:
! 1972: if (yychar <= YYEOF)
! 1973: {
! 1974: /* Return failure if at end of input. */
! 1975: if (yychar == YYEOF)
! 1976: YYABORT;
! 1977: }
! 1978: else
! 1979: {
! 1980: yydestruct ("Error: discarding",
! 1981: yytoken, &yylval);
! 1982: yychar = YYEMPTY;
! 1983: }
! 1984: }
! 1985:
! 1986: /* Else will try to reuse lookahead token after shifting the error
! 1987: token. */
! 1988: goto yyerrlab1;
! 1989:
! 1990:
! 1991: /*---------------------------------------------------.
! 1992: | yyerrorlab -- error raised explicitly by YYERROR. |
! 1993: `---------------------------------------------------*/
! 1994: yyerrorlab:
! 1995:
! 1996: /* Pacify compilers like GCC when the user code never invokes
! 1997: YYERROR and the label yyerrorlab therefore never appears in user
! 1998: code. */
! 1999: if (/*CONSTCOND*/ 0)
! 2000: goto yyerrorlab;
! 2001:
! 2002: /* Do not reclaim the symbols of the rule which action triggered
! 2003: this YYERROR. */
! 2004: YYPOPSTACK (yylen);
! 2005: yylen = 0;
! 2006: YY_STACK_PRINT (yyss, yyssp);
! 2007: yystate = *yyssp;
! 2008: goto yyerrlab1;
! 2009:
! 2010:
! 2011: /*-------------------------------------------------------------.
! 2012: | yyerrlab1 -- common code for both syntax error and YYERROR. |
! 2013: `-------------------------------------------------------------*/
! 2014: yyerrlab1:
! 2015: yyerrstatus = 3; /* Each real token shifted decrements this. */
! 2016:
! 2017: for (;;)
! 2018: {
! 2019: yyn = yypact[yystate];
! 2020: if (yyn != YYPACT_NINF)
! 2021: {
! 2022: yyn += YYTERROR;
! 2023: if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
! 2024: {
! 2025: yyn = yytable[yyn];
! 2026: if (0 < yyn)
! 2027: break;
! 2028: }
! 2029: }
! 2030:
! 2031: /* Pop the current state because it cannot handle the error token. */
! 2032: if (yyssp == yyss)
! 2033: YYABORT;
! 2034:
! 2035:
! 2036: yydestruct ("Error: popping",
! 2037: yystos[yystate], yyvsp);
! 2038: YYPOPSTACK (1);
! 2039: yystate = *yyssp;
! 2040: YY_STACK_PRINT (yyss, yyssp);
! 2041: }
! 2042:
! 2043: *++yyvsp = yylval;
! 2044:
! 2045:
! 2046: /* Shift the error token. */
! 2047: YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
! 2048:
! 2049: yystate = yyn;
! 2050: goto yynewstate;
! 2051:
! 2052:
! 2053: /*-------------------------------------.
! 2054: | yyacceptlab -- YYACCEPT comes here. |
! 2055: `-------------------------------------*/
! 2056: yyacceptlab:
! 2057: yyresult = 0;
! 2058: goto yyreturn;
! 2059:
! 2060: /*-----------------------------------.
! 2061: | yyabortlab -- YYABORT comes here. |
! 2062: `-----------------------------------*/
! 2063: yyabortlab:
! 2064: yyresult = 1;
! 2065: goto yyreturn;
! 2066:
! 2067: #if !defined(yyoverflow) || YYERROR_VERBOSE
! 2068: /*-------------------------------------------------.
! 2069: | yyexhaustedlab -- memory exhaustion comes here. |
! 2070: `-------------------------------------------------*/
! 2071: yyexhaustedlab:
! 2072: yyerror (YY_("memory exhausted"));
! 2073: yyresult = 2;
! 2074: /* Fall through. */
! 2075: #endif
! 2076:
! 2077: yyreturn:
! 2078: if (yychar != YYEMPTY)
! 2079: yydestruct ("Cleanup: discarding lookahead",
! 2080: yytoken, &yylval);
! 2081: /* Do not reclaim the symbols of the rule which action triggered
! 2082: this YYABORT or YYACCEPT. */
! 2083: YYPOPSTACK (yylen);
! 2084: YY_STACK_PRINT (yyss, yyssp);
! 2085: while (yyssp != yyss)
! 2086: {
! 2087: yydestruct ("Cleanup: popping",
! 2088: yystos[*yyssp], yyvsp);
! 2089: YYPOPSTACK (1);
! 2090: }
! 2091: #ifndef yyoverflow
! 2092: if (yyss != yyssa)
! 2093: YYSTACK_FREE (yyss);
! 2094: #endif
! 2095: #if YYERROR_VERBOSE
! 2096: if (yymsg != yymsgbuf)
! 2097: YYSTACK_FREE (yymsg);
! 2098: #endif
! 2099: /* Make sure YYID is used. */
! 2100: return YYID (yyresult);
! 2101: }
! 2102:
! 2103:
! 2104:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>