1 /* A Bison parser, made by GNU Bison 2.5. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
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.
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.
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/>. */
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.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
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. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.5"
50 #define YYSKELETON_NAME "yacc.c"
61 /* Using locations. */
62 #define YYLSP_NEEDED 0
66 /* Copy the first part of user declarations. */
68 /* Line 268 of yacc.c */
71 #ifdef HAVE_DMX_CONFIG_H
72 #include <dmx-config.h>
79 #define YYERROR_VERBOSE
82 DMXConfigEntryPtr dmxConfigEntry
= NULL
;
83 #define APPEND(type, h, t) \
86 for (pt = h; pt->next; pt = pt->next); \
91 /* Line 268 of yacc.c */
94 /* Enabling traces. */
99 /* Enabling verbose error messages. */
100 #ifdef YYERROR_VERBOSE
101 # undef YYERROR_VERBOSE
102 # define YYERROR_VERBOSE 1
104 # define YYERROR_VERBOSE 0
107 /* Enabling the token table. */
108 #ifndef YYTOKEN_TABLE
109 # define YYTOKEN_TABLE 0
116 /* Put the tokens into the symbol table, so that GDB and other debuggers
133 #define T_VIRTUAL 258
134 #define T_DISPLAY 259
139 #define T_DIMENSION 264
142 #define T_COMMENT 267
143 #define T_LINE_COMMENT 268
148 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
149 typedef union YYSTYPE
152 /* Line 293 of yacc.c */
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
;
172 /* Line 293 of yacc.c */
175 # define YYSTYPE_IS_TRIVIAL 1
176 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
177 # define YYSTYPE_IS_DECLARED 1
181 /* Copy the second part of user declarations. */
184 /* Line 343 of yacc.c */
192 typedef YYTYPE_UINT8 yytype_uint8
;
194 typedef unsigned char yytype_uint8
;
198 typedef YYTYPE_INT8 yytype_int8
;
199 #elif (defined __STDC__ || defined __C99__FUNC__ \
200 || defined __cplusplus || defined _MSC_VER)
201 typedef signed char yytype_int8
;
203 typedef short int yytype_int8
;
207 typedef YYTYPE_UINT16 yytype_uint16
;
209 typedef unsigned short int yytype_uint16
;
213 typedef YYTYPE_INT16 yytype_int16
;
215 typedef short int yytype_int16
;
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
228 # define YYSIZE_T unsigned int
232 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
235 # if defined YYENABLE_NLS && YYENABLE_NLS
237 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
238 # define YY_(msgid) dgettext ("bison-runtime", msgid)
242 # define YY_(msgid) msgid
246 /* Suppress unused-variable warnings by "using" E. */
247 #if ! defined lint || defined __GNUC__
248 # define YYUSE(e) ((void) (e))
250 # define YYUSE(e) /* empty */
253 /* Identity function, used to suppress warnings about constant conditions. */
257 #if (defined __STDC__ || defined __C99__FUNC__ \
258 || defined __cplusplus || defined _MSC_VER)
271 #if ! defined yyoverflow || YYERROR_VERBOSE
273 /* The parser invokes alloca or malloc; define the necessary symbols. */
275 # ifdef YYSTACK_USE_ALLOCA
276 # if YYSTACK_USE_ALLOCA
278 # define YYSTACK_ALLOC __builtin_alloca
279 # elif defined __BUILTIN_VA_ARG_INCR
280 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
282 # define YYSTACK_ALLOC __alloca
283 # elif defined _MSC_VER
284 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
285 # define alloca _alloca
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
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 */
310 # define YYSTACK_ALLOC YYMALLOC
311 # define YYSTACK_FREE YYFREE
312 # ifndef YYSTACK_ALLOC_MAXIMUM
313 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
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
324 # define YYMALLOC malloc
325 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
326 || defined __cplusplus || defined _MSC_VER)
327 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
332 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
333 || defined __cplusplus || defined _MSC_VER)
334 void free (void *); /* INFRINGES ON USER NAME SPACE */
338 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
341 #if (! defined yyoverflow \
342 && (! defined __cplusplus \
343 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
345 /* A type that is properly aligned for any stack member. */
348 yytype_int16 yyss_alloc
;
352 /* The size of the maximum gap between one aligned stack and the next. */
353 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
355 /* The size of an array large to enough to hold all stacks, each with
357 # define YYSTACK_BYTES(N) \
358 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
359 + YYSTACK_GAP_MAXIMUM)
361 # define YYCOPY_NEEDED 1
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
368 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
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); \
381 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
382 /* Copy COUNT objects from FROM to TO. The source and destination do
385 # if defined __GNUC__ && 1 < __GNUC__
386 # define YYCOPY(To, From, Count) \
387 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
389 # define YYCOPY(To, From, Count) \
393 for (yyi = 0; yyi < (Count); yyi++) \
394 (To)[yyi] = (From)[yyi]; \
399 #endif /* !YYCOPY_NEEDED */
401 /* YYFINAL -- State number of the termination state. */
403 /* YYLAST -- Last index in YYTABLE. */
406 /* YYNTOKENS -- Number of terminals. */
408 /* YYNNTS -- Number of nonterminals. */
410 /* YYNRULES -- Number of rules. */
412 /* YYNRULES -- Number of states. */
415 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
417 #define YYMAXUTOK 268
419 #define YYTRANSLATE(YYX) \
420 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
422 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
423 static const yytype_uint8 yytranslate
[] =
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
455 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
457 static const yytype_uint8 yyprhs
[] =
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
467 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
468 static const yytype_int8 yyrhs
[] =
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
491 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
492 static const yytype_uint8 yyrline
[] =
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
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. */
506 static const char *const yytname
[] =
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
519 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
521 static const yytype_uint16 yytoknum
[] =
523 0, 256, 257, 123, 125, 59, 47, 258, 259, 260,
524 261, 262, 263, 264, 265, 266, 267, 268
528 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
529 static const yytype_uint8 yyr1
[] =
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
539 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
540 static const yytype_uint8 yyr2
[] =
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
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. */
553 static const yytype_uint8 yydefact
[] =
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,
567 /* YYDEFGOTO[NTERM-NUM]. */
568 static const yytype_int8 yydefgoto
[] =
570 -1, 3, 4, 5, 6, 26, 27, 28, 29, 62,
571 63, 49, 50, 30, 31, 32, 39, 52, 53, 72,
575 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
577 #define YYPACT_NINF -32
578 static const yytype_int8 yypact
[] =
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
592 /* YYPGOTO[NTERM-NUM]. */
593 static const yytype_int8 yypgoto
[] =
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
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
604 static const yytype_uint8 yytable
[] =
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
619 #define yypact_value_is_default(yystate) \
622 #define yytable_value_is_error(yytable_value) \
625 static const yytype_uint8 yycheck
[] =
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
640 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
641 symbol of state STATE-NUM. */
642 static const yytype_uint8 yystos
[] =
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,
656 #define yyerrok (yyerrstatus = 0)
657 #define yyclearin (yychar = YYEMPTY)
661 #define YYACCEPT goto yyacceptlab
662 #define YYABORT goto yyabortlab
663 #define YYERROR goto yyerrorlab
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
673 #define YYFAIL goto yyerrlab
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. */
681 #define YYRECOVERING() (!!yyerrstatus)
683 #define YYBACKUP(Token, Value) \
685 if (yychar == YYEMPTY && yylen == 1) \
694 yyerror (YY_("syntax error: cannot back up")); \
701 #define YYERRCODE 256
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). */
708 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
709 #ifndef YYLLOC_DEFAULT
710 # define YYLLOC_DEFAULT(Current, Rhs, N) \
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; \
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; \
730 /* This macro is provided for backward compatibility. */
732 #ifndef YY_LOCATION_PRINT
733 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
737 /* YYLEX -- calling `yylex' with the right arguments. */
740 # define YYLEX yylex (YYLEX_PARAM)
742 # define YYLEX yylex ()
745 /* Enable debugging if requested. */
749 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
750 # define YYFPRINTF fprintf
753 # define YYDPRINTF(Args) \
759 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
763 YYFPRINTF (stderr, "%s ", Title); \
764 yy_symbol_print (stderr, \
766 YYFPRINTF (stderr, "\n"); \
771 /*--------------------------------.
772 | Print this symbol on YYOUTPUT. |
773 `--------------------------------*/
776 #if (defined __STDC__ || defined __C99__FUNC__ \
777 || defined __cplusplus || defined _MSC_VER)
779 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
782 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
785 YYSTYPE
const * const yyvaluep
;
791 if (yytype
< YYNTOKENS
)
792 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
804 /*--------------------------------.
805 | Print this symbol on YYOUTPUT. |
806 `--------------------------------*/
808 #if (defined __STDC__ || defined __C99__FUNC__ \
809 || defined __cplusplus || defined _MSC_VER)
811 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
814 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
817 YYSTYPE
const * const yyvaluep
;
820 if (yytype
< YYNTOKENS
)
821 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
823 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
825 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
826 YYFPRINTF (yyoutput
, ")");
829 /*------------------------------------------------------------------.
830 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
832 `------------------------------------------------------------------*/
834 #if (defined __STDC__ || defined __C99__FUNC__ \
835 || defined __cplusplus || defined _MSC_VER)
837 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
840 yy_stack_print (yybottom
, yytop
)
841 yytype_int16
*yybottom
;
845 YYFPRINTF (stderr
, "Stack now");
846 for (; yybottom
<= yytop
; yybottom
++)
848 int yybot
= *yybottom
;
849 YYFPRINTF (stderr
, " %d", yybot
);
851 YYFPRINTF (stderr
, "\n");
854 # define YY_STACK_PRINT(Bottom, Top) \
857 yy_stack_print ((Bottom), (Top)); \
861 /*------------------------------------------------.
862 | Report that the YYRULE is going to be reduced. |
863 `------------------------------------------------*/
865 #if (defined __STDC__ || defined __C99__FUNC__ \
866 || defined __cplusplus || defined _MSC_VER)
868 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
871 yy_reduce_print (yyvsp
, yyrule
)
876 int yynrhs
= yyr2
[yyrule
];
878 unsigned long int yylno
= yyrline
[yyrule
];
879 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
881 /* The symbols being reduced. */
882 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
884 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
885 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
886 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
888 YYFPRINTF (stderr
, "\n");
892 # define YY_REDUCE_PRINT(Rule) \
895 yy_reduce_print (yyvsp, Rule); \
898 /* Nonzero means print parse trace. It is left uninitialized so that
899 multiple parsers can coexist. */
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 */
909 /* YYINITDEPTH -- initial size of the parser's stacks. */
911 # define YYINITDEPTH 200
914 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
915 if the built-in stack extension method is used).
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. */
922 # define YYMAXDEPTH 10000
929 # if defined __GLIBC__ && defined _STRING_H
930 # define yystrlen strlen
932 /* Return the length of YYSTR. */
933 #if (defined __STDC__ || defined __C99__FUNC__ \
934 || defined __cplusplus || defined _MSC_VER)
936 yystrlen (const char *yystr
)
944 for (yylen
= 0; yystr
[yylen
]; yylen
++)
952 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
953 # define yystpcpy stpcpy
955 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
957 #if (defined __STDC__ || defined __C99__FUNC__ \
958 || defined __cplusplus || defined _MSC_VER)
960 yystpcpy (char *yydest
, const char *yysrc
)
963 yystpcpy (yydest
, yysrc
)
969 const char *yys
= yysrc
;
971 while ((*yyd
++ = *yys
++) != '\0')
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
988 yytnamerr (char *yyres
, const char *yystr
)
993 char const *yyp
= yystr
;
1000 goto do_not_strip_quotes
;
1004 goto do_not_strip_quotes
;
1017 do_not_strip_quotes
: ;
1021 return yystrlen (yystr
);
1023 return yystpcpy (yyres
, yystr
) - yyres
;
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
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. */
1036 yysyntax_error (YYSIZE_T
*yymsg_alloc
, char **yymsg
,
1037 yytype_int16
*yyssp
, int yytoken
)
1039 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytoken
]);
1040 YYSIZE_T yysize
= yysize0
;
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
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
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.
1078 if (yytoken
!= YYEMPTY
)
1080 int yyn
= yypact
[*yyssp
];
1081 yyarg
[yycount
++] = yytname
[yytoken
];
1082 if (!yypact_value_is_default (yyn
))
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
;
1093 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1094 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
1095 && !yytable_value_is_error (yytable
[yyx
+ yyn
]))
1097 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1103 yyarg
[yycount
++] = yytname
[yyx
];
1104 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1105 if (! (yysize
<= yysize1
1106 && yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1115 # define YYCASE_(N, S) \
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"));
1128 yysize1
= yysize
+ yystrlen (yyformat
);
1129 if (! (yysize
<= yysize1
&& yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1133 if (*yymsg_alloc
< yysize
)
1135 *yymsg_alloc
= 2 * yysize
;
1136 if (! (yysize
<= *yymsg_alloc
1137 && *yymsg_alloc
<= YYSTACK_ALLOC_MAXIMUM
))
1138 *yymsg_alloc
= YYSTACK_ALLOC_MAXIMUM
;
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. */
1148 while ((*yyp
= *yyformat
) != '\0')
1149 if (*yyp
== '%' && yyformat
[1] == 's' && yyi
< yycount
)
1151 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1162 #endif /* YYERROR_VERBOSE */
1164 /*-----------------------------------------------.
1165 | Release the memory associated to this symbol. |
1166 `-----------------------------------------------*/
1169 #if (defined __STDC__ || defined __C99__FUNC__ \
1170 || defined __cplusplus || defined _MSC_VER)
1172 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1175 yydestruct (yymsg
, yytype
, yyvaluep
)
1185 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1196 /* Prevent warnings from -Wmissing-prototypes. */
1197 #ifdef YYPARSE_PARAM
1198 #if defined __STDC__ || defined __cplusplus
1199 int yyparse (void *YYPARSE_PARAM
);
1203 #else /* ! YYPARSE_PARAM */
1204 #if defined __STDC__ || defined __cplusplus
1209 #endif /* ! YYPARSE_PARAM */
1212 /* The lookahead symbol. */
1215 /* The semantic value of the lookahead symbol. */
1218 /* Number of syntax errors so far. */
1226 #ifdef YYPARSE_PARAM
1227 #if (defined __STDC__ || defined __C99__FUNC__ \
1228 || defined __cplusplus || defined _MSC_VER)
1230 yyparse (void *YYPARSE_PARAM
)
1233 yyparse (YYPARSE_PARAM
)
1234 void *YYPARSE_PARAM
;
1236 #else /* ! YYPARSE_PARAM */
1237 #if (defined __STDC__ || defined __C99__FUNC__ \
1238 || defined __cplusplus || defined _MSC_VER)
1249 /* Number of tokens to shift before error messages enabled. */
1252 /* The stacks and their tools:
1253 `yyss': related to states.
1254 `yyvs': related to semantic values.
1256 Refer to the stacks thru separate pointers, to allow yyoverflow
1257 to reallocate them elsewhere. */
1259 /* The state stack. */
1260 yytype_int16 yyssa
[YYINITDEPTH
];
1262 yytype_int16
*yyssp
;
1264 /* The semantic value stack. */
1265 YYSTYPE yyvsa
[YYINITDEPTH
];
1269 YYSIZE_T yystacksize
;
1273 /* Lookahead token as an internal (translated) token number. */
1275 /* The variables used to return semantic value and location from the
1280 /* Buffer for error messages, and its allocated size. */
1282 char *yymsg
= yymsgbuf
;
1283 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1286 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1288 /* The number of symbols on the RHS of the reduced rule.
1289 Keep to zero when no symbol should be popped. */
1295 yystacksize
= YYINITDEPTH
;
1297 YYDPRINTF ((stderr
, "Starting parse\n"));
1302 yychar
= YYEMPTY
; /* Cause a token to be read. */
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. */
1313 /*------------------------------------------------------------.
1314 | yynewstate -- Push a new state, which is found in yystate. |
1315 `------------------------------------------------------------*/
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. */
1324 if (yyss
+ yystacksize
- 1 <= yyssp
)
1326 /* Get the current used size of the three stacks, in elements. */
1327 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
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
1334 YYSTYPE
*yyvs1
= yyvs
;
1335 yytype_int16
*yyss1
= yyss
;
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
),
1349 #else /* no yyoverflow */
1350 # ifndef YYSTACK_RELOCATE
1351 goto yyexhaustedlab
;
1353 /* Extend the stack our own way. */
1354 if (YYMAXDEPTH
<= yystacksize
)
1355 goto yyexhaustedlab
;
1357 if (YYMAXDEPTH
< yystacksize
)
1358 yystacksize
= YYMAXDEPTH
;
1361 yytype_int16
*yyss1
= yyss
;
1362 union yyalloc
*yyptr
=
1363 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1365 goto yyexhaustedlab
;
1366 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1367 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1368 # undef YYSTACK_RELOCATE
1370 YYSTACK_FREE (yyss1
);
1373 #endif /* no yyoverflow */
1375 yyssp
= yyss
+ yysize
- 1;
1376 yyvsp
= yyvs
+ yysize
- 1;
1378 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1379 (unsigned long int) yystacksize
));
1381 if (yyss
+ yystacksize
- 1 <= yyssp
)
1385 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1387 if (yystate
== YYFINAL
)
1397 /* Do appropriate processing given the current state. Read a
1398 lookahead token if we need one and don't already have one. */
1400 /* First try to decide what to do without reference to lookahead token. */
1401 yyn
= yypact
[yystate
];
1402 if (yypact_value_is_default (yyn
))
1405 /* Not known => get a lookahead token if don't already have one. */
1407 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1408 if (yychar
== YYEMPTY
)
1410 YYDPRINTF ((stderr
, "Reading a token: "));
1414 if (yychar
<= YYEOF
)
1416 yychar
= yytoken
= YYEOF
;
1417 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1421 yytoken
= YYTRANSLATE (yychar
);
1422 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1425 /* If the proper action on seeing token YYTOKEN is to reduce or to
1426 detect an error, take that action. */
1428 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1433 if (yytable_value_is_error (yyn
))
1439 /* Count tokens shifted since error; after three, turn off error
1444 /* Shift the lookahead token. */
1445 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1447 /* Discard the shifted token. */
1456 /*-----------------------------------------------------------.
1457 | yydefault -- do the default action for the current state. |
1458 `-----------------------------------------------------------*/
1460 yyn
= yydefact
[yystate
];
1466 /*-----------------------------.
1467 | yyreduce -- Do a reduction. |
1468 `-----------------------------*/
1470 /* yyn is the number of a rule to reduce with. */
1473 /* If YYLEN is nonzero, implement the default value of the action:
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
];
1484 YY_REDUCE_PRINT (yyn
);
1489 /* Line 1806 of yacc.c */
1491 { dmxConfigEntry
= (yyvsp
[(1) - (1)].entry
); }
1496 /* Line 1806 of yacc.c */
1498 { APPEND(DMXConfigEntryPtr
,(yyvsp
[(1) - (2)].entry
),(yyvsp
[(2) - (2)].entry
)); (yyval
.entry
) = (yyvsp
[(1) - (2)].entry
); }
1503 /* Line 1806 of yacc.c */
1504 #line 102 "parser.y"
1505 { (yyval
.entry
) = dmxConfigEntryVirtual((yyvsp
[(1) - (1)].virtual)); }
1510 /* Line 1806 of yacc.c */
1511 #line 103 "parser.y"
1512 { (yyval
.entry
) = dmxConfigEntryComment((yyvsp
[(1) - (1)].comment
)); }
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
)); }
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
)); }
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
)); }
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
) ); }
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
); }
1552 /* Line 1806 of yacc.c */
1553 #line 120 "parser.y"
1554 { (yyval
.subentry
) = dmxConfigSubComment((yyvsp
[(1) - (1)].comment
)); }
1559 /* Line 1806 of yacc.c */
1560 #line 121 "parser.y"
1561 { (yyval
.subentry
) = dmxConfigSubDisplay((yyvsp
[(1) - (1)].display
)); }
1566 /* Line 1806 of yacc.c */
1567 #line 122 "parser.y"
1568 { (yyval
.subentry
) = dmxConfigSubWall((yyvsp
[(1) - (1)].wall
)); }
1573 /* Line 1806 of yacc.c */
1574 #line 123 "parser.y"
1575 { (yyval
.subentry
) = dmxConfigSubOption((yyvsp
[(1) - (1)].option
)); }
1580 /* Line 1806 of yacc.c */
1581 #line 124 "parser.y"
1582 { (yyval
.subentry
) = dmxConfigSubParam((yyvsp
[(1) - (1)].param
)); }
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
)); }
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
)); }
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
);
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
); }
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
)); }
1624 /* Line 1806 of yacc.c */
1625 #line 148 "parser.y"
1626 { (yyval
.pdim
) = dmxConfigCreatePartDim((yyvsp
[(1) - (2)].pair
), (yyvsp
[(2) - (2)].pair
)); }
1631 /* Line 1806 of yacc.c */
1632 #line 150 "parser.y"
1633 { (yyval
.pdim
) = dmxConfigCreatePartDim((yyvsp
[(1) - (1)].pair
), NULL
); }
1638 /* Line 1806 of yacc.c */
1639 #line 152 "parser.y"
1640 { (yyval
.pdim
) = dmxConfigCreatePartDim(NULL
, (yyvsp
[(1) - (1)].pair
)); }
1645 /* Line 1806 of yacc.c */
1646 #line 156 "parser.y"
1647 { (yyval
.fdim
) = dmxConfigCreateFullDim((yyvsp
[(1) - (3)].pdim
), (yyvsp
[(3) - (3)].pdim
)); }
1652 /* Line 1806 of yacc.c */
1653 #line 158 "parser.y"
1654 { (yyval
.fdim
) = dmxConfigCreateFullDim(NULL
, (yyvsp
[(2) - (2)].pdim
)); }
1659 /* Line 1806 of yacc.c */
1660 #line 160 "parser.y"
1661 { (yyval
.fdim
) = dmxConfigCreateFullDim((yyvsp
[(1) - (1)].pdim
), NULL
); }
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
)); }
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
)); }
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
)); }
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
)); }
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
)); }
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
)); }
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
)); }
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
)); }
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
)); }
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
)); }
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
; }
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
; }
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
; }
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
; }
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
; }
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
; }
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
; }
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
; }
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
; }
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
); }
1806 /* Line 1806 of yacc.c */
1807 #line 1808 "parser.c"
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
);
1825 YY_STACK_PRINT (yyss
, yyssp
);
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. */
1835 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1836 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1837 yystate
= yytable
[yystate
];
1839 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1844 /*------------------------------------.
1845 | yyerrlab -- here on detecting error |
1846 `------------------------------------*/
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
);
1852 /* If not already recovering from an error, report this error. */
1856 #if ! YYERROR_VERBOSE
1857 yyerror (YY_("syntax error"));
1859 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1862 char const *yymsgp
= YY_("syntax error");
1863 int yysyntax_error_status
;
1864 yysyntax_error_status
= YYSYNTAX_ERROR
;
1865 if (yysyntax_error_status
== 0)
1867 else if (yysyntax_error_status
== 1)
1869 if (yymsg
!= yymsgbuf
)
1870 YYSTACK_FREE (yymsg
);
1871 yymsg
= (char *) YYSTACK_ALLOC (yymsg_alloc
);
1875 yymsg_alloc
= sizeof yymsgbuf
;
1876 yysyntax_error_status
= 2;
1880 yysyntax_error_status
= YYSYNTAX_ERROR
;
1885 if (yysyntax_error_status
== 2)
1886 goto yyexhaustedlab
;
1888 # undef YYSYNTAX_ERROR
1894 if (yyerrstatus
== 3)
1896 /* If just tried and failed to reuse lookahead token after an
1897 error, discard it. */
1899 if (yychar
<= YYEOF
)
1901 /* Return failure if at end of input. */
1902 if (yychar
== YYEOF
)
1907 yydestruct ("Error: discarding",
1913 /* Else will try to reuse lookahead token after shifting the error
1918 /*---------------------------------------------------.
1919 | yyerrorlab -- error raised explicitly by YYERROR. |
1920 `---------------------------------------------------*/
1923 /* Pacify compilers like GCC when the user code never invokes
1924 YYERROR and the label yyerrorlab therefore never appears in user
1926 if (/*CONSTCOND*/ 0)
1929 /* Do not reclaim the symbols of the rule which action triggered
1933 YY_STACK_PRINT (yyss
, yyssp
);
1938 /*-------------------------------------------------------------.
1939 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1940 `-------------------------------------------------------------*/
1942 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1946 yyn
= yypact
[yystate
];
1947 if (!yypact_value_is_default (yyn
))
1950 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1958 /* Pop the current state because it cannot handle the error token. */
1963 yydestruct ("Error: popping",
1964 yystos
[yystate
], yyvsp
);
1967 YY_STACK_PRINT (yyss
, yyssp
);
1973 /* Shift the error token. */
1974 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
1980 /*-------------------------------------.
1981 | yyacceptlab -- YYACCEPT comes here. |
1982 `-------------------------------------*/
1987 /*-----------------------------------.
1988 | yyabortlab -- YYABORT comes here. |
1989 `-----------------------------------*/
1994 #if !defined(yyoverflow) || YYERROR_VERBOSE
1995 /*-------------------------------------------------.
1996 | yyexhaustedlab -- memory exhaustion comes here. |
1997 `-------------------------------------------------*/
1999 yyerror (YY_("memory exhausted"));
2005 if (yychar
!= YYEMPTY
)
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",
2013 /* Do not reclaim the symbols of the rule which action triggered
2014 this YYABORT or YYACCEPT. */
2016 YY_STACK_PRINT (yyss
, yyssp
);
2017 while (yyssp
!= yyss
)
2019 yydestruct ("Cleanup: popping",
2020 yystos
[*yyssp
], yyvsp
);
2025 YYSTACK_FREE (yyss
);
2028 if (yymsg
!= yymsgbuf
)
2029 YYSTACK_FREE (yymsg
);
2031 /* Make sure YYID is used. */
2032 return YYID (yyresult
);