1 /* A Bison parser, made by GNU Bison 3.7.6. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41 /* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48 /* Identify Bison output, and Bison version. */
49 #define YYBISON 30706
50
51 /* Bison version string. */
52 #define YYBISON_VERSION "3.7.6"
53
54 /* Skeleton name. */
55 #define YYSKELETON_NAME "yacc.c"
56
57 /* Pure parsers. */
58 #define YYPURE 0
59
60 /* Push parsers. */
61 #define YYPUSH 0
62
63 /* Pull parsers. */
64 #define YYPULL 1
65
66
67
68
69 /* First part of user prologue. */
70 #line 35 "parser.y"
71
72 #ifdef HAVE_DMX_CONFIG_H
73 #include <dmx-config.h>
74 #endif
75
76 #include "dmxparse.h"
77 #include <string.h>
78 #include <stdlib.h>
79 #define YYDEBUG 1
80 #define YYERROR_VERBOSE
81 #define YY_USE_PROTOS
82
83 extern int yylex(void);
84 DMXConfigEntryPtr dmxConfigEntry = NULL;
85 #define APPEND(type, h, t) \
86 { \
87 type pt; \
88 for (pt = h; pt->next; pt = pt->next); \
89 pt->next = t; \
90 }
91
92 #line 93 "parser.c"
93
94 # ifndef YY_CAST
95 # ifdef __cplusplus
96 # define YY_CAST(Type, Val) static_cast<Type> (Val)
97 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
98 # else
99 # define YY_CAST(Type, Val) ((Type) (Val))
100 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
101 # endif
102 # endif
103 # ifndef YY_NULLPTR
104 # if defined __cplusplus
105 # if 201103L <= __cplusplus
106 # define YY_NULLPTR nullptr
107 # else
108 # define YY_NULLPTR 0
109 # endif
110 # else
111 # define YY_NULLPTR ((void*)0)
112 # endif
113 # endif
114
115 /* Use api.header.include to #include this header
116 instead of duplicating it here. */
117 #ifndef YY_YY_PARSER_H_INCLUDED
118 # define YY_YY_PARSER_H_INCLUDED
119 /* Debug traces. */
120 #ifndef YYDEBUG
121 # define YYDEBUG 0
122 #endif
123 #if YYDEBUG
124 extern int yydebug;
125 #endif
126
127 /* Token kinds. */
128 #ifndef YYTOKENTYPE
129 # define YYTOKENTYPE
130 enum yytokentype
131 {
132 YYEMPTY = -2,
133 YYEOF = 0, /* "end of file" */
134 YYerror = 256, /* error */
135 YYUNDEF = 257, /* "invalid token" */
136 T_VIRTUAL = 258, /* T_VIRTUAL */
137 T_DISPLAY = 259, /* T_DISPLAY */
138 T_WALL = 260, /* T_WALL */
139 T_OPTION = 261, /* T_OPTION */
140 T_PARAM = 262, /* T_PARAM */
141 T_STRING = 263, /* T_STRING */
142 T_DIMENSION = 264, /* T_DIMENSION */
143 T_OFFSET = 265, /* T_OFFSET */
144 T_ORIGIN = 266, /* T_ORIGIN */
145 T_COMMENT = 267, /* T_COMMENT */
146 T_LINE_COMMENT = 268 /* T_LINE_COMMENT */
147 };
148 typedef enum yytokentype yytoken_kind_t;
149 #endif
150 /* Token kinds. */
151 #define YYEMPTY -2
152 #define YYEOF 0
153 #define YYerror 256
154 #define YYUNDEF 257
155 #define T_VIRTUAL 258
156 #define T_DISPLAY 259
157 #define T_WALL 260
158 #define T_OPTION 261
159 #define T_PARAM 262
160 #define T_STRING 263
161 #define T_DIMENSION 264
162 #define T_OFFSET 265
163 #define T_ORIGIN 266
164 #define T_COMMENT 267
165 #define T_LINE_COMMENT 268
166
167 /* Value type. */
168 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
169 union YYSTYPE
170 {
171 #line 57 "parser.y"
172
173 DMXConfigTokenPtr token;
174 DMXConfigStringPtr string;
175 DMXConfigNumberPtr number;
176 DMXConfigPairPtr pair;
177 DMXConfigFullDimPtr fdim;
178 DMXConfigPartDimPtr pdim;
179 DMXConfigDisplayPtr display;
180 DMXConfigWallPtr wall;
181 DMXConfigOptionPtr option;
182 DMXConfigParamPtr param;
183 DMXConfigCommentPtr comment;
184 DMXConfigSubPtr subentry;
185 DMXConfigVirtualPtr virtual;
186 DMXConfigEntryPtr entry;
187
188 #line 189 "parser.c"
189
190 };
191 typedef union YYSTYPE YYSTYPE;
192 # define YYSTYPE_IS_TRIVIAL 1
193 # define YYSTYPE_IS_DECLARED 1
194 #endif
195
196
197 extern YYSTYPE yylval;
198
199 int yyparse (void);
200
201 #endif /* !YY_YY_PARSER_H_INCLUDED */
202 /* Symbol kind. */
203 enum yysymbol_kind_t
204 {
205 YYSYMBOL_YYEMPTY = -2,
206 YYSYMBOL_YYEOF = 0, /* "end of file" */
207 YYSYMBOL_YYerror = 1, /* error */
208 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
209 YYSYMBOL_3_ = 3, /* '{' */
210 YYSYMBOL_4_ = 4, /* '}' */
211 YYSYMBOL_5_ = 5, /* ';' */
212 YYSYMBOL_6_ = 6, /* '/' */
213 YYSYMBOL_T_VIRTUAL = 7, /* T_VIRTUAL */
214 YYSYMBOL_T_DISPLAY = 8, /* T_DISPLAY */
215 YYSYMBOL_T_WALL = 9, /* T_WALL */
216 YYSYMBOL_T_OPTION = 10, /* T_OPTION */
217 YYSYMBOL_T_PARAM = 11, /* T_PARAM */
218 YYSYMBOL_T_STRING = 12, /* T_STRING */
219 YYSYMBOL_T_DIMENSION = 13, /* T_DIMENSION */
220 YYSYMBOL_T_OFFSET = 14, /* T_OFFSET */
221 YYSYMBOL_T_ORIGIN = 15, /* T_ORIGIN */
222 YYSYMBOL_T_COMMENT = 16, /* T_COMMENT */
223 YYSYMBOL_T_LINE_COMMENT = 17, /* T_LINE_COMMENT */
224 YYSYMBOL_YYACCEPT = 18, /* $accept */
225 YYSYMBOL_Program = 19, /* Program */
226 YYSYMBOL_EntryList = 20, /* EntryList */
227 YYSYMBOL_Entry = 21, /* Entry */
228 YYSYMBOL_Virtual = 22, /* Virtual */
229 YYSYMBOL_SubList = 23, /* SubList */
230 YYSYMBOL_Sub = 24, /* Sub */
231 YYSYMBOL_OptionEntry = 25, /* OptionEntry */
232 YYSYMBOL_ParamEntry = 26, /* ParamEntry */
233 YYSYMBOL_ParamList = 27, /* ParamList */
234 YYSYMBOL_Param = 28, /* Param */
235 YYSYMBOL_PartialDim = 29, /* PartialDim */
236 YYSYMBOL_FullDim = 30, /* FullDim */
237 YYSYMBOL_DisplayEntry = 31, /* DisplayEntry */
238 YYSYMBOL_WallEntry = 32, /* WallEntry */
239 YYSYMBOL_Display = 33, /* Display */
240 YYSYMBOL_Name = 34, /* Name */
241 YYSYMBOL_Dimension = 35, /* Dimension */
242 YYSYMBOL_Offset = 36, /* Offset */
243 YYSYMBOL_Origin = 37, /* Origin */
244 YYSYMBOL_Terminal = 38, /* Terminal */
245 YYSYMBOL_Open = 39, /* Open */
246 YYSYMBOL_Close = 40, /* Close */
247 YYSYMBOL_Wall = 41, /* Wall */
248 YYSYMBOL_NameList = 42 /* NameList */
249 };
250 typedef enum yysymbol_kind_t yysymbol_kind_t;
251
252
253
254
255 #ifdef short
256 # undef short
257 #endif
258
259 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
260 <limits.h> and (if available) <stdint.h> are included
261 so that the code can choose integer types of a good width. */
262
263 #ifndef __PTRDIFF_MAX__
264 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
265 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
266 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
267 # define YY_STDINT_H
268 # endif
269 #endif
270
271 /* Narrow types that promote to a signed type and that can represent a
272 signed or unsigned integer of at least N bits. In tables they can
273 save space and decrease cache pressure. Promoting to a signed type
274 helps avoid bugs in integer arithmetic. */
275
276 #ifdef __INT_LEAST8_MAX__
277 typedef __INT_LEAST8_TYPE__ yytype_int8;
278 #elif defined YY_STDINT_H
279 typedef int_least8_t yytype_int8;
280 #else
281 typedef signed char yytype_int8;
282 #endif
283
284 #ifdef __INT_LEAST16_MAX__
285 typedef __INT_LEAST16_TYPE__ yytype_int16;
286 #elif defined YY_STDINT_H
287 typedef int_least16_t yytype_int16;
288 #else
289 typedef short yytype_int16;
290 #endif
291
292 /* Work around bug in HP-UX 11.23, which defines these macros
293 incorrectly for preprocessor constants. This workaround can likely
294 be removed in 2023, as HPE has promised support for HP-UX 11.23
295 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
296 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
297 #ifdef __hpux
298 # undef UINT_LEAST8_MAX
299 # undef UINT_LEAST16_MAX
300 # define UINT_LEAST8_MAX 255
301 # define UINT_LEAST16_MAX 65535
302 #endif
303
304 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
305 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
306 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
307 && UINT_LEAST8_MAX <= INT_MAX)
308 typedef uint_least8_t yytype_uint8;
309 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
310 typedef unsigned char yytype_uint8;
311 #else
312 typedef short yytype_uint8;
313 #endif
314
315 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
316 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
317 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
318 && UINT_LEAST16_MAX <= INT_MAX)
319 typedef uint_least16_t yytype_uint16;
320 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
321 typedef unsigned short yytype_uint16;
322 #else
323 typedef int yytype_uint16;
324 #endif
325
326 #ifndef YYPTRDIFF_T
327 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
328 # define YYPTRDIFF_T __PTRDIFF_TYPE__
329 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
330 # elif defined PTRDIFF_MAX
331 # ifndef ptrdiff_t
332 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
333 # endif
334 # define YYPTRDIFF_T ptrdiff_t
335 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
336 # else
337 # define YYPTRDIFF_T long
338 # define YYPTRDIFF_MAXIMUM LONG_MAX
339 # endif
340 #endif
341
342 #ifndef YYSIZE_T
343 # ifdef __SIZE_TYPE__
344 # define YYSIZE_T __SIZE_TYPE__
345 # elif defined size_t
346 # define YYSIZE_T size_t
347 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
348 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
349 # define YYSIZE_T size_t
350 # else
351 # define YYSIZE_T unsigned
352 # endif
353 #endif
354
355 #define YYSIZE_MAXIMUM \
356 YY_CAST (YYPTRDIFF_T, \
357 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
358 ? YYPTRDIFF_MAXIMUM \
359 : YY_CAST (YYSIZE_T, -1)))
360
361 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
362
363
364 /* Stored state numbers (used for stacks). */
365 typedef yytype_int8 yy_state_t;
366
367 /* State numbers in computations. */
368 typedef int yy_state_fast_t;
369
370 #ifndef YY_
371 # if defined YYENABLE_NLS && YYENABLE_NLS
372 # if ENABLE_NLS
373 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
374 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
375 # endif
376 # endif
377 # ifndef YY_
378 # define YY_(Msgid) Msgid
379 # endif
380 #endif
381
382
383 #ifndef YY_ATTRIBUTE_PURE
384 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
385 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
386 # else
387 # define YY_ATTRIBUTE_PURE
388 # endif
389 #endif
390
391 #ifndef YY_ATTRIBUTE_UNUSED
392 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
393 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
394 # else
395 # define YY_ATTRIBUTE_UNUSED
396 # endif
397 #endif
398
399 /* Suppress unused-variable warnings by "using" E. */
400 #if ! defined lint || defined __GNUC__
401 # define YY_USE(E) ((void) (E))
402 #else
403 # define YY_USE(E) /* empty */
404 #endif
405
406 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
407 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
408 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
409 _Pragma ("GCC diagnostic push") \
410 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
411 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
412 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
413 _Pragma ("GCC diagnostic pop")
414 #else
415 # define YY_INITIAL_VALUE(Value) Value
416 #endif
417 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
418 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
419 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
420 #endif
421 #ifndef YY_INITIAL_VALUE
422 # define YY_INITIAL_VALUE(Value) /* Nothing. */
423 #endif
424
425 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
426 # define YY_IGNORE_USELESS_CAST_BEGIN \
427 _Pragma ("GCC diagnostic push") \
428 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
429 # define YY_IGNORE_USELESS_CAST_END \
430 _Pragma ("GCC diagnostic pop")
431 #endif
432 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
433 # define YY_IGNORE_USELESS_CAST_BEGIN
434 # define YY_IGNORE_USELESS_CAST_END
435 #endif
436
437
438 #define YY_ASSERT(E) ((void) (0 && (E)))
439
440 #if !defined yyoverflow
441
442 /* The parser invokes alloca or malloc; define the necessary symbols. */
443
444 # ifdef YYSTACK_USE_ALLOCA
445 # if YYSTACK_USE_ALLOCA
446 # ifdef __GNUC__
447 # define YYSTACK_ALLOC __builtin_alloca
448 # elif defined __BUILTIN_VA_ARG_INCR
449 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
450 # elif defined _AIX
451 # define YYSTACK_ALLOC __alloca
452 # elif defined _MSC_VER
453 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
454 # define alloca _alloca
455 # else
456 # define YYSTACK_ALLOC alloca
457 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
458 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
459 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
460 # ifndef EXIT_SUCCESS
461 # define EXIT_SUCCESS 0
462 # endif
463 # endif
464 # endif
465 # endif
466 # endif
467
468 # ifdef YYSTACK_ALLOC
469 /* Pacify GCC's 'empty if-body' warning. */
470 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
471 # ifndef YYSTACK_ALLOC_MAXIMUM
472 /* The OS might guarantee only one guard page at the bottom of the stack,
473 and a page size can be as small as 4096 bytes. So we cannot safely
474 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
475 to allow for a few compiler-allocated temporary stack slots. */
476 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
477 # endif
478 # else
479 # define YYSTACK_ALLOC YYMALLOC
480 # define YYSTACK_FREE YYFREE
481 # ifndef YYSTACK_ALLOC_MAXIMUM
482 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
483 # endif
484 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
485 && ! ((defined YYMALLOC || defined malloc) \
486 && (defined YYFREE || defined free)))
487 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
488 # ifndef EXIT_SUCCESS
489 # define EXIT_SUCCESS 0
490 # endif
491 # endif
492 # ifndef YYMALLOC
493 # define YYMALLOC malloc
494 # if ! defined malloc && ! defined EXIT_SUCCESS
495 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
496 # endif
497 # endif
498 # ifndef YYFREE
499 # define YYFREE free
500 # if ! defined free && ! defined EXIT_SUCCESS
501 void free (void *); /* INFRINGES ON USER NAME SPACE */
502 # endif
503 # endif
504 # endif
505 #endif /* !defined yyoverflow */
506
507 #if (! defined yyoverflow \
508 && (! defined __cplusplus \
509 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
510
511 /* A type that is properly aligned for any stack member. */
512 union yyalloc
513 {
514 yy_state_t yyss_alloc;
515 YYSTYPE yyvs_alloc;
516 };
517
518 /* The size of the maximum gap between one aligned stack and the next. */
519 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
520
521 /* The size of an array large to enough to hold all stacks, each with
522 N elements. */
523 # define YYSTACK_BYTES(N) \
524 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
525 + YYSTACK_GAP_MAXIMUM)
526
527 # define YYCOPY_NEEDED 1
528
529 /* Relocate STACK from its old location to the new one. The
530 local variables YYSIZE and YYSTACKSIZE give the old and new number of
531 elements in the stack, and YYPTR gives the new location of the
532 stack. Advance YYPTR to a properly aligned location for the next
533 stack. */
534 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
535 do \
536 { \
537 YYPTRDIFF_T yynewbytes; \
538 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
539 Stack = &yyptr->Stack_alloc; \
540 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
541 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
542 } \
543 while (0)
544
545 #endif
546
547 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
548 /* Copy COUNT objects from SRC to DST. The source and destination do
549 not overlap. */
550 # ifndef YYCOPY
551 # if defined __GNUC__ && 1 < __GNUC__
552 # define YYCOPY(Dst, Src, Count) \
553 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
554 # else
555 # define YYCOPY(Dst, Src, Count) \
556 do \
557 { \
558 YYPTRDIFF_T yyi; \
559 for (yyi = 0; yyi < (Count); yyi++) \
560 (Dst)[yyi] = (Src)[yyi]; \
561 } \
562 while (0)
563 # endif
564 # endif
565 #endif /* !YYCOPY_NEEDED */
566
567 /* YYFINAL -- State number of the termination state. */
568 #define YYFINAL 13
569 /* YYLAST -- Last index in YYTABLE. */
570 #define YYLAST 106
571
572 /* YYNTOKENS -- Number of terminals. */
573 #define YYNTOKENS 18
574 /* YYNNTS -- Number of nonterminals. */
575 #define YYNNTS 25
576 /* YYNRULES -- Number of rules. */
577 #define YYNRULES 59
578 /* YYNSTATES -- Number of states. */
579 #define YYNSTATES 95
580
581 /* YYMAXUTOK -- Last valid token kind. */
582 #define YYMAXUTOK 268
583
584
585 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
586 as returned by yylex, with out-of-bounds checking. */
587 #define YYTRANSLATE(YYX) \
588 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
589 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
590 : YYSYMBOL_YYUNDEF)
591
592 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
593 as returned by yylex. */
594 static const yytype_int8 yytranslate[] =
595 {
596 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
597 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
598 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
599 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
600 2, 2, 2, 2, 2, 2, 2, 6, 2, 2,
601 2, 2, 2, 2, 2, 2, 2, 2, 2, 5,
602 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
603 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
604 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
605 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
606 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
607 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
608 2, 2, 2, 3, 2, 4, 2, 2, 2, 2,
609 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
610 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
611 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
612 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
613 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
614 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
615 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
616 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
617 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
618 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
619 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
620 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621 2, 2, 2, 2, 2, 2, 1, 2, 7, 8,
622 9, 10, 11, 12, 13, 14, 15, 16, 17
623 };
624
625 #if YYDEBUG
626 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
627 static const yytype_uint8 yyrline[] =
628 {
629 0, 96, 96, 99, 100, 103, 104, 107, 109, 111,
630 113, 117, 118, 121, 122, 123, 124, 125, 128, 132,
631 134, 140, 141, 144, 148, 150, 152, 156, 158, 160,
632 164, 166, 168, 171, 173, 175, 177, 181, 183, 185,
633 189, 190, 193, 194, 197, 198, 201, 202, 205, 206,
634 209, 210, 213, 214, 217, 218, 221, 222, 225, 226
635 };
636 #endif
637
638 /** Accessing symbol of state STATE. */
639 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
640
641 #if YYDEBUG || 0
642 /* The user-facing name of the symbol whose (internal) number is
643 YYSYMBOL. No bounds checking. */
644 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
645
646 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
647 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
648 static const char *const yytname[] =
649 {
650 "\"end of file\"", "error", "\"invalid token\"", "'{'", "'}'", "';'",
651 "'/'", "T_VIRTUAL", "T_DISPLAY", "T_WALL", "T_OPTION", "T_PARAM",
652 "T_STRING", "T_DIMENSION", "T_OFFSET", "T_ORIGIN", "T_COMMENT",
653 "T_LINE_COMMENT", "$accept", "Program", "EntryList", "Entry", "Virtual",
654 "SubList", "Sub", "OptionEntry", "ParamEntry", "ParamList", "Param",
655 "PartialDim", "FullDim", "DisplayEntry", "WallEntry", "Display", "Name",
656 "Dimension", "Offset", "Origin", "Terminal", "Open", "Close", "Wall",
657 "NameList", YY_NULLPTR
658 };
659
660 static const char *
yysymbol_name(yysymbol_kind_t yysymbol)661 yysymbol_name (yysymbol_kind_t yysymbol)
662 {
663 return yytname[yysymbol];
664 }
665 #endif
666
667 #ifdef YYPRINT
668 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
669 (internal) symbol number NUM (which must be that of a token). */
670 static const yytype_int16 yytoknum[] =
671 {
672 0, 256, 257, 123, 125, 59, 47, 258, 259, 260,
673 261, 262, 263, 264, 265, 266, 267, 268
674 };
675 #endif
676
677 #define YYPACT_NINF (-32)
678
679 #define yypact_value_is_default(Yyn) \
680 ((Yyn) == YYPACT_NINF)
681
682 #define YYTABLE_NINF (-1)
683
684 #define yytable_value_is_error(Yyn) \
685 0
686
687 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
688 STATE-NUM. */
689 static const yytype_int8 yypact[] =
690 {
691 -3, 41, -32, 22, -3, -32, -32, 12, 35, 46,
692 5, 62, 75, -32, -32, -32, -32, -32, 62, 75,
693 75, 51, 54, 59, 18, -32, 65, -32, -32, -32,
694 -32, -32, 88, 37, 75, 65, 65, -32, -32, -32,
695 86, 59, 86, 61, -32, -32, 79, -4, 80, 28,
696 31, 74, 67, -32, -32, 37, 86, 65, -32, -32,
697 -32, -32, 56, -32, 86, -32, -32, -32, -32, -32,
698 -4, 81, 94, -32, 31, 94, -32, -32, 59, 86,
699 -32, -32, -32, -32, -32, -32, -32, -32, 94, -32,
700 -32, 86, -32, -32, -32
701 };
702
703 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
704 Performed when YYTABLE does not specify something else to do. Zero
705 means the default is an error. */
706 static const yytype_int8 yydefact[] =
707 {
708 0, 0, 6, 0, 2, 3, 5, 52, 42, 44,
709 0, 0, 0, 1, 4, 53, 43, 45, 0, 0,
710 0, 40, 56, 0, 0, 13, 0, 11, 16, 17,
711 14, 15, 0, 0, 0, 0, 0, 41, 57, 58,
712 0, 0, 0, 54, 12, 7, 50, 0, 46, 29,
713 0, 0, 25, 26, 36, 0, 0, 0, 9, 8,
714 59, 18, 0, 21, 0, 19, 55, 51, 28, 47,
715 0, 48, 0, 34, 0, 0, 35, 24, 0, 0,
716 39, 10, 22, 20, 23, 27, 49, 31, 0, 33,
717 32, 0, 38, 30, 37
718 };
719
720 /* YYPGOTO[NTERM-NUM]. */
721 static const yytype_int8 yypgoto[] =
722 {
723 -32, -32, -32, 99, -32, 6, -19, -32, -32, -32,
724 42, -28, 55, -32, -32, -32, -1, 2, 53, -31,
725 -27, 48, -30, -32, -22
726 };
727
728 /* YYDEFGOTO[NTERM-NUM]. */
729 static const yytype_int8 yydefgoto[] =
730 {
731 0, 3, 4, 5, 6, 26, 27, 28, 29, 62,
732 63, 49, 50, 30, 31, 32, 39, 52, 53, 72,
733 54, 12, 45, 33, 64
734 };
735
736 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
737 positive, shift that token. If negative, reduce the rule whose
738 number is the opposite. If YYTABLE_NINF, syntax error. */
739 static const yytype_int8 yytable[] =
740 {
741 10, 40, 42, 11, 1, 58, 59, 44, 7, 9,
742 48, 56, 18, 61, 2, 65, 44, 44, 9, 68,
743 75, 7, 13, 73, 76, 35, 36, 81, 15, 80,
744 8, 51, 83, 79, 70, 55, 46, 84, 44, 60,
745 57, 60, 85, 88, 7, 87, 71, 89, 90, 8,
746 9, 16, 92, 8, 9, 60, 91, 78, 19, 20,
747 43, 93, 17, 60, 94, 7, 34, 37, 8, 43,
748 38, 8, 41, 21, 22, 23, 24, 66, 60, 46,
749 47, 48, 25, 21, 22, 23, 24, 9, 48, 71,
750 60, 46, 25, 46, 47, 67, 69, 86, 8, 46,
751 8, 9, 48, 14, 82, 77, 74
752 };
753
754 static const yytype_int8 yycheck[] =
755 {
756 1, 23, 24, 1, 7, 35, 36, 26, 3, 13,
757 14, 33, 10, 40, 17, 42, 35, 36, 13, 47,
758 51, 3, 0, 50, 51, 19, 20, 57, 16, 56,
759 12, 32, 62, 55, 6, 33, 5, 64, 57, 40,
760 34, 42, 70, 74, 3, 72, 15, 74, 75, 12,
761 13, 16, 79, 12, 13, 56, 78, 55, 10, 11,
762 4, 88, 16, 64, 91, 3, 18, 16, 12, 4,
763 16, 12, 24, 8, 9, 10, 11, 16, 79, 5,
764 6, 14, 17, 8, 9, 10, 11, 13, 14, 15,
765 91, 5, 17, 5, 6, 16, 16, 16, 12, 5,
766 12, 13, 14, 4, 62, 52, 51
767 };
768
769 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
770 symbol of state STATE-NUM. */
771 static const yytype_int8 yystos[] =
772 {
773 0, 7, 17, 19, 20, 21, 22, 3, 12, 13,
774 34, 35, 39, 0, 21, 16, 16, 16, 35, 39,
775 39, 8, 9, 10, 11, 17, 23, 24, 25, 26,
776 31, 32, 33, 41, 39, 23, 23, 16, 16, 34,
777 42, 39, 42, 4, 24, 40, 5, 6, 14, 29,
778 30, 34, 35, 36, 38, 35, 42, 23, 40, 40,
779 34, 38, 27, 28, 42, 38, 16, 16, 29, 16,
780 6, 15, 37, 38, 30, 37, 38, 36, 35, 42,
781 38, 40, 28, 40, 38, 29, 16, 38, 37, 38,
782 38, 42, 38, 38, 38
783 };
784
785 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
786 static const yytype_int8 yyr1[] =
787 {
788 0, 18, 19, 20, 20, 21, 21, 22, 22, 22,
789 22, 23, 23, 24, 24, 24, 24, 24, 25, 26,
790 26, 27, 27, 28, 29, 29, 29, 30, 30, 30,
791 31, 31, 31, 31, 31, 31, 31, 32, 32, 32,
792 33, 33, 34, 34, 35, 35, 36, 36, 37, 37,
793 38, 38, 39, 39, 40, 40, 41, 41, 42, 42
794 };
795
796 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
797 static const yytype_int8 yyr2[] =
798 {
799 0, 2, 1, 1, 2, 1, 1, 4, 5, 5,
800 6, 1, 2, 1, 1, 1, 1, 1, 3, 3,
801 4, 1, 2, 2, 2, 1, 1, 3, 2, 1,
802 5, 4, 4, 4, 3, 3, 2, 5, 4, 3,
803 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
804 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
805 };
806
807
808 enum { YYENOMEM = -2 };
809
810 #define yyerrok (yyerrstatus = 0)
811 #define yyclearin (yychar = YYEMPTY)
812
813 #define YYACCEPT goto yyacceptlab
814 #define YYABORT goto yyabortlab
815 #define YYERROR goto yyerrorlab
816
817
818 #define YYRECOVERING() (!!yyerrstatus)
819
820 #define YYBACKUP(Token, Value) \
821 do \
822 if (yychar == YYEMPTY) \
823 { \
824 yychar = (Token); \
825 yylval = (Value); \
826 YYPOPSTACK (yylen); \
827 yystate = *yyssp; \
828 goto yybackup; \
829 } \
830 else \
831 { \
832 yyerror (YY_("syntax error: cannot back up")); \
833 YYERROR; \
834 } \
835 while (0)
836
837 /* Backward compatibility with an undocumented macro.
838 Use YYerror or YYUNDEF. */
839 #define YYERRCODE YYUNDEF
840
841
842 /* Enable debugging if requested. */
843 #if YYDEBUG
844
845 # ifndef YYFPRINTF
846 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
847 # define YYFPRINTF fprintf
848 # endif
849
850 # define YYDPRINTF(Args) \
851 do { \
852 if (yydebug) \
853 YYFPRINTF Args; \
854 } while (0)
855
856 /* This macro is provided for backward compatibility. */
857 # ifndef YY_LOCATION_PRINT
858 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
859 # endif
860
861
862 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
863 do { \
864 if (yydebug) \
865 { \
866 YYFPRINTF (stderr, "%s ", Title); \
867 yy_symbol_print (stderr, \
868 Kind, Value); \
869 YYFPRINTF (stderr, "\n"); \
870 } \
871 } while (0)
872
873
874 /*-----------------------------------.
875 | Print this symbol's value on YYO. |
876 `-----------------------------------*/
877
878 static void
yy_symbol_value_print(FILE * yyo,yysymbol_kind_t yykind,YYSTYPE const * const yyvaluep)879 yy_symbol_value_print (FILE *yyo,
880 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
881 {
882 FILE *yyoutput = yyo;
883 YY_USE (yyoutput);
884 if (!yyvaluep)
885 return;
886 # ifdef YYPRINT
887 if (yykind < YYNTOKENS)
888 YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
889 # endif
890 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
891 YY_USE (yykind);
892 YY_IGNORE_MAYBE_UNINITIALIZED_END
893 }
894
895
896 /*---------------------------.
897 | Print this symbol on YYO. |
898 `---------------------------*/
899
900 static void
yy_symbol_print(FILE * yyo,yysymbol_kind_t yykind,YYSTYPE const * const yyvaluep)901 yy_symbol_print (FILE *yyo,
902 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
903 {
904 YYFPRINTF (yyo, "%s %s (",
905 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
906
907 yy_symbol_value_print (yyo, yykind, yyvaluep);
908 YYFPRINTF (yyo, ")");
909 }
910
911 /*------------------------------------------------------------------.
912 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
913 | TOP (included). |
914 `------------------------------------------------------------------*/
915
916 static void
yy_stack_print(yy_state_t * yybottom,yy_state_t * yytop)917 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
918 {
919 YYFPRINTF (stderr, "Stack now");
920 for (; yybottom <= yytop; yybottom++)
921 {
922 int yybot = *yybottom;
923 YYFPRINTF (stderr, " %d", yybot);
924 }
925 YYFPRINTF (stderr, "\n");
926 }
927
928 # define YY_STACK_PRINT(Bottom, Top) \
929 do { \
930 if (yydebug) \
931 yy_stack_print ((Bottom), (Top)); \
932 } while (0)
933
934
935 /*------------------------------------------------.
936 | Report that the YYRULE is going to be reduced. |
937 `------------------------------------------------*/
938
939 static void
yy_reduce_print(yy_state_t * yyssp,YYSTYPE * yyvsp,int yyrule)940 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
941 int yyrule)
942 {
943 int yylno = yyrline[yyrule];
944 int yynrhs = yyr2[yyrule];
945 int yyi;
946 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
947 yyrule - 1, yylno);
948 /* The symbols being reduced. */
949 for (yyi = 0; yyi < yynrhs; yyi++)
950 {
951 YYFPRINTF (stderr, " $%d = ", yyi + 1);
952 yy_symbol_print (stderr,
953 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
954 &yyvsp[(yyi + 1) - (yynrhs)]);
955 YYFPRINTF (stderr, "\n");
956 }
957 }
958
959 # define YY_REDUCE_PRINT(Rule) \
960 do { \
961 if (yydebug) \
962 yy_reduce_print (yyssp, yyvsp, Rule); \
963 } while (0)
964
965 /* Nonzero means print parse trace. It is left uninitialized so that
966 multiple parsers can coexist. */
967 int yydebug;
968 #else /* !YYDEBUG */
969 # define YYDPRINTF(Args) ((void) 0)
970 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
971 # define YY_STACK_PRINT(Bottom, Top)
972 # define YY_REDUCE_PRINT(Rule)
973 #endif /* !YYDEBUG */
974
975
976 /* YYINITDEPTH -- initial size of the parser's stacks. */
977 #ifndef YYINITDEPTH
978 # define YYINITDEPTH 200
979 #endif
980
981 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
982 if the built-in stack extension method is used).
983
984 Do not make this value too large; the results are undefined if
985 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
986 evaluated with infinite-precision integer arithmetic. */
987
988 #ifndef YYMAXDEPTH
989 # define YYMAXDEPTH 10000
990 #endif
991
992
993
994
995
996
997 /*-----------------------------------------------.
998 | Release the memory associated to this symbol. |
999 `-----------------------------------------------*/
1000
1001 static void
yydestruct(const char * yymsg,yysymbol_kind_t yykind,YYSTYPE * yyvaluep)1002 yydestruct (const char *yymsg,
1003 yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
1004 {
1005 YY_USE (yyvaluep);
1006 if (!yymsg)
1007 yymsg = "Deleting";
1008 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
1009
1010 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1011 YY_USE (yykind);
1012 YY_IGNORE_MAYBE_UNINITIALIZED_END
1013 }
1014
1015
1016 /* Lookahead token kind. */
1017 int yychar;
1018
1019 /* The semantic value of the lookahead symbol. */
1020 YYSTYPE yylval;
1021 /* Number of syntax errors so far. */
1022 int yynerrs;
1023
1024
1025
1026
1027 /*----------.
1028 | yyparse. |
1029 `----------*/
1030
1031 int
yyparse(void)1032 yyparse (void)
1033 {
1034 yy_state_fast_t yystate = 0;
1035 /* Number of tokens to shift before error messages enabled. */
1036 int yyerrstatus = 0;
1037
1038 /* Refer to the stacks through separate pointers, to allow yyoverflow
1039 to reallocate them elsewhere. */
1040
1041 /* Their size. */
1042 YYPTRDIFF_T yystacksize = YYINITDEPTH;
1043
1044 /* The state stack: array, bottom, top. */
1045 yy_state_t yyssa[YYINITDEPTH];
1046 yy_state_t *yyss = yyssa;
1047 yy_state_t *yyssp = yyss;
1048
1049 /* The semantic value stack: array, bottom, top. */
1050 YYSTYPE yyvsa[YYINITDEPTH];
1051 YYSTYPE *yyvs = yyvsa;
1052 YYSTYPE *yyvsp = yyvs;
1053
1054 int yyn;
1055 /* The return value of yyparse. */
1056 int yyresult;
1057 /* Lookahead symbol kind. */
1058 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
1059 /* The variables used to return semantic value and location from the
1060 action routines. */
1061 YYSTYPE yyval;
1062
1063
1064
1065 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1066
1067 /* The number of symbols on the RHS of the reduced rule.
1068 Keep to zero when no symbol should be popped. */
1069 int yylen = 0;
1070
1071 YYDPRINTF ((stderr, "Starting parse\n"));
1072
1073 yychar = YYEMPTY; /* Cause a token to be read. */
1074 goto yysetstate;
1075
1076
1077 /*------------------------------------------------------------.
1078 | yynewstate -- push a new state, which is found in yystate. |
1079 `------------------------------------------------------------*/
1080 yynewstate:
1081 /* In all cases, when you get here, the value and location stacks
1082 have just been pushed. So pushing a state here evens the stacks. */
1083 yyssp++;
1084
1085
1086 /*--------------------------------------------------------------------.
1087 | yysetstate -- set current state (the top of the stack) to yystate. |
1088 `--------------------------------------------------------------------*/
1089 yysetstate:
1090 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1091 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1092 YY_IGNORE_USELESS_CAST_BEGIN
1093 *yyssp = YY_CAST (yy_state_t, yystate);
1094 YY_IGNORE_USELESS_CAST_END
1095 YY_STACK_PRINT (yyss, yyssp);
1096
1097 if (yyss + yystacksize - 1 <= yyssp)
1098 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1099 goto yyexhaustedlab;
1100 #else
1101 {
1102 /* Get the current used size of the three stacks, in elements. */
1103 YYPTRDIFF_T yysize = yyssp - yyss + 1;
1104
1105 # if defined yyoverflow
1106 {
1107 /* Give user a chance to reallocate the stack. Use copies of
1108 these so that the &'s don't force the real ones into
1109 memory. */
1110 yy_state_t *yyss1 = yyss;
1111 YYSTYPE *yyvs1 = yyvs;
1112
1113 /* Each stack pointer address is followed by the size of the
1114 data in use in that stack, in bytes. This used to be a
1115 conditional around just the two extra args, but that might
1116 be undefined if yyoverflow is a macro. */
1117 yyoverflow (YY_("memory exhausted"),
1118 &yyss1, yysize * YYSIZEOF (*yyssp),
1119 &yyvs1, yysize * YYSIZEOF (*yyvsp),
1120 &yystacksize);
1121 yyss = yyss1;
1122 yyvs = yyvs1;
1123 }
1124 # else /* defined YYSTACK_RELOCATE */
1125 /* Extend the stack our own way. */
1126 if (YYMAXDEPTH <= yystacksize)
1127 goto yyexhaustedlab;
1128 yystacksize *= 2;
1129 if (YYMAXDEPTH < yystacksize)
1130 yystacksize = YYMAXDEPTH;
1131
1132 {
1133 yy_state_t *yyss1 = yyss;
1134 union yyalloc *yyptr =
1135 YY_CAST (union yyalloc *,
1136 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1137 if (! yyptr)
1138 goto yyexhaustedlab;
1139 YYSTACK_RELOCATE (yyss_alloc, yyss);
1140 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1141 # undef YYSTACK_RELOCATE
1142 if (yyss1 != yyssa)
1143 YYSTACK_FREE (yyss1);
1144 }
1145 # endif
1146
1147 yyssp = yyss + yysize - 1;
1148 yyvsp = yyvs + yysize - 1;
1149
1150 YY_IGNORE_USELESS_CAST_BEGIN
1151 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1152 YY_CAST (long, yystacksize)));
1153 YY_IGNORE_USELESS_CAST_END
1154
1155 if (yyss + yystacksize - 1 <= yyssp)
1156 YYABORT;
1157 }
1158 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1159
1160 if (yystate == YYFINAL)
1161 YYACCEPT;
1162
1163 goto yybackup;
1164
1165
1166 /*-----------.
1167 | yybackup. |
1168 `-----------*/
1169 yybackup:
1170 /* Do appropriate processing given the current state. Read a
1171 lookahead token if we need one and don't already have one. */
1172
1173 /* First try to decide what to do without reference to lookahead token. */
1174 yyn = yypact[yystate];
1175 if (yypact_value_is_default (yyn))
1176 goto yydefault;
1177
1178 /* Not known => get a lookahead token if don't already have one. */
1179
1180 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
1181 if (yychar == YYEMPTY)
1182 {
1183 YYDPRINTF ((stderr, "Reading a token\n"));
1184 yychar = yylex ();
1185 }
1186
1187 if (yychar <= YYEOF)
1188 {
1189 yychar = YYEOF;
1190 yytoken = YYSYMBOL_YYEOF;
1191 YYDPRINTF ((stderr, "Now at end of input.\n"));
1192 }
1193 else if (yychar == YYerror)
1194 {
1195 /* The scanner already issued an error message, process directly
1196 to error recovery. But do not keep the error token as
1197 lookahead, it is too special and may lead us to an endless
1198 loop in error recovery. */
1199 yychar = YYUNDEF;
1200 yytoken = YYSYMBOL_YYerror;
1201 goto yyerrlab1;
1202 }
1203 else
1204 {
1205 yytoken = YYTRANSLATE (yychar);
1206 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1207 }
1208
1209 /* If the proper action on seeing token YYTOKEN is to reduce or to
1210 detect an error, take that action. */
1211 yyn += yytoken;
1212 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1213 goto yydefault;
1214 yyn = yytable[yyn];
1215 if (yyn <= 0)
1216 {
1217 if (yytable_value_is_error (yyn))
1218 goto yyerrlab;
1219 yyn = -yyn;
1220 goto yyreduce;
1221 }
1222
1223 /* Count tokens shifted since error; after three, turn off error
1224 status. */
1225 if (yyerrstatus)
1226 yyerrstatus--;
1227
1228 /* Shift the lookahead token. */
1229 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1230 yystate = yyn;
1231 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1232 *++yyvsp = yylval;
1233 YY_IGNORE_MAYBE_UNINITIALIZED_END
1234
1235 /* Discard the shifted token. */
1236 yychar = YYEMPTY;
1237 goto yynewstate;
1238
1239
1240 /*-----------------------------------------------------------.
1241 | yydefault -- do the default action for the current state. |
1242 `-----------------------------------------------------------*/
1243 yydefault:
1244 yyn = yydefact[yystate];
1245 if (yyn == 0)
1246 goto yyerrlab;
1247 goto yyreduce;
1248
1249
1250 /*-----------------------------.
1251 | yyreduce -- do a reduction. |
1252 `-----------------------------*/
1253 yyreduce:
1254 /* yyn is the number of a rule to reduce with. */
1255 yylen = yyr2[yyn];
1256
1257 /* If YYLEN is nonzero, implement the default value of the action:
1258 '$$ = $1'.
1259
1260 Otherwise, the following line sets YYVAL to garbage.
1261 This behavior is undocumented and Bison
1262 users should not rely upon it. Assigning to YYVAL
1263 unconditionally makes the parser a bit smaller, and it avoids a
1264 GCC warning that YYVAL may be used uninitialized. */
1265 yyval = yyvsp[1-yylen];
1266
1267
1268 YY_REDUCE_PRINT (yyn);
1269 switch (yyn)
1270 {
1271 case 2: /* Program: EntryList */
1272 #line 96 "parser.y"
1273 { dmxConfigEntry = (yyvsp[0].entry); }
1274 #line 1275 "parser.c"
1275 break;
1276
1277 case 4: /* EntryList: EntryList Entry */
1278 #line 100 "parser.y"
1279 { APPEND(DMXConfigEntryPtr,(yyvsp[-1].entry),(yyvsp[0].entry)); (yyval.entry) = (yyvsp[-1].entry); }
1280 #line 1281 "parser.c"
1281 break;
1282
1283 case 5: /* Entry: Virtual */
1284 #line 103 "parser.y"
1285 { (yyval.entry) = dmxConfigEntryVirtual((yyvsp[0].virtual)); }
1286 #line 1287 "parser.c"
1287 break;
1288
1289 case 6: /* Entry: T_LINE_COMMENT */
1290 #line 104 "parser.y"
1291 { (yyval.entry) = dmxConfigEntryComment((yyvsp[0].comment)); }
1292 #line 1293 "parser.c"
1293 break;
1294
1295 case 7: /* Virtual: T_VIRTUAL Open SubList Close */
1296 #line 108 "parser.y"
1297 { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[-3].token), NULL, NULL, (yyvsp[-2].token), (yyvsp[-1].subentry), (yyvsp[0].token)); }
1298 #line 1299 "parser.c"
1299 break;
1300
1301 case 8: /* Virtual: T_VIRTUAL Dimension Open SubList Close */
1302 #line 110 "parser.y"
1303 { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[-4].token), NULL, (yyvsp[-3].pair), (yyvsp[-2].token), (yyvsp[-1].subentry), (yyvsp[0].token)); }
1304 #line 1305 "parser.c"
1305 break;
1306
1307 case 9: /* Virtual: T_VIRTUAL Name Open SubList Close */
1308 #line 112 "parser.y"
1309 { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[-4].token), (yyvsp[-3].string), NULL, (yyvsp[-2].token), (yyvsp[-1].subentry), (yyvsp[0].token)); }
1310 #line 1311 "parser.c"
1311 break;
1312
1313 case 10: /* Virtual: T_VIRTUAL Name Dimension Open SubList Close */
1314 #line 114 "parser.y"
1315 { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[-5].token), (yyvsp[-4].string), (yyvsp[-3].pair), (yyvsp[-2].token), (yyvsp[-1].subentry), (yyvsp[0].token) ); }
1316 #line 1317 "parser.c"
1317 break;
1318
1319 case 12: /* SubList: SubList Sub */
1320 #line 118 "parser.y"
1321 { APPEND(DMXConfigSubPtr,(yyvsp[-1].subentry),(yyvsp[0].subentry)); (yyval.subentry) = (yyvsp[-1].subentry); }
1322 #line 1323 "parser.c"
1323 break;
1324
1325 case 13: /* Sub: T_LINE_COMMENT */
1326 #line 121 "parser.y"
1327 { (yyval.subentry) = dmxConfigSubComment((yyvsp[0].comment)); }
1328 #line 1329 "parser.c"
1329 break;
1330
1331 case 14: /* Sub: DisplayEntry */
1332 #line 122 "parser.y"
1333 { (yyval.subentry) = dmxConfigSubDisplay((yyvsp[0].display)); }
1334 #line 1335 "parser.c"
1335 break;
1336
1337 case 15: /* Sub: WallEntry */
1338 #line 123 "parser.y"
1339 { (yyval.subentry) = dmxConfigSubWall((yyvsp[0].wall)); }
1340 #line 1341 "parser.c"
1341 break;
1342
1343 case 16: /* Sub: OptionEntry */
1344 #line 124 "parser.y"
1345 { (yyval.subentry) = dmxConfigSubOption((yyvsp[0].option)); }
1346 #line 1347 "parser.c"
1347 break;
1348
1349 case 17: /* Sub: ParamEntry */
1350 #line 125 "parser.y"
1351 { (yyval.subentry) = dmxConfigSubParam((yyvsp[0].param)); }
1352 #line 1353 "parser.c"
1353 break;
1354
1355 case 18: /* OptionEntry: T_OPTION NameList Terminal */
1356 #line 129 "parser.y"
1357 { (yyval.option) = dmxConfigCreateOption((yyvsp[-2].token), (yyvsp[-1].string), (yyvsp[0].token)); }
1358 #line 1359 "parser.c"
1359 break;
1360
1361 case 19: /* ParamEntry: T_PARAM NameList Terminal */
1362 #line 133 "parser.y"
1363 { (yyval.param) = dmxConfigCreateParam((yyvsp[-2].token), NULL, (yyvsp[-1].string), NULL, (yyvsp[0].token)); }
1364 #line 1365 "parser.c"
1365 break;
1366
1367 case 20: /* ParamEntry: T_PARAM Open ParamList Close */
1368 #line 135 "parser.y"
1369 { (yyval.param) = dmxConfigCreateParam((yyvsp[-3].token), (yyvsp[-2].token), NULL, (yyvsp[0].token), NULL);
1370 (yyval.param)->next = (yyvsp[-1].param);
1371 }
1372 #line 1373 "parser.c"
1373 break;
1374
1375 case 22: /* ParamList: ParamList Param */
1376 #line 141 "parser.y"
1377 { APPEND(DMXConfigParamPtr,(yyvsp[-1].param),(yyvsp[0].param)); (yyval.param) = (yyvsp[-1].param); }
1378 #line 1379 "parser.c"
1379 break;
1380
1381 case 23: /* Param: NameList Terminal */
1382 #line 145 "parser.y"
1383 { (yyval.param) = dmxConfigCreateParam(NULL, NULL, (yyvsp[-1].string), NULL, (yyvsp[0].token)); }
1384 #line 1385 "parser.c"
1385 break;
1386
1387 case 24: /* PartialDim: Dimension Offset */
1388 #line 149 "parser.y"
1389 { (yyval.pdim) = dmxConfigCreatePartDim((yyvsp[-1].pair), (yyvsp[0].pair)); }
1390 #line 1391 "parser.c"
1391 break;
1392
1393 case 25: /* PartialDim: Dimension */
1394 #line 151 "parser.y"
1395 { (yyval.pdim) = dmxConfigCreatePartDim((yyvsp[0].pair), NULL); }
1396 #line 1397 "parser.c"
1397 break;
1398
1399 case 26: /* PartialDim: Offset */
1400 #line 153 "parser.y"
1401 { (yyval.pdim) = dmxConfigCreatePartDim(NULL, (yyvsp[0].pair)); }
1402 #line 1403 "parser.c"
1403 break;
1404
1405 case 27: /* FullDim: PartialDim '/' PartialDim */
1406 #line 157 "parser.y"
1407 { (yyval.fdim) = dmxConfigCreateFullDim((yyvsp[-2].pdim), (yyvsp[0].pdim)); }
1408 #line 1409 "parser.c"
1409 break;
1410
1411 case 28: /* FullDim: '/' PartialDim */
1412 #line 159 "parser.y"
1413 { (yyval.fdim) = dmxConfigCreateFullDim(NULL, (yyvsp[0].pdim)); }
1414 #line 1415 "parser.c"
1415 break;
1416
1417 case 29: /* FullDim: PartialDim */
1418 #line 161 "parser.y"
1419 { (yyval.fdim) = dmxConfigCreateFullDim((yyvsp[0].pdim), NULL); }
1420 #line 1421 "parser.c"
1421 break;
1422
1423 case 30: /* DisplayEntry: Display Name FullDim Origin Terminal */
1424 #line 165 "parser.y"
1425 { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-4].token), (yyvsp[-3].string), (yyvsp[-2].fdim), (yyvsp[-1].pair), (yyvsp[0].token)); }
1426 #line 1427 "parser.c"
1427 break;
1428
1429 case 31: /* DisplayEntry: Display FullDim Origin Terminal */
1430 #line 167 "parser.y"
1431 { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-3].token), NULL, (yyvsp[-2].fdim), (yyvsp[-1].pair), (yyvsp[0].token)); }
1432 #line 1433 "parser.c"
1433 break;
1434
1435 case 32: /* DisplayEntry: Display Name Origin Terminal */
1436 #line 169 "parser.y"
1437 { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-3].token), (yyvsp[-2].string), NULL, (yyvsp[-1].pair), (yyvsp[0].token)); }
1438 #line 1439 "parser.c"
1439 break;
1440
1441 case 33: /* DisplayEntry: Display Name FullDim Terminal */
1442 #line 172 "parser.y"
1443 { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-3].token), (yyvsp[-2].string), (yyvsp[-1].fdim), NULL, (yyvsp[0].token)); }
1444 #line 1445 "parser.c"
1445 break;
1446
1447 case 34: /* DisplayEntry: Display FullDim Terminal */
1448 #line 174 "parser.y"
1449 { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-2].token), NULL, (yyvsp[-1].fdim), NULL, (yyvsp[0].token)); }
1450 #line 1451 "parser.c"
1451 break;
1452
1453 case 35: /* DisplayEntry: Display Name Terminal */
1454 #line 176 "parser.y"
1455 { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-2].token), (yyvsp[-1].string), NULL, NULL, (yyvsp[0].token)); }
1456 #line 1457 "parser.c"
1457 break;
1458
1459 case 36: /* DisplayEntry: Display Terminal */
1460 #line 178 "parser.y"
1461 { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-1].token), NULL, NULL, NULL, (yyvsp[0].token)); }
1462 #line 1463 "parser.c"
1463 break;
1464
1465 case 37: /* WallEntry: Wall Dimension Dimension NameList Terminal */
1466 #line 182 "parser.y"
1467 { (yyval.wall) = dmxConfigCreateWall((yyvsp[-4].token), (yyvsp[-3].pair), (yyvsp[-2].pair), (yyvsp[-1].string), (yyvsp[0].token)); }
1468 #line 1469 "parser.c"
1469 break;
1470
1471 case 38: /* WallEntry: Wall Dimension NameList Terminal */
1472 #line 184 "parser.y"
1473 { (yyval.wall) = dmxConfigCreateWall((yyvsp[-3].token), (yyvsp[-2].pair), NULL, (yyvsp[-1].string), (yyvsp[0].token)); }
1474 #line 1475 "parser.c"
1475 break;
1476
1477 case 39: /* WallEntry: Wall NameList Terminal */
1478 #line 186 "parser.y"
1479 { (yyval.wall) = dmxConfigCreateWall((yyvsp[-2].token), NULL, NULL, (yyvsp[-1].string), (yyvsp[0].token)); }
1480 #line 1481 "parser.c"
1481 break;
1482
1483 case 41: /* Display: T_DISPLAY T_COMMENT */
1484 #line 190 "parser.y"
1485 { (yyval.token) = (yyvsp[-1].token); (yyval.token)->comment = (yyvsp[0].comment)->comment; }
1486 #line 1487 "parser.c"
1487 break;
1488
1489 case 43: /* Name: T_STRING T_COMMENT */
1490 #line 194 "parser.y"
1491 { (yyval.string) = (yyvsp[-1].string); (yyval.string)->comment = (yyvsp[0].comment)->comment; }
1492 #line 1493 "parser.c"
1493 break;
1494
1495 case 45: /* Dimension: T_DIMENSION T_COMMENT */
1496 #line 198 "parser.y"
1497 { (yyval.pair) = (yyvsp[-1].pair); (yyval.pair)->comment = (yyvsp[0].comment)->comment; }
1498 #line 1499 "parser.c"
1499 break;
1500
1501 case 47: /* Offset: T_OFFSET T_COMMENT */
1502 #line 202 "parser.y"
1503 { (yyval.pair) = (yyvsp[-1].pair); (yyval.pair)->comment = (yyvsp[0].comment)->comment; }
1504 #line 1505 "parser.c"
1505 break;
1506
1507 case 49: /* Origin: T_ORIGIN T_COMMENT */
1508 #line 206 "parser.y"
1509 { (yyval.pair) = (yyvsp[-1].pair); (yyval.pair)->comment = (yyvsp[0].comment)->comment; }
1510 #line 1511 "parser.c"
1511 break;
1512
1513 case 51: /* Terminal: ';' T_COMMENT */
1514 #line 210 "parser.y"
1515 { (yyval.token) = (yyvsp[-1].token); (yyval.token)->comment = (yyvsp[0].comment)->comment; }
1516 #line 1517 "parser.c"
1517 break;
1518
1519 case 53: /* Open: '{' T_COMMENT */
1520 #line 214 "parser.y"
1521 { (yyval.token) = (yyvsp[-1].token); (yyval.token)->comment = (yyvsp[0].comment)->comment; }
1522 #line 1523 "parser.c"
1523 break;
1524
1525 case 55: /* Close: '}' T_COMMENT */
1526 #line 218 "parser.y"
1527 { (yyval.token) = (yyvsp[-1].token); (yyval.token)->comment = (yyvsp[0].comment)->comment; }
1528 #line 1529 "parser.c"
1529 break;
1530
1531 case 57: /* Wall: T_WALL T_COMMENT */
1532 #line 222 "parser.y"
1533 { (yyval.token) = (yyvsp[-1].token); (yyval.token)->comment = (yyvsp[0].comment)->comment; }
1534 #line 1535 "parser.c"
1535 break;
1536
1537 case 59: /* NameList: NameList Name */
1538 #line 226 "parser.y"
1539 { APPEND(DMXConfigStringPtr, (yyvsp[-1].string), (yyvsp[0].string)); (yyval.string) = (yyvsp[-1].string); }
1540 #line 1541 "parser.c"
1541 break;
1542
1543
1544 #line 1545 "parser.c"
1545
1546 default: break;
1547 }
1548 /* User semantic actions sometimes alter yychar, and that requires
1549 that yytoken be updated with the new translation. We take the
1550 approach of translating immediately before every use of yytoken.
1551 One alternative is translating here after every semantic action,
1552 but that translation would be missed if the semantic action invokes
1553 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1554 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1555 incorrect destructor might then be invoked immediately. In the
1556 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1557 to an incorrect destructor call or verbose syntax error message
1558 before the lookahead is translated. */
1559 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
1560
1561 YYPOPSTACK (yylen);
1562 yylen = 0;
1563
1564 *++yyvsp = yyval;
1565
1566 /* Now 'shift' the result of the reduction. Determine what state
1567 that goes to, based on the state we popped back to and the rule
1568 number reduced by. */
1569 {
1570 const int yylhs = yyr1[yyn] - YYNTOKENS;
1571 const int yyi = yypgoto[yylhs] + *yyssp;
1572 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1573 ? yytable[yyi]
1574 : yydefgoto[yylhs]);
1575 }
1576
1577 goto yynewstate;
1578
1579
1580 /*--------------------------------------.
1581 | yyerrlab -- here on detecting error. |
1582 `--------------------------------------*/
1583 yyerrlab:
1584 /* Make sure we have latest lookahead translation. See comments at
1585 user semantic actions for why this is necessary. */
1586 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
1587 /* If not already recovering from an error, report this error. */
1588 if (!yyerrstatus)
1589 {
1590 ++yynerrs;
1591 yyerror (YY_("syntax error"));
1592 }
1593
1594 if (yyerrstatus == 3)
1595 {
1596 /* If just tried and failed to reuse lookahead token after an
1597 error, discard it. */
1598
1599 if (yychar <= YYEOF)
1600 {
1601 /* Return failure if at end of input. */
1602 if (yychar == YYEOF)
1603 YYABORT;
1604 }
1605 else
1606 {
1607 yydestruct ("Error: discarding",
1608 yytoken, &yylval);
1609 yychar = YYEMPTY;
1610 }
1611 }
1612
1613 /* Else will try to reuse lookahead token after shifting the error
1614 token. */
1615 goto yyerrlab1;
1616
1617
1618 /*---------------------------------------------------.
1619 | yyerrorlab -- error raised explicitly by YYERROR. |
1620 `---------------------------------------------------*/
1621 yyerrorlab:
1622 /* Pacify compilers when the user code never invokes YYERROR and the
1623 label yyerrorlab therefore never appears in user code. */
1624 if (0)
1625 YYERROR;
1626
1627 /* Do not reclaim the symbols of the rule whose action triggered
1628 this YYERROR. */
1629 YYPOPSTACK (yylen);
1630 yylen = 0;
1631 YY_STACK_PRINT (yyss, yyssp);
1632 yystate = *yyssp;
1633 goto yyerrlab1;
1634
1635
1636 /*-------------------------------------------------------------.
1637 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1638 `-------------------------------------------------------------*/
1639 yyerrlab1:
1640 yyerrstatus = 3; /* Each real token shifted decrements this. */
1641
1642 /* Pop stack until we find a state that shifts the error token. */
1643 for (;;)
1644 {
1645 yyn = yypact[yystate];
1646 if (!yypact_value_is_default (yyn))
1647 {
1648 yyn += YYSYMBOL_YYerror;
1649 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
1650 {
1651 yyn = yytable[yyn];
1652 if (0 < yyn)
1653 break;
1654 }
1655 }
1656
1657 /* Pop the current state because it cannot handle the error token. */
1658 if (yyssp == yyss)
1659 YYABORT;
1660
1661
1662 yydestruct ("Error: popping",
1663 YY_ACCESSING_SYMBOL (yystate), yyvsp);
1664 YYPOPSTACK (1);
1665 yystate = *yyssp;
1666 YY_STACK_PRINT (yyss, yyssp);
1667 }
1668
1669 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1670 *++yyvsp = yylval;
1671 YY_IGNORE_MAYBE_UNINITIALIZED_END
1672
1673
1674 /* Shift the error token. */
1675 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
1676
1677 yystate = yyn;
1678 goto yynewstate;
1679
1680
1681 /*-------------------------------------.
1682 | yyacceptlab -- YYACCEPT comes here. |
1683 `-------------------------------------*/
1684 yyacceptlab:
1685 yyresult = 0;
1686 goto yyreturn;
1687
1688
1689 /*-----------------------------------.
1690 | yyabortlab -- YYABORT comes here. |
1691 `-----------------------------------*/
1692 yyabortlab:
1693 yyresult = 1;
1694 goto yyreturn;
1695
1696
1697 #if !defined yyoverflow
1698 /*-------------------------------------------------.
1699 | yyexhaustedlab -- memory exhaustion comes here. |
1700 `-------------------------------------------------*/
1701 yyexhaustedlab:
1702 yyerror (YY_("memory exhausted"));
1703 yyresult = 2;
1704 goto yyreturn;
1705 #endif
1706
1707
1708 /*-------------------------------------------------------.
1709 | yyreturn -- parsing is finished, clean up and return. |
1710 `-------------------------------------------------------*/
1711 yyreturn:
1712 if (yychar != YYEMPTY)
1713 {
1714 /* Make sure we have latest lookahead translation. See comments at
1715 user semantic actions for why this is necessary. */
1716 yytoken = YYTRANSLATE (yychar);
1717 yydestruct ("Cleanup: discarding lookahead",
1718 yytoken, &yylval);
1719 }
1720 /* Do not reclaim the symbols of the rule whose action triggered
1721 this YYABORT or YYACCEPT. */
1722 YYPOPSTACK (yylen);
1723 YY_STACK_PRINT (yyss, yyssp);
1724 while (yyssp != yyss)
1725 {
1726 yydestruct ("Cleanup: popping",
1727 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
1728 YYPOPSTACK (1);
1729 }
1730 #ifndef yyoverflow
1731 if (yyss != yyssa)
1732 YYSTACK_FREE (yyss);
1733 #endif
1734
1735 return yyresult;
1736 }
1737
1738