1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
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, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
61 /* Substitute the variable and function names. */
62 #define yyparse zconfparse
63 #define yylex zconflex
64 #define yyerror zconferror
65 #define yylval zconflval
66 #define yychar zconfchar
67 #define yydebug zconfdebug
68 #define yynerrs zconfnerrs
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
114 #define T_MAINMENU 258
116 #define T_ENDMENU 260
119 #define T_ENDCHOICE 263
120 #define T_COMMENT 264
122 #define T_MENUCONFIG 266
124 #define T_HELPTEXT 268
127 #define T_DEPENDS 271
128 #define T_OPTIONAL 272
131 #define T_DEFAULT 275
134 #define T_VISIBLE 278
139 #define T_WORD_QUOTE 283
140 #define T_UNEQUAL 284
141 #define T_CLOSE_PAREN 285
142 #define T_OPEN_PAREN 286
152 /* Copy the first part of user declarations. */
156 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
157 * Released under the terms of the GNU GPL v2.0.
169 #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
171 #define PRINTD 0x0001
172 #define DEBUG_PARSE 0x0002
176 extern int zconflex(void);
177 static void zconfprint(const char *err, ...);
178 static void zconf_error(const char *err, ...);
179 static void zconferror(const char *err);
180 static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
182 struct symbol *symbol_hash[SYMBOL_HASHSIZE];
184 static struct menu *current_menu, *current_entry;
188 /* Enabling traces. */
193 /* Enabling verbose error messages. */
194 #ifdef YYERROR_VERBOSE
195 # undef YYERROR_VERBOSE
196 # define YYERROR_VERBOSE 1
198 # define YYERROR_VERBOSE 0
201 /* Enabling the token table. */
202 #ifndef YYTOKEN_TABLE
203 # define YYTOKEN_TABLE 0
206 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
207 typedef union YYSTYPE
212 struct symbol *symbol;
215 const struct kconf_id *id;
217 /* Line 193 of yacc.c. */
220 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
221 # define YYSTYPE_IS_DECLARED 1
222 # define YYSTYPE_IS_TRIVIAL 1
227 /* Copy the second part of user declarations. */
230 /* Include zconf.hash.c here so it can see the token constants. */
231 #include "zconf.hash.c"
234 /* Line 216 of yacc.c. */
242 typedef YYTYPE_UINT8 yytype_uint8;
244 typedef unsigned char yytype_uint8;
248 typedef YYTYPE_INT8 yytype_int8;
249 #elif (defined __STDC__ || defined __C99__FUNC__ \
250 || defined __cplusplus || defined _MSC_VER)
251 typedef signed char yytype_int8;
253 typedef short int yytype_int8;
257 typedef YYTYPE_UINT16 yytype_uint16;
259 typedef unsigned short int yytype_uint16;
263 typedef YYTYPE_INT16 yytype_int16;
265 typedef short int yytype_int16;
269 # ifdef __SIZE_TYPE__
270 # define YYSIZE_T __SIZE_TYPE__
271 # elif defined size_t
272 # define YYSIZE_T size_t
273 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
274 || defined __cplusplus || defined _MSC_VER)
275 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
276 # define YYSIZE_T size_t
278 # define YYSIZE_T unsigned int
282 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
285 # if defined YYENABLE_NLS && YYENABLE_NLS
287 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
288 # define YY_(msgid) dgettext ("bison-runtime", msgid)
292 # define YY_(msgid) msgid
296 /* Suppress unused-variable warnings by "using" E. */
297 #if ! defined lint || defined __GNUC__
298 # define YYUSE(e) ((void) (e))
300 # define YYUSE(e) /* empty */
303 /* Identity function, used to suppress warnings about constant conditions. */
307 #if (defined __STDC__ || defined __C99__FUNC__ \
308 || defined __cplusplus || defined _MSC_VER)
321 #if ! defined yyoverflow || YYERROR_VERBOSE
323 /* The parser invokes alloca or malloc; define the necessary symbols. */
325 # ifdef YYSTACK_USE_ALLOCA
326 # if YYSTACK_USE_ALLOCA
328 # define YYSTACK_ALLOC __builtin_alloca
329 # elif defined __BUILTIN_VA_ARG_INCR
330 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
332 # define YYSTACK_ALLOC __alloca
333 # elif defined _MSC_VER
334 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
335 # define alloca _alloca
337 # define YYSTACK_ALLOC alloca
338 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
339 || defined __cplusplus || defined _MSC_VER)
340 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
349 # ifdef YYSTACK_ALLOC
350 /* Pacify GCC's `empty if-body' warning. */
351 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
352 # ifndef YYSTACK_ALLOC_MAXIMUM
353 /* The OS might guarantee only one guard page at the bottom of the stack,
354 and a page size can be as small as 4096 bytes. So we cannot safely
355 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
356 to allow for a few compiler-allocated temporary stack slots. */
357 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
360 # define YYSTACK_ALLOC YYMALLOC
361 # define YYSTACK_FREE YYFREE
362 # ifndef YYSTACK_ALLOC_MAXIMUM
363 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
365 # if (defined __cplusplus && ! defined _STDLIB_H \
366 && ! ((defined YYMALLOC || defined malloc) \
367 && (defined YYFREE || defined free)))
368 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
374 # define YYMALLOC malloc
375 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
376 || defined __cplusplus || defined _MSC_VER)
377 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
382 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
383 || defined __cplusplus || defined _MSC_VER)
384 void free (void *); /* INFRINGES ON USER NAME SPACE */
388 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
391 #if (! defined yyoverflow \
392 && (! defined __cplusplus \
393 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
395 /* A type that is properly aligned for any stack member. */
402 /* The size of the maximum gap between one aligned stack and the next. */
403 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
405 /* The size of an array large to enough to hold all stacks, each with
407 # define YYSTACK_BYTES(N) \
408 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
409 + YYSTACK_GAP_MAXIMUM)
411 /* Copy COUNT objects from FROM to TO. The source and destination do
414 # if defined __GNUC__ && 1 < __GNUC__
415 # define YYCOPY(To, From, Count) \
416 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
418 # define YYCOPY(To, From, Count) \
422 for (yyi = 0; yyi < (Count); yyi++) \
423 (To)[yyi] = (From)[yyi]; \
429 /* Relocate STACK from its old location to the new one. The
430 local variables YYSIZE and YYSTACKSIZE give the old and new number of
431 elements in the stack, and YYPTR gives the new location of the
432 stack. Advance YYPTR to a properly aligned location for the next
434 # define YYSTACK_RELOCATE(Stack) \
437 YYSIZE_T yynewbytes; \
438 YYCOPY (&yyptr->Stack, Stack, yysize); \
439 Stack = &yyptr->Stack; \
440 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
441 yyptr += yynewbytes / sizeof (*yyptr); \
447 /* YYFINAL -- State number of the termination state. */
449 /* YYLAST -- Last index in YYTABLE. */
452 /* YYNTOKENS -- Number of terminals. */
454 /* YYNNTS -- Number of nonterminals. */
456 /* YYNRULES -- Number of rules. */
458 /* YYNRULES -- Number of states. */
459 #define YYNSTATES 195
461 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
463 #define YYMAXUTOK 291
465 #define YYTRANSLATE(YYX) \
466 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
468 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
469 static const yytype_uint8 yytranslate[] =
471 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
480 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
484 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
485 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
486 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
488 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
490 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
491 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
492 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
493 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
494 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
495 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
496 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
497 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
498 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
499 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
504 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
506 static const yytype_uint16 yyprhs[] =
508 0, 0, 3, 6, 8, 11, 13, 14, 17, 20,
509 23, 26, 31, 36, 40, 42, 44, 46, 48, 50,
510 52, 54, 56, 58, 60, 62, 64, 66, 68, 70,
511 74, 77, 81, 84, 88, 91, 92, 95, 98, 101,
512 104, 107, 110, 114, 119, 124, 129, 135, 139, 140,
513 144, 145, 148, 152, 155, 157, 161, 162, 165, 168,
514 171, 174, 177, 182, 186, 189, 193, 198, 199, 202,
515 206, 208, 212, 213, 216, 219, 222, 226, 230, 234,
516 236, 240, 241, 244, 247, 250, 254, 258, 261, 264,
517 267, 268, 271, 274, 277, 282, 283, 286, 289, 292,
518 293, 296, 298, 300, 303, 306, 309, 311, 314, 315,
519 318, 320, 324, 328, 332, 335, 339, 343, 345, 347,
523 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
524 static const yytype_int8 yyrhs[] =
526 38, 0, -1, 82, 39, -1, 39, -1, 64, 40,
527 -1, 40, -1, -1, 40, 42, -1, 40, 56, -1,
528 40, 68, -1, 40, 81, -1, 40, 27, 1, 32,
529 -1, 40, 41, 1, 32, -1, 40, 1, 32, -1,
530 16, -1, 18, -1, 19, -1, 21, -1, 17, -1,
531 22, -1, 20, -1, 23, -1, 26, -1, 32, -1,
532 62, -1, 72, -1, 45, -1, 47, -1, 70, -1,
533 27, 1, 32, -1, 1, 32, -1, 10, 27, 32,
534 -1, 44, 48, -1, 11, 27, 32, -1, 46, 48,
535 -1, -1, 48, 49, -1, 48, 50, -1, 48, 76,
536 -1, 48, 74, -1, 48, 43, -1, 48, 32, -1,
537 19, 79, 32, -1, 18, 80, 83, 32, -1, 20,
538 84, 83, 32, -1, 21, 27, 83, 32, -1, 22,
539 85, 85, 83, 32, -1, 24, 51, 32, -1, -1,
540 51, 27, 52, -1, -1, 35, 80, -1, 7, 86,
541 32, -1, 53, 57, -1, 81, -1, 54, 59, 55,
542 -1, -1, 57, 58, -1, 57, 76, -1, 57, 74,
543 -1, 57, 32, -1, 57, 43, -1, 18, 80, 83,
544 32, -1, 19, 79, 32, -1, 17, 32, -1, 26,
545 83, 32, -1, 20, 27, 83, 32, -1, -1, 59,
546 42, -1, 14, 84, 82, -1, 81, -1, 60, 63,
547 61, -1, -1, 63, 42, -1, 63, 68, -1, 63,
548 56, -1, 3, 80, 82, -1, 4, 80, 32, -1,
549 65, 77, 75, -1, 81, -1, 66, 69, 67, -1,
550 -1, 69, 42, -1, 69, 68, -1, 69, 56, -1,
551 6, 80, 32, -1, 9, 80, 32, -1, 71, 75,
552 -1, 12, 32, -1, 73, 13, -1, -1, 75, 76,
553 -1, 75, 32, -1, 75, 43, -1, 16, 25, 84,
554 32, -1, -1, 77, 78, -1, 77, 32, -1, 23,
555 83, -1, -1, 80, 83, -1, 27, -1, 28, -1,
556 5, 32, -1, 8, 32, -1, 15, 32, -1, 32,
557 -1, 82, 32, -1, -1, 14, 84, -1, 85, -1,
558 85, 35, 85, -1, 85, 29, 85, -1, 31, 84,
559 30, -1, 36, 84, -1, 84, 33, 84, -1, 84,
560 34, 84, -1, 27, -1, 28, -1, -1, 27, -1
563 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
564 static const yytype_uint16 yyrline[] =
566 0, 104, 104, 104, 106, 106, 108, 110, 111, 112,
567 113, 114, 115, 119, 123, 123, 123, 123, 123, 123,
568 123, 123, 123, 127, 128, 129, 130, 131, 132, 136,
569 137, 143, 151, 157, 165, 175, 177, 178, 179, 180,
570 181, 182, 185, 193, 199, 209, 215, 221, 224, 226,
571 237, 238, 243, 252, 257, 265, 268, 270, 271, 272,
572 273, 274, 277, 283, 294, 300, 305, 315, 317, 322,
573 330, 338, 341, 343, 344, 345, 350, 357, 364, 369,
574 377, 380, 382, 383, 384, 387, 395, 402, 409, 415,
575 422, 424, 425, 426, 429, 437, 439, 440, 443, 450,
576 452, 457, 458, 461, 462, 463, 467, 468, 471, 472,
577 475, 476, 477, 478, 479, 480, 481, 484, 485, 488,
582 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
583 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
584 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
585 static const char *const yytname[] =
587 "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU",
588 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
589 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
590 "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE",
591 "T_VISIBLE", "T_OPTION", "T_ON", "T_RESET", "T_WORD", "T_WORD_QUOTE",
592 "T_UNEQUAL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND",
593 "T_EQUAL", "T_NOT", "$accept", "input", "start", "stmt_list",
594 "option_name", "common_stmt", "option_error", "config_entry_start",
595 "config_stmt", "menuconfig_entry_start", "menuconfig_stmt",
596 "config_option_list", "config_option", "symbol_option",
597 "symbol_option_list", "symbol_option_arg", "choice", "choice_entry",
598 "choice_end", "choice_stmt", "choice_option_list", "choice_option",
599 "choice_block", "if_entry", "if_end", "if_stmt", "if_block",
600 "mainmenu_stmt", "menu", "menu_entry", "menu_end", "menu_stmt",
601 "menu_block", "source_stmt", "comment", "comment_stmt", "help_start",
602 "help", "depends_list", "depends", "visibility_list", "visible",
603 "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", "symbol",
609 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
611 static const yytype_uint16 yytoknum[] =
613 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
614 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
615 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
616 285, 286, 287, 288, 289, 290, 291
620 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
621 static const yytype_uint8 yyr1[] =
623 0, 37, 38, 38, 39, 39, 40, 40, 40, 40,
624 40, 40, 40, 40, 41, 41, 41, 41, 41, 41,
625 41, 41, 41, 42, 42, 42, 42, 42, 42, 43,
626 43, 44, 45, 46, 47, 48, 48, 48, 48, 48,
627 48, 48, 49, 49, 49, 49, 49, 50, 51, 51,
628 52, 52, 53, 54, 55, 56, 57, 57, 57, 57,
629 57, 57, 58, 58, 58, 58, 58, 59, 59, 60,
630 61, 62, 63, 63, 63, 63, 64, 65, 66, 67,
631 68, 69, 69, 69, 69, 70, 71, 72, 73, 74,
632 75, 75, 75, 75, 76, 77, 77, 77, 78, 79,
633 79, 80, 80, 81, 81, 81, 82, 82, 83, 83,
634 84, 84, 84, 84, 84, 84, 84, 85, 85, 86,
638 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
639 static const yytype_uint8 yyr2[] =
641 0, 2, 2, 1, 2, 1, 0, 2, 2, 2,
642 2, 4, 4, 3, 1, 1, 1, 1, 1, 1,
643 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
644 2, 3, 2, 3, 2, 0, 2, 2, 2, 2,
645 2, 2, 3, 4, 4, 4, 5, 3, 0, 3,
646 0, 2, 3, 2, 1, 3, 0, 2, 2, 2,
647 2, 2, 4, 3, 2, 3, 4, 0, 2, 3,
648 1, 3, 0, 2, 2, 2, 3, 3, 3, 1,
649 3, 0, 2, 2, 2, 3, 3, 2, 2, 2,
650 0, 2, 2, 2, 4, 0, 2, 2, 2, 0,
651 2, 1, 1, 2, 2, 2, 1, 2, 0, 2,
652 1, 3, 3, 3, 2, 3, 3, 1, 1, 0,
656 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
657 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
658 means the default is an error. */
659 static const yytype_uint8 yydefact[] =
661 6, 0, 106, 0, 3, 0, 6, 6, 101, 102,
662 0, 1, 0, 0, 0, 0, 119, 0, 0, 0,
663 0, 0, 0, 14, 18, 15, 16, 20, 17, 19,
664 21, 22, 0, 23, 0, 7, 35, 26, 35, 27,
665 56, 67, 8, 72, 24, 95, 81, 9, 28, 90,
666 25, 10, 0, 107, 2, 76, 13, 0, 103, 0,
667 120, 0, 104, 0, 0, 0, 117, 118, 0, 0,
668 0, 110, 105, 0, 0, 0, 0, 0, 0, 0,
669 90, 0, 0, 77, 85, 52, 86, 31, 33, 0,
670 114, 0, 0, 69, 0, 0, 11, 12, 0, 0,
671 0, 0, 99, 0, 0, 0, 48, 0, 41, 40,
672 36, 37, 0, 39, 38, 0, 0, 99, 0, 108,
673 60, 61, 57, 59, 58, 68, 55, 54, 73, 75,
674 71, 74, 70, 108, 97, 0, 96, 82, 84, 80,
675 83, 79, 92, 93, 91, 113, 115, 116, 112, 111,
676 30, 88, 0, 108, 0, 108, 108, 108, 0, 0,
677 0, 89, 64, 108, 0, 108, 0, 0, 98, 0,
678 0, 42, 100, 0, 0, 108, 50, 47, 29, 0,
679 63, 0, 109, 65, 94, 43, 44, 45, 0, 0,
683 /* YYDEFGOTO[NTERM-NUM]. */
684 static const yytype_int16 yydefgoto[] =
686 -1, 3, 4, 5, 34, 35, 109, 36, 37, 38,
687 39, 75, 110, 111, 159, 190, 40, 41, 126, 42,
688 77, 122, 78, 43, 130, 44, 79, 6, 45, 46,
689 139, 47, 81, 48, 49, 50, 112, 113, 82, 114,
690 80, 136, 154, 155, 51, 7, 167, 70, 71, 61
693 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
695 #define YYPACT_NINF -127
696 static const yytype_int16 yypact[] =
698 6, 16, -127, 10, -127, 160, -127, 13, -127, -127,
699 -14, -127, -10, 16, 25, 16, 21, 35, 16, 44,
700 61, -8, 62, -127, -127, -127, -127, -127, -127, -127,
701 -127, -127, 100, -127, 126, -127, -127, -127, -127, -127,
702 -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
703 -127, -127, 189, -127, -127, 98, -127, 101, -127, 112,
704 -127, 124, -127, 127, 130, 140, -127, -127, -8, -8,
705 0, 17, -127, 141, 152, 102, 131, 64, 45, 261,
706 3, 261, 218, -127, -127, -127, -127, -127, -127, 28,
707 -127, -8, -8, 98, 70, 70, -127, -127, 153, 159,
708 176, 16, 16, -8, 175, 70, -127, 212, -127, -127,
709 -127, -127, 201, -127, -127, 185, 16, 16, 193, 216,
710 -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
711 -127, -127, -127, 216, -127, 247, -127, -127, -127, -127,
712 -127, -127, -127, -127, -127, -127, 197, -127, -127, -127,
713 -127, -127, -8, 216, 210, 216, 7, 216, 70, 15,
714 211, -127, -127, 216, 214, 216, -8, 227, -127, 248,
715 228, -127, -127, 232, 241, 216, 242, -127, -127, 246,
716 -127, 252, 71, -127, -127, -127, -127, -127, 254, 16,
717 -127, -127, -127, -127, -127
720 /* YYPGOTO[NTERM-NUM]. */
721 static const yytype_int16 yypgoto[] =
723 -127, -127, 280, 282, -127, 8, -71, -127, -127, -127,
724 -127, 251, -127, -127, -127, -127, -127, -127, -127, 168,
725 -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
726 -127, 204, -127, -127, -127, -127, -127, 213, 215, -69,
727 -127, -127, 174, -1, 14, -7, -126, -67, -90, -127
730 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
731 positive, shift that token. If negative, reduce the rule which
732 number is the opposite. If zero, do what YYDEFACT says.
733 If YYTABLE_NINF, syntax error. */
734 #define YYTABLE_NINF -88
735 static const yytype_int16 yytable[] =
737 10, 89, 90, 55, 148, 149, 121, 168, 124, 1,
738 11, 143, 57, 144, 59, 158, 1, 63, 2, 66,
739 67, 166, 56, 68, 146, 147, 133, 170, 69, 172,
740 173, 174, 2, 91, 92, 134, 156, 179, 2, 181,
741 91, 92, 176, 8, 9, 53, 94, 177, 60, 188,
742 14, 15, 95, 17, 18, 19, 20, 58, 145, 21,
743 22, 91, 92, 93, 143, 98, 144, 62, 175, -53,
744 -53, 64, -53, -53, -53, -53, 99, 33, -53, -53,
745 100, 115, 116, 117, 118, 169, 125, 128, 65, 137,
746 119, 107, 127, 132, 72, 141, 120, 66, 67, 182,
747 153, 73, -32, 98, 91, 92, -32, -32, -32, -32,
748 -32, -32, -32, -32, 99, 163, -32, -32, 100, -32,
749 101, 102, 103, 104, 105, -32, 106, 74, -32, 107,
750 53, -34, 98, 83, 108, -34, -34, -34, -34, -34,
751 -34, -34, -34, 99, 84, -34, -34, 100, -34, 101,
752 102, 103, 104, 105, -34, 106, 85, -34, 107, 86,
753 -5, 12, 87, 108, 13, 14, 15, 16, 17, 18,
754 19, 20, 88, 96, 21, 22, 23, 24, 25, 26,
755 27, 28, 29, 30, 97, 150, 31, 32, 194, -4,
756 12, 151, 33, 13, 14, 15, 16, 17, 18, 19,
757 20, 152, 157, 21, 22, 23, 24, 25, 26, 27,
758 28, 29, 30, 160, 161, 31, 32, 162, -87, 98,
759 165, 33, -87, -87, -87, -87, -87, -87, -87, -87,
760 166, 92, -87, -87, 100, -87, -87, -87, -87, -87,
761 -87, -87, 171, 178, -87, 107, 180, 129, 98, 138,
762 142, -78, -78, -78, -78, -78, -78, -78, -78, 183,
763 185, -78, -78, 100, 186, 13, 14, 15, 16, 17,
764 18, 19, 20, 187, 107, 21, 22, 189, 191, 142,
765 184, 91, 92, 131, 192, 140, 193, 54, 52, 76,
766 123, 164, 0, 33, 0, 135
769 static const yytype_int16 yycheck[] =
771 1, 68, 69, 10, 94, 95, 77, 133, 77, 3,
772 0, 82, 13, 82, 15, 105, 3, 18, 32, 27,
773 28, 14, 32, 31, 91, 92, 23, 153, 36, 155,
774 156, 157, 32, 33, 34, 32, 103, 163, 32, 165,
775 33, 34, 27, 27, 28, 32, 29, 32, 27, 175,
776 5, 6, 35, 8, 9, 10, 11, 32, 30, 14,
777 15, 33, 34, 70, 135, 1, 135, 32, 158, 5,
778 6, 27, 8, 9, 10, 11, 12, 32, 14, 15,
779 16, 17, 18, 19, 20, 152, 78, 79, 27, 81,
780 26, 27, 78, 79, 32, 81, 32, 27, 28, 166,
781 101, 1, 0, 1, 33, 34, 4, 5, 6, 7,
782 8, 9, 10, 11, 12, 116, 14, 15, 16, 17,
783 18, 19, 20, 21, 22, 23, 24, 1, 26, 27,
784 32, 0, 1, 32, 32, 4, 5, 6, 7, 8,
785 9, 10, 11, 12, 32, 14, 15, 16, 17, 18,
786 19, 20, 21, 22, 23, 24, 32, 26, 27, 32,
787 0, 1, 32, 32, 4, 5, 6, 7, 8, 9,
788 10, 11, 32, 32, 14, 15, 16, 17, 18, 19,
789 20, 21, 22, 23, 32, 32, 26, 27, 189, 0,
790 1, 32, 32, 4, 5, 6, 7, 8, 9, 10,
791 11, 25, 27, 14, 15, 16, 17, 18, 19, 20,
792 21, 22, 23, 1, 13, 26, 27, 32, 0, 1,
793 27, 32, 4, 5, 6, 7, 8, 9, 10, 11,
794 14, 34, 14, 15, 16, 17, 18, 19, 20, 21,
795 22, 23, 32, 32, 26, 27, 32, 79, 1, 81,
796 32, 4, 5, 6, 7, 8, 9, 10, 11, 32,
797 32, 14, 15, 16, 32, 4, 5, 6, 7, 8,
798 9, 10, 11, 32, 27, 14, 15, 35, 32, 32,
799 32, 33, 34, 79, 32, 81, 32, 7, 6, 38,
800 77, 117, -1, 32, -1, 80
803 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
804 symbol of state STATE-NUM. */
805 static const yytype_uint8 yystos[] =
807 0, 3, 32, 38, 39, 40, 64, 82, 27, 28,
808 80, 0, 1, 4, 5, 6, 7, 8, 9, 10,
809 11, 14, 15, 16, 17, 18, 19, 20, 21, 22,
810 23, 26, 27, 32, 41, 42, 44, 45, 46, 47,
811 53, 54, 56, 60, 62, 65, 66, 68, 70, 71,
812 72, 81, 40, 32, 39, 82, 32, 80, 32, 80,
813 27, 86, 32, 80, 27, 27, 27, 28, 31, 36,
814 84, 85, 32, 1, 1, 48, 48, 57, 59, 63,
815 77, 69, 75, 32, 32, 32, 32, 32, 32, 84,
816 84, 33, 34, 82, 29, 35, 32, 32, 1, 12,
817 16, 18, 19, 20, 21, 22, 24, 27, 32, 43,
818 49, 50, 73, 74, 76, 17, 18, 19, 20, 26,
819 32, 43, 58, 74, 76, 42, 55, 81, 42, 56,
820 61, 68, 81, 23, 32, 75, 78, 42, 56, 67,
821 68, 81, 32, 43, 76, 30, 84, 84, 85, 85,
822 32, 32, 25, 80, 79, 80, 84, 27, 85, 51,
823 1, 13, 32, 80, 79, 27, 14, 83, 83, 84,
824 83, 32, 83, 83, 83, 85, 27, 32, 32, 83,
825 32, 83, 84, 32, 32, 32, 32, 32, 83, 35,
829 #define yyerrok (yyerrstatus = 0)
830 #define yyclearin (yychar = YYEMPTY)
834 #define YYACCEPT goto yyacceptlab
835 #define YYABORT goto yyabortlab
836 #define YYERROR goto yyerrorlab
839 /* Like YYERROR except do call yyerror. This remains here temporarily
840 to ease the transition to the new meaning of YYERROR, for GCC.
841 Once GCC version 2 has supplanted version 1, this can go. */
843 #define YYFAIL goto yyerrlab
845 #define YYRECOVERING() (!!yyerrstatus)
847 #define YYBACKUP(Token, Value) \
849 if (yychar == YYEMPTY && yylen == 1) \
853 yytoken = YYTRANSLATE (yychar); \
859 yyerror (YY_("syntax error: cannot back up")); \
866 #define YYERRCODE 256
869 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
870 If N is 0, then set CURRENT to the empty location which ends
871 the previous symbol: RHS[0] (always defined). */
873 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
874 #ifndef YYLLOC_DEFAULT
875 # define YYLLOC_DEFAULT(Current, Rhs, N) \
879 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
880 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
881 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
882 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
886 (Current).first_line = (Current).last_line = \
887 YYRHSLOC (Rhs, 0).last_line; \
888 (Current).first_column = (Current).last_column = \
889 YYRHSLOC (Rhs, 0).last_column; \
895 /* YY_LOCATION_PRINT -- Print the location on the stream.
896 This macro was not mandated originally: define only if we know
897 we won't break user code: when these are the locations we know. */
899 #ifndef YY_LOCATION_PRINT
900 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
901 # define YY_LOCATION_PRINT(File, Loc) \
902 fprintf (File, "%d.%d-%d.%d", \
903 (Loc).first_line, (Loc).first_column, \
904 (Loc).last_line, (Loc).last_column)
906 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
911 /* YYLEX -- calling `yylex' with the right arguments. */
914 # define YYLEX yylex (YYLEX_PARAM)
916 # define YYLEX yylex ()
919 /* Enable debugging if requested. */
923 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
924 # define YYFPRINTF fprintf
927 # define YYDPRINTF(Args) \
933 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
937 YYFPRINTF (stderr, "%s ", Title); \
938 yy_symbol_print (stderr, \
940 YYFPRINTF (stderr, "\n"); \
945 /*--------------------------------.
946 | Print this symbol on YYOUTPUT. |
947 `--------------------------------*/
950 #if (defined __STDC__ || defined __C99__FUNC__ \
951 || defined __cplusplus || defined _MSC_VER)
953 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
956 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
959 YYSTYPE const * const yyvaluep;
965 if (yytype < YYNTOKENS)
966 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
978 /*--------------------------------.
979 | Print this symbol on YYOUTPUT. |
980 `--------------------------------*/
982 #if (defined __STDC__ || defined __C99__FUNC__ \
983 || defined __cplusplus || defined _MSC_VER)
985 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
988 yy_symbol_print (yyoutput, yytype, yyvaluep)
991 YYSTYPE const * const yyvaluep;
994 if (yytype < YYNTOKENS)
995 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
997 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
999 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1000 YYFPRINTF (yyoutput, ")");
1003 /*------------------------------------------------------------------.
1004 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1006 `------------------------------------------------------------------*/
1008 #if (defined __STDC__ || defined __C99__FUNC__ \
1009 || defined __cplusplus || defined _MSC_VER)
1011 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1014 yy_stack_print (bottom, top)
1015 yytype_int16 *bottom;
1019 YYFPRINTF (stderr, "Stack now");
1020 for (; bottom <= top; ++bottom)
1021 YYFPRINTF (stderr, " %d", *bottom);
1022 YYFPRINTF (stderr, "\n");
1025 # define YY_STACK_PRINT(Bottom, Top) \
1028 yy_stack_print ((Bottom), (Top)); \
1032 /*------------------------------------------------.
1033 | Report that the YYRULE is going to be reduced. |
1034 `------------------------------------------------*/
1036 #if (defined __STDC__ || defined __C99__FUNC__ \
1037 || defined __cplusplus || defined _MSC_VER)
1039 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1042 yy_reduce_print (yyvsp, yyrule)
1047 int yynrhs = yyr2[yyrule];
1049 unsigned long int yylno = yyrline[yyrule];
1050 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1052 /* The symbols being reduced. */
1053 for (yyi = 0; yyi < yynrhs; yyi++)
1055 fprintf (stderr, " $%d = ", yyi + 1);
1056 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1057 &(yyvsp[(yyi + 1) - (yynrhs)])
1059 fprintf (stderr, "\n");
1063 # define YY_REDUCE_PRINT(Rule) \
1066 yy_reduce_print (yyvsp, Rule); \
1069 /* Nonzero means print parse trace. It is left uninitialized so that
1070 multiple parsers can coexist. */
1072 #else /* !YYDEBUG */
1073 # define YYDPRINTF(Args)
1074 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1075 # define YY_STACK_PRINT(Bottom, Top)
1076 # define YY_REDUCE_PRINT(Rule)
1077 #endif /* !YYDEBUG */
1080 /* YYINITDEPTH -- initial size of the parser's stacks. */
1082 # define YYINITDEPTH 200
1085 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1086 if the built-in stack extension method is used).
1088 Do not make this value too large; the results are undefined if
1089 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1090 evaluated with infinite-precision integer arithmetic. */
1093 # define YYMAXDEPTH 10000
1101 # if defined __GLIBC__ && defined _STRING_H
1102 # define yystrlen strlen
1104 /* Return the length of YYSTR. */
1105 #if (defined __STDC__ || defined __C99__FUNC__ \
1106 || defined __cplusplus || defined _MSC_VER)
1108 yystrlen (const char *yystr)
1116 for (yylen = 0; yystr[yylen]; yylen++)
1124 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1125 # define yystpcpy stpcpy
1127 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1129 #if (defined __STDC__ || defined __C99__FUNC__ \
1130 || defined __cplusplus || defined _MSC_VER)
1132 yystpcpy (char *yydest, const char *yysrc)
1135 yystpcpy (yydest, yysrc)
1141 const char *yys = yysrc;
1143 while ((*yyd++ = *yys++) != '\0')
1152 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1153 quotes and backslashes, so that it's suitable for yyerror. The
1154 heuristic is that double-quoting is unnecessary unless the string
1155 contains an apostrophe, a comma, or backslash (other than
1156 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1157 null, do not copy; instead, return the length of what the result
1160 yytnamerr (char *yyres, const char *yystr)
1165 char const *yyp = yystr;
1172 goto do_not_strip_quotes;
1176 goto do_not_strip_quotes;
1189 do_not_strip_quotes: ;
1193 return yystrlen (yystr);
1195 return yystpcpy (yyres, yystr) - yyres;
1199 /* Copy into YYRESULT an error message about the unexpected token
1200 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1201 including the terminating null byte. If YYRESULT is null, do not
1202 copy anything; just return the number of bytes that would be
1203 copied. As a special case, return 0 if an ordinary "syntax error"
1204 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1205 size calculation. */
1207 yysyntax_error (char *yyresult, int yystate, int yychar)
1209 int yyn = yypact[yystate];
1211 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1215 int yytype = YYTRANSLATE (yychar);
1216 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1217 YYSIZE_T yysize = yysize0;
1219 int yysize_overflow = 0;
1220 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1221 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1225 /* This is so xgettext sees the translatable formats that are
1226 constructed on the fly. */
1227 YY_("syntax error, unexpected %s");
1228 YY_("syntax error, unexpected %s, expecting %s");
1229 YY_("syntax error, unexpected %s, expecting %s or %s");
1230 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1231 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1235 static char const yyunexpected[] = "syntax error, unexpected %s";
1236 static char const yyexpecting[] = ", expecting %s";
1237 static char const yyor[] = " or %s";
1238 char yyformat[sizeof yyunexpected
1239 + sizeof yyexpecting - 1
1240 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1241 * (sizeof yyor - 1))];
1242 char const *yyprefix = yyexpecting;
1244 /* Start YYX at -YYN if negative to avoid negative indexes in
1246 int yyxbegin = yyn < 0 ? -yyn : 0;
1248 /* Stay within bounds of both yycheck and yytname. */
1249 int yychecklim = YYLAST - yyn + 1;
1250 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1253 yyarg[0] = yytname[yytype];
1254 yyfmt = yystpcpy (yyformat, yyunexpected);
1256 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1257 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1259 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1263 yyformat[sizeof yyunexpected - 1] = '\0';
1266 yyarg[yycount++] = yytname[yyx];
1267 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1268 yysize_overflow |= (yysize1 < yysize);
1270 yyfmt = yystpcpy (yyfmt, yyprefix);
1274 yyf = YY_(yyformat);
1275 yysize1 = yysize + yystrlen (yyf);
1276 yysize_overflow |= (yysize1 < yysize);
1279 if (yysize_overflow)
1280 return YYSIZE_MAXIMUM;
1284 /* Avoid sprintf, as that infringes on the user's name space.
1285 Don't have undefined behavior even if the translation
1286 produced a string with the wrong number of "%s"s. */
1287 char *yyp = yyresult;
1289 while ((*yyp = *yyf) != '\0')
1291 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1293 yyp += yytnamerr (yyp, yyarg[yyi++]);
1306 #endif /* YYERROR_VERBOSE */
1309 /*-----------------------------------------------.
1310 | Release the memory associated to this symbol. |
1311 `-----------------------------------------------*/
1314 #if (defined __STDC__ || defined __C99__FUNC__ \
1315 || defined __cplusplus || defined _MSC_VER)
1317 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1320 yydestruct (yymsg, yytype, yyvaluep)
1330 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1334 case 54: /* "choice_entry" */
1337 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1338 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
1339 if (current_menu == (yyvaluep->menu))
1344 case 60: /* "if_entry" */
1347 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1348 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
1349 if (current_menu == (yyvaluep->menu))
1354 case 66: /* "menu_entry" */
1357 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1358 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
1359 if (current_menu == (yyvaluep->menu))
1371 /* Prevent warnings from -Wmissing-prototypes. */
1373 #ifdef YYPARSE_PARAM
1374 #if defined __STDC__ || defined __cplusplus
1375 int yyparse (void *YYPARSE_PARAM);
1379 #else /* ! YYPARSE_PARAM */
1380 #if defined __STDC__ || defined __cplusplus
1385 #endif /* ! YYPARSE_PARAM */
1389 /* The look-ahead symbol. */
1392 /* The semantic value of the look-ahead symbol. */
1395 /* Number of syntax errors so far. */
1404 #ifdef YYPARSE_PARAM
1405 #if (defined __STDC__ || defined __C99__FUNC__ \
1406 || defined __cplusplus || defined _MSC_VER)
1408 yyparse (void *YYPARSE_PARAM)
1411 yyparse (YYPARSE_PARAM)
1412 void *YYPARSE_PARAM;
1414 #else /* ! YYPARSE_PARAM */
1415 #if (defined __STDC__ || defined __C99__FUNC__ \
1416 || defined __cplusplus || defined _MSC_VER)
1430 /* Number of tokens to shift before error messages enabled. */
1432 /* Look-ahead token as an internal (translated) token number. */
1435 /* Buffer for error messages, and its allocated size. */
1437 char *yymsg = yymsgbuf;
1438 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1441 /* Three stacks and their tools:
1442 `yyss': related to states,
1443 `yyvs': related to semantic values,
1444 `yyls': related to locations.
1446 Refer to the stacks thru separate pointers, to allow yyoverflow
1447 to reallocate them elsewhere. */
1449 /* The state stack. */
1450 yytype_int16 yyssa[YYINITDEPTH];
1451 yytype_int16 *yyss = yyssa;
1452 yytype_int16 *yyssp;
1454 /* The semantic value stack. */
1455 YYSTYPE yyvsa[YYINITDEPTH];
1456 YYSTYPE *yyvs = yyvsa;
1461 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1463 YYSIZE_T yystacksize = YYINITDEPTH;
1465 /* The variables used to return semantic value and location from the
1470 /* The number of symbols on the RHS of the reduced rule.
1471 Keep to zero when no symbol should be popped. */
1474 YYDPRINTF ((stderr, "Starting parse\n"));
1479 yychar = YYEMPTY; /* Cause a token to be read. */
1481 /* Initialize stack pointers.
1482 Waste one element of value and location stack
1483 so that they stay on the same level as the state stack.
1484 The wasted elements are never initialized. */
1491 /*------------------------------------------------------------.
1492 | yynewstate -- Push a new state, which is found in yystate. |
1493 `------------------------------------------------------------*/
1495 /* In all cases, when you get here, the value and location stacks
1496 have just been pushed. So pushing a state here evens the stacks. */
1502 if (yyss + yystacksize - 1 <= yyssp)
1504 /* Get the current used size of the three stacks, in elements. */
1505 YYSIZE_T yysize = yyssp - yyss + 1;
1509 /* Give user a chance to reallocate the stack. Use copies of
1510 these so that the &'s don't force the real ones into
1512 YYSTYPE *yyvs1 = yyvs;
1513 yytype_int16 *yyss1 = yyss;
1516 /* Each stack pointer address is followed by the size of the
1517 data in use in that stack, in bytes. This used to be a
1518 conditional around just the two extra args, but that might
1519 be undefined if yyoverflow is a macro. */
1520 yyoverflow (YY_("memory exhausted"),
1521 &yyss1, yysize * sizeof (*yyssp),
1522 &yyvs1, yysize * sizeof (*yyvsp),
1529 #else /* no yyoverflow */
1530 # ifndef YYSTACK_RELOCATE
1531 goto yyexhaustedlab;
1533 /* Extend the stack our own way. */
1534 if (YYMAXDEPTH <= yystacksize)
1535 goto yyexhaustedlab;
1537 if (YYMAXDEPTH < yystacksize)
1538 yystacksize = YYMAXDEPTH;
1541 yytype_int16 *yyss1 = yyss;
1542 union yyalloc *yyptr =
1543 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1545 goto yyexhaustedlab;
1546 YYSTACK_RELOCATE (yyss);
1547 YYSTACK_RELOCATE (yyvs);
1549 # undef YYSTACK_RELOCATE
1551 YYSTACK_FREE (yyss1);
1554 #endif /* no yyoverflow */
1556 yyssp = yyss + yysize - 1;
1557 yyvsp = yyvs + yysize - 1;
1560 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1561 (unsigned long int) yystacksize));
1563 if (yyss + yystacksize - 1 <= yyssp)
1567 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1576 /* Do appropriate processing given the current state. Read a
1577 look-ahead token if we need one and don't already have one. */
1579 /* First try to decide what to do without reference to look-ahead token. */
1580 yyn = yypact[yystate];
1581 if (yyn == YYPACT_NINF)
1584 /* Not known => get a look-ahead token if don't already have one. */
1586 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1587 if (yychar == YYEMPTY)
1589 YYDPRINTF ((stderr, "Reading a token: "));
1593 if (yychar <= YYEOF)
1595 yychar = yytoken = YYEOF;
1596 YYDPRINTF ((stderr, "Now at end of input.\n"));
1600 yytoken = YYTRANSLATE (yychar);
1601 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1604 /* If the proper action on seeing token YYTOKEN is to reduce or to
1605 detect an error, take that action. */
1607 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1612 if (yyn == 0 || yyn == YYTABLE_NINF)
1621 /* Count tokens shifted since error; after three, turn off error
1626 /* Shift the look-ahead token. */
1627 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1629 /* Discard the shifted token unless it is eof. */
1630 if (yychar != YYEOF)
1639 /*-----------------------------------------------------------.
1640 | yydefault -- do the default action for the current state. |
1641 `-----------------------------------------------------------*/
1643 yyn = yydefact[yystate];
1649 /*-----------------------------.
1650 | yyreduce -- Do a reduction. |
1651 `-----------------------------*/
1653 /* yyn is the number of a rule to reduce with. */
1656 /* If YYLEN is nonzero, implement the default value of the action:
1659 Otherwise, the following line sets YYVAL to garbage.
1660 This behavior is undocumented and Bison
1661 users should not rely upon it. Assigning to YYVAL
1662 unconditionally makes the parser a bit smaller, and it avoids a
1663 GCC warning that YYVAL may be used uninitialized. */
1664 yyval = yyvsp[1-yylen];
1667 YY_REDUCE_PRINT (yyn);
1672 { zconf_error("unexpected end statement"); ;}
1677 { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); ;}
1683 zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name);
1689 { zconf_error("invalid statement"); ;}
1694 { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;}
1699 { zconf_error("invalid option"); ;}
1705 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
1706 sym->flags |= SYMBOL_OPTIONAL;
1707 menu_add_entry(sym);
1708 printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
1716 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
1723 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
1724 sym->flags |= SYMBOL_OPTIONAL;
1725 menu_add_entry(sym);
1726 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
1733 if (current_entry->prompt)
1734 current_entry->prompt->type = P_MENU;
1736 zconfprint("warning: menuconfig statement without prompt");
1738 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
1745 menu_set_type((yyvsp[(1) - (3)].id)->stype);
1746 printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
1747 zconf_curname(), zconf_lineno(),
1748 (yyvsp[(1) - (3)].id)->stype);
1755 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
1756 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
1763 menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr));
1764 if ((yyvsp[(1) - (4)].id)->stype != S_UNKNOWN)
1765 menu_set_type((yyvsp[(1) - (4)].id)->stype);
1766 printd(DEBUG_PARSE, "%s:%d:default(%u)\n",
1767 zconf_curname(), zconf_lineno(),
1768 (yyvsp[(1) - (4)].id)->stype);
1775 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
1776 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
1783 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr));
1784 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
1791 const struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
1792 if (id && id->flags & TF_OPTION)
1793 menu_add_option(id->token, (yyvsp[(3) - (3)].string));
1795 zconfprint("warning: ignoring unknown option %s", (yyvsp[(2) - (3)].string));
1796 free((yyvsp[(2) - (3)].string));
1802 { (yyval.string) = NULL; ;}
1807 { (yyval.string) = (yyvsp[(2) - (2)].string); ;}
1813 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE);
1814 sym->flags |= SYMBOL_AUTO;
1815 menu_add_entry(sym);
1816 menu_add_expr(P_CHOICE, NULL, NULL);
1817 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
1824 (yyval.menu) = menu_add_menu();
1831 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) {
1833 printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
1841 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
1842 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
1849 if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) {
1850 menu_set_type((yyvsp[(1) - (3)].id)->stype);
1851 printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
1852 zconf_curname(), zconf_lineno(),
1853 (yyvsp[(1) - (3)].id)->stype);
1862 current_entry->sym->flags |= SYMBOL_OPTIONAL;
1863 printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
1870 menu_add_prop(P_RESET, NULL, NULL, (yyvsp[(2) - (3)].expr));
1877 if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) {
1878 menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
1879 printd(DEBUG_PARSE, "%s:%d:default\n",
1880 zconf_curname(), zconf_lineno());
1889 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
1890 menu_add_entry(NULL);
1891 menu_add_dep((yyvsp[(2) - (3)].expr));
1892 (yyval.menu) = menu_add_menu();
1899 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) {
1901 printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
1909 menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
1916 menu_add_entry(NULL);
1917 menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
1918 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
1925 (yyval.menu) = menu_add_menu();
1932 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) {
1934 printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
1942 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
1943 zconf_nextfile((yyvsp[(2) - (3)].string));
1950 menu_add_entry(NULL);
1951 menu_add_prompt(P_COMMENT, (yyvsp[(2) - (3)].string), NULL);
1952 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
1966 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
1974 current_entry->help = (yyvsp[(2) - (2)].string);
1981 menu_add_dep((yyvsp[(3) - (4)].expr));
1982 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
1989 menu_add_visibility((yyvsp[(2) - (2)].expr));
1996 menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr));
2002 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
2007 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
2012 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
2017 { (yyval.expr) = NULL; ;}
2022 { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;}
2027 { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;}
2032 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
2037 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
2042 { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;}
2047 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;}
2052 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
2057 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
2062 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;}
2067 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); ;}
2072 { (yyval.string) = NULL; ;}
2076 /* Line 1267 of yacc.c. */
2080 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2084 YY_STACK_PRINT (yyss, yyssp);
2089 /* Now `shift' the result of the reduction. Determine what state
2090 that goes to, based on the state we popped back to and the rule
2091 number reduced by. */
2095 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2096 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2097 yystate = yytable[yystate];
2099 yystate = yydefgoto[yyn - YYNTOKENS];
2104 /*------------------------------------.
2105 | yyerrlab -- here on detecting error |
2106 `------------------------------------*/
2108 /* If not already recovering from an error, report this error. */
2112 #if ! YYERROR_VERBOSE
2113 yyerror (YY_("syntax error"));
2116 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2117 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2119 YYSIZE_T yyalloc = 2 * yysize;
2120 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2121 yyalloc = YYSTACK_ALLOC_MAXIMUM;
2122 if (yymsg != yymsgbuf)
2123 YYSTACK_FREE (yymsg);
2124 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2126 yymsg_alloc = yyalloc;
2130 yymsg_alloc = sizeof yymsgbuf;
2134 if (0 < yysize && yysize <= yymsg_alloc)
2136 (void) yysyntax_error (yymsg, yystate, yychar);
2141 yyerror (YY_("syntax error"));
2143 goto yyexhaustedlab;
2151 if (yyerrstatus == 3)
2153 /* If just tried and failed to reuse look-ahead token after an
2154 error, discard it. */
2156 if (yychar <= YYEOF)
2158 /* Return failure if at end of input. */
2159 if (yychar == YYEOF)
2164 yydestruct ("Error: discarding",
2170 /* Else will try to reuse look-ahead token after shifting the error
2175 /*---------------------------------------------------.
2176 | yyerrorlab -- error raised explicitly by YYERROR. |
2177 `---------------------------------------------------*/
2180 /* Pacify compilers like GCC when the user code never invokes
2181 YYERROR and the label yyerrorlab therefore never appears in user
2183 if (/*CONSTCOND*/ 0)
2186 /* Do not reclaim the symbols of the rule which action triggered
2190 YY_STACK_PRINT (yyss, yyssp);
2195 /*-------------------------------------------------------------.
2196 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2197 `-------------------------------------------------------------*/
2199 yyerrstatus = 3; /* Each real token shifted decrements this. */
2203 yyn = yypact[yystate];
2204 if (yyn != YYPACT_NINF)
2207 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2215 /* Pop the current state because it cannot handle the error token. */
2220 yydestruct ("Error: popping",
2221 yystos[yystate], yyvsp);
2224 YY_STACK_PRINT (yyss, yyssp);
2233 /* Shift the error token. */
2234 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2240 /*-------------------------------------.
2241 | yyacceptlab -- YYACCEPT comes here. |
2242 `-------------------------------------*/
2247 /*-----------------------------------.
2248 | yyabortlab -- YYABORT comes here. |
2249 `-----------------------------------*/
2255 /*-------------------------------------------------.
2256 | yyexhaustedlab -- memory exhaustion comes here. |
2257 `-------------------------------------------------*/
2259 yyerror (YY_("memory exhausted"));
2265 if (yychar != YYEOF && yychar != YYEMPTY)
2266 yydestruct ("Cleanup: discarding lookahead",
2268 /* Do not reclaim the symbols of the rule which action triggered
2269 this YYABORT or YYACCEPT. */
2271 YY_STACK_PRINT (yyss, yyssp);
2272 while (yyssp != yyss)
2274 yydestruct ("Cleanup: popping",
2275 yystos[*yyssp], yyvsp);
2280 YYSTACK_FREE (yyss);
2283 if (yymsg != yymsgbuf)
2284 YYSTACK_FREE (yymsg);
2286 /* Make sure YYID is used. */
2287 return YYID (yyresult);
2294 void conf_parse(const char *name)
2299 zconf_initscan(name);
2303 modules_sym = sym_lookup(NULL, 0);
2304 modules_sym->type = S_BOOLEAN;
2305 modules_sym->flags |= SYMBOL_AUTO;
2306 rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
2309 if (getenv("ZCONF_DEBUG"))
2315 if (!modules_sym->prop) {
2316 struct property *prop;
2318 prop = prop_alloc(P_DEFAULT, modules_sym);
2319 prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
2322 rootmenu.prompt->text = _(rootmenu.prompt->text);
2323 rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);
2325 menu_finalize(&rootmenu);
2326 for_all_symbols(i, sym) {
2327 if (sym_check_deps(sym))
2332 sym_set_change_count(1);
2335 static const char *zconf_tokenname(int token)
2338 case T_MENU: return "menu";
2339 case T_ENDMENU: return "endmenu";
2340 case T_CHOICE: return "choice";
2341 case T_ENDCHOICE: return "endchoice";
2342 case T_IF: return "if";
2343 case T_ENDIF: return "endif";
2344 case T_DEPENDS: return "depends";
2345 case T_VISIBLE: return "visible";
2350 static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken)
2352 if (id->token != endtoken) {
2353 zconf_error("unexpected '%s' within %s block",
2354 kconf_id_strings + id->name, zconf_tokenname(starttoken));
2358 if (current_menu->file != current_file) {
2359 zconf_error("'%s' in different file than '%s'",
2360 kconf_id_strings + id->name, zconf_tokenname(starttoken));
2361 fprintf(stderr, "%s:%d: location of the '%s'\n",
2362 current_menu->file->name, current_menu->lineno,
2363 zconf_tokenname(starttoken));
2370 static void zconfprint(const char *err, ...)
2374 fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno());
2376 vfprintf(stderr, err, ap);
2378 fprintf(stderr, "\n");
2381 static void zconf_error(const char *err, ...)
2386 fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno());
2388 vfprintf(stderr, err, ap);
2390 fprintf(stderr, "\n");
2393 static void zconferror(const char *err)
2395 fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
2398 static void print_quoted_string(FILE *out, const char *str)
2404 while ((p = strchr(str, '"'))) {
2407 fprintf(out, "%.*s", len, str);
2415 static void print_symbol(FILE *out, struct menu *menu)
2417 struct symbol *sym = menu->sym;
2418 struct property *prop;
2420 if (sym_is_choice(sym))
2421 fprintf(out, "\nchoice\n");
2423 fprintf(out, "\nconfig %s\n", sym->name);
2424 switch (sym->type) {
2426 fputs(" boolean\n", out);
2429 fputs(" tristate\n", out);
2432 fputs(" string\n", out);
2435 fputs(" integer\n", out);
2438 fputs(" hex\n", out);
2441 fputs(" ???\n", out);
2444 for (prop = sym->prop; prop; prop = prop->next) {
2445 if (prop->menu != menu)
2447 switch (prop->type) {
2449 fputs(" prompt ", out);
2450 print_quoted_string(out, prop->text);
2451 if (!expr_is_yes(prop->visible.expr)) {
2453 expr_fprint(prop->visible.expr, out);
2458 fputs( " default ", out);
2459 expr_fprint(prop->expr, out);
2460 if (!expr_is_yes(prop->visible.expr)) {
2462 expr_fprint(prop->visible.expr, out);
2467 fputs(" #choice value\n", out);
2470 fputs( " select ", out);
2471 expr_fprint(prop->expr, out);
2475 fputs( " range ", out);
2476 expr_fprint(prop->expr, out);
2480 fputs( " menu ", out);
2481 print_quoted_string(out, prop->text);
2485 fprintf(out, " unknown prop %d!\n", prop->type);
2490 int len = strlen(menu->help);
2491 while (menu->help[--len] == '\n')
2492 menu->help[len] = 0;
2493 fprintf(out, " help\n%s\n", menu->help);
2497 void zconfdump(FILE *out)
2499 struct property *prop;
2503 menu = rootmenu.list;
2505 if ((sym = menu->sym))
2506 print_symbol(out, menu);
2507 else if ((prop = menu->prompt)) {
2508 switch (prop->type) {
2510 fputs("\ncomment ", out);
2511 print_quoted_string(out, prop->text);
2515 fputs("\nmenu ", out);
2516 print_quoted_string(out, prop->text);
2522 if (!expr_is_yes(prop->visible.expr)) {
2523 fputs(" depends ", out);
2524 expr_fprint(prop->visible.expr, out);
2531 else if (menu->next)
2533 else while ((menu = menu->parent)) {
2534 if (menu->prompt && menu->prompt->type == P_MENU)
2535 fputs("\nendmenu\n", out);
2544 #include "zconf.lex.c"
2546 #include "confdata.c"