1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 01:01:52 +02:00

force a config reset when the user changes the target platform in menuconfig

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6503 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2007-03-04 14:04:33 +00:00
parent 34a4576552
commit cbc765de67
7 changed files with 337 additions and 309 deletions

View File

@ -94,6 +94,7 @@ struct symbol {
#define SYMBOL_AUTO 0x1000 #define SYMBOL_AUTO 0x1000
#define SYMBOL_CHECKED 0x2000 #define SYMBOL_CHECKED 0x2000
#define SYMBOL_WARNED 0x8000 #define SYMBOL_WARNED 0x8000
#define SYMBOL_RESET 0x10000
#define SYMBOL_MAXLENGTH 256 #define SYMBOL_MAXLENGTH 256
#define SYMBOL_HASHSIZE 257 #define SYMBOL_HASHSIZE 257

View File

@ -920,6 +920,9 @@ static void conf_choice(struct menu *menu)
case 0: case 0:
if (sscanf(input_buf, "%p", &child) != 1) if (sscanf(input_buf, "%p", &child) != 1)
break; break;
if ((menu->sym->flags & SYMBOL_RESET) &&
sym_get_tristate_value(child->sym) != yes)
conf_reset();
sym_set_tristate_value(child->sym, yes); sym_set_tristate_value(child->sym, yes);
return; return;
case 1: case 1:

View File

@ -25,6 +25,7 @@ endif, T_ENDIF, TF_COMMAND
depends, T_DEPENDS, TF_COMMAND depends, T_DEPENDS, TF_COMMAND
requires, T_REQUIRES, TF_COMMAND requires, T_REQUIRES, TF_COMMAND
optional, T_OPTIONAL, TF_COMMAND optional, T_OPTIONAL, TF_COMMAND
reset, T_RESET, TF_COMMAND
default, T_DEFAULT, TF_COMMAND, S_UNKNOWN default, T_DEFAULT, TF_COMMAND, S_UNKNOWN
prompt, T_PROMPT, TF_COMMAND prompt, T_PROMPT, TF_COMMAND
tristate, T_TYPE, TF_COMMAND, S_TRISTATE tristate, T_TYPE, TF_COMMAND, S_TRISTATE

View File

@ -53,10 +53,10 @@ kconf_id_hash (register const char *str, register unsigned int len)
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 25, 10, 15, 47, 47, 47, 47, 47, 47, 47, 0, 10, 15,
0, 0, 5, 47, 0, 0, 47, 47, 0, 10, 0, 0, 5, 47, 5, 0, 47, 47, 10, 10,
0, 20, 20, 20, 5, 0, 0, 20, 47, 47, 0, 20, 20, 20, 5, 15, 0, 15, 47, 47,
20, 47, 47, 47, 47, 47, 47, 47, 47, 47, 15, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
@ -90,31 +90,32 @@ struct kconf_id_strings_t
{ {
char kconf_id_strings_str2[sizeof("if")]; char kconf_id_strings_str2[sizeof("if")];
char kconf_id_strings_str3[sizeof("int")]; char kconf_id_strings_str3[sizeof("int")];
char kconf_id_strings_str4[sizeof("help")];
char kconf_id_strings_str5[sizeof("endif")]; char kconf_id_strings_str5[sizeof("endif")];
char kconf_id_strings_str6[sizeof("select")]; char kconf_id_strings_str6[sizeof("enable")];
char kconf_id_strings_str7[sizeof("endmenu")]; char kconf_id_strings_str7[sizeof("endmenu")];
char kconf_id_strings_str8[sizeof("tristate")]; char kconf_id_strings_str8[sizeof("tristate")];
char kconf_id_strings_str9[sizeof("endchoice")]; char kconf_id_strings_str9[sizeof("endchoice")];
char kconf_id_strings_str10[sizeof("range")]; char kconf_id_strings_str10[sizeof("range")];
char kconf_id_strings_str11[sizeof("string")];
char kconf_id_strings_str12[sizeof("default")]; char kconf_id_strings_str12[sizeof("default")];
char kconf_id_strings_str13[sizeof("def_bool")]; char kconf_id_strings_str13[sizeof("def_bool")];
char kconf_id_strings_str14[sizeof("menu")]; char kconf_id_strings_str14[sizeof("menu")];
char kconf_id_strings_str16[sizeof("def_boolean")]; char kconf_id_strings_str16[sizeof("def_boolean")];
char kconf_id_strings_str17[sizeof("def_tristate")]; char kconf_id_strings_str17[sizeof("def_tristate")];
char kconf_id_strings_str18[sizeof("mainmenu")]; char kconf_id_strings_str18[sizeof("mainmenu")];
char kconf_id_strings_str19[sizeof("help")];
char kconf_id_strings_str20[sizeof("menuconfig")]; char kconf_id_strings_str20[sizeof("menuconfig")];
char kconf_id_strings_str21[sizeof("config")]; char kconf_id_strings_str21[sizeof("config")];
char kconf_id_strings_str22[sizeof("on")]; char kconf_id_strings_str22[sizeof("on")];
char kconf_id_strings_str23[sizeof("hex")]; char kconf_id_strings_str23[sizeof("hex")];
char kconf_id_strings_str26[sizeof("source")]; char kconf_id_strings_str25[sizeof("reset")];
char kconf_id_strings_str26[sizeof("string")];
char kconf_id_strings_str27[sizeof("depends")]; char kconf_id_strings_str27[sizeof("depends")];
char kconf_id_strings_str28[sizeof("optional")]; char kconf_id_strings_str28[sizeof("optional")];
char kconf_id_strings_str31[sizeof("enable")]; char kconf_id_strings_str31[sizeof("select")];
char kconf_id_strings_str32[sizeof("comment")]; char kconf_id_strings_str32[sizeof("comment")];
char kconf_id_strings_str33[sizeof("requires")]; char kconf_id_strings_str33[sizeof("requires")];
char kconf_id_strings_str34[sizeof("bool")]; char kconf_id_strings_str34[sizeof("bool")];
char kconf_id_strings_str36[sizeof("source")];
char kconf_id_strings_str37[sizeof("boolean")]; char kconf_id_strings_str37[sizeof("boolean")];
char kconf_id_strings_str41[sizeof("choice")]; char kconf_id_strings_str41[sizeof("choice")];
char kconf_id_strings_str46[sizeof("prompt")]; char kconf_id_strings_str46[sizeof("prompt")];
@ -123,31 +124,32 @@ static struct kconf_id_strings_t kconf_id_strings_contents =
{ {
"if", "if",
"int", "int",
"help",
"endif", "endif",
"select", "enable",
"endmenu", "endmenu",
"tristate", "tristate",
"endchoice", "endchoice",
"range", "range",
"string",
"default", "default",
"def_bool", "def_bool",
"menu", "menu",
"def_boolean", "def_boolean",
"def_tristate", "def_tristate",
"mainmenu", "mainmenu",
"help",
"menuconfig", "menuconfig",
"config", "config",
"on", "on",
"hex", "hex",
"source", "reset",
"string",
"depends", "depends",
"optional", "optional",
"enable", "select",
"comment", "comment",
"requires", "requires",
"bool", "bool",
"source",
"boolean", "boolean",
"choice", "choice",
"prompt" "prompt"
@ -161,7 +163,7 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{ {
enum enum
{ {
TOTAL_KEYWORDS = 30, TOTAL_KEYWORDS = 31,
MIN_WORD_LENGTH = 2, MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 12, MAX_WORD_LENGTH = 12,
MIN_HASH_VALUE = 2, MIN_HASH_VALUE = 2,
@ -173,14 +175,14 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{-1}, {-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str4, T_HELP, TF_COMMAND}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_SELECT, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_SELECT, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_TYPE, TF_COMMAND, S_STRING}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_MENU, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_MENU, TF_COMMAND},
@ -188,13 +190,14 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_MAINMENU, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_MAINMENU, TF_COMMAND},
{-1}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_HELP, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_MENUCONFIG, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_MENUCONFIG, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CONFIG, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CONFIG, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ON, TF_PARAM}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ON, TF_PARAM},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_HEX}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_HEX},
{-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SOURCE, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_RESET, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_TYPE, TF_COMMAND, S_STRING},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_DEPENDS, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_DEPENDS, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPTIONAL, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPTIONAL, TF_COMMAND},
{-1}, {-1}, {-1}, {-1},
@ -202,7 +205,8 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_REQUIRES, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_REQUIRES, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str34, T_TYPE, TF_COMMAND, S_BOOLEAN}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str34, T_TYPE, TF_COMMAND, S_BOOLEAN},
{-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_SOURCE, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_CHOICE, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_CHOICE, TF_COMMAND},

