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