trim
[build-config.git] / src / config / lxrgmr-code / gmr / parser.tab.c
blobd901abfee18e4b86b2c1a9724675d10ff83a1927
1 /* A Bison parser, made by GNU Bison 3.4.2. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
6 Inc.
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
37 /* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
44 /* Undocumented macros, especially those whose name start with YY_,
45 are private implementation details. Do not rely on them. */
47 /* Identify Bison output. */
48 #define YYBISON 1
50 /* Bison version. */
51 #define YYBISON_VERSION "3.4.2"
53 /* Skeleton name. */
54 #define YYSKELETON_NAME "yacc.c"
56 /* Pure parsers. */
57 #define YYPURE 0
59 /* Push parsers. */
60 #define YYPUSH 0
62 /* Pull parsers. */
63 #define YYPULL 1
68 /* First part of user prologue. */
71 #include "parser.gmrdecl.c"
75 # ifndef YY_NULLPTR
76 # if defined __cplusplus
77 # if 201103L <= __cplusplus
78 # define YY_NULLPTR nullptr
79 # else
80 # define YY_NULLPTR 0
81 # endif
82 # else
83 # define YY_NULLPTR ((void*)0)
84 # endif
85 # endif
87 /* Enabling verbose error messages. */
88 #ifdef YYERROR_VERBOSE
89 # undef YYERROR_VERBOSE
90 # define YYERROR_VERBOSE 1
91 #else
92 # define YYERROR_VERBOSE 0
93 #endif
95 /* Use api.header.include to #include this header
96 instead of duplicating it here. */
97 #ifndef YY_YY_SCRIPTS_KCONFIG_PARSER_TAB_H_INCLUDED
98 # define YY_YY_SCRIPTS_KCONFIG_PARSER_TAB_H_INCLUDED
99 /* Debug traces. */
100 #ifndef YYDEBUG
101 # define YYDEBUG 1
102 #endif
103 #if YYDEBUG
104 extern int yydebug;
105 #endif
109 extern YYSTYPE yylval;
111 int yyparse (void);
113 #endif /* !YY_YY_SCRIPTS_KCONFIG_PARSER_TAB_H_INCLUDED */
115 /* Include kconf_id.c here so it can see the token constants. */
116 //#include "../kconf_id.c"
117 #include "../token_id.c"
121 #ifdef short
122 # undef short
123 #endif
125 #ifdef YYTYPE_UINT8
126 typedef YYTYPE_UINT8 yytype_uint8;
127 #else
128 typedef unsigned char yytype_uint8;
129 #endif
131 #ifdef YYTYPE_INT8
132 typedef YYTYPE_INT8 yytype_int8;
133 #else
134 typedef signed char yytype_int8;
135 #endif
137 #ifdef YYTYPE_UINT16
138 typedef YYTYPE_UINT16 yytype_uint16;
139 #else
140 typedef unsigned short yytype_uint16;
141 #endif
143 #ifdef YYTYPE_INT16
144 typedef YYTYPE_INT16 yytype_int16;
145 #else
146 typedef short yytype_int16;
147 #endif
149 #ifndef YYSIZE_T
150 # ifdef __SIZE_TYPE__
151 # define YYSIZE_T __SIZE_TYPE__
152 # elif defined size_t
153 # define YYSIZE_T size_t
154 # elif ! defined YYSIZE_T
155 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
156 # define YYSIZE_T size_t
157 # else
158 # define YYSIZE_T unsigned
159 # endif
160 #endif
162 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
164 #ifndef YY_
165 # if defined YYENABLE_NLS && YYENABLE_NLS
166 # if ENABLE_NLS
167 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
168 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
169 # endif
170 # endif
171 # ifndef YY_
172 # define YY_(Msgid) Msgid
173 # endif
174 #endif
176 #ifndef YY_ATTRIBUTE
177 # if (defined __GNUC__ \
178 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
179 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
180 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
181 # else
182 # define YY_ATTRIBUTE(Spec) /* empty */
183 # endif
184 #endif
186 #ifndef YY_ATTRIBUTE_PURE
187 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
188 #endif
190 #ifndef YY_ATTRIBUTE_UNUSED
191 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
192 #endif
194 /* Suppress unused-variable warnings by "using" E. */
195 #if ! defined lint || defined __GNUC__
196 # define YYUSE(E) ((void) (E))
197 #else
198 # define YYUSE(E) /* empty */
199 #endif
201 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
202 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
203 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
204 _Pragma ("GCC diagnostic push") \
205 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
206 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
207 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
208 _Pragma ("GCC diagnostic pop")
209 #else
210 # define YY_INITIAL_VALUE(Value) Value
211 #endif
212 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
213 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
214 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
215 #endif
216 #ifndef YY_INITIAL_VALUE
217 # define YY_INITIAL_VALUE(Value) /* Nothing. */
218 #endif
221 #define YY_ASSERT(E) ((void) (0 && (E)))
223 #if ! defined yyoverflow || YYERROR_VERBOSE
225 /* The parser invokes alloca or malloc; define the necessary symbols. */
227 # ifdef YYSTACK_USE_ALLOCA
228 # if YYSTACK_USE_ALLOCA
229 # ifdef __GNUC__
230 # define YYSTACK_ALLOC __builtin_alloca
231 # elif defined __BUILTIN_VA_ARG_INCR
232 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
233 # elif defined _AIX
234 # define YYSTACK_ALLOC __alloca
235 # elif defined _MSC_VER
236 # include <malloglob.h> /* INFRINGES ON USER NAME SPACE */
237 # define alloca _alloca
238 # else
239 # define YYSTACK_ALLOC alloca
240 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
241 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
242 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
243 # ifndef EXIT_SUCCESS
244 # define EXIT_SUCCESS 0
245 # endif
246 # endif
247 # endif
248 # endif
249 # endif
251 # ifdef YYSTACK_ALLOC
252 /* Pacify GCC's 'empty if-body' warning. */
253 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
254 # ifndef YYSTACK_ALLOC_MAXIMUM
255 /* The OS might guarantee only one guard page at the bottom of the stack,
256 and a page size can be as small as 4096 bytes. So we cannot safely
257 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
258 to allow for a few compiler-allocated temporary stack slots. */
259 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
260 # endif
261 # else
262 # define YYSTACK_ALLOC YYMALLOC
263 # define YYSTACK_FREE YYFREE
264 # ifndef YYSTACK_ALLOC_MAXIMUM
265 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
266 # endif
267 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
268 && ! ((defined YYMALLOC || defined malloc) \
269 && (defined YYFREE || defined free)))
270 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
271 # ifndef EXIT_SUCCESS
272 # define EXIT_SUCCESS 0
273 # endif
274 # endif
275 # ifndef YYMALLOC
276 # define YYMALLOC malloc
277 # if ! defined malloc && ! defined EXIT_SUCCESS
278 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
279 # endif
280 # endif
281 # ifndef YYFREE
282 # define YYFREE free
283 # if ! defined free && ! defined EXIT_SUCCESS
284 void free (void *); /* INFRINGES ON USER NAME SPACE */
285 # endif
286 # endif
287 # endif
288 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
291 #if (! defined yyoverflow \
292 && (! defined __cplusplus \
293 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
295 /* A type that is properly aligned for any stack member. */
296 union yyalloc
298 yytype_int16 yyss_alloc;
299 YYSTYPE yyvs_alloc;
302 /* The size of the maximum gap between one aligned stack and the next. */
303 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
305 /* The size of an array large to enough to hold all stacks, each with
306 N elements. */
307 # define YYSTACK_BYTES(N) \
308 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
309 + YYSTACK_GAP_MAXIMUM)
311 # define YYCOPY_NEEDED 1
313 /* Relocate STACK from its old location to the new one. The
314 local variables YYSIZE and YYSTACKSIZE give the old and new number of
315 elements in the stack, and YYPTR gives the new location of the
316 stack. Advance YYPTR to a properly aligned location for the next
317 stack. */
318 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
319 do \
321 YYSIZE_T yynewbytes; \
322 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
323 Stack = &yyptr->Stack_alloc; \
324 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
325 yyptr += yynewbytes / sizeof (*yyptr); \
327 while (0)
329 #endif
331 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
332 /* Copy COUNT objects from SRC to DST. The source and destination do
333 not overlap. */
334 # ifndef YYCOPY
335 # if defined __GNUC__ && 1 < __GNUC__
336 # define YYCOPY(Dst, Src, Count) \
337 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
338 # else
339 # define YYCOPY(Dst, Src, Count) \
340 do \
342 YYSIZE_T yyi; \
343 for (yyi = 0; yyi < (Count); yyi++) \
344 (Dst)[yyi] = (Src)[yyi]; \
346 while (0)
347 # endif
348 # endif
349 #endif /* !YYCOPY_NEEDED */
351 /* YYFINAL -- State number of the termination state. */
352 #define YYFINAL 8
353 /* YYLAST -- Last index in YYTABLE. */
354 #define YYLAST 187
356 /* YYNTOKENS -- Number of terminals. */
357 #define YYNTOKENS 53
358 /* YYNNTS -- Number of nonterminals. */
359 #define YYNNTS 48
360 /* YYNRULES -- Number of rules. */
361 #define YYNRULES 106
362 /* YYNSTATES -- Number of states. */
363 #define YYNSTATES 186
365 #define YYUNDEFTOK 2
366 #define YYMAXUTOK 307
368 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
369 as returned by yylex, with out-of-bounds checking. */
370 #define YYTRANSLATE(YYX) \
371 ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
373 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
374 as returned by yylex. */
375 static const yytype_uint8 yytranslate[] =
377 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
378 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
379 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
380 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
381 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
382 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
383 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
384 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
385 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
386 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
387 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
388 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
389 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
390 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
391 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
392 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
393 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
394 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
395 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
396 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
397 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
398 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
399 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
400 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
401 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
402 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
403 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
404 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
405 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
406 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
407 45, 46, 47, 48, 49, 50, 51, 52
410 #if YYDEBUG
411 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
412 static const yytype_uint16 yyrline[] =
414 0, 112, 112, 112, 116, 121, 123, 124, 125, 126,
415 127, 131, 132, 133, 134, 135, 136, 141, 148, 153,
416 160, 169, 171, 172, 173, 176, 184, 190, 200, 206,
417 212, 218, 223, 228, 235, 245, 250, 258, 261, 263,
418 264, 265, 268, 274, 281, 287, 295, 296, 297, 298,
419 301, 302, 305, 306, 307, 309, 311, 316, 324, 332,
420 337, 344, 349, 357, 360, 362, 363, 366, 375, 382,
421 385, 387, 392, 398, 416, 423, 430, 432, 437, 438,
422 441, 442, 443, 446, 447, 450, 451, 452, 453, 454,
423 455, 456, 457, 458, 459, 460, 464, 466, 467, 470,
424 471, 475, 478, 479, 480, 484, 485
426 #endif
428 #if YYDEBUG || YYERROR_VERBOSE || 0
429 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
430 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
431 static const char *const yytname[] =
433 "$end", "error", "$undefined", "T_HELPTEXT", "T_WORD", "T_WORD_QUOTE",
434 "T_ALLNOCONFIG_Y", "T_BOOL", "T_CHOICE", "T_CLOSE_PAREN",
435 "T_COLON_EQUAL", "T_COMMENT", "T_CONFIG", "T_DEFAULT",
436 "T_DEFCONFIG_LIST", "T_DEF_BOOL", "T_DEF_TRISTATE", "T_DEPENDS",
437 "T_ENDCHOICE", "T_ENDIF", "T_ENDMENU", "T_HELP", "T_HEX", "T_IF",
438 "T_IMPLY", "T_INT", "T_MAINMENU", "T_MENU", "T_MENUCONFIG", "T_MODULES",
439 "T_ON", "T_OPEN_PAREN", "T_OPTION", "T_OPTIONAL", "T_PLUS_EQUAL",
440 "T_PROMPT", "T_RANGE", "T_SELECT", "T_SOURCE", "T_STRING", "T_TRISTATE",
441 "T_VISIBLE", "T_EOL", "T_ASSIGN_VAL", "T_OR", "T_AND", "T_EQUAL",
442 "T_UNEQUAL", "T_LESS", "T_LESS_EQUAL", "T_GREATER", "T_GREATER_EQUAL",
443 "T_NOT", "$accept", "input", "mainmenu_stmt", "stmt_list", "common_stmt",
444 "config_entry_start", "config_stmt", "menuconfig_entry_start",
445 "menuconfig_stmt", "config_option_list", "config_option", "choice",
446 "choice_entry", "choice_end", "choice_stmt", "choice_option_list",
447 "choice_option", "type", "logic_type", "default", "choice_block",
448 "if_entry", "if_end", "if_stmt", "menu", "menu_entry", "menu_end",
449 "menu_stmt", "menu_option_list", "source_stmt", "comment",
450 "comment_stmt", "comment_option_list", "help_start", "help", "depends",
451 "visible", "prompt_stmt_opt", "prompt", "end", "if_expr", "expr",
452 "nonconst_symbol", "symbol", "word_opt", "assignment_stmt", "assign_op",
453 "assign_val", YY_NULLPTR
455 #endif
457 # ifdef YYPRINT
458 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
459 (internal) symbol number NUM (which must be that of a token). */
460 static const yytype_uint16 yytoknum[] =
462 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
463 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
464 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
465 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
466 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
467 305, 306, 307
469 # endif
471 #define YYPACT_NINF -70
473 #define yypact_value_is_default(Yystate) \
474 (!!((Yystate) == (-70)))
476 #define YYTABLE_NINF -4
478 #define yytable_value_is_error(Yytable_value) \
481 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
482 STATE-NUM. */
483 static const yytype_int16 yypact[] =
485 -3, 12, 43, -70, 30, -70, -70, 23, -70, 55,
486 27, 18, 40, 12, 68, 9, 12, 68, 12, -70,
487 -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
488 -70, -70, -70, -70, -70, -70, -70, -70, 32, -70,
489 -70, -70, 36, -70, 44, 45, -70, 47, -70, 9,
490 9, 31, -70, 119, 52, 54, 60, 110, 110, 123,
491 101, 80, 4, 80, 92, -70, -70, 72, -70, -70,
492 -70, 26, -70, -70, 9, 9, 28, 28, 28, 28,
493 28, 28, -70, -70, -70, -70, -70, -70, -70, 85,
494 74, -70, 68, -70, 33, 12, 28, 68, -70, -70,
495 -70, 12, -70, 9, 125, -70, -70, 68, 91, 12,
496 -70, 12, -70, -70, 14, 95, 96, 99, -70, -70,
497 -70, -70, -70, 120, -70, -70, -70, -70, -70, -70,
498 -70, 77, -70, -70, -70, -70, -70, -70, -70, 9,
499 -70, 120, 106, 111, 112, 120, 28, 120, 130, 120,
500 6, -70, 120, -70, 120, 133, -70, -70, -70, 9,
501 134, 129, 136, -70, -70, -70, 137, 120, 138, -70,
502 -70, 139, 140, 141, -70, -8, -70, -70, -70, -70,
503 142, -70, -70, -70, -70, -70
506 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
507 Performed when YYTABLE does not specify something else to do. Zero
508 means the default is an error. */
509 static const yytype_uint8 yydefact[] =
511 5, 0, 0, 5, 0, 78, 79, 0, 1, 0,
512 0, 0, 99, 0, 0, 0, 0, 0, 0, 6,
513 21, 13, 21, 14, 38, 55, 7, 5, 11, 64,
514 5, 8, 15, 70, 12, 16, 4, 10, 0, 103,
515 104, 102, 105, 100, 0, 0, 96, 0, 98, 0,
516 0, 0, 97, 85, 0, 0, 0, 18, 20, 35,
517 0, 0, 61, 0, 69, 9, 106, 0, 34, 68,
518 17, 0, 93, 57, 0, 0, 0, 0, 0, 0,
519 0, 0, 60, 19, 67, 50, 52, 53, 54, 0,
520 0, 48, 0, 47, 0, 0, 0, 0, 49, 51,
521 22, 76, 46, 0, 0, 24, 23, 0, 0, 0,
522 39, 76, 41, 40, 0, 0, 0, 0, 56, 37,
523 36, 59, 58, 83, 66, 65, 63, 62, 71, 101,
524 92, 94, 95, 90, 91, 86, 87, 88, 89, 0,
525 72, 83, 0, 0, 0, 83, 0, 83, 0, 83,
526 83, 73, 83, 44, 83, 0, 81, 82, 80, 0,
527 0, 0, 0, 33, 32, 31, 0, 83, 0, 25,
528 77, 0, 0, 0, 43, 84, 75, 74, 29, 26,
529 0, 28, 27, 45, 42, 30
532 /* YYPGOTO[NTERM-NUM]. */
533 static const yytype_int16 yypgoto[] =
535 -70, -70, -70, 19, 126, -70, -70, -70, -70, 163,
536 -70, -70, -70, -70, -70, -70, -70, -70, 93, -70,
537 -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
538 -70, -70, -70, -70, 102, 42, -70, 76, 2, -57,
539 10, -49, -12, -69, -70, -70, -70, -70
542 /* YYDEFGOTO[NTERM-NUM]. */
543 static const yytype_int16 yydefgoto[] =
545 -1, 2, 3, 4, 19, 20, 21, 22, 23, 57,
546 100, 24, 25, 119, 26, 59, 110, 101, 102, 103,
547 60, 27, 121, 28, 29, 30, 126, 31, 62, 32,
548 33, 34, 64, 104, 105, 106, 125, 148, 149, 120,
549 160, 51, 52, 53, 44, 35, 42, 67
552 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
553 positive, shift that token. If negative, reduce the rule whose
554 number is the opposite. If YYTABLE_NINF, syntax error. */
555 static const yytype_int16 yytable[] =
557 71, 72, 47, 7, 122, 55, 127, 133, 134, 135,
558 136, 137, 138, 46, 48, 45, 5, 6, 54, 38,
559 56, 89, 9, 1, 39, 131, 132, 146, 39, 159,
560 -3, 10, 46, 48, 11, 130, 74, 75, 12, 142,
561 49, 13, 14, 8, 43, 123, 61, 143, 40, 63,
562 74, 75, 40, 15, 150, -2, 10, 16, 17, 11,
563 41, 50, 144, 12, 41, 36, 13, 14, 18, 37,
564 74, 75, 46, 73, 65, 74, 75, 167, 15, 66,
565 141, 10, 16, 17, 11, 147, 68, 69, 12, 70,
566 161, 13, 14, 18, 82, 152, 83, 145, 115, 116,
567 117, 113, 84, 15, 124, 114, 128, 16, 17, 89,
568 175, 154, 13, 14, 129, 139, 140, 85, 18, 115,
569 116, 117, 75, 86, 15, 87, 88, 89, 151, 17,
570 85, 90, 91, 153, 92, 93, 107, 156, 157, 18,
571 89, 158, 94, 159, 90, 95, 96, 97, 163, 98,
572 99, 162, 111, 164, 165, 166, 108, 168, 109, 170,
573 171, 112, 172, 99, 173, 76, 77, 78, 79, 80,
574 81, 177, 169, 74, 75, 174, 176, 180, 178, 179,
575 181, 182, 183, 184, 185, 58, 118, 155
578 static const yytype_uint8 yycheck[] =
580 49, 50, 14, 1, 61, 17, 63, 76, 77, 78,
581 79, 80, 81, 4, 5, 13, 4, 5, 16, 1,
582 18, 17, 3, 26, 10, 74, 75, 96, 10, 23,
583 0, 1, 4, 5, 4, 9, 44, 45, 8, 6,
584 31, 11, 12, 0, 4, 41, 27, 14, 34, 30,
585 44, 45, 34, 23, 103, 0, 1, 27, 28, 4,
586 46, 52, 29, 8, 46, 42, 11, 12, 38, 42,
587 44, 45, 4, 42, 42, 44, 45, 146, 23, 43,
588 92, 1, 27, 28, 4, 97, 42, 42, 8, 42,
589 139, 11, 12, 38, 42, 107, 42, 95, 18, 19,
590 20, 59, 42, 23, 62, 4, 64, 27, 28, 17,
591 159, 109, 11, 12, 42, 30, 42, 7, 38, 18,
592 19, 20, 45, 13, 23, 15, 16, 17, 3, 28,
593 7, 21, 22, 42, 24, 25, 13, 42, 42, 38,
594 17, 42, 32, 23, 21, 35, 36, 37, 42, 39,
595 40, 141, 59, 42, 42, 145, 33, 147, 35, 149,
596 150, 59, 152, 40, 154, 46, 47, 48, 49, 50,
597 51, 42, 42, 44, 45, 42, 42, 167, 42, 42,
598 42, 42, 42, 42, 42, 22, 60, 111
601 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
602 symbol of state STATE-NUM. */
603 static const yytype_uint8 yystos[] =
605 0, 26, 54, 55, 56, 4, 5, 91, 0, 56,
606 1, 4, 8, 11, 12, 23, 27, 28, 38, 57,
607 58, 59, 60, 61, 64, 65, 67, 74, 76, 77,
608 78, 80, 82, 83, 84, 98, 42, 42, 1, 10,
609 34, 46, 99, 4, 97, 91, 4, 95, 5, 31,
610 52, 94, 95, 96, 91, 95, 91, 62, 62, 68,
611 73, 56, 81, 56, 85, 42, 43, 100, 42, 42,
612 42, 94, 94, 42, 44, 45, 46, 47, 48, 49,
613 50, 51, 42, 42, 42, 7, 13, 15, 16, 17,
614 21, 22, 24, 25, 32, 35, 36, 37, 39, 40,
615 63, 70, 71, 72, 86, 87, 88, 13, 33, 35,
616 69, 71, 87, 88, 4, 18, 19, 20, 57, 66,
617 92, 75, 92, 41, 88, 89, 79, 92, 88, 42,
618 9, 94, 94, 96, 96, 96, 96, 96, 96, 30,
619 42, 95, 6, 14, 29, 91, 96, 95, 90, 91,
620 94, 3, 95, 42, 91, 90, 42, 42, 42, 23,
621 93, 94, 93, 42, 42, 42, 93, 96, 93, 42,
622 93, 93, 93, 93, 42, 94, 42, 42, 42, 42,
623 93, 42, 42, 42, 42, 42
626 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
627 static const yytype_uint8 yyr1[] =
629 0, 53, 54, 54, 55, 56, 56, 56, 56, 56,
630 56, 57, 57, 57, 57, 57, 57, 58, 59, 60,
631 61, 62, 62, 62, 62, 63, 63, 63, 63, 63,
632 63, 63, 63, 63, 64, 65, 66, 67, 68, 68,
633 68, 68, 69, 69, 69, 69, 70, 70, 70, 70,
634 71, 71, 72, 72, 72, 73, 73, 74, 75, 76,
635 77, 78, 79, 80, 81, 81, 81, 82, 83, 84,
636 85, 85, 86, 87, 88, 89, 90, 90, 91, 91,
637 92, 92, 92, 93, 93, 94, 94, 94, 94, 94,
638 94, 94, 94, 94, 94, 94, 95, 96, 96, 97,
639 97, 98, 99, 99, 99, 100, 100
642 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
643 static const yytype_uint8 yyr2[] =
645 0, 2, 2, 1, 3, 0, 2, 2, 2, 4,
646 3, 1, 1, 1, 1, 1, 1, 3, 2, 3,
647 2, 0, 2, 2, 2, 3, 4, 4, 4, 4,
648 5, 3, 3, 3, 3, 2, 1, 3, 0, 2,
649 2, 2, 4, 3, 2, 4, 1, 1, 1, 1,
650 1, 1, 1, 1, 1, 0, 2, 3, 1, 3,
651 3, 2, 1, 3, 0, 2, 2, 3, 3, 2,
652 0, 2, 2, 2, 4, 3, 0, 2, 1, 1,
653 2, 2, 2, 0, 2, 1, 3, 3, 3, 3,
654 3, 3, 3, 2, 3, 3, 1, 1, 1, 0,
655 1, 4, 1, 1, 1, 0, 1
659 #define yyerrok (yyerrstatus = 0)
660 #define yyclearin (yychar = YYEMPTY)
661 #define YYEMPTY (-2)
662 #define YYEOF 0
664 #define YYACCEPT goto yyacceptlab
665 #define YYABORT goto yyabortlab
666 #define YYERROR goto yyerrorlab
669 #define YYRECOVERING() (!!yyerrstatus)
671 #define YYBACKUP(Token, Value) \
672 do \
673 if (yychar == YYEMPTY) \
675 yychar = (Token); \
676 yylval = (Value); \
677 YYPOPSTACK (yylen); \
678 yystate = *yyssp; \
679 goto yybackup; \
681 else \
683 yyerror (YY_("syntax error: cannot back up")); \
684 YYERROR; \
686 while (0)
688 /* Error token number */
689 #define YYTERROR 1
690 #define YYERRCODE 256
694 /* Enable debugging if requested. */
695 #if YYDEBUG
697 # ifndef YYFPRINTF
698 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
699 # define YYFPRINTF fprintf
700 # endif
702 # define YYDPRINTF(Args) \
703 do { \
704 if (yydebug) \
705 YYFPRINTF Args; \
706 } while (0)
708 /* This macro is provided for backward compatibility. */
709 #ifndef YY_LOCATION_PRINT
710 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
711 #endif
714 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
715 do { \
716 if (yydebug) \
718 YYFPRINTF (stderr, "%s ", Title); \
719 yy_symbol_print (stderr, \
720 Type, Value); \
721 YYFPRINTF (stderr, "\n"); \
723 } while (0)
726 /*-----------------------------------.
727 | Print this symbol's value on YYO. |
728 `-----------------------------------*/
730 static void
731 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
733 FILE *yyoutput = yyo;
734 YYUSE (yyoutput);
735 if (!yyvaluep)
736 return;
737 # ifdef YYPRINT
738 if (yytype < YYNTOKENS)
739 YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
740 # endif
741 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
742 YYUSE (yytype);
743 YY_IGNORE_MAYBE_UNINITIALIZED_END
747 /*---------------------------.
748 | Print this symbol on YYO. |
749 `---------------------------*/
751 static void
752 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
754 YYFPRINTF (yyo, "%s %s (",
755 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
757 yy_symbol_value_print (yyo, yytype, yyvaluep);
758 YYFPRINTF (yyo, ")");
761 /*------------------------------------------------------------------.
762 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
763 | TOP (included). |
764 `------------------------------------------------------------------*/
766 static void
767 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
769 YYFPRINTF (stderr, "Stack now");
770 for (; yybottom <= yytop; yybottom++)
772 int yybot = *yybottom;
773 YYFPRINTF (stderr, " %d", yybot);
775 YYFPRINTF (stderr, "\n");
778 # define YY_STACK_PRINT(Bottom, Top) \
779 do { \
780 if (yydebug) \
781 yy_stack_print ((Bottom), (Top)); \
782 } while (0)
785 /*------------------------------------------------.
786 | Report that the YYRULE is going to be reduced. |
787 `------------------------------------------------*/
789 static void
790 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
792 unsigned long yylno = yyrline[yyrule];
793 int yynrhs = yyr2[yyrule];
794 int yyi;
795 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
796 yyrule - 1, yylno);
797 /* The symbols being reduced. */
798 for (yyi = 0; yyi < yynrhs; yyi++)
800 YYFPRINTF (stderr, " $%d = ", yyi + 1);
801 yy_symbol_print (stderr,
802 yystos[yyssp[yyi + 1 - yynrhs]],
803 &yyvsp[(yyi + 1) - (yynrhs)]
805 YYFPRINTF (stderr, "\n");
809 # define YY_REDUCE_PRINT(Rule) \
810 do { \
811 if (yydebug) \
812 yy_reduce_print (yyssp, yyvsp, Rule); \
813 } while (0)
815 /* Nonzero means print parse trace. It is left uninitialized so that
816 multiple parsers can coexist. */
817 int yydebug;
818 #else /* !YYDEBUG */
819 # define YYDPRINTF(Args)
820 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
821 # define YY_STACK_PRINT(Bottom, Top)
822 # define YY_REDUCE_PRINT(Rule)
823 #endif /* !YYDEBUG */
826 /* YYINITDEPTH -- initial size of the parser's stacks. */
827 #ifndef YYINITDEPTH
828 # define YYINITDEPTH 200
829 #endif
831 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
832 if the built-in stack extension method is used).
834 Do not make this value too large; the results are undefined if
835 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
836 evaluated with infinite-precision integer arithmetic. */
838 #ifndef YYMAXDEPTH
839 # define YYMAXDEPTH 10000
840 #endif
843 #if YYERROR_VERBOSE
845 # ifndef yystrlen
846 # if defined __GLIBC__ && defined _STRING_H
847 # define yystrlen strlen
848 # else
849 /* Return the length of YYSTR. */
850 static YYSIZE_T
851 yystrlen (const char *yystr)
853 YYSIZE_T yylen;
854 for (yylen = 0; yystr[yylen]; yylen++)
855 continue;
856 return yylen;
858 # endif
859 # endif
861 # ifndef yystpcpy
862 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
863 # define yystpcpy stpcpy
864 # else
865 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
866 YYDEST. */
867 static char *
868 yystpcpy (char *yydest, const char *yysrc)
870 char *yyd = yydest;
871 const char *yys = yysrc;
873 while ((*yyd++ = *yys++) != '\0')
874 continue;
876 return yyd - 1;
878 # endif
879 # endif
881 # ifndef yytnamerr
882 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
883 quotes and backslashes, so that it's suitable for yyerror. The
884 heuristic is that double-quoting is unnecessary unless the string
885 contains an apostrophe, a comma, or backslash (other than
886 backslash-backslash). YYSTR is taken from yytname. If YYRES is
887 null, do not copy; instead, return the length of what the result
888 would have been. */
889 static YYSIZE_T
890 yytnamerr (char *yyres, const char *yystr)
892 if (*yystr == '"')
894 YYSIZE_T yyn = 0;
895 char const *yyp = yystr;
897 for (;;)
898 switch (*++yyp)
900 case '\'':
901 case ',':
902 goto do_not_strip_quotes;
904 case '\\':
905 if (*++yyp != '\\')
906 goto do_not_strip_quotes;
907 else
908 goto append;
910 append:
911 default:
912 if (yyres)
913 yyres[yyn] = *yyp;
914 yyn++;
915 break;
917 case '"':
918 if (yyres)
919 yyres[yyn] = '\0';
920 return yyn;
922 do_not_strip_quotes: ;
925 if (! yyres)
926 return yystrlen (yystr);
928 return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
930 # endif
932 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
933 about the unexpected token YYTOKEN for the state stack whose top is
934 YYSSP.
936 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
937 not large enough to hold the message. In that case, also set
938 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
939 required number of bytes is too large to store. */
940 static int
941 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
942 yytype_int16 *yyssp, int yytoken)
944 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
945 YYSIZE_T yysize = yysize0;
946 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
947 /* Internationalized format string. */
948 const char *yyformat = YY_NULLPTR;
949 /* Arguments of yyformat. */
950 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
951 /* Number of reported tokens (one for the "unexpected", one per
952 "expected"). */
953 int yycount = 0;
955 /* There are many possibilities here to consider:
956 - If this state is a consistent state with a default action, then
957 the only way this function was invoked is if the default action
958 is an error action. In that case, don't check for expected
959 tokens because there are none.
960 - The only way there can be no lookahead present (in yychar) is if
961 this state is a consistent state with a default action. Thus,
962 detecting the absence of a lookahead is sufficient to determine
963 that there is no unexpected or expected token to report. In that
964 case, just report a simple "syntax error".
965 - Don't assume there isn't a lookahead just because this state is a
966 consistent state with a default action. There might have been a
967 previous inconsistent state, consistent state with a non-default
968 action, or user semantic action that manipulated yychar.
969 - Of course, the expected token list depends on states to have
970 correct lookahead information, and it depends on the parser not
971 to perform extra reductions after fetching a lookahead from the
972 scanner and before detecting a syntax error. Thus, state merging
973 (from LALR or IELR) and default reductions corrupt the expected
974 token list. However, the list is correct for canonical LR with
975 one exception: it will still contain any token that will not be
976 accepted due to an error action in a later state.
978 if (yytoken != YYEMPTY)
980 int yyn = yypact[*yyssp];
981 yyarg[yycount++] = yytname[yytoken];
982 if (!yypact_value_is_default (yyn))
984 /* Start YYX at -YYN if negative to avoid negative indexes in
985 YYCHECK. In other words, skip the first -YYN actions for
986 this state because they are default actions. */
987 int yyxbegin = yyn < 0 ? -yyn : 0;
988 /* Stay within bounds of both yycheck and yytname. */
989 int yychecklim = YYLAST - yyn + 1;
990 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
991 int yyx;
993 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
994 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
995 && !yytable_value_is_error (yytable[yyx + yyn]))
997 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
999 yycount = 1;
1000 yysize = yysize0;
1001 break;
1003 yyarg[yycount++] = yytname[yyx];
1005 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1006 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1007 yysize = yysize1;
1008 else
1009 return 2;
1015 switch (yycount)
1017 # define YYCASE_(N, S) \
1018 case N: \
1019 yyformat = S; \
1020 break
1021 default: /* Avoid compiler warnings. */
1022 YYCASE_(0, YY_("syntax error"));
1023 YYCASE_(1, YY_("syntax error, unexpected %s"));
1024 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1025 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1026 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1027 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1028 # undef YYCASE_
1032 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1033 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1034 yysize = yysize1;
1035 else
1036 return 2;
1039 if (*yymsg_alloc < yysize)
1041 *yymsg_alloc = 2 * yysize;
1042 if (! (yysize <= *yymsg_alloc
1043 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1044 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1045 return 1;
1048 /* Avoid sprintf, as that infringes on the user's name space.
1049 Don't have undefined behavior even if the translation
1050 produced a string with the wrong number of "%s"s. */
1052 char *yyp = *yymsg;
1053 int yyi = 0;
1054 while ((*yyp = *yyformat) != '\0')
1055 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1057 yyp += yytnamerr (yyp, yyarg[yyi++]);
1058 yyformat += 2;
1060 else
1062 yyp++;
1063 yyformat++;
1066 return 0;
1068 #endif /* YYERROR_VERBOSE */
1070 /*-----------------------------------------------.
1071 | Release the memory associated to this symbol. |
1072 `-----------------------------------------------*/
1074 static void
1075 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1077 YYUSE (yyvaluep);
1078 if (!yymsg)
1079 yymsg = "Deleting";
1080 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1082 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1083 switch (yytype)
1085 case 65: /* choice_entry */
1087 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1088 ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno);
1089 if (current_menu == ((*yyvaluep).menu))
1090 menu_end_menu();
1092 break;
1094 case 74: /* if_entry */
1096 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1097 ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno);
1098 if (current_menu == ((*yyvaluep).menu))
1099 menu_end_menu();
1101 break;
1103 case 78: /* menu_entry */
1105 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1106 ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno);
1107 if (current_menu == ((*yyvaluep).menu))
1108 menu_end_menu();
1110 break;
1112 default:
1113 break;
1115 YY_IGNORE_MAYBE_UNINITIALIZED_END
1121 /* The lookahead symbol. */
1122 int yychar;
1124 /* The semantic value of the lookahead symbol. */
1125 YYSTYPE yylval;
1126 /* Number of syntax errors so far. */
1127 int yynerrs;
1130 /*----------.
1131 | yyparse. |
1132 `----------*/
1135 yyparse (void)
1137 int yystate;
1138 /* Number of tokens to shift before error messages enabled. */
1139 int yyerrstatus;
1141 /* The stacks and their tools:
1142 'yyss': related to states.
1143 'yyvs': related to semantic values.
1145 Refer to the stacks through separate pointers, to allow yyoverflow
1146 to reallocate them elsewhere. */
1148 /* The state stack. */
1149 yytype_int16 yyssa[YYINITDEPTH];
1150 yytype_int16 *yyss;
1151 yytype_int16 *yyssp;
1153 /* The semantic value stack. */
1154 YYSTYPE yyvsa[YYINITDEPTH];
1155 YYSTYPE *yyvs;
1156 YYSTYPE *yyvsp;
1158 YYSIZE_T yystacksize;
1160 int yyn;
1161 int yyresult;
1162 /* Lookahead token as an internal (translated) token number. */
1163 int yytoken = 0;
1164 /* The variables used to return semantic value and location from the
1165 action routines. */
1166 YYSTYPE yyval;
1168 #if YYERROR_VERBOSE
1169 /* Buffer for error messages, and its allocated size. */
1170 char yymsgbuf[128];
1171 char *yymsg = yymsgbuf;
1172 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1173 #endif
1175 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1177 /* The number of symbols on the RHS of the reduced rule.
1178 Keep to zero when no symbol should be popped. */
1179 int yylen = 0;
1181 yyssp = yyss = yyssa;
1182 yyvsp = yyvs = yyvsa;
1183 yystacksize = YYINITDEPTH;
1185 YYDPRINTF ((stderr, "Starting parse\n"));
1187 yystate = 0;
1188 yyerrstatus = 0;
1189 yynerrs = 0;
1190 yychar = YYEMPTY; /* Cause a token to be read. */
1191 goto yysetstate;
1194 /*------------------------------------------------------------.
1195 | yynewstate -- push a new state, which is found in yystate. |
1196 `------------------------------------------------------------*/
1197 yynewstate:
1198 /* In all cases, when you get here, the value and location stacks
1199 have just been pushed. So pushing a state here evens the stacks. */
1200 yyssp++;
1203 /*--------------------------------------------------------------------.
1204 | yynewstate -- set current state (the top of the stack) to yystate. |
1205 `--------------------------------------------------------------------*/
1206 yysetstate:
1207 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1208 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1209 *yyssp = (yytype_int16) yystate;
1211 if (yyss + yystacksize - 1 <= yyssp)
1212 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1213 goto yyexhaustedlab;
1214 #else
1216 /* Get the current used size of the three stacks, in elements. */
1217 YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1219 # if defined yyoverflow
1221 /* Give user a chance to reallocate the stack. Use copies of
1222 these so that the &'s don't force the real ones into
1223 memory. */
1224 YYSTYPE *yyvs1 = yyvs;
1225 yytype_int16 *yyss1 = yyss;
1227 /* Each stack pointer address is followed by the size of the
1228 data in use in that stack, in bytes. This used to be a
1229 conditional around just the two extra args, but that might
1230 be undefined if yyoverflow is a macro. */
1231 yyoverflow (YY_("memory exhausted"),
1232 &yyss1, yysize * sizeof (*yyssp),
1233 &yyvs1, yysize * sizeof (*yyvsp),
1234 &yystacksize);
1235 yyss = yyss1;
1236 yyvs = yyvs1;
1238 # else /* defined YYSTACK_RELOCATE */
1239 /* Extend the stack our own way. */
1240 if (YYMAXDEPTH <= yystacksize)
1241 goto yyexhaustedlab;
1242 yystacksize *= 2;
1243 if (YYMAXDEPTH < yystacksize)
1244 yystacksize = YYMAXDEPTH;
1247 yytype_int16 *yyss1 = yyss;
1248 union yyalloc *yyptr =
1249 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1250 if (! yyptr)
1251 goto yyexhaustedlab;
1252 YYSTACK_RELOCATE (yyss_alloc, yyss);
1253 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1254 # undef YYSTACK_RELOCATE
1255 if (yyss1 != yyssa)
1256 YYSTACK_FREE (yyss1);
1258 # endif
1260 yyssp = yyss + yysize - 1;
1261 yyvsp = yyvs + yysize - 1;
1263 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1264 (unsigned long) yystacksize));
1266 if (yyss + yystacksize - 1 <= yyssp)
1267 YYABORT;
1269 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1271 if (yystate == YYFINAL)
1272 YYACCEPT;
1274 goto yybackup;
1277 /*-----------.
1278 | yybackup. |
1279 `-----------*/
1280 yybackup:
1281 /* Do appropriate processing given the current state. Read a
1282 lookahead token if we need one and don't already have one. */
1284 /* First try to decide what to do without reference to lookahead token. */
1285 yyn = yypact[yystate];
1286 if (yypact_value_is_default (yyn))
1287 goto yydefault;
1289 /* Not known => get a lookahead token if don't already have one. */
1291 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1292 if (yychar == YYEMPTY)
1294 YYDPRINTF ((stderr, "Reading a token: "));
1295 yychar = yylex_proc ();
1298 if (yychar <= YYEOF)
1300 yychar = yytoken = YYEOF;
1301 YYDPRINTF ((stderr, "Now at end of input.\n"));
1303 else
1305 yytoken = YYTRANSLATE (yychar);
1306 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1309 /* If the proper action on seeing token YYTOKEN is to reduce or to
1310 detect an error, take that action. */
1311 yyn += yytoken;
1312 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1313 goto yydefault;
1314 yyn = yytable[yyn];
1315 if (yyn <= 0)
1317 if (yytable_value_is_error (yyn))
1318 goto yyerrlab;
1319 yyn = -yyn;
1320 goto yyreduce;
1323 /* Count tokens shifted since error; after three, turn off error
1324 status. */
1325 if (yyerrstatus)
1326 yyerrstatus--;
1328 /* Shift the lookahead token. */
1329 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1331 /* Discard the shifted token. */
1332 yychar = YYEMPTY;
1334 yystate = yyn;
1335 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1336 *++yyvsp = yylval;
1337 YY_IGNORE_MAYBE_UNINITIALIZED_END
1338 goto yynewstate;
1341 /*-----------------------------------------------------------.
1342 | yydefault -- do the default action for the current state. |
1343 `-----------------------------------------------------------*/
1344 yydefault:
1345 yyn = yydefact[yystate];
1346 if (yyn == 0)
1347 goto yyerrlab;
1348 goto yyreduce;
1351 /*-----------------------------.
1352 | yyreduce -- do a reduction. |
1353 `-----------------------------*/
1354 yyreduce:
1355 /* yyn is the number of a rule to reduce with. */
1356 yylen = yyr2[yyn];
1358 /* If YYLEN is nonzero, implement the default value of the action:
1359 '$$ = $1'.
1361 Otherwise, the following line sets YYVAL to garbage.
1362 This behavior is undocumented and Bison
1363 users should not rely upon it. Assigning to YYVAL
1364 unconditionally makes the parser a bit smaller, and it avoids a
1365 GCC warning that YYVAL may be used uninitialized. */
1366 yyval = yyvsp[1-yylen];
1369 YY_REDUCE_PRINT (yyn);
1370 switch (yyn)
1372 case 4:
1374 menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL);
1376 break;
1378 case 9:
1379 { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); }
1380 break;
1382 case 10:
1383 { zconf_error("invalid statement (%s)\n(%s)\n(%s)\n(%s)\n", (yyvsp[0].string),
1384 (yyvsp[-1].string),
1385 (yyvsp[1].string),
1386 (yyvsp[2].string)); }
1387 break;
1389 case 17:
1391 (yyvsp[-1].symbol)->flags |= SYMBOL_OPTIONAL;
1392 menu_add_entry((yyvsp[-1].symbol));
1393 printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].symbol)->name);
1395 break;
1397 case 18:
1399 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
1401 break;
1403 case 19:
1405 (yyvsp[-1].symbol)->flags |= SYMBOL_OPTIONAL;
1406 menu_add_entry((yyvsp[-1].symbol));
1407 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].symbol)->name);
1409 break;
1411 case 20:
1413 if (current_entry->prompt)
1414 current_entry->prompt->type = P_MENU;
1415 else
1416 zconfprint("warning: menuconfig statement without prompt");
1417 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
1419 break;
1421 case 25:
1423 menu_set_type((yyvsp[-2].type));
1424 printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
1425 zconf_curname(), zconf_lineno(),
1426 (yyvsp[-2].type));
1428 break;
1430 case 26:
1432 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
1433 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
1435 break;
1437 case 27:
1439 menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr));
1440 if ((yyvsp[-3].type) != S_UNKNOWN)
1441 menu_set_type((yyvsp[-3].type));
1442 printd(DEBUG_PARSE, "%s:%d:default(%u)\n",
1443 zconf_curname(), zconf_lineno(),
1444 (yyvsp[-3].type));
1446 break;
1448 case 28:
1450 menu_add_symbol(P_SELECT, (yyvsp[-2].symbol), (yyvsp[-1].expr));
1451 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
1453 break;
1455 case 29:
1457 menu_add_symbol(P_IMPLY, (yyvsp[-2].symbol), (yyvsp[-1].expr));
1458 printd(DEBUG_PARSE, "%s:%d:imply\n", zconf_curname(), zconf_lineno());
1460 break;
1462 case 30:
1464 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr));
1465 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
1467 break;
1469 case 31:
1471 menu_add_option_modules();
1473 break;
1475 case 32:
1477 menu_add_option_defconfig_list();
1479 break;
1481 case 33:
1483 menu_add_option_allnoconfig_y();
1485 break;
1487 case 34:
1489 struct symbol *sym = sym_lookup((yyvsp[-1].string), SYMBOL_CHOICE);
1490 sym->flags |= SYMBOL_NO_WRITE;
1491 menu_add_entry(sym);
1492 menu_add_expr(P_CHOICE, NULL, NULL);
1493 free((yyvsp[-1].string));
1494 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
1496 break;
1498 case 35:
1500 (yyval.menu) = menu_add_menu();
1502 break;
1504 case 36:
1506 if (zconf_endtoken((yyvsp[0].string), "choice")) {
1507 menu_end_menu();
1508 printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
1511 break;
1513 case 42:
1515 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
1516 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
1518 break;
1520 case 43:
1522 menu_set_type((yyvsp[-2].type));
1523 printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
1524 zconf_curname(), zconf_lineno(), (yyvsp[-2].type));
1526 break;
1528 case 44:
1530 current_entry->sym->flags |= SYMBOL_OPTIONAL;
1531 printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
1533 break;
1535 case 45:
1537 menu_add_symbol(P_DEFAULT, (yyvsp[-2].symbol), (yyvsp[-1].expr));
1538 printd(DEBUG_PARSE, "%s:%d:default\n",
1539 zconf_curname(), zconf_lineno());
1541 break;
1543 case 47:
1544 { (yyval.type) = S_INT; }
1545 break;
1547 case 48:
1548 { (yyval.type) = S_HEX; }
1549 break;
1551 case 49:
1552 { (yyval.type) = S_STRING; }
1553 break;
1555 case 50:
1556 { (yyval.type) = S_BOOLEAN; }
1557 break;
1559 case 51:
1560 { (yyval.type) = S_TRISTATE; }
1561 break;
1563 case 52:
1564 { (yyval.type) = S_UNKNOWN; }
1565 break;
1567 case 53:
1568 { (yyval.type) = S_BOOLEAN; }
1569 break;
1571 case 54:
1572 { (yyval.type) = S_TRISTATE; }
1573 break;
1575 case 57:
1577 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
1578 menu_add_entry(NULL);
1579 menu_add_dep((yyvsp[-1].expr));
1580 (yyval.menu) = menu_add_menu();
1582 break;
1584 case 58:
1586 if (zconf_endtoken((yyvsp[0].string), "if")) {
1587 menu_end_menu();
1588 printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
1591 break;
1593 case 60:
1595 menu_add_entry(NULL);
1596 menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL);
1597 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
1599 break;
1601 case 61:
1603 (yyval.menu) = menu_add_menu();
1605 break;
1607 case 62:
1609 if (zconf_endtoken((yyvsp[0].string), "menu")) {
1610 menu_end_menu();
1611 printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
1614 break;
1616 case 67:
1618 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
1619 printf("%s\n", (yyvsp[-1].string));
1620 system("echo ${PWD}\n");
1621 system("echo BR2_BASE_DIR=${BR2_BASE_DIR}\n");
1622 system("echo BASE_DIR=${BASE_DIR}\n");
1623 zconf_nextfile((yyvsp[-1].string));
1624 free((yyvsp[-1].string));
1626 break;
1628 case 68:
1630 menu_add_entry(NULL);
1631 menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL);
1632 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
1634 break;
1636 case 72:
1638 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
1639 zconf_starthelp();
1641 break;
1643 case 73:
1645 if (current_entry->help) {
1646 free(current_entry->help);
1647 zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used",
1648 current_entry->sym->name ?: "<choice>");
1651 /* Is the help text empty or all whitespace? */
1652 if ((yyvsp[0].string)[strspn((yyvsp[0].string), " \f\n\r\t\v")] == '\0')
1653 zconfprint("warning: '%s' defined with blank help text",
1654 current_entry->sym->name ?: "<choice>");
1656 current_entry->help = (yyvsp[0].string);
1658 break;
1660 case 74:
1662 menu_add_dep((yyvsp[-1].expr));
1663 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
1665 break;
1667 case 75:
1669 menu_add_visibility((yyvsp[-1].expr));
1671 break;
1673 case 77:
1675 menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr));
1677 break;
1679 case 80:
1680 { (yyval.string) = "menu"; }
1681 break;
1683 case 81:
1684 { (yyval.string) = "choice"; }
1685 break;
1687 case 82:
1688 { (yyval.string) = "if"; }
1689 break;
1691 case 83:
1692 { (yyval.expr) = NULL; }
1693 break;
1695 case 84:
1696 { (yyval.expr) = (yyvsp[0].expr); }
1697 break;
1699 case 85:
1700 { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); }
1701 break;
1703 case 86:
1704 { (yyval.expr) = expr_alloc_comp(E_LTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1705 break;
1707 case 87:
1708 { (yyval.expr) = expr_alloc_comp(E_LEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1709 break;
1711 case 88:
1712 { (yyval.expr) = expr_alloc_comp(E_GTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1713 break;
1715 case 89:
1716 { (yyval.expr) = expr_alloc_comp(E_GEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1717 break;
1719 case 90:
1720 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1721 break;
1723 case 91:
1724 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1725 break;
1727 case 92:
1728 { (yyval.expr) = (yyvsp[-1].expr); }
1729 break;
1731 case 93:
1732 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); }
1733 break;
1735 case 94:
1736 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
1737 break;
1739 case 95:
1740 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
1741 break;
1743 case 96:
1744 { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); }
1745 break;
1747 case 98:
1748 { (yyval.symbol) = sym_lookup((yyvsp[0].string), SYMBOL_CONST); free((yyvsp[0].string)); }
1749 break;
1751 case 99:
1752 { (yyval.string) = NULL; }
1753 break;
1755 case 101:
1756 { variable_add((yyvsp[-3].string), (yyvsp[-1].string), (yyvsp[-2].flavor)); free((yyvsp[-3].string)); free((yyvsp[-1].string)); }
1757 break;
1759 case 102:
1760 { (yyval.flavor) = VAR_RECURSIVE; }
1761 break;
1763 case 103:
1764 { (yyval.flavor) = VAR_SIMPLE; }
1765 break;
1767 case 104:
1768 { (yyval.flavor) = VAR_APPEND; }
1769 break;
1771 case 105:
1772 { (yyval.string) = xstrdup(""); }
1773 break;
1777 default: break;
1779 /* User semantic actions sometimes alter yychar, and that requires
1780 that yytoken be updated with the new translation. We take the
1781 approach of translating immediately before every use of yytoken.
1782 One alternative is translating here after every semantic action,
1783 but that translation would be missed if the semantic action invokes
1784 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1785 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1786 incorrect destructor might then be invoked immediately. In the
1787 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1788 to an incorrect destructor call or verbose syntax error message
1789 before the lookahead is translated. */
1790 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1792 YYPOPSTACK (yylen);
1793 yylen = 0;
1794 YY_STACK_PRINT (yyss, yyssp);
1796 *++yyvsp = yyval;
1798 /* Now 'shift' the result of the reduction. Determine what state
1799 that goes to, based on the state we popped back to and the rule
1800 number reduced by. */
1802 const int yylhs = yyr1[yyn] - YYNTOKENS;
1803 const int yyi = yypgoto[yylhs] + *yyssp;
1804 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1805 ? yytable[yyi]
1806 : yydefgoto[yylhs]);
1809 goto yynewstate;
1812 /*--------------------------------------.
1813 | yyerrlab -- here on detecting error. |
1814 `--------------------------------------*/
1815 yyerrlab:
1816 /* Make sure we have latest lookahead translation. See comments at
1817 user semantic actions for why this is necessary. */
1818 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1820 /* If not already recovering from an error, report this error. */
1821 if (!yyerrstatus)
1823 ++yynerrs;
1824 #if ! YYERROR_VERBOSE
1825 yyerror (YY_("syntax error ..."));
1826 printf("\n");
1827 zconf_error("invalid statement (%s)\n(%s)\n(%s)\n(%s)\n", (yyvsp[0].string),
1828 (yyvsp[-1].string),
1829 (yyvsp[1].string),
1830 (yyvsp[2].string));
1831 #else
1832 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1833 yyssp, yytoken)
1835 char const *yymsgp = YY_("syntax error");
1836 int yysyntax_error_status;
1837 yysyntax_error_status = YYSYNTAX_ERROR;
1838 if (yysyntax_error_status == 0)
1839 yymsgp = yymsg;
1840 else if (yysyntax_error_status == 1)
1842 if (yymsg != yymsgbuf)
1843 YYSTACK_FREE (yymsg);
1844 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1845 if (!yymsg)
1847 yymsg = yymsgbuf;
1848 yymsg_alloc = sizeof yymsgbuf;
1849 yysyntax_error_status = 2;
1851 else
1853 yysyntax_error_status = YYSYNTAX_ERROR;
1854 yymsgp = yymsg;
1857 yyerror (yymsgp);
1858 if (yysyntax_error_status == 2)
1859 goto yyexhaustedlab;
1861 # undef YYSYNTAX_ERROR
1862 #endif
1867 if (yyerrstatus == 3)
1869 /* If just tried and failed to reuse lookahead token after an
1870 error, discard it. */
1872 if (yychar <= YYEOF)
1874 /* Return failure if at end of input. */
1875 if (yychar == YYEOF)
1876 YYABORT;
1878 else
1880 yydestruct ("Error: discarding",
1881 yytoken, &yylval);
1882 yychar = YYEMPTY;
1886 /* Else will try to reuse lookahead token after shifting the error
1887 token. */
1888 goto yyerrlab1;
1891 /*---------------------------------------------------.
1892 | yyerrorlab -- error raised explicitly by YYERROR. |
1893 `---------------------------------------------------*/
1894 yyerrorlab:
1895 /* Pacify compilers when the user code never invokes YYERROR and the
1896 label yyerrorlab therefore never appears in user code. */
1897 if (0)
1898 YYERROR;
1900 /* Do not reclaim the symbols of the rule whose action triggered
1901 this YYERROR. */
1902 YYPOPSTACK (yylen);
1903 yylen = 0;
1904 YY_STACK_PRINT (yyss, yyssp);
1905 yystate = *yyssp;
1906 goto yyerrlab1;
1909 /*-------------------------------------------------------------.
1910 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1911 `-------------------------------------------------------------*/
1912 yyerrlab1:
1913 yyerrstatus = 3; /* Each real token shifted decrements this. */
1915 for (;;)
1917 yyn = yypact[yystate];
1918 if (!yypact_value_is_default (yyn))
1920 yyn += YYTERROR;
1921 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1923 yyn = yytable[yyn];
1924 if (0 < yyn)
1925 break;
1929 /* Pop the current state because it cannot handle the error token. */
1930 if (yyssp == yyss)
1931 YYABORT;
1934 yydestruct ("Error: popping",
1935 yystos[yystate], yyvsp);
1936 YYPOPSTACK (1);
1937 yystate = *yyssp;
1938 YY_STACK_PRINT (yyss, yyssp);
1941 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1942 *++yyvsp = yylval;
1943 YY_IGNORE_MAYBE_UNINITIALIZED_END
1946 /* Shift the error token. */
1947 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1949 yystate = yyn;
1950 goto yynewstate;
1953 /*-------------------------------------.
1954 | yyacceptlab -- YYACCEPT comes here. |
1955 `-------------------------------------*/
1956 yyacceptlab:
1957 yyresult = 0;
1958 goto yyreturn;
1961 /*-----------------------------------.
1962 | yyabortlab -- YYABORT comes here. |
1963 `-----------------------------------*/
1964 yyabortlab:
1965 yyresult = 1;
1966 goto yyreturn;
1969 #if !defined yyoverflow || YYERROR_VERBOSE
1970 /*-------------------------------------------------.
1971 | yyexhaustedlab -- memory exhaustion comes here. |
1972 `-------------------------------------------------*/
1973 yyexhaustedlab:
1974 yyerror (YY_("memory exhausted"));
1975 yyresult = 2;
1976 /* Fall through. */
1977 #endif
1980 /*-----------------------------------------------------.
1981 | yyreturn -- parsing is finished, return the result. |
1982 `-----------------------------------------------------*/
1983 yyreturn:
1984 if (yychar != YYEMPTY)
1986 /* Make sure we have latest lookahead translation. See comments at
1987 user semantic actions for why this is necessary. */
1988 yytoken = YYTRANSLATE (yychar);
1989 yydestruct ("Cleanup: discarding lookahead",
1990 yytoken, &yylval);
1992 /* Do not reclaim the symbols of the rule whose action triggered
1993 this YYABORT or YYACCEPT. */
1994 YYPOPSTACK (yylen);
1995 YY_STACK_PRINT (yyss, yyssp);
1996 while (yyssp != yyss)
1998 yydestruct ("Cleanup: popping",
1999 yystos[*yyssp], yyvsp);
2000 YYPOPSTACK (1);
2002 #ifndef yyoverflow
2003 if (yyss != yyssa)
2004 YYSTACK_FREE (yyss);
2005 #endif
2006 #if YYERROR_VERBOSE
2007 if (yymsg != yymsgbuf)
2008 YYSTACK_FREE (yymsg);
2009 #endif
2010 return yyresult;
2014 #include "parser.gmrproc.c"