1.1 --- a/kconfig/zconf.tab.c Fri Oct 17 12:47:53 2008 +0000
1.2 +++ b/kconfig/zconf.tab.c Sun Sep 11 18:18:53 2011 +0200
1.3 @@ -1,24 +1,23 @@
1.4 -/* A Bison parser, made by GNU Bison 2.3. */
1.5 +
1.6 +/* A Bison parser, made by GNU Bison 2.4.1. */
1.7
1.8 /* Skeleton implementation for Bison's Yacc-like parsers in C
1.9 -
1.10 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
1.11 +
1.12 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
1.13 Free Software Foundation, Inc.
1.14 -
1.15 - This program is free software; you can redistribute it and/or modify
1.16 +
1.17 + This program is free software: you can redistribute it and/or modify
1.18 it under the terms of the GNU General Public License as published by
1.19 - the Free Software Foundation; either version 2, or (at your option)
1.20 - any later version.
1.21 -
1.22 + the Free Software Foundation, either version 3 of the License, or
1.23 + (at your option) any later version.
1.24 +
1.25 This program is distributed in the hope that it will be useful,
1.26 but WITHOUT ANY WARRANTY; without even the implied warranty of
1.27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.28 GNU General Public License for more details.
1.29 -
1.30 +
1.31 You should have received a copy of the GNU General Public License
1.32 - along with this program; if not, write to the Free Software
1.33 - Foundation, Inc., 51 Franklin Street, Fifth Floor,
1.34 - Boston, MA 02110-1301, USA. */
1.35 + along with this program. If not, see <http://www.gnu.org/licenses/>. */
1.36
1.37 /* As a special exception, you may create a larger work that contains
1.38 part or all of the Bison parser skeleton and distribute that work
1.39 @@ -29,7 +28,7 @@
1.40 special exception, which will cause the skeleton and the resulting
1.41 Bison output files to be licensed under the GNU General Public
1.42 License without this special exception.
1.43 -
1.44 +
1.45 This special exception was added by the Free Software Foundation in
1.46 version 2.2 of Bison. */
1.47
1.48 @@ -47,7 +46,7 @@
1.49 #define YYBISON 1
1.50
1.51 /* Bison version. */
1.52 -#define YYBISON_VERSION "2.3"
1.53 +#define YYBISON_VERSION "2.4.1"
1.54
1.55 /* Skeleton name. */
1.56 #define YYSKELETON_NAME "yacc.c"
1.57 @@ -55,17 +54,84 @@
1.58 /* Pure parsers. */
1.59 #define YYPURE 0
1.60
1.61 +/* Push parsers. */
1.62 +#define YYPUSH 0
1.63 +
1.64 +/* Pull parsers. */
1.65 +#define YYPULL 1
1.66 +
1.67 /* Using locations. */
1.68 #define YYLSP_NEEDED 0
1.69
1.70 /* Substitute the variable and function names. */
1.71 -#define yyparse zconfparse
1.72 -#define yylex zconflex
1.73 -#define yyerror zconferror
1.74 -#define yylval zconflval
1.75 -#define yychar zconfchar
1.76 -#define yydebug zconfdebug
1.77 -#define yynerrs zconfnerrs
1.78 +#define yyparse zconfparse
1.79 +#define yylex zconflex
1.80 +#define yyerror zconferror
1.81 +#define yylval zconflval
1.82 +#define yychar zconfchar
1.83 +#define yydebug zconfdebug
1.84 +#define yynerrs zconfnerrs
1.85 +
1.86 +
1.87 +/* Copy the first part of user declarations. */
1.88 +
1.89 +
1.90 +/*
1.91 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
1.92 + * Released under the terms of the GNU GPL v2.0.
1.93 + */
1.94 +
1.95 +#include <ctype.h>
1.96 +#include <stdarg.h>
1.97 +#include <stdio.h>
1.98 +#include <stdlib.h>
1.99 +#include <string.h>
1.100 +#include <stdbool.h>
1.101 +
1.102 +#define LKC_DIRECT_LINK
1.103 +#include "lkc.h"
1.104 +
1.105 +#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
1.106 +
1.107 +#define PRINTD 0x0001
1.108 +#define DEBUG_PARSE 0x0002
1.109 +
1.110 +int cdebug = PRINTD;
1.111 +
1.112 +extern int zconflex(void);
1.113 +static void zconfprint(const char *err, ...);
1.114 +static void zconf_error(const char *err, ...);
1.115 +static void zconferror(const char *err);
1.116 +static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
1.117 +
1.118 +struct symbol *symbol_hash[SYMBOL_HASHSIZE];
1.119 +
1.120 +static struct menu *current_menu, *current_entry;
1.121 +
1.122 +#define YYDEBUG 0
1.123 +#if YYDEBUG
1.124 +#define YYERROR_VERBOSE
1.125 +#endif
1.126 +
1.127 +
1.128 +
1.129 +/* Enabling traces. */
1.130 +#ifndef YYDEBUG
1.131 +# define YYDEBUG 0
1.132 +#endif
1.133 +
1.134 +/* Enabling verbose error messages. */
1.135 +#ifdef YYERROR_VERBOSE
1.136 +# undef YYERROR_VERBOSE
1.137 +# define YYERROR_VERBOSE 1
1.138 +#else
1.139 +# define YYERROR_VERBOSE 0
1.140 +#endif
1.141 +
1.142 +/* Enabling the token table. */
1.143 +#ifndef YYTOKEN_TABLE
1.144 +# define YYTOKEN_TABLE 0
1.145 +#endif
1.146
1.147
1.148 /* Tokens. */
1.149 @@ -94,143 +160,51 @@
1.150 T_DEFAULT = 275,
1.151 T_SELECT = 276,
1.152 T_RANGE = 277,
1.153 - T_OPTION = 278,
1.154 - T_ON = 279,
1.155 - T_WORD = 280,
1.156 - T_WORD_QUOTE = 281,
1.157 - T_UNEQUAL = 282,
1.158 - T_CLOSE_PAREN = 283,
1.159 - T_OPEN_PAREN = 284,
1.160 - T_EOL = 285,
1.161 - T_OR = 286,
1.162 - T_AND = 287,
1.163 - T_EQUAL = 288,
1.164 - T_NOT = 289
1.165 + T_VISIBLE = 278,
1.166 + T_OPTION = 279,
1.167 + T_ON = 280,
1.168 + T_WORD = 281,
1.169 + T_WORD_QUOTE = 282,
1.170 + T_UNEQUAL = 283,
1.171 + T_CLOSE_PAREN = 284,
1.172 + T_OPEN_PAREN = 285,
1.173 + T_EOL = 286,
1.174 + T_OR = 287,
1.175 + T_AND = 288,
1.176 + T_EQUAL = 289,
1.177 + T_NOT = 290
1.178 };
1.179 #endif
1.180 -/* Tokens. */
1.181 -#define T_MAINMENU 258
1.182 -#define T_MENU 259
1.183 -#define T_ENDMENU 260
1.184 -#define T_SOURCE 261
1.185 -#define T_CHOICE 262
1.186 -#define T_ENDCHOICE 263
1.187 -#define T_COMMENT 264
1.188 -#define T_CONFIG 265
1.189 -#define T_MENUCONFIG 266
1.190 -#define T_HELP 267
1.191 -#define T_HELPTEXT 268
1.192 -#define T_IF 269
1.193 -#define T_ENDIF 270
1.194 -#define T_DEPENDS 271
1.195 -#define T_OPTIONAL 272
1.196 -#define T_PROMPT 273
1.197 -#define T_TYPE 274
1.198 -#define T_DEFAULT 275
1.199 -#define T_SELECT 276
1.200 -#define T_RANGE 277
1.201 -#define T_OPTION 278
1.202 -#define T_ON 279
1.203 -#define T_WORD 280
1.204 -#define T_WORD_QUOTE 281
1.205 -#define T_UNEQUAL 282
1.206 -#define T_CLOSE_PAREN 283
1.207 -#define T_OPEN_PAREN 284
1.208 -#define T_EOL 285
1.209 -#define T_OR 286
1.210 -#define T_AND 287
1.211 -#define T_EQUAL 288
1.212 -#define T_NOT 289
1.213
1.214
1.215
1.216 -
1.217 -/* Copy the first part of user declarations. */
1.218 -
1.219 -
1.220 -/*
1.221 - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
1.222 - * Released under the terms of the GNU GPL v2.0.
1.223 - */
1.224 -
1.225 -#include <ctype.h>
1.226 -#include <stdarg.h>
1.227 -#include <stdio.h>
1.228 -#include <stdlib.h>
1.229 -#include <string.h>
1.230 -#include <stdbool.h>
1.231 -
1.232 -#define LKC_DIRECT_LINK
1.233 -#include "lkc.h"
1.234 -
1.235 -#include "zconf.hash.c"
1.236 -
1.237 -#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
1.238 -
1.239 -#define PRINTD 0x0001
1.240 -#define DEBUG_PARSE 0x0002
1.241 -
1.242 -int cdebug = PRINTD;
1.243 -
1.244 -extern int zconflex(void);
1.245 -static void zconfprint(const char *err, ...);
1.246 -static void zconf_error(const char *err, ...);
1.247 -static void zconferror(const char *err);
1.248 -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
1.249 -
1.250 -struct symbol *symbol_hash[257];
1.251 -
1.252 -static struct menu *current_menu, *current_entry;
1.253 -
1.254 -#define YYDEBUG 0
1.255 -#if YYDEBUG
1.256 -#define YYERROR_VERBOSE
1.257 -#endif
1.258 -
1.259 -
1.260 -/* Enabling traces. */
1.261 -#ifndef YYDEBUG
1.262 -# define YYDEBUG 0
1.263 -#endif
1.264 -
1.265 -/* Enabling verbose error messages. */
1.266 -#ifdef YYERROR_VERBOSE
1.267 -# undef YYERROR_VERBOSE
1.268 -# define YYERROR_VERBOSE 1
1.269 -#else
1.270 -# define YYERROR_VERBOSE 0
1.271 -#endif
1.272 -
1.273 -/* Enabling the token table. */
1.274 -#ifndef YYTOKEN_TABLE
1.275 -# define YYTOKEN_TABLE 0
1.276 -#endif
1.277 -
1.278 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1.279 typedef union YYSTYPE
1.280 +{
1.281
1.282 -{
1.283 +
1.284 char *string;
1.285 struct file *file;
1.286 struct symbol *symbol;
1.287 struct expr *expr;
1.288 struct menu *menu;
1.289 struct kconf_id *id;
1.290 -}
1.291 -/* Line 187 of yacc.c. */
1.292
1.293 - YYSTYPE;
1.294 +
1.295 +
1.296 +} YYSTYPE;
1.297 +# define YYSTYPE_IS_TRIVIAL 1
1.298 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
1.299 # define YYSTYPE_IS_DECLARED 1
1.300 -# define YYSTYPE_IS_TRIVIAL 1
1.301 #endif
1.302
1.303
1.304 -
1.305 /* Copy the second part of user declarations. */
1.306
1.307
1.308 -/* Line 216 of yacc.c. */
1.309 +/* Include zconf.hash.c here so it can see the token constants. */
1.310 +#include "zconf.hash.c"
1.311 +
1.312
1.313
1.314 #ifdef short
1.315 @@ -306,14 +280,14 @@
1.316 #if (defined __STDC__ || defined __C99__FUNC__ \
1.317 || defined __cplusplus || defined _MSC_VER)
1.318 static int
1.319 -YYID (int i)
1.320 +YYID (int yyi)
1.321 #else
1.322 static int
1.323 -YYID (i)
1.324 - int i;
1.325 +YYID (yyi)
1.326 + int yyi;
1.327 #endif
1.328 {
1.329 - return i;
1.330 + return yyi;
1.331 }
1.332 #endif
1.333
1.334 @@ -394,9 +368,9 @@
1.335 /* A type that is properly aligned for any stack member. */
1.336 union yyalloc
1.337 {
1.338 - yytype_int16 yyss;
1.339 - YYSTYPE yyvs;
1.340 - };
1.341 + yytype_int16 yyss_alloc;
1.342 + YYSTYPE yyvs_alloc;
1.343 +};
1.344
1.345 /* The size of the maximum gap between one aligned stack and the next. */
1.346 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1.347 @@ -430,12 +404,12 @@
1.348 elements in the stack, and YYPTR gives the new location of the
1.349 stack. Advance YYPTR to a properly aligned location for the next
1.350 stack. */
1.351 -# define YYSTACK_RELOCATE(Stack) \
1.352 +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1.353 do \
1.354 { \
1.355 YYSIZE_T yynewbytes; \
1.356 - YYCOPY (&yyptr->Stack, Stack, yysize); \
1.357 - Stack = &yyptr->Stack; \
1.358 + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1.359 + Stack = &yyptr->Stack_alloc; \
1.360 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1.361 yyptr += yynewbytes / sizeof (*yyptr); \
1.362 } \
1.363 @@ -444,22 +418,22 @@
1.364 #endif
1.365
1.366 /* YYFINAL -- State number of the termination state. */
1.367 -#define YYFINAL 3
1.368 +#define YYFINAL 11
1.369 /* YYLAST -- Last index in YYTABLE. */
1.370 -#define YYLAST 259
1.371 +#define YYLAST 290
1.372
1.373 /* YYNTOKENS -- Number of terminals. */
1.374 -#define YYNTOKENS 35
1.375 +#define YYNTOKENS 36
1.376 /* YYNNTS -- Number of nonterminals. */
1.377 -#define YYNNTS 46
1.378 +#define YYNNTS 50
1.379 /* YYNRULES -- Number of rules. */
1.380 -#define YYNRULES 110
1.381 +#define YYNRULES 118
1.382 /* YYNRULES -- Number of states. */
1.383 -#define YYNSTATES 180
1.384 +#define YYNSTATES 191
1.385
1.386 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1.387 #define YYUNDEFTOK 2
1.388 -#define YYMAXUTOK 289
1.389 +#define YYMAXUTOK 290
1.390
1.391 #define YYTRANSLATE(YYX) \
1.392 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1.393 @@ -495,7 +469,8 @@
1.394 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1.395 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1.396 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1.397 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34
1.398 + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1.399 + 35
1.400 };
1.401
1.402 #if YYDEBUG
1.403 @@ -503,73 +478,75 @@
1.404 YYRHS. */
1.405 static const yytype_uint16 yyprhs[] =
1.406 {
1.407 - 0, 0, 3, 5, 6, 9, 12, 15, 20, 23,
1.408 - 28, 33, 37, 39, 41, 43, 45, 47, 49, 51,
1.409 - 53, 55, 57, 59, 61, 63, 67, 70, 74, 77,
1.410 - 81, 84, 85, 88, 91, 94, 97, 100, 103, 107,
1.411 - 112, 117, 122, 128, 132, 133, 137, 138, 141, 145,
1.412 - 148, 150, 154, 155, 158, 161, 164, 167, 170, 175,
1.413 - 179, 182, 187, 188, 191, 195, 197, 201, 202, 205,
1.414 - 208, 211, 215, 218, 220, 224, 225, 228, 231, 234,
1.415 - 238, 242, 245, 248, 251, 252, 255, 258, 261, 266,
1.416 - 267, 270, 272, 274, 277, 280, 283, 285, 288, 289,
1.417 - 292, 294, 298, 302, 306, 309, 313, 317, 319, 321,
1.418 - 322
1.419 + 0, 0, 3, 6, 8, 11, 13, 14, 17, 20,
1.420 + 23, 26, 31, 36, 40, 42, 44, 46, 48, 50,
1.421 + 52, 54, 56, 58, 60, 62, 64, 66, 68, 72,
1.422 + 75, 79, 82, 86, 89, 90, 93, 96, 99, 102,
1.423 + 105, 108, 112, 117, 122, 127, 133, 137, 138, 142,
1.424 + 143, 146, 150, 153, 155, 159, 160, 163, 166, 169,
1.425 + 172, 175, 180, 184, 187, 192, 193, 196, 200, 202,
1.426 + 206, 207, 210, 213, 216, 220, 224, 228, 230, 234,
1.427 + 235, 238, 241, 244, 248, 252, 255, 258, 261, 262,
1.428 + 265, 268, 271, 276, 277, 280, 283, 286, 287, 290,
1.429 + 292, 294, 297, 300, 303, 305, 308, 309, 312, 314,
1.430 + 318, 322, 326, 329, 333, 337, 339, 341, 342
1.431 };
1.432
1.433 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1.434 static const yytype_int8 yyrhs[] =
1.435 {
1.436 - 36, 0, -1, 37, -1, -1, 37, 39, -1, 37,
1.437 - 53, -1, 37, 64, -1, 37, 3, 74, 76, -1,
1.438 - 37, 75, -1, 37, 25, 1, 30, -1, 37, 38,
1.439 - 1, 30, -1, 37, 1, 30, -1, 16, -1, 18,
1.440 - -1, 19, -1, 21, -1, 17, -1, 22, -1, 20,
1.441 - -1, 30, -1, 59, -1, 68, -1, 42, -1, 44,
1.442 - -1, 66, -1, 25, 1, 30, -1, 1, 30, -1,
1.443 - 10, 25, 30, -1, 41, 45, -1, 11, 25, 30,
1.444 - -1, 43, 45, -1, -1, 45, 46, -1, 45, 47,
1.445 - -1, 45, 72, -1, 45, 70, -1, 45, 40, -1,
1.446 - 45, 30, -1, 19, 73, 30, -1, 18, 74, 77,
1.447 - 30, -1, 20, 78, 77, 30, -1, 21, 25, 77,
1.448 - 30, -1, 22, 79, 79, 77, 30, -1, 23, 48,
1.449 - 30, -1, -1, 48, 25, 49, -1, -1, 33, 74,
1.450 - -1, 7, 80, 30, -1, 50, 54, -1, 75, -1,
1.451 - 51, 56, 52, -1, -1, 54, 55, -1, 54, 72,
1.452 - -1, 54, 70, -1, 54, 30, -1, 54, 40, -1,
1.453 - 18, 74, 77, 30, -1, 19, 73, 30, -1, 17,
1.454 - 30, -1, 20, 25, 77, 30, -1, -1, 56, 39,
1.455 - -1, 14, 78, 76, -1, 75, -1, 57, 60, 58,
1.456 - -1, -1, 60, 39, -1, 60, 64, -1, 60, 53,
1.457 - -1, 4, 74, 30, -1, 61, 71, -1, 75, -1,
1.458 - 62, 65, 63, -1, -1, 65, 39, -1, 65, 64,
1.459 - -1, 65, 53, -1, 6, 74, 30, -1, 9, 74,
1.460 - 30, -1, 67, 71, -1, 12, 30, -1, 69, 13,
1.461 - -1, -1, 71, 72, -1, 71, 30, -1, 71, 40,
1.462 - -1, 16, 24, 78, 30, -1, -1, 74, 77, -1,
1.463 - 25, -1, 26, -1, 5, 30, -1, 8, 30, -1,
1.464 - 15, 30, -1, 30, -1, 76, 30, -1, -1, 14,
1.465 - 78, -1, 79, -1, 79, 33, 79, -1, 79, 27,
1.466 - 79, -1, 29, 78, 28, -1, 34, 78, -1, 78,
1.467 - 31, 78, -1, 78, 32, 78, -1, 25, -1, 26,
1.468 - -1, -1, 25, -1
1.469 + 37, 0, -1, 81, 38, -1, 38, -1, 63, 39,
1.470 + -1, 39, -1, -1, 39, 41, -1, 39, 55, -1,
1.471 + 39, 67, -1, 39, 80, -1, 39, 26, 1, 31,
1.472 + -1, 39, 40, 1, 31, -1, 39, 1, 31, -1,
1.473 + 16, -1, 18, -1, 19, -1, 21, -1, 17, -1,
1.474 + 22, -1, 20, -1, 23, -1, 31, -1, 61, -1,
1.475 + 71, -1, 44, -1, 46, -1, 69, -1, 26, 1,
1.476 + 31, -1, 1, 31, -1, 10, 26, 31, -1, 43,
1.477 + 47, -1, 11, 26, 31, -1, 45, 47, -1, -1,
1.478 + 47, 48, -1, 47, 49, -1, 47, 75, -1, 47,
1.479 + 73, -1, 47, 42, -1, 47, 31, -1, 19, 78,
1.480 + 31, -1, 18, 79, 82, 31, -1, 20, 83, 82,
1.481 + 31, -1, 21, 26, 82, 31, -1, 22, 84, 84,
1.482 + 82, 31, -1, 24, 50, 31, -1, -1, 50, 26,
1.483 + 51, -1, -1, 34, 79, -1, 7, 85, 31, -1,
1.484 + 52, 56, -1, 80, -1, 53, 58, 54, -1, -1,
1.485 + 56, 57, -1, 56, 75, -1, 56, 73, -1, 56,
1.486 + 31, -1, 56, 42, -1, 18, 79, 82, 31, -1,
1.487 + 19, 78, 31, -1, 17, 31, -1, 20, 26, 82,
1.488 + 31, -1, -1, 58, 41, -1, 14, 83, 81, -1,
1.489 + 80, -1, 59, 62, 60, -1, -1, 62, 41, -1,
1.490 + 62, 67, -1, 62, 55, -1, 3, 79, 81, -1,
1.491 + 4, 79, 31, -1, 64, 76, 74, -1, 80, -1,
1.492 + 65, 68, 66, -1, -1, 68, 41, -1, 68, 67,
1.493 + -1, 68, 55, -1, 6, 79, 31, -1, 9, 79,
1.494 + 31, -1, 70, 74, -1, 12, 31, -1, 72, 13,
1.495 + -1, -1, 74, 75, -1, 74, 31, -1, 74, 42,
1.496 + -1, 16, 25, 83, 31, -1, -1, 76, 77, -1,
1.497 + 76, 31, -1, 23, 82, -1, -1, 79, 82, -1,
1.498 + 26, -1, 27, -1, 5, 31, -1, 8, 31, -1,
1.499 + 15, 31, -1, 31, -1, 81, 31, -1, -1, 14,
1.500 + 83, -1, 84, -1, 84, 34, 84, -1, 84, 28,
1.501 + 84, -1, 30, 83, 29, -1, 35, 83, -1, 83,
1.502 + 32, 83, -1, 83, 33, 83, -1, 26, -1, 27,
1.503 + -1, -1, 26, -1
1.504 };
1.505
1.506 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1.507 static const yytype_uint16 yyrline[] =
1.508 {
1.509 - 0, 104, 104, 106, 108, 109, 110, 111, 112, 113,
1.510 - 114, 118, 122, 122, 122, 122, 122, 122, 122, 126,
1.511 - 127, 128, 129, 130, 131, 135, 136, 142, 150, 156,
1.512 - 164, 174, 176, 177, 178, 179, 180, 181, 184, 192,
1.513 - 198, 208, 214, 220, 223, 225, 236, 237, 242, 251,
1.514 - 256, 264, 267, 269, 270, 271, 272, 273, 276, 282,
1.515 - 293, 299, 309, 311, 316, 324, 332, 335, 337, 338,
1.516 - 339, 344, 351, 356, 364, 367, 369, 370, 371, 374,
1.517 - 382, 389, 396, 402, 409, 411, 412, 413, 416, 424,
1.518 - 426, 431, 432, 435, 436, 437, 441, 442, 445, 446,
1.519 - 449, 450, 451, 452, 453, 454, 455, 458, 459, 462,
1.520 - 463
1.521 + 0, 108, 108, 108, 110, 110, 112, 114, 115, 116,
1.522 + 117, 118, 119, 123, 127, 127, 127, 127, 127, 127,
1.523 + 127, 127, 131, 132, 133, 134, 135, 136, 140, 141,
1.524 + 147, 155, 161, 169, 179, 181, 182, 183, 184, 185,
1.525 + 186, 189, 197, 203, 213, 219, 225, 228, 230, 241,
1.526 + 242, 247, 256, 261, 269, 272, 274, 275, 276, 277,
1.527 + 278, 281, 287, 298, 304, 314, 316, 321, 329, 337,
1.528 + 340, 342, 343, 344, 349, 356, 363, 368, 376, 379,
1.529 + 381, 382, 383, 386, 394, 401, 408, 414, 421, 423,
1.530 + 424, 425, 428, 436, 438, 439, 442, 449, 451, 456,
1.531 + 457, 460, 461, 462, 466, 467, 470, 471, 474, 475,
1.532 + 476, 477, 478, 479, 480, 483, 484, 487, 488
1.533 };
1.534 #endif
1.535
1.536 @@ -582,19 +559,19 @@
1.537 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
1.538 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
1.539 "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE",
1.540 - "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL",
1.541 + "T_VISIBLE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL",
1.542 "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL",
1.543 - "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt",
1.544 - "option_error", "config_entry_start", "config_stmt",
1.545 + "T_NOT", "$accept", "input", "start", "stmt_list", "option_name",
1.546 + "common_stmt", "option_error", "config_entry_start", "config_stmt",
1.547 "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
1.548 "config_option", "symbol_option", "symbol_option_list",
1.549 "symbol_option_arg", "choice", "choice_entry", "choice_end",
1.550 "choice_stmt", "choice_option_list", "choice_option", "choice_block",
1.551 - "if_entry", "if_end", "if_stmt", "if_block", "menu", "menu_entry",
1.552 - "menu_end", "menu_stmt", "menu_block", "source_stmt", "comment",
1.553 - "comment_stmt", "help_start", "help", "depends_list", "depends",
1.554 - "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", "symbol",
1.555 - "word_opt", 0
1.556 + "if_entry", "if_end", "if_stmt", "if_block", "mainmenu_stmt", "menu",
1.557 + "menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt",
1.558 + "comment", "comment_stmt", "help_start", "help", "depends_list",
1.559 + "depends", "visibility_list", "visible", "prompt_stmt_opt", "prompt",
1.560 + "end", "nl", "if_expr", "expr", "symbol", "word_opt", 0
1.561 };
1.562 #endif
1.563
1.564 @@ -606,42 +583,42 @@
1.565 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1.566 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1.567 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1.568 - 285, 286, 287, 288, 289
1.569 + 285, 286, 287, 288, 289, 290
1.570 };
1.571 # endif
1.572
1.573 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1.574 static const yytype_uint8 yyr1[] =
1.575 {
1.576 - 0, 35, 36, 37, 37, 37, 37, 37, 37, 37,
1.577 - 37, 37, 38, 38, 38, 38, 38, 38, 38, 39,
1.578 - 39, 39, 39, 39, 39, 40, 40, 41, 42, 43,
1.579 - 44, 45, 45, 45, 45, 45, 45, 45, 46, 46,
1.580 - 46, 46, 46, 47, 48, 48, 49, 49, 50, 51,
1.581 - 52, 53, 54, 54, 54, 54, 54, 54, 55, 55,
1.582 - 55, 55, 56, 56, 57, 58, 59, 60, 60, 60,
1.583 - 60, 61, 62, 63, 64, 65, 65, 65, 65, 66,
1.584 - 67, 68, 69, 70, 71, 71, 71, 71, 72, 73,
1.585 - 73, 74, 74, 75, 75, 75, 76, 76, 77, 77,
1.586 - 78, 78, 78, 78, 78, 78, 78, 79, 79, 80,
1.587 - 80
1.588 + 0, 36, 37, 37, 38, 38, 39, 39, 39, 39,
1.589 + 39, 39, 39, 39, 40, 40, 40, 40, 40, 40,
1.590 + 40, 40, 41, 41, 41, 41, 41, 41, 42, 42,
1.591 + 43, 44, 45, 46, 47, 47, 47, 47, 47, 47,
1.592 + 47, 48, 48, 48, 48, 48, 49, 50, 50, 51,
1.593 + 51, 52, 53, 54, 55, 56, 56, 56, 56, 56,
1.594 + 56, 57, 57, 57, 57, 58, 58, 59, 60, 61,
1.595 + 62, 62, 62, 62, 63, 64, 65, 66, 67, 68,
1.596 + 68, 68, 68, 69, 70, 71, 72, 73, 74, 74,
1.597 + 74, 74, 75, 76, 76, 76, 77, 78, 78, 79,
1.598 + 79, 80, 80, 80, 81, 81, 82, 82, 83, 83,
1.599 + 83, 83, 83, 83, 83, 84, 84, 85, 85
1.600 };
1.601
1.602 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1.603 static const yytype_uint8 yyr2[] =
1.604 {
1.605 - 0, 2, 1, 0, 2, 2, 2, 4, 2, 4,
1.606 - 4, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1.607 - 1, 1, 1, 1, 1, 3, 2, 3, 2, 3,
1.608 - 2, 0, 2, 2, 2, 2, 2, 2, 3, 4,
1.609 - 4, 4, 5, 3, 0, 3, 0, 2, 3, 2,
1.610 - 1, 3, 0, 2, 2, 2, 2, 2, 4, 3,
1.611 - 2, 4, 0, 2, 3, 1, 3, 0, 2, 2,
1.612 - 2, 3, 2, 1, 3, 0, 2, 2, 2, 3,
1.613 - 3, 2, 2, 2, 0, 2, 2, 2, 4, 0,
1.614 - 2, 1, 1, 2, 2, 2, 1, 2, 0, 2,
1.615 - 1, 3, 3, 3, 2, 3, 3, 1, 1, 0,
1.616 - 1
1.617 + 0, 2, 2, 1, 2, 1, 0, 2, 2, 2,
1.618 + 2, 4, 4, 3, 1, 1, 1, 1, 1, 1,
1.619 + 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
1.620 + 3, 2, 3, 2, 0, 2, 2, 2, 2, 2,
1.621 + 2, 3, 4, 4, 4, 5, 3, 0, 3, 0,
1.622 + 2, 3, 2, 1, 3, 0, 2, 2, 2, 2,
1.623 + 2, 4, 3, 2, 4, 0, 2, 3, 1, 3,
1.624 + 0, 2, 2, 2, 3, 3, 3, 1, 3, 0,
1.625 + 2, 2, 2, 3, 3, 2, 2, 2, 0, 2,
1.626 + 2, 2, 4, 0, 2, 2, 2, 0, 2, 1,
1.627 + 1, 2, 2, 2, 1, 2, 0, 2, 1, 3,
1.628 + 3, 3, 2, 3, 3, 1, 1, 0, 1
1.629 };
1.630
1.631 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1.632 @@ -649,158 +626,172 @@
1.633 means the default is an error. */
1.634 static const yytype_uint8 yydefact[] =
1.635 {
1.636 - 3, 0, 0, 1, 0, 0, 0, 0, 0, 109,
1.637 - 0, 0, 0, 0, 0, 0, 12, 16, 13, 14,
1.638 - 18, 15, 17, 0, 19, 0, 4, 31, 22, 31,
1.639 - 23, 52, 62, 5, 67, 20, 84, 75, 6, 24,
1.640 - 84, 21, 8, 11, 91, 92, 0, 0, 93, 0,
1.641 - 110, 0, 94, 0, 0, 0, 107, 108, 0, 0,
1.642 - 0, 100, 95, 0, 0, 0, 0, 0, 0, 0,
1.643 - 0, 0, 0, 96, 7, 71, 79, 48, 80, 27,
1.644 - 29, 0, 104, 0, 0, 64, 0, 0, 9, 10,
1.645 - 0, 0, 0, 0, 89, 0, 0, 0, 44, 0,
1.646 - 37, 36, 32, 33, 0, 35, 34, 0, 0, 89,
1.647 - 0, 56, 57, 53, 55, 54, 63, 51, 50, 68,
1.648 - 70, 66, 69, 65, 86, 87, 85, 76, 78, 74,
1.649 - 77, 73, 97, 103, 105, 106, 102, 101, 26, 82,
1.650 - 0, 98, 0, 98, 98, 98, 0, 0, 0, 83,
1.651 - 60, 98, 0, 98, 0, 0, 0, 38, 90, 0,
1.652 - 0, 98, 46, 43, 25, 0, 59, 0, 88, 99,
1.653 - 39, 40, 41, 0, 0, 45, 58, 61, 42, 47
1.654 + 6, 0, 104, 0, 3, 0, 6, 6, 99, 100,
1.655 + 0, 1, 0, 0, 0, 0, 117, 0, 0, 0,
1.656 + 0, 0, 0, 14, 18, 15, 16, 20, 17, 19,
1.657 + 21, 0, 22, 0, 7, 34, 25, 34, 26, 55,
1.658 + 65, 8, 70, 23, 93, 79, 9, 27, 88, 24,
1.659 + 10, 0, 105, 2, 74, 13, 0, 101, 0, 118,
1.660 + 0, 102, 0, 0, 0, 115, 116, 0, 0, 0,
1.661 + 108, 103, 0, 0, 0, 0, 0, 0, 0, 88,
1.662 + 0, 0, 75, 83, 51, 84, 30, 32, 0, 112,
1.663 + 0, 0, 67, 0, 0, 11, 12, 0, 0, 0,
1.664 + 0, 97, 0, 0, 0, 47, 0, 40, 39, 35,
1.665 + 36, 0, 38, 37, 0, 0, 97, 0, 59, 60,
1.666 + 56, 58, 57, 66, 54, 53, 71, 73, 69, 72,
1.667 + 68, 106, 95, 0, 94, 80, 82, 78, 81, 77,
1.668 + 90, 91, 89, 111, 113, 114, 110, 109, 29, 86,
1.669 + 0, 106, 0, 106, 106, 106, 0, 0, 0, 87,
1.670 + 63, 106, 0, 106, 0, 96, 0, 0, 41, 98,
1.671 + 0, 0, 106, 49, 46, 28, 0, 62, 0, 107,
1.672 + 92, 42, 43, 44, 0, 0, 48, 61, 64, 45,
1.673 + 50
1.674 };
1.675
1.676 /* YYDEFGOTO[NTERM-NUM]. */
1.677 static const yytype_int16 yydefgoto[] =
1.678 {
1.679 - -1, 1, 2, 25, 26, 101, 27, 28, 29, 30,
1.680 - 65, 102, 103, 147, 175, 31, 32, 117, 33, 67,
1.681 - 113, 68, 34, 121, 35, 69, 36, 37, 129, 38,
1.682 - 71, 39, 40, 41, 104, 105, 70, 106, 142, 143,
1.683 - 42, 74, 156, 60, 61, 51
1.684 + -1, 3, 4, 5, 33, 34, 108, 35, 36, 37,
1.685 + 38, 74, 109, 110, 157, 186, 39, 40, 124, 41,
1.686 + 76, 120, 77, 42, 128, 43, 78, 6, 44, 45,
1.687 + 137, 46, 80, 47, 48, 49, 111, 112, 81, 113,
1.688 + 79, 134, 152, 153, 50, 7, 165, 69, 70, 60
1.689 };
1.690
1.691 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1.692 STATE-NUM. */
1.693 -#define YYPACT_NINF -80
1.694 +#define YYPACT_NINF -90
1.695 static const yytype_int16 yypact[] =
1.696 {
1.697 - -80, 2, 132, -80, -13, -1, -1, -2, -1, 9,
1.698 - 33, -1, 27, 40, -3, 38, -80, -80, -80, -80,
1.699 - -80, -80, -80, 71, -80, 77, -80, -80, -80, -80,
1.700 - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1.701 - -80, -80, -80, -80, -80, -80, 57, 61, -80, 63,
1.702 - -80, 76, -80, 87, 101, 133, -80, -80, -3, -3,
1.703 - 195, -6, -80, 136, 149, 39, 104, 65, 150, 5,
1.704 - 194, 5, 167, -80, 176, -80, -80, -80, -80, -80,
1.705 - -80, 68, -80, -3, -3, 176, 72, 72, -80, -80,
1.706 - 177, 187, 78, -1, -1, -3, 196, 72, -80, 222,
1.707 - -80, -80, -80, -80, 221, -80, -80, 205, -1, -1,
1.708 - 211, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1.709 - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1.710 - -80, -80, -80, -80, 206, -80, -80, -80, -80, -80,
1.711 - -3, 223, 209, 223, 197, 223, 72, 7, 210, -80,
1.712 - -80, 223, 212, 223, 201, -3, 213, -80, -80, 214,
1.713 - 215, 223, 208, -80, -80, 216, -80, 217, -80, 113,
1.714 - -80, -80, -80, 218, -1, -80, -80, -80, -80, -80
1.715 + 4, 42, -90, 96, -90, 111, -90, 15, -90, -90,
1.716 + 75, -90, 82, 42, 104, 42, 110, 107, 42, 115,
1.717 + 125, -4, 121, -90, -90, -90, -90, -90, -90, -90,
1.718 + -90, 162, -90, 163, -90, -90, -90, -90, -90, -90,
1.719 + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
1.720 + -90, 139, -90, -90, 138, -90, 142, -90, 143, -90,
1.721 + 152, -90, 164, 167, 168, -90, -90, -4, -4, 77,
1.722 + -18, -90, 177, 185, 33, 71, 195, 247, 236, -2,
1.723 + 236, 171, -90, -90, -90, -90, -90, -90, 41, -90,
1.724 + -4, -4, 138, 97, 97, -90, -90, 186, 187, 194,
1.725 + 42, 42, -4, 196, 97, -90, 219, -90, -90, -90,
1.726 + -90, 210, -90, -90, 204, 42, 42, 199, -90, -90,
1.727 + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
1.728 + -90, 222, -90, 223, -90, -90, -90, -90, -90, -90,
1.729 + -90, -90, -90, -90, 215, -90, -90, -90, -90, -90,
1.730 + -4, 222, 228, 222, -5, 222, 97, 35, 229, -90,
1.731 + -90, 222, 232, 222, -4, -90, 135, 233, -90, -90,
1.732 + 234, 235, 222, 240, -90, -90, 237, -90, 239, -13,
1.733 + -90, -90, -90, -90, 244, 42, -90, -90, -90, -90,
1.734 + -90
1.735 };
1.736
1.737 /* YYPGOTO[NTERM-NUM]. */
1.738 static const yytype_int16 yypgoto[] =
1.739 {
1.740 - -80, -80, -80, -80, 122, -34, -80, -80, -80, -80,
1.741 - 220, -80, -80, -80, -80, -80, -80, -80, 59, -80,
1.742 - -80, -80, -80, -80, -80, -80, -80, -80, -80, 125,
1.743 - -80, -80, -80, -80, -80, 183, 219, 22, 142, -5,
1.744 - 147, 192, 69, -54, -79, -80
1.745 + -90, -90, 269, 271, -90, 23, -70, -90, -90, -90,
1.746 + -90, 243, -90, -90, -90, -90, -90, -90, -90, -48,
1.747 + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
1.748 + -90, -20, -90, -90, -90, -90, -90, 206, 205, -68,
1.749 + -90, -90, 169, -1, 27, -7, 118, -66, -89, -90
1.750 };
1.751
1.752 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1.753 positive, shift that token. If negative, reduce the rule which
1.754 number is the opposite. If zero, do what YYDEFACT says.
1.755 If YYTABLE_NINF, syntax error. */
1.756 -#define YYTABLE_NINF -82
1.757 +#define YYTABLE_NINF -86
1.758 static const yytype_int16 yytable[] =
1.759 {
1.760 - 46, 47, 3, 49, 81, 82, 53, 136, 137, 6,
1.761 - 7, 8, 9, 10, 11, 12, 13, 43, 146, 14,
1.762 - 15, 86, 56, 57, 44, 45, 58, 87, 48, 134,
1.763 - 135, 59, 162, 112, 50, 24, 125, 163, 125, -28,
1.764 - 90, 144, -28, -28, -28, -28, -28, -28, -28, -28,
1.765 - -28, 91, 54, -28, -28, 92, -28, 93, 94, 95,
1.766 - 96, 97, 98, 52, 99, 55, 90, 161, 62, 100,
1.767 - -49, -49, 63, -49, -49, -49, -49, 91, 64, -49,
1.768 - -49, 92, 107, 108, 109, 110, 154, 73, 141, 115,
1.769 - 99, 75, 126, 76, 126, 111, 133, 56, 57, 83,
1.770 - 84, 169, 140, 151, -30, 90, 77, -30, -30, -30,
1.771 - -30, -30, -30, -30, -30, -30, 91, 78, -30, -30,
1.772 - 92, -30, 93, 94, 95, 96, 97, 98, 120, 99,
1.773 - 128, 79, -2, 4, 100, 5, 6, 7, 8, 9,
1.774 - 10, 11, 12, 13, 83, 84, 14, 15, 16, 17,
1.775 - 18, 19, 20, 21, 22, 7, 8, 23, 10, 11,
1.776 - 12, 13, 24, 80, 14, 15, 88, -81, 90, 179,
1.777 - -81, -81, -81, -81, -81, -81, -81, -81, -81, 89,
1.778 - 24, -81, -81, 92, -81, -81, -81, -81, -81, -81,
1.779 - 116, 119, 99, 127, 122, 90, 130, 124, -72, -72,
1.780 - -72, -72, -72, -72, -72, -72, 132, 138, -72, -72,
1.781 - 92, 155, 158, 159, 160, 118, 123, 139, 131, 99,
1.782 - 165, 145, 167, 148, 124, 73, 83, 84, 83, 84,
1.783 - 173, 168, 83, 84, 149, 150, 153, 155, 84, 157,
1.784 - 164, 174, 166, 170, 171, 172, 176, 177, 178, 66,
1.785 - 114, 152, 85, 0, 0, 0, 0, 0, 0, 72
1.786 + 10, 88, 89, 54, 146, 147, 119, 1, 122, 164,
1.787 + 93, 141, 56, 142, 58, 156, 94, 62, 1, 90,
1.788 + 91, 131, 65, 66, 144, 145, 67, 90, 91, 132,
1.789 + 127, 68, 136, -31, 97, 2, 154, -31, -31, -31,
1.790 + -31, -31, -31, -31, -31, 98, 52, -31, -31, 99,
1.791 + -31, 100, 101, 102, 103, 104, -31, 105, 129, 106,
1.792 + 138, 173, 92, 141, 107, 142, 174, 172, 8, 9,
1.793 + 143, -33, 97, 90, 91, -33, -33, -33, -33, -33,
1.794 + -33, -33, -33, 98, 166, -33, -33, 99, -33, 100,
1.795 + 101, 102, 103, 104, -33, 105, 11, 106, 179, 151,
1.796 + 123, 126, 107, 135, 125, 130, 2, 139, 2, 90,
1.797 + 91, -5, 12, 55, 161, 13, 14, 15, 16, 17,
1.798 + 18, 19, 20, 65, 66, 21, 22, 23, 24, 25,
1.799 + 26, 27, 28, 29, 30, 57, 59, 31, 61, -4,
1.800 + 12, 63, 32, 13, 14, 15, 16, 17, 18, 19,
1.801 + 20, 64, 71, 21, 22, 23, 24, 25, 26, 27,
1.802 + 28, 29, 30, 72, 73, 31, 180, 90, 91, 52,
1.803 + 32, -85, 97, 82, 83, -85, -85, -85, -85, -85,
1.804 + -85, -85, -85, 84, 190, -85, -85, 99, -85, -85,
1.805 + -85, -85, -85, -85, -85, 85, 97, 106, 86, 87,
1.806 + -52, -52, 140, -52, -52, -52, -52, 98, 95, -52,
1.807 + -52, 99, 114, 115, 116, 117, 96, 148, 149, 150,
1.808 + 158, 106, 155, 159, 97, 163, 118, -76, -76, -76,
1.809 + -76, -76, -76, -76, -76, 160, 164, -76, -76, 99,
1.810 + 13, 14, 15, 16, 17, 18, 19, 20, 91, 106,
1.811 + 21, 22, 14, 15, 140, 17, 18, 19, 20, 168,
1.812 + 175, 21, 22, 177, 181, 182, 183, 32, 187, 167,
1.813 + 188, 169, 170, 171, 185, 189, 53, 51, 32, 176,
1.814 + 75, 178, 121, 0, 133, 162, 0, 0, 0, 0,
1.815 + 184
1.816 };
1.817
1.818 static const yytype_int16 yycheck[] =
1.819 {
1.820 - 5, 6, 0, 8, 58, 59, 11, 86, 87, 4,
1.821 - 5, 6, 7, 8, 9, 10, 11, 30, 97, 14,
1.822 - 15, 27, 25, 26, 25, 26, 29, 33, 30, 83,
1.823 - 84, 34, 25, 67, 25, 30, 70, 30, 72, 0,
1.824 - 1, 95, 3, 4, 5, 6, 7, 8, 9, 10,
1.825 - 11, 12, 25, 14, 15, 16, 17, 18, 19, 20,
1.826 - 21, 22, 23, 30, 25, 25, 1, 146, 30, 30,
1.827 - 5, 6, 1, 8, 9, 10, 11, 12, 1, 14,
1.828 - 15, 16, 17, 18, 19, 20, 140, 30, 93, 67,
1.829 - 25, 30, 70, 30, 72, 30, 28, 25, 26, 31,
1.830 - 32, 155, 24, 108, 0, 1, 30, 3, 4, 5,
1.831 - 6, 7, 8, 9, 10, 11, 12, 30, 14, 15,
1.832 - 16, 17, 18, 19, 20, 21, 22, 23, 69, 25,
1.833 - 71, 30, 0, 1, 30, 3, 4, 5, 6, 7,
1.834 - 8, 9, 10, 11, 31, 32, 14, 15, 16, 17,
1.835 - 18, 19, 20, 21, 22, 5, 6, 25, 8, 9,
1.836 - 10, 11, 30, 30, 14, 15, 30, 0, 1, 174,
1.837 - 3, 4, 5, 6, 7, 8, 9, 10, 11, 30,
1.838 - 30, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1.839 - 68, 69, 25, 71, 69, 1, 71, 30, 4, 5,
1.840 - 6, 7, 8, 9, 10, 11, 30, 30, 14, 15,
1.841 - 16, 14, 143, 144, 145, 68, 69, 30, 71, 25,
1.842 - 151, 25, 153, 1, 30, 30, 31, 32, 31, 32,
1.843 - 161, 30, 31, 32, 13, 30, 25, 14, 32, 30,
1.844 - 30, 33, 30, 30, 30, 30, 30, 30, 30, 29,
1.845 - 67, 109, 60, -1, -1, -1, -1, -1, -1, 40
1.846 + 1, 67, 68, 10, 93, 94, 76, 3, 76, 14,
1.847 + 28, 81, 13, 81, 15, 104, 34, 18, 3, 32,
1.848 + 33, 23, 26, 27, 90, 91, 30, 32, 33, 31,
1.849 + 78, 35, 80, 0, 1, 31, 102, 4, 5, 6,
1.850 + 7, 8, 9, 10, 11, 12, 31, 14, 15, 16,
1.851 + 17, 18, 19, 20, 21, 22, 23, 24, 78, 26,
1.852 + 80, 26, 69, 133, 31, 133, 31, 156, 26, 27,
1.853 + 29, 0, 1, 32, 33, 4, 5, 6, 7, 8,
1.854 + 9, 10, 11, 12, 150, 14, 15, 16, 17, 18,
1.855 + 19, 20, 21, 22, 23, 24, 0, 26, 164, 100,
1.856 + 77, 78, 31, 80, 77, 78, 31, 80, 31, 32,
1.857 + 33, 0, 1, 31, 115, 4, 5, 6, 7, 8,
1.858 + 9, 10, 11, 26, 27, 14, 15, 16, 17, 18,
1.859 + 19, 20, 21, 22, 23, 31, 26, 26, 31, 0,
1.860 + 1, 26, 31, 4, 5, 6, 7, 8, 9, 10,
1.861 + 11, 26, 31, 14, 15, 16, 17, 18, 19, 20,
1.862 + 21, 22, 23, 1, 1, 26, 31, 32, 33, 31,
1.863 + 31, 0, 1, 31, 31, 4, 5, 6, 7, 8,
1.864 + 9, 10, 11, 31, 185, 14, 15, 16, 17, 18,
1.865 + 19, 20, 21, 22, 23, 31, 1, 26, 31, 31,
1.866 + 5, 6, 31, 8, 9, 10, 11, 12, 31, 14,
1.867 + 15, 16, 17, 18, 19, 20, 31, 31, 31, 25,
1.868 + 1, 26, 26, 13, 1, 26, 31, 4, 5, 6,
1.869 + 7, 8, 9, 10, 11, 31, 14, 14, 15, 16,
1.870 + 4, 5, 6, 7, 8, 9, 10, 11, 33, 26,
1.871 + 14, 15, 5, 6, 31, 8, 9, 10, 11, 31,
1.872 + 31, 14, 15, 31, 31, 31, 31, 31, 31, 151,
1.873 + 31, 153, 154, 155, 34, 31, 7, 6, 31, 161,
1.874 + 37, 163, 76, -1, 79, 116, -1, -1, -1, -1,
1.875 + 172
1.876 };
1.877
1.878 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1.879 symbol of state STATE-NUM. */
1.880 static const yytype_uint8 yystos[] =
1.881 {
1.882 - 0, 36, 37, 0, 1, 3, 4, 5, 6, 7,
1.883 - 8, 9, 10, 11, 14, 15, 16, 17, 18, 19,
1.884 - 20, 21, 22, 25, 30, 38, 39, 41, 42, 43,
1.885 - 44, 50, 51, 53, 57, 59, 61, 62, 64, 66,
1.886 - 67, 68, 75, 30, 25, 26, 74, 74, 30, 74,
1.887 - 25, 80, 30, 74, 25, 25, 25, 26, 29, 34,
1.888 - 78, 79, 30, 1, 1, 45, 45, 54, 56, 60,
1.889 - 71, 65, 71, 30, 76, 30, 30, 30, 30, 30,
1.890 - 30, 78, 78, 31, 32, 76, 27, 33, 30, 30,
1.891 - 1, 12, 16, 18, 19, 20, 21, 22, 23, 25,
1.892 - 30, 40, 46, 47, 69, 70, 72, 17, 18, 19,
1.893 - 20, 30, 40, 55, 70, 72, 39, 52, 75, 39,
1.894 - 53, 58, 64, 75, 30, 40, 72, 39, 53, 63,
1.895 - 64, 75, 30, 28, 78, 78, 79, 79, 30, 30,
1.896 - 24, 74, 73, 74, 78, 25, 79, 48, 1, 13,
1.897 - 30, 74, 73, 25, 78, 14, 77, 30, 77, 77,
1.898 - 77, 79, 25, 30, 30, 77, 30, 77, 30, 78,
1.899 - 30, 30, 30, 77, 33, 49, 30, 30, 30, 74
1.900 + 0, 3, 31, 37, 38, 39, 63, 81, 26, 27,
1.901 + 79, 0, 1, 4, 5, 6, 7, 8, 9, 10,
1.902 + 11, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1.903 + 23, 26, 31, 40, 41, 43, 44, 45, 46, 52,
1.904 + 53, 55, 59, 61, 64, 65, 67, 69, 70, 71,
1.905 + 80, 39, 31, 38, 81, 31, 79, 31, 79, 26,
1.906 + 85, 31, 79, 26, 26, 26, 27, 30, 35, 83,
1.907 + 84, 31, 1, 1, 47, 47, 56, 58, 62, 76,
1.908 + 68, 74, 31, 31, 31, 31, 31, 31, 83, 83,
1.909 + 32, 33, 81, 28, 34, 31, 31, 1, 12, 16,
1.910 + 18, 19, 20, 21, 22, 24, 26, 31, 42, 48,
1.911 + 49, 72, 73, 75, 17, 18, 19, 20, 31, 42,
1.912 + 57, 73, 75, 41, 54, 80, 41, 55, 60, 67,
1.913 + 80, 23, 31, 74, 77, 41, 55, 66, 67, 80,
1.914 + 31, 42, 75, 29, 83, 83, 84, 84, 31, 31,
1.915 + 25, 79, 78, 79, 83, 26, 84, 50, 1, 13,
1.916 + 31, 79, 78, 26, 14, 82, 83, 82, 31, 82,
1.917 + 82, 82, 84, 26, 31, 31, 82, 31, 82, 83,
1.918 + 31, 31, 31, 31, 82, 34, 51, 31, 31, 31,
1.919 + 79
1.920 };
1.921
1.922 #define yyerrok (yyerrstatus = 0)
1.923 @@ -985,17 +976,20 @@
1.924 #if (defined __STDC__ || defined __C99__FUNC__ \
1.925 || defined __cplusplus || defined _MSC_VER)
1.926 static void
1.927 -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1.928 +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1.929 #else
1.930 static void
1.931 -yy_stack_print (bottom, top)
1.932 - yytype_int16 *bottom;
1.933 - yytype_int16 *top;
1.934 +yy_stack_print (yybottom, yytop)
1.935 + yytype_int16 *yybottom;
1.936 + yytype_int16 *yytop;
1.937 #endif
1.938 {
1.939 YYFPRINTF (stderr, "Stack now");
1.940 - for (; bottom <= top; ++bottom)
1.941 - YYFPRINTF (stderr, " %d", *bottom);
1.942 + for (; yybottom <= yytop; yybottom++)
1.943 + {
1.944 + int yybot = *yybottom;
1.945 + YYFPRINTF (stderr, " %d", yybot);
1.946 + }
1.947 YYFPRINTF (stderr, "\n");
1.948 }
1.949
1.950 @@ -1029,11 +1023,11 @@
1.951 /* The symbols being reduced. */
1.952 for (yyi = 0; yyi < yynrhs; yyi++)
1.953 {
1.954 - fprintf (stderr, " $%d = ", yyi + 1);
1.955 + YYFPRINTF (stderr, " $%d = ", yyi + 1);
1.956 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1.957 &(yyvsp[(yyi + 1) - (yynrhs)])
1.958 );
1.959 - fprintf (stderr, "\n");
1.960 + YYFPRINTF (stderr, "\n");
1.961 }
1.962 }
1.963
1.964 @@ -1308,7 +1302,7 @@
1.965
1.966 switch (yytype)
1.967 {
1.968 - case 51: /* "choice_entry" */
1.969 + case 53: /* "choice_entry" */
1.970
1.971 {
1.972 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1.973 @@ -1318,7 +1312,7 @@
1.974 };
1.975
1.976 break;
1.977 - case 57: /* "if_entry" */
1.978 + case 59: /* "if_entry" */
1.979
1.980 {
1.981 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1.982 @@ -1328,7 +1322,7 @@
1.983 };
1.984
1.985 break;
1.986 - case 62: /* "menu_entry" */
1.987 + case 65: /* "menu_entry" */
1.988
1.989 {
1.990 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1.991 @@ -1343,10 +1337,8 @@
1.992 break;
1.993 }
1.994 }
1.995 -
1.996
1.997 /* Prevent warnings from -Wmissing-prototypes. */
1.998 -
1.999 #ifdef YYPARSE_PARAM
1.1000 #if defined __STDC__ || defined __cplusplus
1.1001 int yyparse (void *YYPARSE_PARAM);
1.1002 @@ -1362,11 +1354,10 @@
1.1003 #endif /* ! YYPARSE_PARAM */
1.1004
1.1005
1.1006 -
1.1007 -/* The look-ahead symbol. */
1.1008 +/* The lookahead symbol. */
1.1009 int yychar;
1.1010
1.1011 -/* The semantic value of the look-ahead symbol. */
1.1012 +/* The semantic value of the lookahead symbol. */
1.1013 YYSTYPE yylval;
1.1014
1.1015 /* Number of syntax errors so far. */
1.1016 @@ -1374,9 +1365,9 @@
1.1017
1.1018
1.1019
1.1020 -/*----------.
1.1021 -| yyparse. |
1.1022 -`----------*/
1.1023 +/*-------------------------.
1.1024 +| yyparse or yypush_parse. |
1.1025 +`-------------------------*/
1.1026
1.1027 #ifdef YYPARSE_PARAM
1.1028 #if (defined __STDC__ || defined __C99__FUNC__ \
1.1029 @@ -1400,14 +1391,39 @@
1.1030 #endif
1.1031 #endif
1.1032 {
1.1033 -
1.1034 - int yystate;
1.1035 +
1.1036 +
1.1037 + int yystate;
1.1038 + /* Number of tokens to shift before error messages enabled. */
1.1039 + int yyerrstatus;
1.1040 +
1.1041 + /* The stacks and their tools:
1.1042 + `yyss': related to states.
1.1043 + `yyvs': related to semantic values.
1.1044 +
1.1045 + Refer to the stacks thru separate pointers, to allow yyoverflow
1.1046 + to reallocate them elsewhere. */
1.1047 +
1.1048 + /* The state stack. */
1.1049 + yytype_int16 yyssa[YYINITDEPTH];
1.1050 + yytype_int16 *yyss;
1.1051 + yytype_int16 *yyssp;
1.1052 +
1.1053 + /* The semantic value stack. */
1.1054 + YYSTYPE yyvsa[YYINITDEPTH];
1.1055 + YYSTYPE *yyvs;
1.1056 + YYSTYPE *yyvsp;
1.1057 +
1.1058 + YYSIZE_T yystacksize;
1.1059 +
1.1060 int yyn;
1.1061 int yyresult;
1.1062 - /* Number of tokens to shift before error messages enabled. */
1.1063 - int yyerrstatus;
1.1064 - /* Look-ahead token as an internal (translated) token number. */
1.1065 - int yytoken = 0;
1.1066 + /* Lookahead token as an internal (translated) token number. */
1.1067 + int yytoken;
1.1068 + /* The variables used to return semantic value and location from the
1.1069 + action routines. */
1.1070 + YYSTYPE yyval;
1.1071 +
1.1072 #if YYERROR_VERBOSE
1.1073 /* Buffer for error messages, and its allocated size. */
1.1074 char yymsgbuf[128];
1.1075 @@ -1415,51 +1431,28 @@
1.1076 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1.1077 #endif
1.1078
1.1079 - /* Three stacks and their tools:
1.1080 - `yyss': related to states,
1.1081 - `yyvs': related to semantic values,
1.1082 - `yyls': related to locations.
1.1083 -
1.1084 - Refer to the stacks thru separate pointers, to allow yyoverflow
1.1085 - to reallocate them elsewhere. */
1.1086 -
1.1087 - /* The state stack. */
1.1088 - yytype_int16 yyssa[YYINITDEPTH];
1.1089 - yytype_int16 *yyss = yyssa;
1.1090 - yytype_int16 *yyssp;
1.1091 -
1.1092 - /* The semantic value stack. */
1.1093 - YYSTYPE yyvsa[YYINITDEPTH];
1.1094 - YYSTYPE *yyvs = yyvsa;
1.1095 - YYSTYPE *yyvsp;
1.1096 -
1.1097 -
1.1098 -
1.1099 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1.1100
1.1101 - YYSIZE_T yystacksize = YYINITDEPTH;
1.1102 -
1.1103 - /* The variables used to return semantic value and location from the
1.1104 - action routines. */
1.1105 - YYSTYPE yyval;
1.1106 -
1.1107 -
1.1108 /* The number of symbols on the RHS of the reduced rule.
1.1109 Keep to zero when no symbol should be popped. */
1.1110 int yylen = 0;
1.1111
1.1112 + yytoken = 0;
1.1113 + yyss = yyssa;
1.1114 + yyvs = yyvsa;
1.1115 + yystacksize = YYINITDEPTH;
1.1116 +
1.1117 YYDPRINTF ((stderr, "Starting parse\n"));
1.1118
1.1119 yystate = 0;
1.1120 yyerrstatus = 0;
1.1121 yynerrs = 0;
1.1122 - yychar = YYEMPTY; /* Cause a token to be read. */
1.1123 + yychar = YYEMPTY; /* Cause a token to be read. */
1.1124
1.1125 /* Initialize stack pointers.
1.1126 Waste one element of value and location stack
1.1127 so that they stay on the same level as the state stack.
1.1128 The wasted elements are never initialized. */
1.1129 -
1.1130 yyssp = yyss;
1.1131 yyvsp = yyvs;
1.1132
1.1133 @@ -1489,7 +1482,6 @@
1.1134 YYSTYPE *yyvs1 = yyvs;
1.1135 yytype_int16 *yyss1 = yyss;
1.1136
1.1137 -
1.1138 /* Each stack pointer address is followed by the size of the
1.1139 data in use in that stack, in bytes. This used to be a
1.1140 conditional around just the two extra args, but that might
1.1141 @@ -1497,7 +1489,6 @@
1.1142 yyoverflow (YY_("memory exhausted"),
1.1143 &yyss1, yysize * sizeof (*yyssp),
1.1144 &yyvs1, yysize * sizeof (*yyvsp),
1.1145 -
1.1146 &yystacksize);
1.1147
1.1148 yyss = yyss1;
1.1149 @@ -1520,9 +1511,8 @@
1.1150 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1.1151 if (! yyptr)
1.1152 goto yyexhaustedlab;
1.1153 - YYSTACK_RELOCATE (yyss);
1.1154 - YYSTACK_RELOCATE (yyvs);
1.1155 -
1.1156 + YYSTACK_RELOCATE (yyss_alloc, yyss);
1.1157 + YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1.1158 # undef YYSTACK_RELOCATE
1.1159 if (yyss1 != yyssa)
1.1160 YYSTACK_FREE (yyss1);
1.1161 @@ -1533,7 +1523,6 @@
1.1162 yyssp = yyss + yysize - 1;
1.1163 yyvsp = yyvs + yysize - 1;
1.1164
1.1165 -
1.1166 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1.1167 (unsigned long int) yystacksize));
1.1168
1.1169 @@ -1543,6 +1532,9 @@
1.1170
1.1171 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1.1172
1.1173 + if (yystate == YYFINAL)
1.1174 + YYACCEPT;
1.1175 +
1.1176 goto yybackup;
1.1177
1.1178 /*-----------.
1.1179 @@ -1551,16 +1543,16 @@
1.1180 yybackup:
1.1181
1.1182 /* Do appropriate processing given the current state. Read a
1.1183 - look-ahead token if we need one and don't already have one. */
1.1184 + lookahead token if we need one and don't already have one. */
1.1185
1.1186 - /* First try to decide what to do without reference to look-ahead token. */
1.1187 + /* First try to decide what to do without reference to lookahead token. */
1.1188 yyn = yypact[yystate];
1.1189 if (yyn == YYPACT_NINF)
1.1190 goto yydefault;
1.1191
1.1192 - /* Not known => get a look-ahead token if don't already have one. */
1.1193 + /* Not known => get a lookahead token if don't already have one. */
1.1194
1.1195 - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1.1196 + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1.1197 if (yychar == YYEMPTY)
1.1198 {
1.1199 YYDPRINTF ((stderr, "Reading a token: "));
1.1200 @@ -1592,20 +1584,16 @@
1.1201 goto yyreduce;
1.1202 }
1.1203
1.1204 - if (yyn == YYFINAL)
1.1205 - YYACCEPT;
1.1206 -
1.1207 /* Count tokens shifted since error; after three, turn off error
1.1208 status. */
1.1209 if (yyerrstatus)
1.1210 yyerrstatus--;
1.1211
1.1212 - /* Shift the look-ahead token. */
1.1213 + /* Shift the lookahead token. */
1.1214 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1.1215
1.1216 - /* Discard the shifted token unless it is eof. */
1.1217 - if (yychar != YYEOF)
1.1218 - yychar = YYEMPTY;
1.1219 + /* Discard the shifted token. */
1.1220 + yychar = YYEMPTY;
1.1221
1.1222 yystate = yyn;
1.1223 *++yyvsp = yylval;
1.1224 @@ -1644,39 +1632,39 @@
1.1225 YY_REDUCE_PRINT (yyn);
1.1226 switch (yyn)
1.1227 {
1.1228 - case 8:
1.1229 + case 10:
1.1230
1.1231 { zconf_error("unexpected end statement"); ;}
1.1232 break;
1.1233
1.1234 - case 9:
1.1235 + case 11:
1.1236
1.1237 { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); ;}
1.1238 break;
1.1239
1.1240 - case 10:
1.1241 + case 12:
1.1242
1.1243 {
1.1244 zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name);
1.1245 ;}
1.1246 break;
1.1247
1.1248 - case 11:
1.1249 + case 13:
1.1250
1.1251 { zconf_error("invalid statement"); ;}
1.1252 break;
1.1253
1.1254 - case 25:
1.1255 + case 28:
1.1256
1.1257 { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;}
1.1258 break;
1.1259
1.1260 - case 26:
1.1261 + case 29:
1.1262
1.1263 { zconf_error("invalid option"); ;}
1.1264 break;
1.1265
1.1266 - case 27:
1.1267 + case 30:
1.1268
1.1269 {
1.1270 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
1.1271 @@ -1686,7 +1674,7 @@
1.1272 ;}
1.1273 break;
1.1274
1.1275 - case 28:
1.1276 + case 31:
1.1277
1.1278 {
1.1279 menu_end_entry();
1.1280 @@ -1694,7 +1682,7 @@
1.1281 ;}
1.1282 break;
1.1283
1.1284 - case 29:
1.1285 + case 32:
1.1286
1.1287 {
1.1288 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
1.1289 @@ -1704,7 +1692,7 @@
1.1290 ;}
1.1291 break;
1.1292
1.1293 - case 30:
1.1294 + case 33:
1.1295
1.1296 {
1.1297 if (current_entry->prompt)
1.1298 @@ -1716,7 +1704,7 @@
1.1299 ;}
1.1300 break;
1.1301
1.1302 - case 38:
1.1303 + case 41:
1.1304
1.1305 {
1.1306 menu_set_type((yyvsp[(1) - (3)].id)->stype);
1.1307 @@ -1726,7 +1714,7 @@
1.1308 ;}
1.1309 break;
1.1310
1.1311 - case 39:
1.1312 + case 42:
1.1313
1.1314 {
1.1315 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
1.1316 @@ -1734,7 +1722,7 @@
1.1317 ;}
1.1318 break;
1.1319
1.1320 - case 40:
1.1321 + case 43:
1.1322
1.1323 {
1.1324 menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr));
1.1325 @@ -1746,7 +1734,7 @@
1.1326 ;}
1.1327 break;
1.1328
1.1329 - case 41:
1.1330 + case 44:
1.1331
1.1332 {
1.1333 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
1.1334 @@ -1754,7 +1742,7 @@
1.1335 ;}
1.1336 break;
1.1337
1.1338 - case 42:
1.1339 + case 45:
1.1340
1.1341 {
1.1342 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr));
1.1343 @@ -1762,7 +1750,7 @@
1.1344 ;}
1.1345 break;
1.1346
1.1347 - case 45:
1.1348 + case 48:
1.1349
1.1350 {
1.1351 struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
1.1352 @@ -1774,17 +1762,17 @@
1.1353 ;}
1.1354 break;
1.1355
1.1356 - case 46:
1.1357 + case 49:
1.1358
1.1359 { (yyval.string) = NULL; ;}
1.1360 break;
1.1361
1.1362 - case 47:
1.1363 + case 50:
1.1364
1.1365 { (yyval.string) = (yyvsp[(2) - (2)].string); ;}
1.1366 break;
1.1367
1.1368 - case 48:
1.1369 + case 51:
1.1370
1.1371 {
1.1372 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE);
1.1373 @@ -1795,14 +1783,14 @@
1.1374 ;}
1.1375 break;
1.1376
1.1377 - case 49:
1.1378 + case 52:
1.1379
1.1380 {
1.1381 (yyval.menu) = menu_add_menu();
1.1382 ;}
1.1383 break;
1.1384
1.1385 - case 50:
1.1386 + case 53:
1.1387
1.1388 {
1.1389 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) {
1.1390 @@ -1812,7 +1800,7 @@
1.1391 ;}
1.1392 break;
1.1393
1.1394 - case 58:
1.1395 + case 61:
1.1396
1.1397 {
1.1398 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
1.1399 @@ -1820,7 +1808,7 @@
1.1400 ;}
1.1401 break;
1.1402
1.1403 - case 59:
1.1404 + case 62:
1.1405
1.1406 {
1.1407 if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) {
1.1408 @@ -1833,7 +1821,7 @@
1.1409 ;}
1.1410 break;
1.1411
1.1412 - case 60:
1.1413 + case 63:
1.1414
1.1415 {
1.1416 current_entry->sym->flags |= SYMBOL_OPTIONAL;
1.1417 @@ -1841,7 +1829,7 @@
1.1418 ;}
1.1419 break;
1.1420
1.1421 - case 61:
1.1422 + case 64:
1.1423
1.1424 {
1.1425 if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) {
1.1426 @@ -1853,7 +1841,7 @@
1.1427 ;}
1.1428 break;
1.1429
1.1430 - case 64:
1.1431 + case 67:
1.1432
1.1433 {
1.1434 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
1.1435 @@ -1863,7 +1851,7 @@
1.1436 ;}
1.1437 break;
1.1438
1.1439 - case 65:
1.1440 + case 68:
1.1441
1.1442 {
1.1443 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) {
1.1444 @@ -1873,7 +1861,14 @@
1.1445 ;}
1.1446 break;
1.1447
1.1448 - case 71:
1.1449 + case 74:
1.1450 +
1.1451 + {
1.1452 + menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
1.1453 +;}
1.1454 + break;
1.1455 +
1.1456 + case 75:
1.1457
1.1458 {
1.1459 menu_add_entry(NULL);
1.1460 @@ -1882,14 +1877,14 @@
1.1461 ;}
1.1462 break;
1.1463
1.1464 - case 72:
1.1465 + case 76:
1.1466
1.1467 {
1.1468 (yyval.menu) = menu_add_menu();
1.1469 ;}
1.1470 break;
1.1471
1.1472 - case 73:
1.1473 + case 77:
1.1474
1.1475 {
1.1476 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) {
1.1477 @@ -1899,7 +1894,7 @@
1.1478 ;}
1.1479 break;
1.1480
1.1481 - case 79:
1.1482 + case 83:
1.1483
1.1484 {
1.1485 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
1.1486 @@ -1907,7 +1902,7 @@
1.1487 ;}
1.1488 break;
1.1489
1.1490 - case 80:
1.1491 + case 84:
1.1492
1.1493 {
1.1494 menu_add_entry(NULL);
1.1495 @@ -1916,14 +1911,14 @@
1.1496 ;}
1.1497 break;
1.1498
1.1499 - case 81:
1.1500 + case 85:
1.1501
1.1502 {
1.1503 menu_end_entry();
1.1504 ;}
1.1505 break;
1.1506
1.1507 - case 82:
1.1508 + case 86:
1.1509
1.1510 {
1.1511 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
1.1512 @@ -1931,14 +1926,14 @@
1.1513 ;}
1.1514 break;
1.1515
1.1516 - case 83:
1.1517 + case 87:
1.1518
1.1519 {
1.1520 current_entry->help = (yyvsp[(2) - (2)].string);
1.1521 ;}
1.1522 break;
1.1523
1.1524 - case 88:
1.1525 + case 92:
1.1526
1.1527 {
1.1528 menu_add_dep((yyvsp[(3) - (4)].expr));
1.1529 @@ -1946,90 +1941,96 @@
1.1530 ;}
1.1531 break;
1.1532
1.1533 - case 90:
1.1534 + case 96:
1.1535 +
1.1536 + {
1.1537 + menu_add_visibility((yyvsp[(2) - (2)].expr));
1.1538 +;}
1.1539 + break;
1.1540 +
1.1541 + case 98:
1.1542
1.1543 {
1.1544 menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr));
1.1545 ;}
1.1546 break;
1.1547
1.1548 - case 93:
1.1549 + case 101:
1.1550
1.1551 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
1.1552 break;
1.1553
1.1554 - case 94:
1.1555 + case 102:
1.1556
1.1557 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
1.1558 break;
1.1559
1.1560 - case 95:
1.1561 + case 103:
1.1562
1.1563 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
1.1564 break;
1.1565
1.1566 - case 98:
1.1567 + case 106:
1.1568
1.1569 { (yyval.expr) = NULL; ;}
1.1570 break;
1.1571
1.1572 - case 99:
1.1573 + case 107:
1.1574
1.1575 { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;}
1.1576 break;
1.1577
1.1578 - case 100:
1.1579 + case 108:
1.1580
1.1581 { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;}
1.1582 break;
1.1583
1.1584 - case 101:
1.1585 + case 109:
1.1586
1.1587 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
1.1588 break;
1.1589
1.1590 - case 102:
1.1591 + case 110:
1.1592
1.1593 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
1.1594 break;
1.1595
1.1596 - case 103:
1.1597 + case 111:
1.1598
1.1599 { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;}
1.1600 break;
1.1601
1.1602 - case 104:
1.1603 + case 112:
1.1604
1.1605 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;}
1.1606 break;
1.1607
1.1608 - case 105:
1.1609 + case 113:
1.1610
1.1611 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
1.1612 break;
1.1613
1.1614 - case 106:
1.1615 + case 114:
1.1616
1.1617 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
1.1618 break;
1.1619
1.1620 - case 107:
1.1621 + case 115:
1.1622
1.1623 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;}
1.1624 break;
1.1625
1.1626 - case 108:
1.1627 + case 116:
1.1628
1.1629 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); ;}
1.1630 break;
1.1631
1.1632 - case 109:
1.1633 + case 117:
1.1634
1.1635 { (yyval.string) = NULL; ;}
1.1636 break;
1.1637
1.1638
1.1639 -/* Line 1267 of yacc.c. */
1.1640
1.1641 default: break;
1.1642 }
1.1643 @@ -2041,7 +2042,6 @@
1.1644
1.1645 *++yyvsp = yyval;
1.1646
1.1647 -
1.1648 /* Now `shift' the result of the reduction. Determine what state
1.1649 that goes to, based on the state we popped back to and the rule
1.1650 number reduced by. */
1.1651 @@ -2106,7 +2106,7 @@
1.1652
1.1653 if (yyerrstatus == 3)
1.1654 {
1.1655 - /* If just tried and failed to reuse look-ahead token after an
1.1656 + /* If just tried and failed to reuse lookahead token after an
1.1657 error, discard it. */
1.1658
1.1659 if (yychar <= YYEOF)
1.1660 @@ -2123,7 +2123,7 @@
1.1661 }
1.1662 }
1.1663
1.1664 - /* Else will try to reuse look-ahead token after shifting the error
1.1665 + /* Else will try to reuse lookahead token after shifting the error
1.1666 token. */
1.1667 goto yyerrlab1;
1.1668
1.1669 @@ -2180,9 +2180,6 @@
1.1670 YY_STACK_PRINT (yyss, yyssp);
1.1671 }
1.1672
1.1673 - if (yyn == YYFINAL)
1.1674 - YYACCEPT;
1.1675 -
1.1676 *++yyvsp = yylval;
1.1677
1.1678
1.1679 @@ -2207,7 +2204,7 @@
1.1680 yyresult = 1;
1.1681 goto yyreturn;
1.1682
1.1683 -#ifndef yyoverflow
1.1684 +#if !defined(yyoverflow) || YYERROR_VERBOSE
1.1685 /*-------------------------------------------------.
1.1686 | yyexhaustedlab -- memory exhaustion comes here. |
1.1687 `-------------------------------------------------*/
1.1688 @@ -2218,7 +2215,7 @@
1.1689 #endif
1.1690
1.1691 yyreturn:
1.1692 - if (yychar != YYEOF && yychar != YYEMPTY)
1.1693 + if (yychar != YYEMPTY)
1.1694 yydestruct ("Cleanup: discarding lookahead",
1.1695 yytoken, &yylval);
1.1696 /* Do not reclaim the symbols of the rule which action triggered
1.1697 @@ -2255,11 +2252,11 @@
1.1698 zconf_initscan(name);
1.1699
1.1700 sym_init();
1.1701 - menu_init();
1.1702 + _menu_init();
1.1703 modules_sym = sym_lookup(NULL, 0);
1.1704 modules_sym->type = S_BOOLEAN;
1.1705 modules_sym->flags |= SYMBOL_AUTO;
1.1706 - rootmenu.prompt = menu_add_prompt(P_MENU, PACKAGE, NULL);
1.1707 + rootmenu.prompt = menu_add_prompt(P_MENU, PACKAGE " Configuration", NULL);
1.1708
1.1709 #if YYDEBUG
1.1710 if (getenv("ZCONF_DEBUG"))
1.1711 @@ -2274,6 +2271,10 @@
1.1712 prop = prop_alloc(P_DEFAULT, modules_sym);
1.1713 prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
1.1714 }
1.1715 +
1.1716 + rootmenu.prompt->text = _(rootmenu.prompt->text);
1.1717 + rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);
1.1718 +
1.1719 menu_finalize(&rootmenu);
1.1720 for_all_symbols(i, sym) {
1.1721 if (sym_check_deps(sym))
1.1722 @@ -2284,7 +2285,7 @@
1.1723 sym_set_change_count(1);
1.1724 }
1.1725
1.1726 -const char *zconf_tokenname(int token)
1.1727 +static const char *zconf_tokenname(int token)
1.1728 {
1.1729 switch (token) {
1.1730 case T_MENU: return "menu";
1.1731 @@ -2294,6 +2295,7 @@
1.1732 case T_IF: return "if";
1.1733 case T_ENDIF: return "endif";
1.1734 case T_DEPENDS: return "depends";
1.1735 + case T_VISIBLE: return "visible";
1.1736 }
1.1737 return "<token>";
1.1738 }
1.1739 @@ -2348,7 +2350,7 @@
1.1740 #endif
1.1741 }
1.1742
1.1743 -void print_quoted_string(FILE *out, const char *str)
1.1744 +static void print_quoted_string(FILE *out, const char *str)
1.1745 {
1.1746 const char *p;
1.1747 int len;
1.1748 @@ -2365,15 +2367,15 @@
1.1749 putc('"', out);
1.1750 }
1.1751
1.1752 -void print_symbol(FILE *out, struct menu *menu)
1.1753 +static void print_symbol(FILE *out, struct menu *menu)
1.1754 {
1.1755 struct symbol *sym = menu->sym;
1.1756 struct property *prop;
1.1757
1.1758 if (sym_is_choice(sym))
1.1759 - fprintf(out, "choice\n");
1.1760 + fprintf(out, "\nchoice\n");
1.1761 else
1.1762 - fprintf(out, "config %s\n", sym->name);
1.1763 + fprintf(out, "\nconfig %s\n", sym->name);
1.1764 switch (sym->type) {
1.1765 case S_BOOLEAN:
1.1766 fputs(" boolean\n", out);
1.1767 @@ -2419,6 +2421,21 @@
1.1768 case P_CHOICE:
1.1769 fputs(" #choice value\n", out);
1.1770 break;
1.1771 + case P_SELECT:
1.1772 + fputs( " select ", out);
1.1773 + expr_fprint(prop->expr, out);
1.1774 + fputc('\n', out);
1.1775 + break;
1.1776 + case P_RANGE:
1.1777 + fputs( " range ", out);
1.1778 + expr_fprint(prop->expr, out);
1.1779 + fputc('\n', out);
1.1780 + break;
1.1781 + case P_MENU:
1.1782 + fputs( " menu ", out);
1.1783 + print_quoted_string(out, prop->text);
1.1784 + fputc('\n', out);
1.1785 + break;
1.1786 default:
1.1787 fprintf(out, " unknown prop %d!\n", prop->type);
1.1788 break;
1.1789 @@ -2430,7 +2447,6 @@
1.1790 menu->help[len] = 0;
1.1791 fprintf(out, " help\n%s\n", menu->help);
1.1792 }
1.1793 - fputc('\n', out);
1.1794 }
1.1795
1.1796 void zconfdump(FILE *out)
1.1797 @@ -2463,7 +2479,6 @@
1.1798 expr_fprint(prop->visible.expr, out);
1.1799 fputc('\n', out);
1.1800 }
1.1801 - fputs("\n", out);
1.1802 }
1.1803
1.1804 if (menu->list)