View File

@ -84,16 +84,17 @@
T_SELECT = 277, T_SELECT = 277,
T_RANGE = 278, T_RANGE = 278,
T_ON = 279, T_ON = 279,
T_WORD = 280, T_RESET = 280,
T_WORD_QUOTE = 281, T_WORD = 281,
T_UNEQUAL = 282, T_WORD_QUOTE = 282,
T_CLOSE_PAREN = 283, T_UNEQUAL = 283,
T_OPEN_PAREN = 284, T_CLOSE_PAREN = 284,
T_EOL = 285, T_OPEN_PAREN = 285,
T_OR = 286, T_EOL = 286,
T_AND = 287, T_OR = 287,
T_EQUAL = 288, T_AND = 288,
T_NOT = 289 T_EQUAL = 289,
T_NOT = 290
}; };
#endif #endif
#define T_MAINMENU 258 #define T_MAINMENU 258
@ -118,16 +119,17 @@
#define T_SELECT 277 #define T_SELECT 277
#define T_RANGE 278 #define T_RANGE 278
#define T_ON 279 #define T_ON 279
#define T_WORD 280 #define T_RESET 280
#define T_WORD_QUOTE 281 #define T_WORD 281
#define T_UNEQUAL 282 #define T_WORD_QUOTE 282
#define T_CLOSE_PAREN 283 #define T_UNEQUAL 283
#define T_OPEN_PAREN 284 #define T_CLOSE_PAREN 284
#define T_EOL 285 #define T_OPEN_PAREN 285
#define T_OR 286 #define T_EOL 286
#define T_AND 287 #define T_OR 287
#define T_EQUAL 288 #define T_AND 288
#define T_NOT 289 #define T_EQUAL 289
#define T_NOT 290
@ -317,20 +319,20 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 3 #define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
#define YYLAST 264 #define YYLAST 275
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 35 #define YYNTOKENS 36
/* YYNNTS -- Number of nonterminals. */ /* YYNNTS -- Number of nonterminals. */
#define YYNNTS 42 #define YYNNTS 42
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 104 #define YYNRULES 106
/* YYNRULES -- Number of states. */ /* YYNRULES -- Number of states. */
#define YYNSTATES 175 #define YYNSTATES 178
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2 #define YYUNDEFTOK 2
#define YYMAXUTOK 289 #define YYMAXUTOK 290
#define YYTRANSLATE(YYX) \ #define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@ -366,7 +368,8 @@ static const unsigned char yytranslate[] =
2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35
}; };
#if YYDEBUG #if YYDEBUG
@ -376,68 +379,68 @@ static const unsigned short int yyprhs[] =
{ {
0, 0, 3, 5, 6, 9, 12, 15, 20, 23, 0, 0, 3, 5, 6, 9, 12, 15, 20, 23,
28, 33, 37, 39, 41, 43, 45, 47, 49, 51, 28, 33, 37, 39, 41, 43, 45, 47, 49, 51,
53, 55, 57, 59, 61, 63, 67, 70, 74, 77, 53, 55, 57, 59, 61, 63, 65, 69, 72, 76,
81, 84, 85, 88, 91, 94, 97, 100, 104, 109, 79, 83, 86, 87, 90, 93, 96, 99, 102, 106,
114, 119, 125, 128, 131, 133, 137, 138, 141, 144, 111, 116, 121, 127, 130, 133, 135, 139, 140, 143,
147, 150, 153, 158, 162, 165, 170, 171, 174, 178, 146, 149, 152, 155, 160, 164, 167, 170, 175, 176,
180, 184, 185, 188, 191, 194, 198, 201, 203, 207, 179, 183, 185, 189, 190, 193, 196, 199, 203, 206,
208, 211, 214, 217, 221, 225, 228, 231, 234, 235, 208, 212, 213, 216, 219, 222, 226, 230, 233, 236,
238, 241, 244, 249, 253, 257, 258, 261, 263, 265, 239, 240, 243, 246, 249, 254, 258, 262, 263, 266,
268, 271, 274, 276, 279, 280, 283, 285, 289, 293, 268, 270, 273, 276, 279, 281, 284, 285, 288, 290,
297, 300, 304, 308, 310 294, 298, 302, 305, 309, 313, 315
}; };
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ /* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yysigned_char yyrhs[] = static const yysigned_char yyrhs[] =
{ {
36, 0, -1, 37, -1, -1, 37, 39, -1, 37, 37, 0, -1, 38, -1, -1, 38, 40, -1, 38,
50, -1, 37, 61, -1, 37, 3, 71, 73, -1, 51, -1, 38, 62, -1, 38, 3, 72, 74, -1,
37, 72, -1, 37, 25, 1, 30, -1, 37, 38, 38, 73, -1, 38, 26, 1, 31, -1, 38, 39,
1, 30, -1, 37, 1, 30, -1, 16, -1, 19, 1, 31, -1, 38, 1, 31, -1, 16, -1, 19,
-1, 20, -1, 22, -1, 18, -1, 23, -1, 21, -1, 20, -1, 22, -1, 18, -1, 23, -1, 21,
-1, 30, -1, 56, -1, 65, -1, 42, -1, 44, -1, 25, -1, 31, -1, 57, -1, 66, -1, 43,
-1, 63, -1, 25, 1, 30, -1, 1, 30, -1, -1, 45, -1, 64, -1, 26, 1, 31, -1, 1,
10, 25, 30, -1, 41, 45, -1, 11, 25, 30, 31, -1, 10, 26, 31, -1, 42, 46, -1, 11,
-1, 43, 45, -1, -1, 45, 46, -1, 45, 69, 26, 31, -1, 44, 46, -1, -1, 46, 47, -1,
-1, 45, 67, -1, 45, 40, -1, 45, 30, -1, 46, 70, -1, 46, 68, -1, 46, 41, -1, 46,
20, 70, 30, -1, 19, 71, 74, 30, -1, 21, 31, -1, 20, 71, 31, -1, 19, 72, 75, 31,
75, 74, 30, -1, 22, 25, 74, 30, -1, 23, -1, 21, 76, 75, 31, -1, 22, 26, 75, 31,
76, 76, 74, 30, -1, 7, 30, -1, 47, 51, -1, 23, 77, 77, 75, 31, -1, 7, 31, -1,
-1, 72, -1, 48, 53, 49, -1, -1, 51, 52, 48, 52, -1, 73, -1, 49, 54, 50, -1, -1,
-1, 51, 69, -1, 51, 67, -1, 51, 30, -1, 52, 53, -1, 52, 70, -1, 52, 68, -1, 52,
51, 40, -1, 19, 71, 74, 30, -1, 20, 70, 31, -1, 52, 41, -1, 19, 72, 75, 31, -1,
30, -1, 18, 30, -1, 21, 25, 74, 30, -1, 20, 71, 31, -1, 18, 31, -1, 25, 31, -1,
-1, 53, 39, -1, 14, 75, 73, -1, 72, -1, 21, 26, 75, 31, -1, -1, 54, 40, -1, 14,
54, 57, 55, -1, -1, 57, 39, -1, 57, 61, 76, 74, -1, 73, -1, 55, 58, 56, -1, -1,
-1, 57, 50, -1, 4, 71, 30, -1, 58, 68, 58, 40, -1, 58, 62, -1, 58, 51, -1, 4,
-1, 72, -1, 59, 62, 60, -1, -1, 62, 39, 72, 31, -1, 59, 69, -1, 73, -1, 60, 63,
-1, 62, 61, -1, 62, 50, -1, 6, 71, 30, 61, -1, -1, 63, 40, -1, 63, 62, -1, 63,
-1, 9, 71, 30, -1, 64, 68, -1, 12, 30, 51, -1, 6, 72, 31, -1, 9, 72, 31, -1,
-1, 66, 13, -1, -1, 68, 69, -1, 68, 30, 65, 69, -1, 12, 31, -1, 67, 13, -1, -1,
-1, 68, 40, -1, 16, 24, 75, 30, -1, 16, 69, 70, -1, 69, 31, -1, 69, 41, -1, 16,
75, 30, -1, 17, 75, 30, -1, -1, 71, 74, 24, 76, 31, -1, 16, 76, 31, -1, 17, 76,
-1, 25, -1, 26, -1, 5, 30, -1, 8, 30, 31, -1, -1, 72, 75, -1, 26, -1, 27, -1,
-1, 15, 30, -1, 30, -1, 73, 30, -1, -1, 5, 31, -1, 8, 31, -1, 15, 31, -1, 31,
14, 75, -1, 76, -1, 76, 33, 76, -1, 76, -1, 74, 31, -1, -1, 14, 76, -1, 77, -1,
27, 76, -1, 29, 75, 28, -1, 34, 75, -1, 77, 34, 77, -1, 77, 28, 77, -1, 30, 76,
75, 31, 75, -1, 75, 32, 75, -1, 25, -1, 29, -1, 35, 76, -1, 76, 32, 76, -1, 76,
26, -1 33, 76, -1, 26, -1, 27, -1
}; };
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short int yyrline[] = static const unsigned short int yyrline[] =
{ {
0, 103, 103, 105, 107, 108, 109, 110, 111, 112, 0, 104, 104, 106, 108, 109, 110, 111, 112, 113,
113, 117, 121, 121, 121, 121, 121, 121, 121, 125, 114, 118, 122, 122, 122, 122, 122, 122, 122, 122,
126, 127, 128, 129, 130, 134, 135, 141, 149, 155, 126, 127, 128, 129, 130, 131, 135, 136, 142, 150,
163, 173, 175, 176, 177, 178, 179, 182, 190, 196, 156, 164, 174, 176, 177, 178, 179, 180, 183, 191,
206, 212, 220, 229, 234, 242, 245, 247, 248, 249, 197, 207, 213, 221, 230, 235, 243, 246, 248, 249,
250, 251, 254, 260, 271, 277, 287, 289, 294, 302, 250, 251, 252, 255, 261, 272, 278, 283, 293, 295,
310, 313, 315, 316, 317, 322, 329, 334, 342, 345, 300, 308, 316, 319, 321, 322, 323, 328, 335, 340,
347, 348, 349, 352, 360, 367, 374, 380, 387, 389, 348, 351, 353, 354, 355, 358, 366, 373, 380, 386,
390, 391, 394, 399, 404, 412, 414, 419, 420, 423, 393, 395, 396, 397, 400, 405, 410, 418, 420, 425,
424, 425, 429, 430, 433, 434, 437, 438, 439, 440, 426, 429, 430, 431, 435, 436, 439, 440, 443, 444,
441, 442, 443, 446, 447 445, 446, 447, 448, 449, 452, 453
}; };
#endif #endif
@ -450,10 +453,10 @@ static const char *const yytname[] =
"T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
"T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
"T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT",
"T_SELECT", "T_RANGE", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", "T_SELECT", "T_RANGE", "T_ON", "T_RESET", "T_WORD", "T_WORD_QUOTE",
"T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", "T_UNEQUAL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND",
"T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt", "T_EQUAL", "T_NOT", "$accept", "input", "stmt_list", "option_name",
"option_error", "config_entry_start", "config_stmt", "common_stmt", "option_error", "config_entry_start", "config_stmt",
"menuconfig_entry_start", "menuconfig_stmt", "config_option_list", "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
"config_option", "choice", "choice_entry", "choice_end", "choice_stmt", "config_option", "choice", "choice_entry", "choice_end", "choice_stmt",
"choice_option_list", "choice_option", "choice_block", "if_entry", "choice_option_list", "choice_option", "choice_block", "if_entry",
@ -472,24 +475,24 @@ static const unsigned short int yytoknum[] =
0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289 285, 286, 287, 288, 289, 290
}; };
# endif # endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const unsigned char yyr1[] = static const unsigned char yyr1[] =
{ {
0, 35, 36, 37, 37, 37, 37, 37, 37, 37, 0, 36, 37, 38, 38, 38, 38, 38, 38, 38,
37, 37, 38, 38, 38, 38, 38, 38, 38, 39, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 40, 40, 41, 42, 43, 40, 40, 40, 40, 40, 40, 41, 41, 42, 43,
44, 45, 45, 45, 45, 45, 45, 46, 46, 46, 44, 45, 46, 46, 46, 46, 46, 46, 47, 47,
46, 46, 47, 48, 49, 50, 51, 51, 51, 51, 47, 47, 47, 48, 49, 50, 51, 52, 52, 52,
51, 51, 52, 52, 52, 52, 53, 53, 54, 55, 52, 52, 52, 53, 53, 53, 53, 53, 54, 54,
56, 57, 57, 57, 57, 58, 59, 60, 61, 62, 55, 56, 57, 58, 58, 58, 58, 59, 60, 61,
62, 62, 62, 63, 64, 65, 66, 67, 68, 68, 62, 63, 63, 63, 63, 64, 65, 66, 67, 68,
68, 68, 69, 69, 69, 70, 70, 71, 71, 72, 69, 69, 69, 69, 70, 70, 70, 71, 71, 72,
72, 72, 73, 73, 74, 74, 75, 75, 75, 75, 72, 73, 73, 73, 74, 74, 75, 75, 76, 76,
75, 75, 75, 76, 76 76, 76, 76, 76, 76, 77, 77
}; };
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@ -497,15 +500,15 @@ static const unsigned char yyr2[] =
{ {
0, 2, 1, 0, 2, 2, 2, 4, 2, 4, 0, 2, 1, 0, 2, 2, 2, 4, 2, 4,
4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 3, 2, 3, 2, 3, 1, 1, 1, 1, 1, 1, 3, 2, 3, 2,
2, 0, 2, 2, 2, 2, 2, 3, 4, 4, 3, 2, 0, 2, 2, 2, 2, 2, 3, 4,
4, 5, 2, 2, 1, 3, 0, 2, 2, 2, 4, 4, 5, 2, 2, 1, 3, 0, 2, 2,
2, 2, 4, 3, 2, 4, 0, 2, 3, 1, 2, 2, 2, 4, 3, 2, 2, 4, 0, 2,
3, 0, 2, 2, 2, 3, 2, 1, 3, 0, 3, 1, 3, 0, 2, 2, 2, 3, 2, 1,
2, 2, 2, 3, 3, 2, 2, 2, 0, 2, 3, 0, 2, 2, 2, 3, 3, 2, 2, 2,
2, 2, 4, 3, 3, 0, 2, 1, 1, 2, 0, 2, 2, 2, 4, 3, 3, 0, 2, 1,
2, 2, 1, 2, 0, 2, 1, 3, 3, 3, 1, 2, 2, 2, 1, 2, 0, 2, 1, 3,
2, 3, 3, 1, 1 3, 3, 2, 3, 3, 1, 1
}; };
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@ -515,158 +518,160 @@ static const unsigned char yydefact[] =
{ {
3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 12, 16, 13, 14, 0, 0, 0, 0, 0, 0, 12, 16, 13, 14,
18, 15, 17, 0, 19, 0, 4, 31, 22, 31, 18, 15, 17, 19, 0, 20, 0, 4, 32, 23,
23, 46, 56, 5, 61, 20, 78, 69, 6, 24, 32, 24, 47, 58, 5, 63, 21, 80, 71, 6,
78, 21, 8, 11, 87, 88, 0, 0, 89, 0, 25, 80, 22, 8, 11, 89, 90, 0, 0, 91,
42, 90, 0, 0, 0, 103, 104, 0, 0, 0, 0, 43, 92, 0, 0, 0, 105, 106, 0, 0,
96, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 93, 0, 0, 0, 0, 0, 0, 0,
0, 0, 92, 7, 65, 73, 74, 27, 29, 0, 0, 0, 0, 94, 7, 67, 75, 76, 28, 30,
100, 0, 0, 58, 0, 0, 9, 10, 0, 0, 0, 102, 0, 0, 60, 0, 0, 9, 10, 0,
0, 0, 0, 85, 0, 0, 0, 0, 36, 35, 0, 0, 0, 0, 87, 0, 0, 0, 0, 37,
32, 0, 34, 33, 0, 0, 85, 0, 50, 51, 36, 33, 0, 35, 34, 0, 0, 87, 0, 0,
47, 49, 48, 57, 45, 44, 62, 64, 60, 63, 51, 52, 48, 50, 49, 59, 46, 45, 64, 66,
59, 80, 81, 79, 70, 72, 68, 71, 67, 93, 62, 65, 61, 82, 83, 81, 72, 74, 70, 73,
99, 101, 102, 98, 97, 26, 76, 0, 0, 0, 69, 95, 101, 103, 104, 100, 99, 27, 78, 0,
94, 0, 94, 94, 94, 0, 0, 77, 54, 94, 0, 0, 96, 0, 96, 96, 96, 0, 0, 79,
0, 94, 0, 83, 84, 0, 0, 37, 86, 0, 55, 96, 0, 96, 56, 0, 85, 86, 0, 0,
0, 94, 25, 0, 53, 0, 82, 95, 38, 39, 38, 88, 0, 0, 96, 26, 0, 54, 0, 84,
40, 0, 52, 55, 41 97, 39, 40, 41, 0, 53, 57, 42
}; };
/* YYDEFGOTO[NTERM-NUM]. */ /* YYDEFGOTO[NTERM-NUM]. */
static const short int yydefgoto[] = static const short int yydefgoto[] =
{ {
-1, 1, 2, 25, 26, 99, 27, 28, 29, 30, -1, 1, 2, 26, 27, 100, 28, 29, 30, 31,
64, 100, 31, 32, 114, 33, 66, 110, 67, 34, 65, 101, 32, 33, 116, 34, 67, 112, 68, 35,
118, 35, 68, 36, 37, 126, 38, 70, 39, 40, 120, 36, 69, 37, 38, 128, 39, 71, 40, 41,
41, 101, 102, 69, 103, 141, 142, 42, 73, 156, 42, 102, 103, 70, 104, 143, 144, 43, 74, 159,
59, 60 60, 61
}; };
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */ STATE-NUM. */
#define YYPACT_NINF -78 #define YYPACT_NINF -134
static const short int yypact[] = static const short int yypact[] =
{ {
-78, 2, 159, -78, -21, 0, 0, -12, 0, 1, -134, 2, 160, -134, -21, -10, -10, -8, -10, -1,
4, 0, 27, 38, 60, 58, -78, -78, -78, -78, 21, -10, 64, 68, 212, 84, -134, -134, -134, -134,
-78, -78, -78, 100, -78, 104, -78, -78, -78, -78, -134, -134, -134, -134, 125, -134, 128, -134, -134, -134,
-78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
-78, -78, -78, -78, -78, -78, 86, 113, -78, 114, -134, -134, -134, -134, -134, -134, -134, 99, 112, -134,
-78, -78, 125, 127, 128, -78, -78, 60, 60, 210, 113, -134, -134, 124, 127, 141, -134, -134, 212, 212,
65, -78, 141, 142, 39, 103, 182, 200, 6, 66, 3, -19, -134, 142, 153, 39, 102, 187, 226, 215,
6, 131, -78, 146, -78, -78, -78, -78, -78, 196, 67, 215, 131, -134, 159, -134, -134, -134, -134, -134,
-78, 60, 60, 146, 40, 40, -78, -78, 155, 156, 34, -134, 212, 212, 159, 53, 53, -134, -134, 163,
-2, 60, 0, 0, 60, 105, 40, 194, -78, -78, 169, 65, 212, -10, -10, 212, 133, 53, 176, -134,
-78, 206, -78, -78, 183, 0, 0, 195, -78, -78, -134, -134, 203, -134, -134, 196, -10, -10, 202, 213,
-78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
-78, -78, -78, -78, -78, -78, -78, -78, -78, -78, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
-78, 197, -78, -78, -78, -78, -78, 60, 213, 216, -134, -134, -134, 200, -134, -134, -134, -134, -134, 212,
212, 203, 212, 190, 212, 40, 208, -78, -78, 212, 178, 217, 240, 224, 240, 0, 240, 53, 225, -134,
222, 212, 219, -78, -78, 60, 223, -78, -78, 224, -134, 240, 227, 240, -134, 220, -134, -134, 212, 228,
225, 212, -78, 226, -78, 227, -78, 47, -78, -78, -134, -134, 229, 230, 240, -134, 231, -134, 232, -134,
-78, 228, -78, -78, -78 54, -134, -134, -134, 233, -134, -134, -134
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
static const short int yypgoto[] = static const short int yypgoto[] =
{ {
-78, -78, -78, -78, 164, -36, -78, -78, -78, -78, -134, -134, -134, -134, 28, -46, -134, -134, -134, -134,
230, -78, -78, -78, -78, 29, -78, -78, -78, -78, 235, -134, -134, -134, -134, 118, -134, -134, -134, -134,
-78, -78, -78, -78, -78, -78, 59, -78, -78, -78, -134, -134, -134, -134, -134, -134, 174, -134, -134, -134,
-78, -78, 198, 220, 24, 157, -5, 169, 202, 74, -134, -134, 199, 234, -45, 161, -5, 146, 207, -133,
-53, -77 -54, -78
}; };
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says. number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */ If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -76 #define YYTABLE_NINF -78
static const short int yytable[] = static const short int yytable[] =
{ {
46, 47, 3, 49, 79, 80, 52, 133, 134, 43, 47, 48, 3, 50, 80, 81, 53, 135, 136, 85,
6, 7, 8, 9, 10, 11, 12, 13, 48, 145, 44, 161, 162, 163, 158, 86, 45, 46, 166, 147,
14, 15, 137, 55, 56, 44, 45, 57, 131, 132, 168, 111, 114, 49, 124, 125, 124, 125, 133, 134,
109, 50, 58, 122, 51, 122, 24, 138, 139, -28, 51, 174, 82, 83, 73, 82, 83, 140, 141, -29,
88, 143, -28, -28, -28, -28, -28, -28, -28, -28, 89, 145, -29, -29, -29, -29, -29, -29, -29, -29,
-28, 89, 53, -28, -28, 90, 91, -28, 92, 93, -29, 90, 52, -29, -29, 91, 92, -29, 93, 94,
94, 95, 96, 54, 97, 55, 56, 88, 161, 98, 95, 96, 97, 132, -29, 98, 82, 83, 89, 164,
-66, -66, -66, -66, -66, -66, -66, -66, 81, 82, 99, -68, -68, -68, -68, -68, -68, -68, -68, 56,
-66, -66, 90, 91, 152, 55, 56, 140, 61, 57, 57, -68, -68, 91, 92, 155, 82, 83, 142, 139,
112, 97, 84, 123, 58, 123, 121, 117, 85, 125, 54, 56, 57, 98, 55, 58, 115, 118, 123, 126,
149, 62, 167, -30, 88, 63, -30, -30, -30, -30, 59, 151, -31, 89, 170, -31, -31, -31, -31, -31,
-30, -30, -30, -30, -30, 89, 72, -30, -30, 90, -31, -31, -31, -31, 90, 62, -31, -31, 91, 92,
91, -30, 92, 93, 94, 95, 96, 119, 97, 127, -31, 93, 94, 95, 96, 97, 63, -31, 98, 64,
144, -75, 88, 98, -75, -75, -75, -75, -75, -75, 73, -77, 89, 99, -77, -77, -77, -77, -77, -77,
-75, -75, -75, 74, 75, -75, -75, 90, 91, -75, -77, -77, -77, 75, 76, -77, -77, 91, 92, -77,
-75, -75, -75, -75, -75, 76, 97, 77, 78, -2, -77, -77, -77, -77, -77, 77, -77, 98, 78, 146,
4, 121, 5, 6, 7, 8, 9, 10, 11, 12, -2, 4, 123, 5, 6, 7, 8, 9, 10, 11,
13, 86, 87, 14, 15, 16, 129, 17, 18, 19, 12, 13, 79, 87, 14, 15, 16, 148, 17, 18,
20, 21, 22, 88, 23, 135, 136, -43, -43, 24, 19, 20, 21, 22, 88, 23, 24, 119, 89, 127,
-43, -43, -43, -43, 89, 146, -43, -43, 90, 91, 131, 25, -44, -44, 137, -44, -44, -44, -44, 90,
104, 105, 106, 107, 155, 7, 8, 97, 10, 11, 138, -44, -44, 91, 92, 105, 106, 107, 108, 156,
12, 13, 108, 148, 14, 15, 158, 159, 160, 147, 82, 83, 109, 98, 117, 122, 149, 130, 110, 6,
151, 81, 82, 163, 130, 165, 155, 81, 82, 82, 7, 8, 9, 10, 11, 12, 13, 150, 153, 14,
24, 113, 116, 157, 124, 171, 115, 120, 162, 128, 15, 7, 8, 83, 10, 11, 12, 13, 56, 57,
72, 81, 82, 153, 81, 82, 154, 81, 82, 166, 14, 15, 58, 121, 154, 129, 25, 59, 157, 82,
81, 82, 164, 168, 169, 170, 172, 173, 174, 65, 83, 169, 82, 83, 158, 160, 165, 25, 167, 171,
71, 83, 0, 150, 111 172, 173, 175, 176, 177, 66, 113, 84, 152, 0,
0, 0, 0, 0, 0, 72
}; };
static const short int yycheck[] = static const short int yycheck[] =
{ {
5, 6, 0, 8, 57, 58, 11, 84, 85, 30, 5, 6, 0, 8, 58, 59, 11, 85, 86, 28,
4, 5, 6, 7, 8, 9, 10, 11, 30, 96, 31, 144, 145, 146, 14, 34, 26, 27, 151, 97,
14, 15, 24, 25, 26, 25, 26, 29, 81, 82, 153, 67, 67, 31, 70, 70, 72, 72, 82, 83,
66, 30, 34, 69, 30, 71, 30, 90, 91, 0, 31, 164, 32, 33, 31, 32, 33, 91, 92, 0,
1, 94, 3, 4, 5, 6, 7, 8, 9, 10, 1, 95, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 25, 14, 15, 16, 17, 18, 19, 20, 11, 12, 31, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 25, 25, 25, 26, 1, 145, 30, 21, 22, 23, 29, 25, 26, 32, 33, 1, 147,
4, 5, 6, 7, 8, 9, 10, 11, 31, 32, 31, 4, 5, 6, 7, 8, 9, 10, 11, 26,
14, 15, 16, 17, 137, 25, 26, 92, 30, 29, 27, 14, 15, 16, 17, 139, 32, 33, 93, 24,
66, 25, 27, 69, 34, 71, 30, 68, 33, 70, 26, 26, 27, 26, 26, 30, 68, 69, 31, 71,
105, 1, 155, 0, 1, 1, 3, 4, 5, 6, 35, 106, 0, 1, 158, 3, 4, 5, 6, 7,
7, 8, 9, 10, 11, 12, 30, 14, 15, 16, 8, 9, 10, 11, 12, 31, 14, 15, 16, 17,
17, 18, 19, 20, 21, 22, 23, 68, 25, 70, 18, 19, 20, 21, 22, 23, 1, 25, 26, 1,
25, 0, 1, 30, 3, 4, 5, 6, 7, 8, 31, 0, 1, 31, 3, 4, 5, 6, 7, 8,
9, 10, 11, 30, 30, 14, 15, 16, 17, 18, 9, 10, 11, 31, 31, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 30, 25, 30, 30, 0, 19, 20, 21, 22, 23, 31, 25, 26, 31, 26,
1, 30, 3, 4, 5, 6, 7, 8, 9, 10, 0, 1, 31, 3, 4, 5, 6, 7, 8, 9,
11, 30, 30, 14, 15, 16, 30, 18, 19, 20, 10, 11, 31, 31, 14, 15, 16, 1, 18, 19,
21, 22, 23, 1, 25, 30, 30, 5, 6, 30, 20, 21, 22, 23, 31, 25, 26, 69, 1, 71,
8, 9, 10, 11, 12, 1, 14, 15, 16, 17, 31, 31, 5, 6, 31, 8, 9, 10, 11, 12,
18, 19, 20, 21, 14, 5, 6, 25, 8, 9, 31, 14, 15, 16, 17, 18, 19, 20, 21, 31,
10, 11, 30, 30, 14, 15, 142, 143, 144, 13, 32, 33, 25, 26, 68, 69, 13, 71, 31, 4,
25, 31, 32, 149, 28, 151, 14, 31, 32, 32, 5, 6, 7, 8, 9, 10, 11, 31, 26, 14,
30, 67, 68, 30, 70, 161, 67, 68, 30, 70, 15, 5, 6, 33, 8, 9, 10, 11, 26, 27,
30, 31, 32, 30, 31, 32, 30, 31, 32, 30, 14, 15, 30, 69, 31, 71, 31, 35, 31, 32,
31, 32, 30, 30, 30, 30, 30, 30, 30, 29, 33, 31, 32, 33, 14, 31, 31, 31, 31, 31,
40, 59, -1, 106, 66 31, 31, 31, 31, 31, 30, 67, 60, 107, -1,
-1, -1, -1, -1, -1, 41
}; };
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */ symbol of state STATE-NUM. */
static const unsigned char yystos[] = static const unsigned char yystos[] =
{ {
0, 36, 37, 0, 1, 3, 4, 5, 6, 7, 0, 37, 38, 0, 1, 3, 4, 5, 6, 7,
8, 9, 10, 11, 14, 15, 16, 18, 19, 20, 8, 9, 10, 11, 14, 15, 16, 18, 19, 20,
21, 22, 23, 25, 30, 38, 39, 41, 42, 43, 21, 22, 23, 25, 26, 31, 39, 40, 42, 43,
44, 47, 48, 50, 54, 56, 58, 59, 61, 63, 44, 45, 48, 49, 51, 55, 57, 59, 60, 62,
64, 65, 72, 30, 25, 26, 71, 71, 30, 71, 64, 65, 66, 73, 31, 26, 27, 72, 72, 31,
30, 30, 71, 25, 25, 25, 26, 29, 34, 75, 72, 31, 31, 72, 26, 26, 26, 27, 30, 35,
76, 30, 1, 1, 45, 45, 51, 53, 57, 68, 76, 77, 31, 1, 1, 46, 46, 52, 54, 58,
62, 68, 30, 73, 30, 30, 30, 30, 30, 75, 69, 63, 69, 31, 74, 31, 31, 31, 31, 31,
75, 31, 32, 73, 27, 33, 30, 30, 1, 12, 76, 76, 32, 33, 74, 28, 34, 31, 31, 1,
16, 17, 19, 20, 21, 22, 23, 25, 30, 40, 12, 16, 17, 19, 20, 21, 22, 23, 26, 31,
46, 66, 67, 69, 18, 19, 20, 21, 30, 40, 41, 47, 67, 68, 70, 18, 19, 20, 21, 25,
52, 67, 69, 39, 49, 72, 39, 50, 55, 61, 31, 41, 53, 68, 70, 40, 50, 73, 40, 51,
72, 30, 40, 69, 39, 50, 60, 61, 72, 30, 56, 62, 73, 31, 41, 70, 40, 51, 61, 62,
28, 75, 75, 76, 76, 30, 30, 24, 75, 75, 73, 31, 29, 76, 76, 77, 77, 31, 31, 24,
71, 70, 71, 75, 25, 76, 1, 13, 30, 71, 76, 76, 72, 71, 72, 76, 26, 77, 1, 13,
70, 25, 75, 30, 30, 14, 74, 30, 74, 74, 31, 72, 71, 26, 31, 76, 31, 31, 14, 75,
74, 76, 30, 74, 30, 74, 30, 75, 30, 30, 31, 75, 75, 75, 77, 31, 75, 31, 75, 31,
30, 74, 30, 30, 30 76, 31, 31, 31, 75, 31, 31, 31
}; };
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
@ -976,7 +981,7 @@ yydestruct (yytype, yyvaluep)
switch (yytype) switch (yytype)
{ {
case 48: /* choice_entry */ case 49: /* choice_entry */
{ {
fprintf(stderr, "%s:%d: missing end statement for this entry\n", fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@ -986,7 +991,7 @@ yydestruct (yytype, yyvaluep)
}; };
break; break;
case 54: /* if_entry */ case 55: /* if_entry */
{ {
fprintf(stderr, "%s:%d: missing end statement for this entry\n", fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@ -996,7 +1001,7 @@ yydestruct (yytype, yyvaluep)
}; };
break; break;
case 59: /* menu_entry */ case 60: /* menu_entry */
{ {
fprintf(stderr, "%s:%d: missing end statement for this entry\n", fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@ -1329,17 +1334,17 @@ yyreduce:
{ zconf_error("invalid statement"); ;} { zconf_error("invalid statement"); ;}
break; break;
case 25: case 26:
{ zconf_error("unknown option \"%s\"", yyvsp[-2].string); ;} { zconf_error("unknown option \"%s\"", yyvsp[-2].string); ;}
break; break;
case 26: case 27:
{ zconf_error("invalid option"); ;} { zconf_error("invalid option"); ;}
break; break;
case 27: case 28:
{ {
struct symbol *sym = sym_lookup(yyvsp[-1].string, 0); struct symbol *sym = sym_lookup(yyvsp[-1].string, 0);
@ -1349,7 +1354,7 @@ yyreduce:
;} ;}
break; break;
case 28: case 29:
{ {
menu_end_entry(); menu_end_entry();
@ -1357,7 +1362,7 @@ yyreduce:
;} ;}
break; break;
case 29: case 30:
{ {
struct symbol *sym = sym_lookup(yyvsp[-1].string, 0); struct symbol *sym = sym_lookup(yyvsp[-1].string, 0);
@ -1367,7 +1372,7 @@ yyreduce:
;} ;}
break; break;
case 30: case 31:
{ {
if (current_entry->prompt) if (current_entry->prompt)
@ -1379,7 +1384,7 @@ yyreduce:
;} ;}
break; break;
case 37: case 38:
{ {
menu_set_type(yyvsp[-2].id->stype); menu_set_type(yyvsp[-2].id->stype);
@ -1389,7 +1394,7 @@ yyreduce:
;} ;}
break; break;
case 38: case 39:
{ {
menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr); menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr);
@ -1397,7 +1402,7 @@ yyreduce:
;} ;}
break; break;
case 39: case 40:
{ {
menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr); menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr);
@ -1409,7 +1414,7 @@ yyreduce:
;} ;}
break; break;
case 40: case 41:
{ {
menu_add_symbol(P_SELECT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr); menu_add_symbol(P_SELECT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr);
@ -1417,7 +1422,7 @@ yyreduce:
;} ;}
break; break;
case 41: case 42:
{ {
menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,yyvsp[-3].symbol, yyvsp[-2].symbol), yyvsp[-1].expr); menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,yyvsp[-3].symbol, yyvsp[-2].symbol), yyvsp[-1].expr);
@ -1425,7 +1430,7 @@ yyreduce:
;} ;}
break; break;
case 42: case 43:
{ {
struct symbol *sym = sym_lookup(NULL, 0); struct symbol *sym = sym_lookup(NULL, 0);
@ -1436,14 +1441,14 @@ yyreduce:
;} ;}
break; break;
case 43: case 44:
{ {
yyval.menu = menu_add_menu(); yyval.menu = menu_add_menu();
;} ;}
break; break;
case 44: case 45:
{ {
if (zconf_endtoken(yyvsp[0].id, T_CHOICE, T_ENDCHOICE)) { if (zconf_endtoken(yyvsp[0].id, T_CHOICE, T_ENDCHOICE)) {
@ -1453,7 +1458,7 @@ yyreduce:
;} ;}
break; break;
case 52: case 53:
{ {
menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr); menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr);
@ -1461,7 +1466,7 @@ yyreduce:
;} ;}
break; break;
case 53: case 54:
{ {
if (yyvsp[-2].id->stype == S_BOOLEAN || yyvsp[-2].id->stype == S_TRISTATE) { if (yyvsp[-2].id->stype == S_BOOLEAN || yyvsp[-2].id->stype == S_TRISTATE) {
@ -1474,7 +1479,7 @@ yyreduce:
;} ;}
break; break;
case 54: case 55:
{ {
current_entry->sym->flags |= SYMBOL_OPTIONAL; current_entry->sym->flags |= SYMBOL_OPTIONAL;
@ -1482,7 +1487,14 @@ yyreduce:
;} ;}
break; break;
case 55: case 56:
{
current_entry->sym->flags |= SYMBOL_RESET;
;}
break;
case 57:
{ {
if (yyvsp[-3].id->stype == S_UNKNOWN) { if (yyvsp[-3].id->stype == S_UNKNOWN) {
@ -1494,7 +1506,7 @@ yyreduce:
;} ;}
break; break;
case 58: case 60:
{ {
printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
@ -1504,7 +1516,7 @@ yyreduce:
;} ;}
break; break;
case 59: case 61:
{ {
if (zconf_endtoken(yyvsp[0].id, T_IF, T_ENDIF)) { if (zconf_endtoken(yyvsp[0].id, T_IF, T_ENDIF)) {
@ -1514,7 +1526,7 @@ yyreduce:
;} ;}
break; break;
case 65: case 67:
{ {
menu_add_entry(NULL); menu_add_entry(NULL);
@ -1523,14 +1535,14 @@ yyreduce:
;} ;}
break; break;
case 66: case 68:
{ {
yyval.menu = menu_add_menu(); yyval.menu = menu_add_menu();
;} ;}
break; break;
case 67: case 69:
{ {
if (zconf_endtoken(yyvsp[0].id, T_MENU, T_ENDMENU)) { if (zconf_endtoken(yyvsp[0].id, T_MENU, T_ENDMENU)) {
@ -1540,7 +1552,7 @@ yyreduce:
;} ;}
break; break;
case 73: case 75:
{ {
printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string); printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string);
@ -1548,7 +1560,7 @@ yyreduce:
;} ;}
break; break;
case 74: case 76:
{ {
menu_add_entry(NULL); menu_add_entry(NULL);
@ -1557,14 +1569,14 @@ yyreduce:
;} ;}
break; break;
case 75: case 77:
{ {
menu_end_entry(); menu_end_entry();
;} ;}
break; break;
case 76: case 78:
{ {
printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
@ -1572,52 +1584,42 @@ yyreduce:
;} ;}
break; break;
case 77: case 79:
{ {
current_entry->sym->help = yyvsp[0].string; current_entry->sym->help = yyvsp[0].string;
;} ;}
break; break;
case 82:
{
menu_add_dep(yyvsp[-1].expr);
printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
;}
break;
case 83:
{
menu_add_dep(yyvsp[-1].expr);
printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
;}
break;
case 84: case 84:
{ {
menu_add_dep(yyvsp[-1].expr); menu_add_dep(yyvsp[-1].expr);
printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
;}
break;
case 85:
{
menu_add_dep(yyvsp[-1].expr);
printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
;} ;}
break; break;
case 86: case 86:
{ {
menu_add_prompt(P_PROMPT, yyvsp[-1].string, yyvsp[0].expr); menu_add_dep(yyvsp[-1].expr);
printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
;} ;}
break; break;
case 89: case 88:
{ yyval.id = yyvsp[-1].id; ;} {
break; menu_add_prompt(P_PROMPT, yyvsp[-1].string, yyvsp[0].expr);
;}
case 90:
{ yyval.id = yyvsp[-1].id; ;}
break; break;
case 91: case 91:
@ -1625,58 +1627,68 @@ yyreduce:
{ yyval.id = yyvsp[-1].id; ;} { yyval.id = yyvsp[-1].id; ;}
break; break;
case 94: case 92:
{ yyval.expr = NULL; ;} { yyval.id = yyvsp[-1].id; ;}
break; break;
case 95: case 93:
{ yyval.expr = yyvsp[0].expr; ;} { yyval.id = yyvsp[-1].id; ;}
break; break;
case 96: case 96:
{ yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); ;} { yyval.expr = NULL; ;}
break; break;
case 97: case 97:
{ yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;} { yyval.expr = yyvsp[0].expr; ;}
break; break;
case 98: case 98:
{ yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;} { yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); ;}
break; break;
case 99: case 99:
{ yyval.expr = yyvsp[-1].expr; ;} { yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;}
break; break;
case 100: case 100:
{ yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); ;} { yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;}
break; break;
case 101: case 101:
{ yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); ;} { yyval.expr = yyvsp[-1].expr; ;}
break; break;
case 102: case 102:
{ yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); ;} { yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); ;}
break; break;
case 103: case 103:
{ yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); ;} { yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); ;}
break; break;
case 104: case 104:
{ yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); ;}
break;
case 105:
{ yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); ;}
break;
case 106:
{ yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); ;} { yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); ;}
break; break;

