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