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