View File

@ -72,6 +72,7 @@ static struct menu *current_menu, *current_entry;
%token <id>T_SELECT %token <id>T_SELECT
%token <id>T_RANGE %token <id>T_RANGE
%token <id>T_ON %token <id>T_ON
%token <id>T_RESET
%token <string> T_WORD %token <string> T_WORD
%token <string> T_WORD_QUOTE %token <string> T_WORD_QUOTE
%token T_UNEQUAL %token T_UNEQUAL
@ -118,7 +119,7 @@ stmt_list:
; ;
option_name: option_name:
T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_RESET
; ;
common_stmt: common_stmt:
@ -274,6 +275,11 @@ choice_option: T_OPTIONAL T_EOL
printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
}; };
choice_option: T_RESET T_EOL
{
current_entry->sym->flags |= SYMBOL_RESET;
};
choice_option: T_DEFAULT T_WORD if_expr T_EOL choice_option: T_DEFAULT T_WORD if_expr T_EOL
{ {
if ($1->stype == S_UNKNOWN) { if ($1->stype == S_UNKNOWN) {

View File

@ -203,6 +203,7 @@ sub gen_target_config() {
choice choice
prompt "Target System" prompt "Target System"
default LINUX_2_4_BRCM default LINUX_2_4_BRCM
reset
EOF EOF