fixed pkg-config rule
[k8jam.git] / src / jamgram_poorman / jamgram.c
blobb3322963280cbea77d86a6589d86fbc972c43e30
1 /* A Bison parser, made by GNU Bison 2.4.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6 2009, 2010 Free Software Foundation, Inc.
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
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.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
37 /* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
44 /* Identify Bison output. */
45 #define YYBISON 1
47 /* Bison version. */
48 #define YYBISON_VERSION "2.4.3"
50 /* Skeleton name. */
51 #define YYSKELETON_NAME "yacc.c"
53 /* Pure parsers. */
54 #define YYPURE 0
56 /* Push parsers. */
57 #define YYPUSH 0
59 /* Pull parsers. */
60 #define YYPULL 1
62 /* Using locations. */
63 #define YYLSP_NEEDED 0
67 /* Copy the first part of user declarations. */
70 #include "jam.h"
72 #include "lists.h"
73 #include "variable.h"
74 #include "parse.h"
75 #include "scan.h"
76 #include "compile.h"
77 #include "newstr.h"
78 #include "rules.h"
80 /* for OSF and other less endowed yaccs */
81 #define YYMAXDEPTH (10000)
83 #define F0 (LIST *(*)(PARSE *, LOL *, int *))0
84 #define P0 (PARSE *)0
85 #define S0 (char *)0
87 #define pappend(l,r) parse_make(compile_append, l, r, P0, S0, S0, 0)
88 #define pbreak(l,f) parse_make(compile_break, l, P0, P0, S0, S0, f)
89 #define peval(c,l,r) parse_make(compile_eval, l, r, P0, S0, S0, c)
90 #define pfor(s,l,r) parse_make(compile_foreach, l, r, P0, s, S0, 0)
91 #define pif(l,r,t) parse_make(compile_if, l, r, t, S0, S0, 0)
92 #define pincl(l) parse_make(compile_include, l, P0, P0, S0, S0, 0)
93 #define psincl(l) parse_make(compile_softinclude, l, P0, P0, S0, S0, 0)
94 #define plist(s) parse_make(compile_list, P0, P0, P0, s, S0, 0)
95 #define plocal(l,r,t) parse_make(compile_local, l, r, t, S0, S0, 0)
96 #define pnull() parse_make(compile_null, P0, P0, P0, S0, S0, 0)
97 #define pon(l,r) parse_make(compile_on, l, r, P0, S0, S0, 0)
98 #define prule(a,p) parse_make(compile_rule, a, p, P0, S0, S0, 0)
99 #define prules(l,r) parse_make(compile_rules, l, r, P0, S0, S0, 0)
100 #define pset(l,r,a) parse_make(compile_set, l, r, P0, S0, S0, a)
101 #define pset1(l,r,t,a) parse_make(compile_settings, l, r, t, S0, S0, a)
102 #define psetc(s,l,r) parse_make(compile_setcomp, l, r, P0, s, S0, 0)
103 #define psete(s,l,s1,f) parse_make(compile_setexec, l, P0, P0, s, s1, f)
104 #define pswitch(l,r) parse_make(compile_switch, l, r, P0, S0, S0, 0)
105 #define pwhile(l,r) parse_make(compile_while, l, r, P0, S0, S0, 0)
107 #define pnode(l,r) parse_make(F0, l, r, P0, S0, S0, 0)
108 #define psnode(s,l) parse_make(F0, l, P0, P0, s, S0, 0)
113 /* Enabling traces. */
114 #ifndef YYDEBUG
115 # define YYDEBUG 0
116 #endif
118 /* Enabling verbose error messages. */
119 #ifdef YYERROR_VERBOSE
120 # undef YYERROR_VERBOSE
121 # define YYERROR_VERBOSE 1
122 #else
123 # define YYERROR_VERBOSE 0
124 #endif
126 /* Enabling the token table. */
127 #ifndef YYTOKEN_TABLE
128 # define YYTOKEN_TABLE 0
129 #endif
132 /* Tokens. */
133 #ifndef YYTOKENTYPE
134 # define YYTOKENTYPE
135 /* Put the tokens into the symbol table, so that GDB and other debuggers
136 know about them. */
137 enum yytokentype {
138 _LANGLE_t = 258,
139 _LANGLE_EQUALS_t = 259,
140 _EQUALS_t = 260,
141 _EQUALSEQUALS_t = 261,
142 _RANGLE_t = 262,
143 _RANGLE_EQUALS_t = 263,
144 _BAR_t = 264,
145 _BARBAR_t = 265,
146 _MINUS_EQUALS_t = 266,
147 _SEMIC_t = 267,
148 _COLON_t = 268,
149 _BANG_t = 269,
150 _BANG_EQUALS_t = 270,
151 _QUESTION_EQUALS_t = 271,
152 _LPAREN_t = 272,
153 _RPAREN_t = 273,
154 _LBRACKET_t = 274,
155 _RBRACKET_t = 275,
156 _LBRACE_t = 276,
157 _RBRACE_t = 277,
158 _AMPER_t = 278,
159 _AMPERAMPER_t = 279,
160 _PLUS_EQUALS_t = 280,
161 ACTIONS_t = 281,
162 BIND_t = 282,
163 BREAK_t = 283,
164 CASE_t = 284,
165 CONTINUE_t = 285,
166 ELSE_t = 286,
167 EXISTING_t = 287,
168 FOR_t = 288,
169 IF_t = 289,
170 IGNORE_t = 290,
171 IN_t = 291,
172 INCLUDE_t = 292,
173 LOCAL_t = 293,
174 MAXLINE_t = 294,
175 ON_t = 295,
176 PIECEMEAL_t = 296,
177 QUIETLY_t = 297,
178 RETURN_t = 298,
179 RULE_t = 299,
180 SOFTINCLUDE_t = 300,
181 SWITCH_t = 301,
182 TOGETHER_t = 302,
183 UPDATED_t = 303,
184 WHILE_t = 304,
185 ARG = 305,
186 STRING = 306
188 #endif
192 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
193 typedef int YYSTYPE;
194 # define YYSTYPE_IS_TRIVIAL 1
195 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
196 # define YYSTYPE_IS_DECLARED 1
197 #endif
200 /* Copy the second part of user declarations. */
204 #ifdef short
205 # undef short
206 #endif
208 #ifdef YYTYPE_UINT8
209 typedef YYTYPE_UINT8 yytype_uint8;
210 #else
211 typedef unsigned char yytype_uint8;
212 #endif
214 #ifdef YYTYPE_INT8
215 typedef YYTYPE_INT8 yytype_int8;
216 #elif (defined __STDC__ || defined __C99__FUNC__ \
217 || defined __cplusplus || defined _MSC_VER)
218 typedef signed char yytype_int8;
219 #else
220 typedef short int yytype_int8;
221 #endif
223 #ifdef YYTYPE_UINT16
224 typedef YYTYPE_UINT16 yytype_uint16;
225 #else
226 typedef unsigned short int yytype_uint16;
227 #endif
229 #ifdef YYTYPE_INT16
230 typedef YYTYPE_INT16 yytype_int16;
231 #else
232 typedef short int yytype_int16;
233 #endif
235 #ifndef YYSIZE_T
236 # ifdef __SIZE_TYPE__
237 # define YYSIZE_T __SIZE_TYPE__
238 # elif defined size_t
239 # define YYSIZE_T size_t
240 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
241 || defined __cplusplus || defined _MSC_VER)
242 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
243 # define YYSIZE_T size_t
244 # else
245 # define YYSIZE_T unsigned int
246 # endif
247 #endif
249 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
251 #ifndef YY_
252 # if defined YYENABLE_NLS && YYENABLE_NLS
253 # if ENABLE_NLS
254 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
255 # define YY_(msgid) dgettext ("bison-runtime", msgid)
256 # endif
257 # endif
258 # ifndef YY_
259 # define YY_(msgid) msgid
260 # endif
261 #endif
263 /* Suppress unused-variable warnings by "using" E. */
264 #if ! defined lint || defined __GNUC__
265 # define YYUSE(e) ((void) (e))
266 #else
267 # define YYUSE(e) /* empty */
268 #endif
270 /* Identity function, used to suppress warnings about constant conditions. */
271 #ifndef lint
272 # define YYID(n) (n)
273 #else
274 #if (defined __STDC__ || defined __C99__FUNC__ \
275 || defined __cplusplus || defined _MSC_VER)
276 static int
277 YYID (int yyi)
278 #else
279 static int
280 YYID (yyi)
281 int yyi;
282 #endif
284 return yyi;
286 #endif
288 #if ! defined yyoverflow || YYERROR_VERBOSE
290 /* The parser invokes alloca or malloc; define the necessary symbols. */
292 # ifdef YYSTACK_USE_ALLOCA
293 # if YYSTACK_USE_ALLOCA
294 # ifdef __GNUC__
295 # define YYSTACK_ALLOC __builtin_alloca
296 # elif defined __BUILTIN_VA_ARG_INCR
297 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
298 # elif defined _AIX
299 # define YYSTACK_ALLOC __alloca
300 # elif defined _MSC_VER
301 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
302 # define alloca _alloca
303 # else
304 # define YYSTACK_ALLOC alloca
305 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
306 || defined __cplusplus || defined _MSC_VER)
307 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
308 # ifndef _STDLIB_H
309 # define _STDLIB_H 1
310 # endif
311 # endif
312 # endif
313 # endif
314 # endif
316 # ifdef YYSTACK_ALLOC
317 /* Pacify GCC's `empty if-body' warning. */
318 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
319 # ifndef YYSTACK_ALLOC_MAXIMUM
320 /* The OS might guarantee only one guard page at the bottom of the stack,
321 and a page size can be as small as 4096 bytes. So we cannot safely
322 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
323 to allow for a few compiler-allocated temporary stack slots. */
324 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
325 # endif
326 # else
327 # define YYSTACK_ALLOC YYMALLOC
328 # define YYSTACK_FREE YYFREE
329 # ifndef YYSTACK_ALLOC_MAXIMUM
330 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
331 # endif
332 # if (defined __cplusplus && ! defined _STDLIB_H \
333 && ! ((defined YYMALLOC || defined malloc) \
334 && (defined YYFREE || defined free)))
335 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
336 # ifndef _STDLIB_H
337 # define _STDLIB_H 1
338 # endif
339 # endif
340 # ifndef YYMALLOC
341 # define YYMALLOC malloc
342 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
343 || defined __cplusplus || defined _MSC_VER)
344 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
345 # endif
346 # endif
347 # ifndef YYFREE
348 # define YYFREE free
349 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
350 || defined __cplusplus || defined _MSC_VER)
351 void free (void *); /* INFRINGES ON USER NAME SPACE */
352 # endif
353 # endif
354 # endif
355 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
358 #if (! defined yyoverflow \
359 && (! defined __cplusplus \
360 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
362 /* A type that is properly aligned for any stack member. */
363 union yyalloc
365 yytype_int16 yyss_alloc;
366 YYSTYPE yyvs_alloc;
369 /* The size of the maximum gap between one aligned stack and the next. */
370 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
372 /* The size of an array large to enough to hold all stacks, each with
373 N elements. */
374 # define YYSTACK_BYTES(N) \
375 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
376 + YYSTACK_GAP_MAXIMUM)
378 /* Copy COUNT objects from FROM to TO. The source and destination do
379 not overlap. */
380 # ifndef YYCOPY
381 # if defined __GNUC__ && 1 < __GNUC__
382 # define YYCOPY(To, From, Count) \
383 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
384 # else
385 # define YYCOPY(To, From, Count) \
386 do \
388 YYSIZE_T yyi; \
389 for (yyi = 0; yyi < (Count); yyi++) \
390 (To)[yyi] = (From)[yyi]; \
392 while (YYID (0))
393 # endif
394 # endif
396 /* Relocate STACK from its old location to the new one. The
397 local variables YYSIZE and YYSTACKSIZE give the old and new number of
398 elements in the stack, and YYPTR gives the new location of the
399 stack. Advance YYPTR to a properly aligned location for the next
400 stack. */
401 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
402 do \
404 YYSIZE_T yynewbytes; \
405 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
406 Stack = &yyptr->Stack_alloc; \
407 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
408 yyptr += yynewbytes / sizeof (*yyptr); \
410 while (YYID (0))
412 #endif
414 /* YYFINAL -- State number of the termination state. */
415 #define YYFINAL 41
416 /* YYLAST -- Last index in YYTABLE. */
417 #define YYLAST 270
419 /* YYNTOKENS -- Number of terminals. */
420 #define YYNTOKENS 52
421 /* YYNNTS -- Number of nonterminals. */
422 #define YYNNTS 21
423 /* YYNRULES -- Number of rules. */
424 #define YYNRULES 75
425 /* YYNRULES -- Number of states. */
426 #define YYNSTATES 158
428 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
429 #define YYUNDEFTOK 2
430 #define YYMAXUTOK 306
432 #define YYTRANSLATE(YYX) \
433 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
435 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
436 static const yytype_uint8 yytranslate[] =
438 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
464 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
465 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
466 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
467 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
468 45, 46, 47, 48, 49, 50, 51
471 #if YYDEBUG
472 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
473 YYRHS. */
474 static const yytype_uint16 yyprhs[] =
476 0, 0, 3, 4, 6, 7, 9, 11, 14, 19,
477 26, 30, 34, 38, 42, 47, 54, 58, 62, 66,
478 74, 80, 86, 94, 100, 107, 111, 112, 113, 123,
479 125, 127, 129, 131, 133, 137, 141, 145, 149, 153,
480 157, 161, 165, 169, 173, 177, 181, 184, 188, 189,
481 192, 197, 198, 202, 204, 206, 210, 212, 213, 216,
482 218, 219, 224, 227, 232, 237, 238, 241, 243, 245,
483 247, 249, 251, 253, 256, 257
486 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
487 static const yytype_int8 yyrhs[] =
489 53, 0, -1, -1, 55, -1, -1, 55, -1, 56,
490 -1, 56, 55, -1, 38, 65, 12, 54, -1, 38,
491 65, 5, 65, 12, 54, -1, 21, 54, 22, -1,
492 37, 65, 12, -1, 45, 65, 12, -1, 67, 64,
493 12, -1, 67, 59, 65, 12, -1, 67, 40, 65,
494 59, 65, 12, -1, 28, 65, 12, -1, 30, 65,
495 12, -1, 43, 65, 12, -1, 33, 50, 36, 65,
496 21, 54, 22, -1, 46, 65, 21, 61, 22, -1,
497 34, 60, 21, 54, 22, -1, 34, 60, 21, 54,
498 22, 31, 56, -1, 49, 60, 21, 54, 22, -1,
499 44, 50, 63, 21, 54, 22, -1, 40, 67, 56,
500 -1, -1, -1, 26, 70, 50, 72, 21, 57, 51,
501 58, 22, -1, 5, -1, 25, -1, 11, -1, 16,
502 -1, 67, -1, 60, 5, 60, -1, 60, 6, 60,
503 -1, 60, 15, 60, -1, 60, 3, 60, -1, 60,
504 4, 60, -1, 60, 7, 60, -1, 60, 8, 60,
505 -1, 60, 23, 60, -1, 60, 24, 60, -1, 60,
506 9, 60, -1, 60, 10, 60, -1, 67, 36, 65,
507 -1, 14, 60, -1, 17, 60, 18, -1, -1, 62,
508 61, -1, 29, 50, 13, 54, -1, -1, 50, 13,
509 63, -1, 50, -1, 65, -1, 65, 13, 64, -1,
510 66, -1, -1, 66, 67, -1, 50, -1, -1, 19,
511 68, 69, 20, -1, 67, 64, -1, 40, 67, 67,
512 64, -1, 40, 67, 43, 65, -1, -1, 70, 71,
513 -1, 48, -1, 47, -1, 35, -1, 42, -1, 41,
514 -1, 32, -1, 39, 50, -1, -1, 27, 65, -1
517 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
518 static const yytype_uint16 yyrline[] =
520 0, 130, 130, 132, 143, 144, 148, 149, 150, 151,
521 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
522 165, 166, 167, 168, 169, 170, 171, 171, 171, 180,
523 181, 182, 183, 191, 192, 193, 194, 195, 196, 197,
524 198, 199, 200, 201, 202, 203, 204, 205, 215, 216,
525 220, 229, 230, 231, 240, 241, 251, 255, 256, 260,
526 261, 261, 270, 271, 272, 281, 282, 286, 287, 288,
527 289, 290, 291, 292, 300, 301
529 #endif
531 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
532 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
533 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
534 static const char *const yytname[] =
536 "$end", "error", "$undefined", "_LANGLE_t", "_LANGLE_EQUALS_t",
537 "_EQUALS_t", "_EQUALSEQUALS_t", "_RANGLE_t", "_RANGLE_EQUALS_t",
538 "_BAR_t", "_BARBAR_t", "_MINUS_EQUALS_t", "_SEMIC_t", "_COLON_t",
539 "_BANG_t", "_BANG_EQUALS_t", "_QUESTION_EQUALS_t", "_LPAREN_t",
540 "_RPAREN_t", "_LBRACKET_t", "_RBRACKET_t", "_LBRACE_t", "_RBRACE_t",
541 "_AMPER_t", "_AMPERAMPER_t", "_PLUS_EQUALS_t", "ACTIONS_t", "BIND_t",
542 "BREAK_t", "CASE_t", "CONTINUE_t", "ELSE_t", "EXISTING_t", "FOR_t",
543 "IF_t", "IGNORE_t", "IN_t", "INCLUDE_t", "LOCAL_t", "MAXLINE_t", "ON_t",
544 "PIECEMEAL_t", "QUIETLY_t", "RETURN_t", "RULE_t", "SOFTINCLUDE_t",
545 "SWITCH_t", "TOGETHER_t", "UPDATED_t", "WHILE_t", "ARG", "STRING",
546 "$accept", "run", "block", "rules", "rule", "$@1", "$@2", "assign",
547 "expr", "cases", "case", "params", "lol", "list", "listp", "arg", "$@3",
548 "func", "eflags", "eflag", "bindlist", 0
550 #endif
552 # ifdef YYPRINT
553 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
554 token YYLEX-NUM. */
555 static const yytype_uint16 yytoknum[] =
557 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
558 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
559 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
560 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
561 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
562 305, 306
564 # endif
566 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
567 static const yytype_uint8 yyr1[] =
569 0, 52, 53, 53, 54, 54, 55, 55, 55, 55,
570 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
571 56, 56, 56, 56, 56, 56, 57, 58, 56, 59,
572 59, 59, 59, 60, 60, 60, 60, 60, 60, 60,
573 60, 60, 60, 60, 60, 60, 60, 60, 61, 61,
574 62, 63, 63, 63, 64, 64, 65, 66, 66, 67,
575 68, 67, 69, 69, 69, 70, 70, 71, 71, 71,
576 71, 71, 71, 71, 72, 72
579 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
580 static const yytype_uint8 yyr2[] =
582 0, 2, 0, 1, 0, 1, 1, 2, 4, 6,
583 3, 3, 3, 3, 4, 6, 3, 3, 3, 7,
584 5, 5, 7, 5, 6, 3, 0, 0, 9, 1,
585 1, 1, 1, 1, 3, 3, 3, 3, 3, 3,
586 3, 3, 3, 3, 3, 3, 2, 3, 0, 2,
587 4, 0, 3, 1, 1, 3, 1, 0, 2, 1,
588 0, 4, 2, 4, 4, 0, 2, 1, 1, 1,
589 1, 1, 1, 2, 0, 2
592 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
593 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
594 means the default is an error. */
595 static const yytype_uint8 yydefact[] =
597 2, 60, 4, 65, 57, 57, 0, 0, 57, 57,
598 0, 57, 0, 57, 57, 0, 59, 0, 3, 6,
599 57, 0, 0, 5, 0, 0, 56, 0, 0, 0,
600 0, 0, 33, 0, 0, 0, 0, 51, 0, 0,
601 0, 1, 7, 29, 31, 32, 30, 57, 57, 0,
602 54, 0, 57, 0, 10, 72, 69, 0, 71, 70,
603 68, 67, 74, 66, 16, 58, 17, 57, 46, 0,
604 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
605 0, 0, 57, 11, 57, 4, 25, 18, 53, 0,
606 12, 48, 4, 0, 0, 13, 57, 0, 62, 61,
607 73, 57, 0, 0, 47, 37, 38, 34, 35, 39,
608 40, 43, 44, 36, 0, 41, 42, 45, 0, 8,
609 51, 4, 0, 0, 48, 0, 57, 14, 55, 57,
610 57, 75, 26, 4, 21, 4, 52, 0, 0, 20,
611 49, 23, 0, 64, 63, 0, 0, 0, 9, 24,
612 4, 15, 27, 19, 22, 50, 0, 28
615 /* YYDEFGOTO[NTERM-NUM]. */
616 static const yytype_int16 yydefgoto[] =
618 -1, 17, 22, 23, 19, 145, 156, 48, 31, 123,
619 124, 89, 49, 50, 26, 32, 21, 53, 24, 63,
623 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
624 STATE-NUM. */
625 #define YYPACT_NINF -73
626 static const yytype_int16 yypact[] =
628 144, -73, 144, -73, -73, -73, -46, -8, -73, -73,
629 -7, -73, -45, -73, -73, -8, -73, 14, -73, 144,
630 20, -11, -6, -73, 52, 6, -7, 10, 2, -8,
631 -8, 49, 4, 34, 32, 176, 38, 12, 53, 47,
632 119, -73, -73, -73, -73, -73, -73, -73, -73, 59,
633 61, -7, -73, 56, -73, -73, -73, 27, -73, -73,
634 -73, -73, 55, -73, -73, -73, -73, -73, -73, 224,
635 -8, -8, -8, -8, -8, -8, -8, -8, -8, 144,
636 -8, -8, -73, -73, -73, 144, -73, -73, 70, 67,
637 -73, 66, 144, 64, 78, -73, -73, -2, -73, -73,
638 -73, -73, 77, 91, -73, -73, -73, 111, 111, -73,
639 -73, 246, 246, 111, 95, 101, 101, -73, 118, -73,
640 12, 144, 82, 109, 66, 114, -73, -73, -73, -73,
641 -73, -73, -73, 144, 106, 144, -73, 116, 126, -73,
642 -73, -73, 129, -73, -73, 93, 124, 176, -73, -73,
643 144, -73, -73, -73, -73, -73, 127, -73
646 /* YYPGOTO[NTERM-NUM]. */
647 static const yytype_int8 yypgoto[] =
649 -73, -73, -72, 15, -34, -73, -73, 71, 81, 36,
650 -73, 46, -49, 19, -73, 0, -73, -73, -73, -73,
654 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
655 positive, shift that token. If negative, reduce the rule which
656 number is the opposite. If zero, do what YYDEFACT says.
657 If YYTABLE_NINF, syntax error. */
658 #define YYTABLE_NINF -1
659 static const yytype_uint8 yytable[] =
661 20, 86, 20, 98, 28, 37, 29, 114, 1, 30,
662 35, 1, 1, 119, 41, 18, 54, 1, 64, 20,
663 125, 52, 66, 25, 27, 43, 65, 33, 34, 51,
664 36, 44, 38, 39, 42, 20, 45, 84, 67, 16,
665 82, 129, 16, 16, 85, 46, 83, 128, 16, 137,
666 87, 97, 70, 71, 72, 73, 74, 75, 76, 77,
667 47, 146, 88, 148, 78, 90, 93, 94, 91, 43,
668 79, 95, 80, 81, 96, 44, 99, 100, 155, 20,
669 45, 144, 101, 120, 55, 20, 103, 56, 121, 46,
670 127, 57, 20, 58, 59, 122, 40, 130, 132, 60,
671 61, 117, 62, 118, 70, 71, 72, 73, 74, 75,
672 68, 69, 133, 154, 70, 71, 78, 134, 74, 75,
673 131, 20, 70, 71, 72, 73, 74, 75, 76, 77,
674 135, 139, 138, 20, 78, 20, 141, 147, 149, 150,
675 92, 151, 80, 81, 152, 142, 153, 20, 143, 157,
676 20, 105, 106, 107, 108, 109, 110, 111, 112, 113,
677 140, 115, 116, 1, 126, 2, 136, 0, 0, 0,
678 3, 0, 4, 0, 5, 0, 0, 6, 7, 0,
679 0, 8, 9, 0, 10, 0, 0, 11, 12, 13,
680 14, 0, 0, 15, 16, 1, 0, 2, 0, 0,
681 0, 0, 3, 0, 4, 0, 5, 0, 0, 6,
682 7, 0, 0, 8, 0, 0, 10, 0, 0, 11,
683 12, 13, 14, 0, 0, 15, 16, 70, 71, 72,
684 73, 74, 75, 76, 77, 0, 0, 0, 0, 78,
685 0, 0, 104, 0, 0, 0, 0, 80, 81, 70,
686 71, 72, 73, 74, 75, 0, 0, 0, 0, 0,
687 0, 78, 0, 0, 0, 0, 0, 0, 0, 80,
691 static const yytype_int16 yycheck[] =
693 0, 35, 2, 52, 50, 50, 14, 79, 19, 17,
694 10, 19, 19, 85, 0, 0, 22, 19, 12, 19,
695 92, 21, 12, 4, 5, 5, 26, 8, 9, 40,
696 11, 11, 13, 14, 19, 35, 16, 5, 36, 50,
697 36, 43, 50, 50, 12, 25, 12, 96, 50, 121,
698 12, 51, 3, 4, 5, 6, 7, 8, 9, 10,
699 40, 133, 50, 135, 15, 12, 47, 48, 21, 5,
700 21, 12, 23, 24, 13, 11, 20, 50, 150, 79,
701 16, 130, 27, 13, 32, 85, 67, 35, 21, 25,
702 12, 39, 92, 41, 42, 29, 15, 97, 21, 47,
703 48, 82, 50, 84, 3, 4, 5, 6, 7, 8,
704 29, 30, 21, 147, 3, 4, 15, 22, 7, 8,
705 101, 121, 3, 4, 5, 6, 7, 8, 9, 10,
706 12, 22, 50, 133, 15, 135, 22, 31, 22, 13,
707 21, 12, 23, 24, 51, 126, 22, 147, 129, 22,
708 150, 70, 71, 72, 73, 74, 75, 76, 77, 78,
709 124, 80, 81, 19, 93, 21, 120, -1, -1, -1,
710 26, -1, 28, -1, 30, -1, -1, 33, 34, -1,
711 -1, 37, 38, -1, 40, -1, -1, 43, 44, 45,
712 46, -1, -1, 49, 50, 19, -1, 21, -1, -1,
713 -1, -1, 26, -1, 28, -1, 30, -1, -1, 33,
714 34, -1, -1, 37, -1, -1, 40, -1, -1, 43,
715 44, 45, 46, -1, -1, 49, 50, 3, 4, 5,
716 6, 7, 8, 9, 10, -1, -1, -1, -1, 15,
717 -1, -1, 18, -1, -1, -1, -1, 23, 24, 3,
718 4, 5, 6, 7, 8, -1, -1, -1, -1, -1,
719 -1, 15, -1, -1, -1, -1, -1, -1, -1, 23,
723 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
724 symbol of state STATE-NUM. */
725 static const yytype_uint8 yystos[] =
727 0, 19, 21, 26, 28, 30, 33, 34, 37, 38,
728 40, 43, 44, 45, 46, 49, 50, 53, 55, 56,
729 67, 68, 54, 55, 70, 65, 66, 65, 50, 14,
730 17, 60, 67, 65, 65, 67, 65, 50, 65, 65,
731 60, 0, 55, 5, 11, 16, 25, 40, 59, 64,
732 65, 40, 67, 69, 22, 32, 35, 39, 41, 42,
733 47, 48, 50, 71, 12, 67, 12, 36, 60, 60,
734 3, 4, 5, 6, 7, 8, 9, 10, 15, 21,
735 23, 24, 36, 12, 5, 12, 56, 12, 50, 63,
736 12, 21, 21, 65, 65, 12, 13, 67, 64, 20,
737 50, 27, 72, 65, 18, 60, 60, 60, 60, 60,
738 60, 60, 60, 60, 54, 60, 60, 65, 65, 54,
739 13, 21, 29, 61, 62, 54, 59, 12, 64, 43,
740 67, 65, 21, 21, 22, 12, 63, 54, 50, 22,
741 61, 22, 65, 65, 64, 57, 54, 31, 54, 22,
742 13, 12, 51, 22, 56, 54, 58, 22
745 #define yyerrok (yyerrstatus = 0)
746 #define yyclearin (yychar = YYEMPTY)
747 #define YYEMPTY (-2)
748 #define YYEOF 0
750 #define YYACCEPT goto yyacceptlab
751 #define YYABORT goto yyabortlab
752 #define YYERROR goto yyerrorlab
755 /* Like YYERROR except do call yyerror. This remains here temporarily
756 to ease the transition to the new meaning of YYERROR, for GCC.
757 Once GCC version 2 has supplanted version 1, this can go. However,
758 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
759 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
760 discussed. */
762 #define YYFAIL goto yyerrlab
763 #if defined YYFAIL
764 /* This is here to suppress warnings from the GCC cpp's
765 -Wunused-macros. Normally we don't worry about that warning, but
766 some users do, and we want to make it easy for users to remove
767 YYFAIL uses, which will produce warnings from Bison 2.5. */
768 #endif
770 #define YYRECOVERING() (!!yyerrstatus)
772 #define YYBACKUP(Token, Value) \
773 do \
774 if (yychar == YYEMPTY && yylen == 1) \
776 yychar = (Token); \
777 yylval = (Value); \
778 yytoken = YYTRANSLATE (yychar); \
779 YYPOPSTACK (1); \
780 goto yybackup; \
782 else \
784 yyerror (YY_("syntax error: cannot back up")); \
785 YYERROR; \
787 while (YYID (0))
790 #define YYTERROR 1
791 #define YYERRCODE 256
794 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
795 If N is 0, then set CURRENT to the empty location which ends
796 the previous symbol: RHS[0] (always defined). */
798 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
799 #ifndef YYLLOC_DEFAULT
800 # define YYLLOC_DEFAULT(Current, Rhs, N) \
801 do \
802 if (YYID (N)) \
804 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
805 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
806 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
807 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
809 else \
811 (Current).first_line = (Current).last_line = \
812 YYRHSLOC (Rhs, 0).last_line; \
813 (Current).first_column = (Current).last_column = \
814 YYRHSLOC (Rhs, 0).last_column; \
816 while (YYID (0))
817 #endif
820 /* YY_LOCATION_PRINT -- Print the location on the stream.
821 This macro was not mandated originally: define only if we know
822 we won't break user code: when these are the locations we know. */
824 #ifndef YY_LOCATION_PRINT
825 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
826 # define YY_LOCATION_PRINT(File, Loc) \
827 fprintf (File, "%d.%d-%d.%d", \
828 (Loc).first_line, (Loc).first_column, \
829 (Loc).last_line, (Loc).last_column)
830 # else
831 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
832 # endif
833 #endif
836 /* YYLEX -- calling `yylex' with the right arguments. */
838 #ifdef YYLEX_PARAM
839 # define YYLEX yylex (YYLEX_PARAM)
840 #else
841 # define YYLEX yylex ()
842 #endif
844 /* Enable debugging if requested. */
845 #if YYDEBUG
847 # ifndef YYFPRINTF
848 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
849 # define YYFPRINTF fprintf
850 # endif
852 # define YYDPRINTF(Args) \
853 do { \
854 if (yydebug) \
855 YYFPRINTF Args; \
856 } while (YYID (0))
858 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
859 do { \
860 if (yydebug) \
862 YYFPRINTF (stderr, "%s ", Title); \
863 yy_symbol_print (stderr, \
864 Type, Value); \
865 YYFPRINTF (stderr, "\n"); \
867 } while (YYID (0))
870 /*--------------------------------.
871 | Print this symbol on YYOUTPUT. |
872 `--------------------------------*/
874 /*ARGSUSED*/
875 #if (defined __STDC__ || defined __C99__FUNC__ \
876 || defined __cplusplus || defined _MSC_VER)
877 static void
878 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
879 #else
880 static void
881 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
882 FILE *yyoutput;
883 int yytype;
884 YYSTYPE const * const yyvaluep;
885 #endif
887 if (!yyvaluep)
888 return;
889 # ifdef YYPRINT
890 if (yytype < YYNTOKENS)
891 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
892 # else
893 YYUSE (yyoutput);
894 # endif
895 switch (yytype)
897 default:
898 break;
903 /*--------------------------------.
904 | Print this symbol on YYOUTPUT. |
905 `--------------------------------*/
907 #if (defined __STDC__ || defined __C99__FUNC__ \
908 || defined __cplusplus || defined _MSC_VER)
909 static void
910 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
911 #else
912 static void
913 yy_symbol_print (yyoutput, yytype, yyvaluep)
914 FILE *yyoutput;
915 int yytype;
916 YYSTYPE const * const yyvaluep;
917 #endif
919 if (yytype < YYNTOKENS)
920 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
921 else
922 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
924 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
925 YYFPRINTF (yyoutput, ")");
928 /*------------------------------------------------------------------.
929 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
930 | TOP (included). |
931 `------------------------------------------------------------------*/
933 #if (defined __STDC__ || defined __C99__FUNC__ \
934 || defined __cplusplus || defined _MSC_VER)
935 static void
936 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
937 #else
938 static void
939 yy_stack_print (yybottom, yytop)
940 yytype_int16 *yybottom;
941 yytype_int16 *yytop;
942 #endif
944 YYFPRINTF (stderr, "Stack now");
945 for (; yybottom <= yytop; yybottom++)
947 int yybot = *yybottom;
948 YYFPRINTF (stderr, " %d", yybot);
950 YYFPRINTF (stderr, "\n");
953 # define YY_STACK_PRINT(Bottom, Top) \
954 do { \
955 if (yydebug) \
956 yy_stack_print ((Bottom), (Top)); \
957 } while (YYID (0))
960 /*------------------------------------------------.
961 | Report that the YYRULE is going to be reduced. |
962 `------------------------------------------------*/
964 #if (defined __STDC__ || defined __C99__FUNC__ \
965 || defined __cplusplus || defined _MSC_VER)
966 static void
967 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
968 #else
969 static void
970 yy_reduce_print (yyvsp, yyrule)
971 YYSTYPE *yyvsp;
972 int yyrule;
973 #endif
975 int yynrhs = yyr2[yyrule];
976 int yyi;
977 unsigned long int yylno = yyrline[yyrule];
978 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
979 yyrule - 1, yylno);
980 /* The symbols being reduced. */
981 for (yyi = 0; yyi < yynrhs; yyi++)
983 YYFPRINTF (stderr, " $%d = ", yyi + 1);
984 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
985 &(yyvsp[(yyi + 1) - (yynrhs)])
987 YYFPRINTF (stderr, "\n");
991 # define YY_REDUCE_PRINT(Rule) \
992 do { \
993 if (yydebug) \
994 yy_reduce_print (yyvsp, Rule); \
995 } while (YYID (0))
997 /* Nonzero means print parse trace. It is left uninitialized so that
998 multiple parsers can coexist. */
999 int yydebug;
1000 #else /* !YYDEBUG */
1001 # define YYDPRINTF(Args)
1002 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1003 # define YY_STACK_PRINT(Bottom, Top)
1004 # define YY_REDUCE_PRINT(Rule)
1005 #endif /* !YYDEBUG */
1008 /* YYINITDEPTH -- initial size of the parser's stacks. */
1009 #ifndef YYINITDEPTH
1010 # define YYINITDEPTH 200
1011 #endif
1013 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1014 if the built-in stack extension method is used).
1016 Do not make this value too large; the results are undefined if
1017 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1018 evaluated with infinite-precision integer arithmetic. */
1020 #ifndef YYMAXDEPTH
1021 # define YYMAXDEPTH 10000
1022 #endif
1026 #if YYERROR_VERBOSE
1028 # ifndef yystrlen
1029 # if defined __GLIBC__ && defined _STRING_H
1030 # define yystrlen strlen
1031 # else
1032 /* Return the length of YYSTR. */
1033 #if (defined __STDC__ || defined __C99__FUNC__ \
1034 || defined __cplusplus || defined _MSC_VER)
1035 static YYSIZE_T
1036 yystrlen (const char *yystr)
1037 #else
1038 static YYSIZE_T
1039 yystrlen (yystr)
1040 const char *yystr;
1041 #endif
1043 YYSIZE_T yylen;
1044 for (yylen = 0; yystr[yylen]; yylen++)
1045 continue;
1046 return yylen;
1048 # endif
1049 # endif
1051 # ifndef yystpcpy
1052 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1053 # define yystpcpy stpcpy
1054 # else
1055 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1056 YYDEST. */
1057 #if (defined __STDC__ || defined __C99__FUNC__ \
1058 || defined __cplusplus || defined _MSC_VER)
1059 static char *
1060 yystpcpy (char *yydest, const char *yysrc)
1061 #else
1062 static char *
1063 yystpcpy (yydest, yysrc)
1064 char *yydest;
1065 const char *yysrc;
1066 #endif
1068 char *yyd = yydest;
1069 const char *yys = yysrc;
1071 while ((*yyd++ = *yys++) != '\0')
1072 continue;
1074 return yyd - 1;
1076 # endif
1077 # endif
1079 # ifndef yytnamerr
1080 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1081 quotes and backslashes, so that it's suitable for yyerror. The
1082 heuristic is that double-quoting is unnecessary unless the string
1083 contains an apostrophe, a comma, or backslash (other than
1084 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1085 null, do not copy; instead, return the length of what the result
1086 would have been. */
1087 static YYSIZE_T
1088 yytnamerr (char *yyres, const char *yystr)
1090 if (*yystr == '"')
1092 YYSIZE_T yyn = 0;
1093 char const *yyp = yystr;
1095 for (;;)
1096 switch (*++yyp)
1098 case '\'':
1099 case ',':
1100 goto do_not_strip_quotes;
1102 case '\\':
1103 if (*++yyp != '\\')
1104 goto do_not_strip_quotes;
1105 /* Fall through. */
1106 default:
1107 if (yyres)
1108 yyres[yyn] = *yyp;
1109 yyn++;
1110 break;
1112 case '"':
1113 if (yyres)
1114 yyres[yyn] = '\0';
1115 return yyn;
1117 do_not_strip_quotes: ;
1120 if (! yyres)
1121 return yystrlen (yystr);
1123 return yystpcpy (yyres, yystr) - yyres;
1125 # endif
1127 /* Copy into YYRESULT an error message about the unexpected token
1128 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1129 including the terminating null byte. If YYRESULT is null, do not
1130 copy anything; just return the number of bytes that would be
1131 copied. As a special case, return 0 if an ordinary "syntax error"
1132 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1133 size calculation. */
1134 static YYSIZE_T
1135 yysyntax_error (char *yyresult, int yystate, int yychar)
1137 int yyn = yypact[yystate];
1139 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1140 return 0;
1141 else
1143 int yytype = YYTRANSLATE (yychar);
1144 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1145 YYSIZE_T yysize = yysize0;
1146 YYSIZE_T yysize1;
1147 int yysize_overflow = 0;
1148 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1149 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1150 int yyx;
1152 # if 0
1153 /* This is so xgettext sees the translatable formats that are
1154 constructed on the fly. */
1155 YY_("syntax error, unexpected %s");
1156 YY_("syntax error, unexpected %s, expecting %s");
1157 YY_("syntax error, unexpected %s, expecting %s or %s");
1158 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1159 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1160 # endif
1161 char *yyfmt;
1162 char const *yyf;
1163 static char const yyunexpected[] = "syntax error, unexpected %s";
1164 static char const yyexpecting[] = ", expecting %s";
1165 static char const yyor[] = " or %s";
1166 char yyformat[sizeof yyunexpected
1167 + sizeof yyexpecting - 1
1168 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1169 * (sizeof yyor - 1))];
1170 char const *yyprefix = yyexpecting;
1172 /* Start YYX at -YYN if negative to avoid negative indexes in
1173 YYCHECK. */
1174 int yyxbegin = yyn < 0 ? -yyn : 0;
1176 /* Stay within bounds of both yycheck and yytname. */
1177 int yychecklim = YYLAST - yyn + 1;
1178 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1179 int yycount = 1;
1181 yyarg[0] = yytname[yytype];
1182 yyfmt = yystpcpy (yyformat, yyunexpected);
1184 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1185 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1187 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1189 yycount = 1;
1190 yysize = yysize0;
1191 yyformat[sizeof yyunexpected - 1] = '\0';
1192 break;
1194 yyarg[yycount++] = yytname[yyx];
1195 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1196 yysize_overflow |= (yysize1 < yysize);
1197 yysize = yysize1;
1198 yyfmt = yystpcpy (yyfmt, yyprefix);
1199 yyprefix = yyor;
1202 yyf = YY_(yyformat);
1203 yysize1 = yysize + yystrlen (yyf);
1204 yysize_overflow |= (yysize1 < yysize);
1205 yysize = yysize1;
1207 if (yysize_overflow)
1208 return YYSIZE_MAXIMUM;
1210 if (yyresult)
1212 /* Avoid sprintf, as that infringes on the user's name space.
1213 Don't have undefined behavior even if the translation
1214 produced a string with the wrong number of "%s"s. */
1215 char *yyp = yyresult;
1216 int yyi = 0;
1217 while ((*yyp = *yyf) != '\0')
1219 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1221 yyp += yytnamerr (yyp, yyarg[yyi++]);
1222 yyf += 2;
1224 else
1226 yyp++;
1227 yyf++;
1231 return yysize;
1234 #endif /* YYERROR_VERBOSE */
1237 /*-----------------------------------------------.
1238 | Release the memory associated to this symbol. |
1239 `-----------------------------------------------*/
1241 /*ARGSUSED*/
1242 #if (defined __STDC__ || defined __C99__FUNC__ \
1243 || defined __cplusplus || defined _MSC_VER)
1244 static void
1245 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1246 #else
1247 static void
1248 yydestruct (yymsg, yytype, yyvaluep)
1249 const char *yymsg;
1250 int yytype;
1251 YYSTYPE *yyvaluep;
1252 #endif
1254 YYUSE (yyvaluep);
1256 if (!yymsg)
1257 yymsg = "Deleting";
1258 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1260 switch (yytype)
1263 default:
1264 break;
1268 /* Prevent warnings from -Wmissing-prototypes. */
1269 #ifdef YYPARSE_PARAM
1270 #if defined __STDC__ || defined __cplusplus
1271 int yyparse (void *YYPARSE_PARAM);
1272 #else
1273 int yyparse ();
1274 #endif
1275 #else /* ! YYPARSE_PARAM */
1276 #if defined __STDC__ || defined __cplusplus
1277 int yyparse (void);
1278 #else
1279 int yyparse ();
1280 #endif
1281 #endif /* ! YYPARSE_PARAM */
1284 /* The lookahead symbol. */
1285 int yychar;
1287 /* The semantic value of the lookahead symbol. */
1288 YYSTYPE yylval;
1290 /* Number of syntax errors so far. */
1291 int yynerrs;
1295 /*-------------------------.
1296 | yyparse or yypush_parse. |
1297 `-------------------------*/
1299 #ifdef YYPARSE_PARAM
1300 #if (defined __STDC__ || defined __C99__FUNC__ \
1301 || defined __cplusplus || defined _MSC_VER)
1303 yyparse (void *YYPARSE_PARAM)
1304 #else
1306 yyparse (YYPARSE_PARAM)
1307 void *YYPARSE_PARAM;
1308 #endif
1309 #else /* ! YYPARSE_PARAM */
1310 #if (defined __STDC__ || defined __C99__FUNC__ \
1311 || defined __cplusplus || defined _MSC_VER)
1313 yyparse (void)
1314 #else
1316 yyparse ()
1318 #endif
1319 #endif
1323 int yystate;
1324 /* Number of tokens to shift before error messages enabled. */
1325 int yyerrstatus;
1327 /* The stacks and their tools:
1328 `yyss': related to states.
1329 `yyvs': related to semantic values.
1331 Refer to the stacks thru separate pointers, to allow yyoverflow
1332 to reallocate them elsewhere. */
1334 /* The state stack. */
1335 yytype_int16 yyssa[YYINITDEPTH];
1336 yytype_int16 *yyss;
1337 yytype_int16 *yyssp;
1339 /* The semantic value stack. */
1340 YYSTYPE yyvsa[YYINITDEPTH];
1341 YYSTYPE *yyvs;
1342 YYSTYPE *yyvsp;
1344 YYSIZE_T yystacksize;
1346 int yyn;
1347 int yyresult;
1348 /* Lookahead token as an internal (translated) token number. */
1349 int yytoken;
1350 /* The variables used to return semantic value and location from the
1351 action routines. */
1352 YYSTYPE yyval;
1354 #if YYERROR_VERBOSE
1355 /* Buffer for error messages, and its allocated size. */
1356 char yymsgbuf[128];
1357 char *yymsg = yymsgbuf;
1358 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1359 #endif
1361 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1363 /* The number of symbols on the RHS of the reduced rule.
1364 Keep to zero when no symbol should be popped. */
1365 int yylen = 0;
1367 yytoken = 0;
1368 yyss = yyssa;
1369 yyvs = yyvsa;
1370 yystacksize = YYINITDEPTH;
1372 YYDPRINTF ((stderr, "Starting parse\n"));
1374 yystate = 0;
1375 yyerrstatus = 0;
1376 yynerrs = 0;
1377 yychar = YYEMPTY; /* Cause a token to be read. */
1379 /* Initialize stack pointers.
1380 Waste one element of value and location stack
1381 so that they stay on the same level as the state stack.
1382 The wasted elements are never initialized. */
1383 yyssp = yyss;
1384 yyvsp = yyvs;
1386 goto yysetstate;
1388 /*------------------------------------------------------------.
1389 | yynewstate -- Push a new state, which is found in yystate. |
1390 `------------------------------------------------------------*/
1391 yynewstate:
1392 /* In all cases, when you get here, the value and location stacks
1393 have just been pushed. So pushing a state here evens the stacks. */
1394 yyssp++;
1396 yysetstate:
1397 *yyssp = yystate;
1399 if (yyss + yystacksize - 1 <= yyssp)
1401 /* Get the current used size of the three stacks, in elements. */
1402 YYSIZE_T yysize = yyssp - yyss + 1;
1404 #ifdef yyoverflow
1406 /* Give user a chance to reallocate the stack. Use copies of
1407 these so that the &'s don't force the real ones into
1408 memory. */
1409 YYSTYPE *yyvs1 = yyvs;
1410 yytype_int16 *yyss1 = yyss;
1412 /* Each stack pointer address is followed by the size of the
1413 data in use in that stack, in bytes. This used to be a
1414 conditional around just the two extra args, but that might
1415 be undefined if yyoverflow is a macro. */
1416 yyoverflow (YY_("memory exhausted"),
1417 &yyss1, yysize * sizeof (*yyssp),
1418 &yyvs1, yysize * sizeof (*yyvsp),
1419 &yystacksize);
1421 yyss = yyss1;
1422 yyvs = yyvs1;
1424 #else /* no yyoverflow */
1425 # ifndef YYSTACK_RELOCATE
1426 goto yyexhaustedlab;
1427 # else
1428 /* Extend the stack our own way. */
1429 if (YYMAXDEPTH <= yystacksize)
1430 goto yyexhaustedlab;
1431 yystacksize *= 2;
1432 if (YYMAXDEPTH < yystacksize)
1433 yystacksize = YYMAXDEPTH;
1436 yytype_int16 *yyss1 = yyss;
1437 union yyalloc *yyptr =
1438 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1439 if (! yyptr)
1440 goto yyexhaustedlab;
1441 YYSTACK_RELOCATE (yyss_alloc, yyss);
1442 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1443 # undef YYSTACK_RELOCATE
1444 if (yyss1 != yyssa)
1445 YYSTACK_FREE (yyss1);
1447 # endif
1448 #endif /* no yyoverflow */
1450 yyssp = yyss + yysize - 1;
1451 yyvsp = yyvs + yysize - 1;
1453 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1454 (unsigned long int) yystacksize));
1456 if (yyss + yystacksize - 1 <= yyssp)
1457 YYABORT;
1460 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1462 if (yystate == YYFINAL)
1463 YYACCEPT;
1465 goto yybackup;
1467 /*-----------.
1468 | yybackup. |
1469 `-----------*/
1470 yybackup:
1472 /* Do appropriate processing given the current state. Read a
1473 lookahead token if we need one and don't already have one. */
1475 /* First try to decide what to do without reference to lookahead token. */
1476 yyn = yypact[yystate];
1477 if (yyn == YYPACT_NINF)
1478 goto yydefault;
1480 /* Not known => get a lookahead token if don't already have one. */
1482 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1483 if (yychar == YYEMPTY)
1485 YYDPRINTF ((stderr, "Reading a token: "));
1486 yychar = YYLEX;
1489 if (yychar <= YYEOF)
1491 yychar = yytoken = YYEOF;
1492 YYDPRINTF ((stderr, "Now at end of input.\n"));
1494 else
1496 yytoken = YYTRANSLATE (yychar);
1497 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1500 /* If the proper action on seeing token YYTOKEN is to reduce or to
1501 detect an error, take that action. */
1502 yyn += yytoken;
1503 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1504 goto yydefault;
1505 yyn = yytable[yyn];
1506 if (yyn <= 0)
1508 if (yyn == 0 || yyn == YYTABLE_NINF)
1509 goto yyerrlab;
1510 yyn = -yyn;
1511 goto yyreduce;
1514 /* Count tokens shifted since error; after three, turn off error
1515 status. */
1516 if (yyerrstatus)
1517 yyerrstatus--;
1519 /* Shift the lookahead token. */
1520 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1522 /* Discard the shifted token. */
1523 yychar = YYEMPTY;
1525 yystate = yyn;
1526 *++yyvsp = yylval;
1528 goto yynewstate;
1531 /*-----------------------------------------------------------.
1532 | yydefault -- do the default action for the current state. |
1533 `-----------------------------------------------------------*/
1534 yydefault:
1535 yyn = yydefact[yystate];
1536 if (yyn == 0)
1537 goto yyerrlab;
1538 goto yyreduce;
1541 /*-----------------------------.
1542 | yyreduce -- Do a reduction. |
1543 `-----------------------------*/
1544 yyreduce:
1545 /* yyn is the number of a rule to reduce with. */
1546 yylen = yyr2[yyn];
1548 /* If YYLEN is nonzero, implement the default value of the action:
1549 `$$ = $1'.
1551 Otherwise, the following line sets YYVAL to garbage.
1552 This behavior is undocumented and Bison
1553 users should not rely upon it. Assigning to YYVAL
1554 unconditionally makes the parser a bit smaller, and it avoids a
1555 GCC warning that YYVAL may be used uninitialized. */
1556 yyval = yyvsp[1-yylen];
1559 YY_REDUCE_PRINT (yyn);
1560 switch (yyn)
1562 case 3:
1564 { parse_save((yyvsp[(1) - (1)]).parse); ;}
1565 break;
1567 case 4:
1569 { (yyval).parse = pnull(); ;}
1570 break;
1572 case 5:
1574 { (yyval).parse = (yyvsp[(1) - (1)]).parse; ;}
1575 break;
1577 case 6:
1579 { (yyval).parse = (yyvsp[(1) - (1)]).parse; ;}
1580 break;
1582 case 7:
1584 { (yyval).parse = prules((yyvsp[(1) - (2)]).parse, (yyvsp[(2) - (2)]).parse); ;}
1585 break;
1587 case 8:
1589 { (yyval).parse = plocal((yyvsp[(2) - (4)]).parse, pnull(), (yyvsp[(4) - (4)]).parse); ;}
1590 break;
1592 case 9:
1594 { (yyval).parse = plocal((yyvsp[(2) - (6)]).parse, (yyvsp[(4) - (6)]).parse, (yyvsp[(6) - (6)]).parse); ;}
1595 break;
1597 case 10:
1599 { (yyval).parse = (yyvsp[(2) - (3)]).parse; ;}
1600 break;
1602 case 11:
1604 { (yyval).parse = pincl((yyvsp[(2) - (3)]).parse); ;}
1605 break;
1607 case 12:
1609 { (yyval).parse = psincl((yyvsp[(2) - (3)]).parse); ;}
1610 break;
1612 case 13:
1614 { (yyval).parse = prule((yyvsp[(1) - (3)]).parse, (yyvsp[(2) - (3)]).parse); ;}
1615 break;
1617 case 14:
1619 { (yyval).parse = pset((yyvsp[(1) - (4)]).parse, (yyvsp[(3) - (4)]).parse, (yyvsp[(2) - (4)]).number); ;}
1620 break;
1622 case 15:
1624 { (yyval).parse = pset1((yyvsp[(1) - (6)]).parse, (yyvsp[(3) - (6)]).parse, (yyvsp[(5) - (6)]).parse, (yyvsp[(4) - (6)]).number); ;}
1625 break;
1627 case 16:
1629 { (yyval).parse = pbreak((yyvsp[(2) - (3)]).parse, JMP_BREAK); ;}
1630 break;
1632 case 17:
1634 { (yyval).parse = pbreak((yyvsp[(2) - (3)]).parse, JMP_CONTINUE); ;}
1635 break;
1637 case 18:
1639 { (yyval).parse = pbreak((yyvsp[(2) - (3)]).parse, JMP_RETURN); ;}
1640 break;
1642 case 19:
1644 { (yyval).parse = pfor((yyvsp[(2) - (7)]).string, (yyvsp[(4) - (7)]).parse, (yyvsp[(6) - (7)]).parse); ;}
1645 break;
1647 case 20:
1649 { (yyval).parse = pswitch((yyvsp[(2) - (5)]).parse, (yyvsp[(4) - (5)]).parse); ;}
1650 break;
1652 case 21:
1654 { (yyval).parse = pif((yyvsp[(2) - (5)]).parse, (yyvsp[(4) - (5)]).parse, pnull()); ;}
1655 break;
1657 case 22:
1659 { (yyval).parse = pif((yyvsp[(2) - (7)]).parse, (yyvsp[(4) - (7)]).parse, (yyvsp[(7) - (7)]).parse); ;}
1660 break;
1662 case 23:
1664 { (yyval).parse = pwhile((yyvsp[(2) - (5)]).parse, (yyvsp[(4) - (5)]).parse); ;}
1665 break;
1667 case 24:
1669 { (yyval).parse = psetc((yyvsp[(2) - (6)]).string, (yyvsp[(3) - (6)]).parse, (yyvsp[(5) - (6)]).parse); ;}
1670 break;
1672 case 25:
1674 { (yyval).parse = pon((yyvsp[(2) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1675 break;
1677 case 26:
1679 { yymode(SCAN_STRING); ;}
1680 break;
1682 case 27:
1684 { yymode(SCAN_NORMAL); ;}
1685 break;
1687 case 28:
1689 { (yyval).parse = psete((yyvsp[(3) - (9)]).string, (yyvsp[(4) - (9)]).parse, (yyvsp[(7) - (9)]).string, (yyvsp[(2) - (9)]).number); ;}
1690 break;
1692 case 29:
1694 { (yyval).number = VAR_SET; ;}
1695 break;
1697 case 30:
1699 { (yyval).number = VAR_APPEND; ;}
1700 break;
1702 case 31:
1704 { (yyval).number = VAR_REMOVE; ;}
1705 break;
1707 case 32:
1709 { (yyval).number = VAR_DEFAULT; ;}
1710 break;
1712 case 33:
1714 { (yyval).parse = peval(EXPR_EXISTS, (yyvsp[(1) - (1)]).parse, pnull()); ;}
1715 break;
1717 case 34:
1719 { (yyval).parse = peval(EXPR_EQUALS, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1720 break;
1722 case 35:
1724 { (yyval).parse = peval(EXPR_EQUALS, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1725 break;
1727 case 36:
1729 { (yyval).parse = peval(EXPR_NOTEQ, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1730 break;
1732 case 37:
1734 { (yyval).parse = peval(EXPR_LESS, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1735 break;
1737 case 38:
1739 { (yyval).parse = peval(EXPR_LESSEQ, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1740 break;
1742 case 39:
1744 { (yyval).parse = peval(EXPR_MORE, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1745 break;
1747 case 40:
1749 { (yyval).parse = peval(EXPR_MOREEQ, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1750 break;
1752 case 41:
1754 { (yyval).parse = peval(EXPR_AND, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1755 break;
1757 case 42:
1759 { (yyval).parse = peval(EXPR_AND, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1760 break;
1762 case 43:
1764 { (yyval).parse = peval(EXPR_OR, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1765 break;
1767 case 44:
1769 { (yyval).parse = peval(EXPR_OR, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1770 break;
1772 case 45:
1774 { (yyval).parse = peval(EXPR_IN, (yyvsp[(1) - (3)]).parse, (yyvsp[(3) - (3)]).parse); ;}
1775 break;
1777 case 46:
1779 { (yyval).parse = peval(EXPR_NOT, (yyvsp[(2) - (2)]).parse, pnull()); ;}
1780 break;
1782 case 47:
1784 { (yyval).parse = (yyvsp[(2) - (3)]).parse; ;}
1785 break;
1787 case 48:
1789 { (yyval).parse = P0; ;}
1790 break;
1792 case 49:
1794 { (yyval).parse = pnode((yyvsp[(1) - (2)]).parse, (yyvsp[(2) - (2)]).parse); ;}
1795 break;
1797 case 50:
1799 { (yyval).parse = psnode((yyvsp[(2) - (4)]).string, (yyvsp[(4) - (4)]).parse); ;}
1800 break;
1802 case 51:
1804 { (yyval).parse = P0; ;}
1805 break;
1807 case 52:
1809 { (yyval).parse = psnode((yyvsp[(1) - (3)]).string, (yyvsp[(3) - (3)]).parse); ;}
1810 break;
1812 case 53:
1814 { (yyval).parse = psnode((yyvsp[(1) - (1)]).string, P0); ;}
1815 break;
1817 case 54:
1819 { (yyval).parse = pnode(P0, (yyvsp[(1) - (1)]).parse); ;}
1820 break;
1822 case 55:
1824 { (yyval).parse = pnode((yyvsp[(3) - (3)]).parse, (yyvsp[(1) - (3)]).parse); ;}
1825 break;
1827 case 56:
1829 { (yyval).parse = (yyvsp[(1) - (1)]).parse; yymode(SCAN_NORMAL); ;}
1830 break;
1832 case 57:
1834 { (yyval).parse = pnull(); yymode(SCAN_PUNCT); ;}
1835 break;
1837 case 58:
1839 { (yyval).parse = pappend((yyvsp[(1) - (2)]).parse, (yyvsp[(2) - (2)]).parse); ;}
1840 break;
1842 case 59:
1844 { (yyval).parse = plist((yyvsp[(1) - (1)]).string); ;}
1845 break;
1847 case 60:
1849 { yymode(SCAN_NORMAL); ;}
1850 break;
1852 case 61:
1854 { (yyval).parse = (yyvsp[(3) - (4)]).parse; ;}
1855 break;
1857 case 62:
1859 { (yyval).parse = prule((yyvsp[(1) - (2)]).parse, (yyvsp[(2) - (2)]).parse); ;}
1860 break;
1862 case 63:
1864 { (yyval).parse = pon((yyvsp[(2) - (4)]).parse, prule((yyvsp[(3) - (4)]).parse, (yyvsp[(4) - (4)]).parse)); ;}
1865 break;
1867 case 64:
1869 { (yyval).parse = pon((yyvsp[(2) - (4)]).parse, (yyvsp[(4) - (4)]).parse); ;}
1870 break;
1872 case 65:
1874 { (yyval).number = 0; ;}
1875 break;
1877 case 66:
1879 { (yyval).number = (yyvsp[(1) - (2)]).number | (yyvsp[(2) - (2)]).number; ;}
1880 break;
1882 case 67:
1884 { (yyval).number = RULE_UPDATED; ;}
1885 break;
1887 case 68:
1889 { (yyval).number = RULE_TOGETHER; ;}
1890 break;
1892 case 69:
1894 { (yyval).number = RULE_IGNORE; ;}
1895 break;
1897 case 70:
1899 { (yyval).number = RULE_QUIETLY; ;}
1900 break;
1902 case 71:
1904 { (yyval).number = RULE_PIECEMEAL; ;}
1905 break;
1907 case 72:
1909 { (yyval).number = RULE_EXISTING; ;}
1910 break;
1912 case 73:
1914 { (yyval).number = atoi((yyvsp[(2) - (2)]).string)*RULE_MAXLINE; ;}
1915 break;
1917 case 74:
1919 { (yyval).parse = pnull(); ;}
1920 break;
1922 case 75:
1924 { (yyval).parse = (yyvsp[(2) - (2)]).parse; ;}
1925 break;
1929 default: break;
1931 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1933 YYPOPSTACK (yylen);
1934 yylen = 0;
1935 YY_STACK_PRINT (yyss, yyssp);
1937 *++yyvsp = yyval;
1939 /* Now `shift' the result of the reduction. Determine what state
1940 that goes to, based on the state we popped back to and the rule
1941 number reduced by. */
1943 yyn = yyr1[yyn];
1945 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1946 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1947 yystate = yytable[yystate];
1948 else
1949 yystate = yydefgoto[yyn - YYNTOKENS];
1951 goto yynewstate;
1954 /*------------------------------------.
1955 | yyerrlab -- here on detecting error |
1956 `------------------------------------*/
1957 yyerrlab:
1958 /* If not already recovering from an error, report this error. */
1959 if (!yyerrstatus)
1961 ++yynerrs;
1962 #if ! YYERROR_VERBOSE
1963 yyerror (YY_("syntax error"));
1964 #else
1966 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1967 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1969 YYSIZE_T yyalloc = 2 * yysize;
1970 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1971 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1972 if (yymsg != yymsgbuf)
1973 YYSTACK_FREE (yymsg);
1974 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1975 if (yymsg)
1976 yymsg_alloc = yyalloc;
1977 else
1979 yymsg = yymsgbuf;
1980 yymsg_alloc = sizeof yymsgbuf;
1984 if (0 < yysize && yysize <= yymsg_alloc)
1986 (void) yysyntax_error (yymsg, yystate, yychar);
1987 yyerror (yymsg);
1989 else
1991 yyerror (YY_("syntax error"));
1992 if (yysize != 0)
1993 goto yyexhaustedlab;
1996 #endif
2001 if (yyerrstatus == 3)
2003 /* If just tried and failed to reuse lookahead token after an
2004 error, discard it. */
2006 if (yychar <= YYEOF)
2008 /* Return failure if at end of input. */
2009 if (yychar == YYEOF)
2010 YYABORT;
2012 else
2014 yydestruct ("Error: discarding",
2015 yytoken, &yylval);
2016 yychar = YYEMPTY;
2020 /* Else will try to reuse lookahead token after shifting the error
2021 token. */
2022 goto yyerrlab1;
2025 /*---------------------------------------------------.
2026 | yyerrorlab -- error raised explicitly by YYERROR. |
2027 `---------------------------------------------------*/
2028 yyerrorlab:
2030 /* Pacify compilers like GCC when the user code never invokes
2031 YYERROR and the label yyerrorlab therefore never appears in user
2032 code. */
2033 if (/*CONSTCOND*/ 0)
2034 goto yyerrorlab;
2036 /* Do not reclaim the symbols of the rule which action triggered
2037 this YYERROR. */
2038 YYPOPSTACK (yylen);
2039 yylen = 0;
2040 YY_STACK_PRINT (yyss, yyssp);
2041 yystate = *yyssp;
2042 goto yyerrlab1;
2045 /*-------------------------------------------------------------.
2046 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2047 `-------------------------------------------------------------*/
2048 yyerrlab1:
2049 yyerrstatus = 3; /* Each real token shifted decrements this. */
2051 for (;;)
2053 yyn = yypact[yystate];
2054 if (yyn != YYPACT_NINF)
2056 yyn += YYTERROR;
2057 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2059 yyn = yytable[yyn];
2060 if (0 < yyn)
2061 break;
2065 /* Pop the current state because it cannot handle the error token. */
2066 if (yyssp == yyss)
2067 YYABORT;
2070 yydestruct ("Error: popping",
2071 yystos[yystate], yyvsp);
2072 YYPOPSTACK (1);
2073 yystate = *yyssp;
2074 YY_STACK_PRINT (yyss, yyssp);
2077 *++yyvsp = yylval;
2080 /* Shift the error token. */
2081 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2083 yystate = yyn;
2084 goto yynewstate;
2087 /*-------------------------------------.
2088 | yyacceptlab -- YYACCEPT comes here. |
2089 `-------------------------------------*/
2090 yyacceptlab:
2091 yyresult = 0;
2092 goto yyreturn;
2094 /*-----------------------------------.
2095 | yyabortlab -- YYABORT comes here. |
2096 `-----------------------------------*/
2097 yyabortlab:
2098 yyresult = 1;
2099 goto yyreturn;
2101 #if !defined(yyoverflow) || YYERROR_VERBOSE
2102 /*-------------------------------------------------.
2103 | yyexhaustedlab -- memory exhaustion comes here. |
2104 `-------------------------------------------------*/
2105 yyexhaustedlab:
2106 yyerror (YY_("memory exhausted"));
2107 yyresult = 2;
2108 /* Fall through. */
2109 #endif
2111 yyreturn:
2112 if (yychar != YYEMPTY)
2113 yydestruct ("Cleanup: discarding lookahead",
2114 yytoken, &yylval);
2115 /* Do not reclaim the symbols of the rule which action triggered
2116 this YYABORT or YYACCEPT. */
2117 YYPOPSTACK (yylen);
2118 YY_STACK_PRINT (yyss, yyssp);
2119 while (yyssp != yyss)
2121 yydestruct ("Cleanup: popping",
2122 yystos[*yyssp], yyvsp);
2123 YYPOPSTACK (1);
2125 #ifndef yyoverflow
2126 if (yyss != yyssa)
2127 YYSTACK_FREE (yyss);
2128 #endif
2129 #if YYERROR_VERBOSE
2130 if (yymsg != yymsgbuf)
2131 YYSTACK_FREE (yymsg);
2132 #endif
2133 /* Make sure YYID is used. */
2134 return YYID (yyresult);