aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/expr.h1
-rw-r--r--scripts/kconfig/lkc.h1
-rw-r--r--scripts/kconfig/menu.c11
-rw-r--r--scripts/kconfig/symbol.c2
-rw-r--r--scripts/kconfig/zconf.gperf1
-rw-r--r--scripts/kconfig/zconf.hash.c_shipped122
-rw-r--r--scripts/kconfig/zconf.tab.c_shipped570
-rw-r--r--scripts/kconfig/zconf.y21
8 files changed, 391 insertions, 338 deletions
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 184eb6a0b505..e57826ced380 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -164,6 +164,7 @@ struct menu {
164 struct menu *list; 164 struct menu *list;
165 struct symbol *sym; 165 struct symbol *sym;
166 struct property *prompt; 166 struct property *prompt;
167 struct expr *visibility;
167 struct expr *dep; 168 struct expr *dep;
168 unsigned int flags; 169 unsigned int flags;
169 char *help; 170 char *help;
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 753cdbd7b805..3f7240df0f3b 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -107,6 +107,7 @@ void menu_end_menu(void);
107void menu_add_entry(struct symbol *sym); 107void menu_add_entry(struct symbol *sym);
108void menu_end_entry(void); 108void menu_end_entry(void);
109void menu_add_dep(struct expr *dep); 109void menu_add_dep(struct expr *dep);
110void menu_add_visibility(struct expr *dep);
110struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); 111struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
111struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); 112struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
112void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); 113void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 7e83aef42c6d..b9d9aa18e6d6 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -152,6 +152,12 @@ struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr
152 return menu_add_prop(type, prompt, NULL, dep); 152 return menu_add_prop(type, prompt, NULL, dep);
153} 153}
154 154
155void menu_add_visibility(struct expr *expr)
156{
157 current_entry->visibility = expr_alloc_and(current_entry->visibility,
158 expr);
159}
160
155void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) 161void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep)
156{ 162{
157 menu_add_prop(type, NULL, expr, dep); 163 menu_add_prop(type, NULL, expr, dep);
@@ -410,6 +416,11 @@ bool menu_is_visible(struct menu *menu)
410 if (!menu->prompt) 416 if (!menu->prompt)
411 return false; 417 return false;
412 418
419 if (menu->visibility) {
420 if (expr_calc_value(menu->visibility) == no)
421 return no;
422 }
423
413 sym = menu->sym; 424 sym = menu->sym;
414 if (sym) { 425 if (sym) {
415 sym_calc_value(sym); 426 sym_calc_value(sym);
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index c0efe102d655..af6e9f3de950 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -875,7 +875,7 @@ const char *sym_expand_string_value(const char *in)
875 symval = sym_get_string_value(sym); 875 symval = sym_get_string_value(sym);
876 } 876 }
877 877
878 newlen = strlen(res) + strlen(symval) + strlen(src); 878 newlen = strlen(res) + strlen(symval) + strlen(src) + 1;
879 if (newlen > reslen) { 879 if (newlen > reslen) {
880 reslen = newlen; 880 reslen = newlen;
881 res = realloc(res, reslen); 881 res = realloc(res, reslen);
diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf
index d8bc74249622..c9e690eb7545 100644
--- a/scripts/kconfig/zconf.gperf
+++ b/scripts/kconfig/zconf.gperf
@@ -38,6 +38,7 @@ hex, T_TYPE, TF_COMMAND, S_HEX
38string, T_TYPE, TF_COMMAND, S_STRING 38string, T_TYPE, TF_COMMAND, S_STRING
39select, T_SELECT, TF_COMMAND 39select, T_SELECT, TF_COMMAND
40range, T_RANGE, TF_COMMAND 40range, T_RANGE, TF_COMMAND
41visible, T_VISIBLE, TF_COMMAND
41option, T_OPTION, TF_COMMAND 42option, T_OPTION, TF_COMMAND
42on, T_ON, TF_PARAM 43on, T_ON, TF_PARAM
43modules, T_OPT_MODULES, TF_OPTION 44modules, T_OPT_MODULES, TF_OPTION
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped
index c1748faf4634..4055d5de1750 100644
--- a/scripts/kconfig/zconf.hash.c_shipped
+++ b/scripts/kconfig/zconf.hash.c_shipped
@@ -32,7 +32,7 @@
32struct kconf_id; 32struct kconf_id;
33 33
34static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); 34static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
35/* maximum key range = 47, duplicates = 0 */ 35/* maximum key range = 50, duplicates = 0 */
36 36
37#ifdef __GNUC__ 37#ifdef __GNUC__
38__inline 38__inline
@@ -46,32 +46,32 @@ kconf_id_hash (register const char *str, register unsigned int len)
46{ 46{
47 static unsigned char asso_values[] = 47 static unsigned char asso_values[] =
48 { 48 {
49 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
50 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 50 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
51 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 51 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
53 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
54 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 54 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
55 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 55 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
56 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 56 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
57 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 57 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
58 49, 49, 49, 49, 49, 49, 49, 49, 11, 5, 58 52, 52, 52, 52, 52, 52, 52, 52, 40, 5,
59 0, 0, 5, 49, 5, 20, 49, 49, 5, 20, 59 0, 0, 5, 52, 0, 20, 52, 52, 10, 20,
60 5, 0, 30, 49, 0, 15, 0, 10, 0, 49, 60 5, 0, 35, 52, 0, 30, 0, 15, 0, 52,
61 25, 49, 49, 49, 49, 49, 49, 49, 49, 49, 61 15, 52, 52, 52, 52, 52, 52, 52, 52, 52,
62 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 62 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
63 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 63 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
64 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 64 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
65 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 65 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
66 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 66 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
67 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 67 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
68 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 68 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
69 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 69 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
70 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 70 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
71 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 71 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
72 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 72 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
73 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 73 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
74 49, 49, 49, 49, 49, 49 74 52, 52, 52, 52, 52, 52
75 }; 75 };
76 register int hval = len; 76 register int hval = len;
77 77
@@ -102,25 +102,26 @@ struct kconf_id_strings_t
102 char kconf_id_strings_str12[sizeof("default")]; 102 char kconf_id_strings_str12[sizeof("default")];
103 char kconf_id_strings_str13[sizeof("def_bool")]; 103 char kconf_id_strings_str13[sizeof("def_bool")];
104 char kconf_id_strings_str14[sizeof("help")]; 104 char kconf_id_strings_str14[sizeof("help")];
105 char kconf_id_strings_str15[sizeof("bool")];
106 char kconf_id_strings_str16[sizeof("config")]; 105 char kconf_id_strings_str16[sizeof("config")];
107 char kconf_id_strings_str17[sizeof("def_tristate")]; 106 char kconf_id_strings_str17[sizeof("def_tristate")];
108 char kconf_id_strings_str18[sizeof("boolean")]; 107 char kconf_id_strings_str18[sizeof("hex")];
109 char kconf_id_strings_str19[sizeof("defconfig_list")]; 108 char kconf_id_strings_str19[sizeof("defconfig_list")];
110 char kconf_id_strings_str21[sizeof("string")];
111 char kconf_id_strings_str22[sizeof("if")]; 109 char kconf_id_strings_str22[sizeof("if")];
112 char kconf_id_strings_str23[sizeof("int")]; 110 char kconf_id_strings_str23[sizeof("int")];
113 char kconf_id_strings_str26[sizeof("select")];
114 char kconf_id_strings_str27[sizeof("modules")]; 111 char kconf_id_strings_str27[sizeof("modules")];
115 char kconf_id_strings_str28[sizeof("tristate")]; 112 char kconf_id_strings_str28[sizeof("tristate")];
116 char kconf_id_strings_str29[sizeof("menu")]; 113 char kconf_id_strings_str29[sizeof("menu")];
117 char kconf_id_strings_str31[sizeof("source")];
118 char kconf_id_strings_str32[sizeof("comment")]; 114 char kconf_id_strings_str32[sizeof("comment")];
119 char kconf_id_strings_str33[sizeof("hex")];
120 char kconf_id_strings_str35[sizeof("menuconfig")]; 115 char kconf_id_strings_str35[sizeof("menuconfig")];
121 char kconf_id_strings_str36[sizeof("prompt")]; 116 char kconf_id_strings_str36[sizeof("string")];
122 char kconf_id_strings_str37[sizeof("depends")]; 117 char kconf_id_strings_str37[sizeof("visible")];
118 char kconf_id_strings_str41[sizeof("prompt")];
119 char kconf_id_strings_str42[sizeof("depends")];
120 char kconf_id_strings_str44[sizeof("bool")];
121 char kconf_id_strings_str46[sizeof("select")];
122 char kconf_id_strings_str47[sizeof("boolean")];
123 char kconf_id_strings_str48[sizeof("mainmenu")]; 123 char kconf_id_strings_str48[sizeof("mainmenu")];
124 char kconf_id_strings_str51[sizeof("source")];
124 }; 125 };
125static struct kconf_id_strings_t kconf_id_strings_contents = 126static struct kconf_id_strings_t kconf_id_strings_contents =
126 { 127 {
@@ -136,25 +137,26 @@ static struct kconf_id_strings_t kconf_id_strings_contents =
136 "default", 137 "default",
137 "def_bool", 138 "def_bool",
138 "help", 139 "help",
139 "bool",
140 "config", 140 "config",
141 "def_tristate", 141 "def_tristate",
142 "boolean", 142 "hex",
143 "defconfig_list", 143 "defconfig_list",
144 "string",
145 "if", 144 "if",
146 "int", 145 "int",
147 "select",
148 "modules", 146 "modules",
149 "tristate", 147 "tristate",
150 "menu", 148 "menu",
151 "source",
152 "comment", 149 "comment",
153 "hex",
154 "menuconfig", 150 "menuconfig",
151 "string",
152 "visible",
155 "prompt", 153 "prompt",
156 "depends", 154 "depends",
157 "mainmenu" 155 "bool",
156 "select",
157 "boolean",
158 "mainmenu",
159 "source"
158 }; 160 };
159#define kconf_id_strings ((const char *) &kconf_id_strings_contents) 161#define kconf_id_strings ((const char *) &kconf_id_strings_contents)
160#ifdef __GNUC__ 162#ifdef __GNUC__
@@ -168,11 +170,11 @@ kconf_id_lookup (register const char *str, register unsigned int len)
168{ 170{
169 enum 171 enum
170 { 172 {
171 TOTAL_KEYWORDS = 31, 173 TOTAL_KEYWORDS = 32,
172 MIN_WORD_LENGTH = 2, 174 MIN_WORD_LENGTH = 2,
173 MAX_WORD_LENGTH = 14, 175 MAX_WORD_LENGTH = 14,
174 MIN_HASH_VALUE = 2, 176 MIN_HASH_VALUE = 2,
175 MAX_HASH_VALUE = 48 177 MAX_HASH_VALUE = 51
176 }; 178 };
177 179
178 static struct kconf_id wordlist[] = 180 static struct kconf_id wordlist[] =
@@ -191,31 +193,35 @@ kconf_id_lookup (register const char *str, register unsigned int len)
191 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, 193 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
192 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, 194 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
193 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND}, 195 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND},
194 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str15, T_TYPE, TF_COMMAND, S_BOOLEAN}, 196 {-1},
195 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND}, 197 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND},
196 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE}, 198 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
197 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_BOOLEAN}, 199 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_HEX},
198 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION}, 200 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION},
199 {-1}, 201 {-1}, {-1},
200 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_TYPE, TF_COMMAND, S_STRING},
201 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM}, 202 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM},
202 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT}, 203 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT},
203 {-1}, {-1}, 204 {-1}, {-1}, {-1},
204 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SELECT, TF_COMMAND},
205 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, 205 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
206 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE}, 206 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE},
207 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, 207 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
208 {-1}, 208 {-1}, {-1},
209 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SOURCE, TF_COMMAND},
210 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, 209 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
211 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_TYPE, TF_COMMAND, S_HEX}, 210 {-1}, {-1},
212 {-1},
213 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND}, 211 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND},
214 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_PROMPT, TF_COMMAND}, 212 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_TYPE, TF_COMMAND, S_STRING},
215 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_DEPENDS, TF_COMMAND}, 213 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_VISIBLE, TF_COMMAND},
216 {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, 214 {-1}, {-1}, {-1},
215 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_PROMPT, TF_COMMAND},
216 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_DEPENDS, TF_COMMAND},
217 {-1}, 217 {-1},
218 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND} 218 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str44, T_TYPE, TF_COMMAND, S_BOOLEAN},
219 {-1},
220 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND},
221 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
222 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND},
223 {-1}, {-1},
224 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_SOURCE, TF_COMMAND}
219 }; 225 };
220 226
221 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) 227 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index 699d4b265186..4c5495ea205e 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -160,18 +160,19 @@ static struct menu *current_menu, *current_entry;
160 T_DEFAULT = 275, 160 T_DEFAULT = 275,
161 T_SELECT = 276, 161 T_SELECT = 276,
162 T_RANGE = 277, 162 T_RANGE = 277,
163 T_OPTION = 278, 163 T_VISIBLE = 278,
164 T_ON = 279, 164 T_OPTION = 279,
165 T_WORD = 280, 165 T_ON = 280,
166 T_WORD_QUOTE = 281, 166 T_WORD = 281,
167 T_UNEQUAL = 282, 167 T_WORD_QUOTE = 282,
168 T_CLOSE_PAREN = 283, 168 T_UNEQUAL = 283,
169 T_OPEN_PAREN = 284, 169 T_CLOSE_PAREN = 284,
170 T_EOL = 285, 170 T_OPEN_PAREN = 285,
171 T_OR = 286, 171 T_EOL = 286,
172 T_AND = 287, 172 T_OR = 287,
173 T_EQUAL = 288, 173 T_AND = 288,
174 T_NOT = 289 174 T_EQUAL = 289,
175 T_NOT = 290
175 }; 176 };
176#endif 177#endif
177 178
@@ -419,20 +420,20 @@ union yyalloc
419/* YYFINAL -- State number of the termination state. */ 420/* YYFINAL -- State number of the termination state. */
420#define YYFINAL 11 421#define YYFINAL 11
421/* YYLAST -- Last index in YYTABLE. */ 422/* YYLAST -- Last index in YYTABLE. */
422#define YYLAST 277 423#define YYLAST 290
423 424
424/* YYNTOKENS -- Number of terminals. */ 425/* YYNTOKENS -- Number of terminals. */
425#define YYNTOKENS 35 426#define YYNTOKENS 36
426/* YYNNTS -- Number of nonterminals. */ 427/* YYNNTS -- Number of nonterminals. */
427#define YYNNTS 48 428#define YYNNTS 50
428/* YYNRULES -- Number of rules. */ 429/* YYNRULES -- Number of rules. */
429#define YYNRULES 113 430#define YYNRULES 118
430/* YYNRULES -- Number of states. */ 431/* YYNRULES -- Number of states. */
431#define YYNSTATES 185 432#define YYNSTATES 191
432 433
433/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 434/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
434#define YYUNDEFTOK 2 435#define YYUNDEFTOK 2
435#define YYMAXUTOK 289 436#define YYMAXUTOK 290
436 437
437#define YYTRANSLATE(YYX) \ 438#define YYTRANSLATE(YYX) \
438 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 439 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -468,7 +469,8 @@ static const yytype_uint8 yytranslate[] =
468 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 469 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
469 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 470 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
470 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 471 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
471 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 472 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
473 35
472}; 474};
473 475
474#if YYDEBUG 476#if YYDEBUG
@@ -478,72 +480,73 @@ static const yytype_uint16 yyprhs[] =
478{ 480{
479 0, 0, 3, 6, 8, 11, 13, 14, 17, 20, 481 0, 0, 3, 6, 8, 11, 13, 14, 17, 20,
480 23, 26, 31, 36, 40, 42, 44, 46, 48, 50, 482 23, 26, 31, 36, 40, 42, 44, 46, 48, 50,
481 52, 54, 56, 58, 60, 62, 64, 66, 70, 73, 483 52, 54, 56, 58, 60, 62, 64, 66, 68, 72,
482 77, 80, 84, 87, 88, 91, 94, 97, 100, 103, 484 75, 79, 82, 86, 89, 90, 93, 96, 99, 102,
483 106, 110, 115, 120, 125, 131, 135, 136, 140, 141, 485 105, 108, 112, 117, 122, 127, 133, 137, 138, 142,
484 144, 148, 151, 153, 157, 158, 161, 164, 167, 170, 486 143, 146, 150, 153, 155, 159, 160, 163, 166, 169,
485 173, 178, 182, 185, 190, 191, 194, 198, 200, 204, 487 172, 175, 180, 184, 187, 192, 193, 196, 200, 202,
486 205, 208, 211, 214, 218, 222, 225, 227, 231, 232, 488 206, 207, 210, 213, 216, 220, 224, 228, 230, 234,
487 235, 238, 241, 245, 249, 252, 255, 258, 259, 262, 489 235, 238, 241, 244, 248, 252, 255, 258, 261, 262,
488 265, 268, 273, 274, 277, 279, 281, 284, 287, 290, 490 265, 268, 271, 276, 277, 280, 283, 286, 287, 290,
489 292, 295, 296, 299, 301, 305, 309, 313, 316, 320, 491 292, 294, 297, 300, 303, 305, 308, 309, 312, 314,
490 324, 326, 328, 329 492 318, 322, 326, 329, 333, 337, 339, 341, 342
491}; 493};
492 494
493/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 495/* YYRHS -- A `-1'-separated list of the rules' RHS. */
494static const yytype_int8 yyrhs[] = 496static const yytype_int8 yyrhs[] =
495{ 497{
496 36, 0, -1, 78, 37, -1, 37, -1, 62, 38, 498 37, 0, -1, 81, 38, -1, 38, -1, 63, 39,
497 -1, 38, -1, -1, 38, 40, -1, 38, 54, -1, 499 -1, 39, -1, -1, 39, 41, -1, 39, 55, -1,
498 38, 66, -1, 38, 77, -1, 38, 25, 1, 30, 500 39, 67, -1, 39, 80, -1, 39, 26, 1, 31,
499 -1, 38, 39, 1, 30, -1, 38, 1, 30, -1, 501 -1, 39, 40, 1, 31, -1, 39, 1, 31, -1,
500 16, -1, 18, -1, 19, -1, 21, -1, 17, -1, 502 16, -1, 18, -1, 19, -1, 21, -1, 17, -1,
501 22, -1, 20, -1, 30, -1, 60, -1, 70, -1, 503 22, -1, 20, -1, 23, -1, 31, -1, 61, -1,
502 43, -1, 45, -1, 68, -1, 25, 1, 30, -1, 504 71, -1, 44, -1, 46, -1, 69, -1, 26, 1,
503 1, 30, -1, 10, 25, 30, -1, 42, 46, -1, 505 31, -1, 1, 31, -1, 10, 26, 31, -1, 43,
504 11, 25, 30, -1, 44, 46, -1, -1, 46, 47, 506 47, -1, 11, 26, 31, -1, 45, 47, -1, -1,
505 -1, 46, 48, -1, 46, 74, -1, 46, 72, -1, 507 47, 48, -1, 47, 49, -1, 47, 75, -1, 47,
506 46, 41, -1, 46, 30, -1, 19, 75, 30, -1, 508 73, -1, 47, 42, -1, 47, 31, -1, 19, 78,
507 18, 76, 79, 30, -1, 20, 80, 79, 30, -1, 509 31, -1, 18, 79, 82, 31, -1, 20, 83, 82,
508 21, 25, 79, 30, -1, 22, 81, 81, 79, 30, 510 31, -1, 21, 26, 82, 31, -1, 22, 84, 84,
509 -1, 23, 49, 30, -1, -1, 49, 25, 50, -1, 511 82, 31, -1, 24, 50, 31, -1, -1, 50, 26,
510 -1, 33, 76, -1, 7, 82, 30, -1, 51, 55, 512 51, -1, -1, 34, 79, -1, 7, 85, 31, -1,
511 -1, 77, -1, 52, 57, 53, -1, -1, 55, 56, 513 52, 56, -1, 80, -1, 53, 58, 54, -1, -1,
512 -1, 55, 74, -1, 55, 72, -1, 55, 30, -1, 514 56, 57, -1, 56, 75, -1, 56, 73, -1, 56,
513 55, 41, -1, 18, 76, 79, 30, -1, 19, 75, 515 31, -1, 56, 42, -1, 18, 79, 82, 31, -1,
514 30, -1, 17, 30, -1, 20, 25, 79, 30, -1, 516 19, 78, 31, -1, 17, 31, -1, 20, 26, 82,
515 -1, 57, 40, -1, 14, 80, 78, -1, 77, -1, 517 31, -1, -1, 58, 41, -1, 14, 83, 81, -1,
516 58, 61, 59, -1, -1, 61, 40, -1, 61, 66, 518 80, -1, 59, 62, 60, -1, -1, 62, 41, -1,
517 -1, 61, 54, -1, 3, 76, 78, -1, 4, 76, 519 62, 67, -1, 62, 55, -1, 3, 79, 81, -1,
518 30, -1, 63, 73, -1, 77, -1, 64, 67, 65, 520 4, 79, 31, -1, 64, 76, 74, -1, 80, -1,
519 -1, -1, 67, 40, -1, 67, 66, -1, 67, 54, 521 65, 68, 66, -1, -1, 68, 41, -1, 68, 67,
520 -1, 6, 76, 30, -1, 9, 76, 30, -1, 69, 522 -1, 68, 55, -1, 6, 79, 31, -1, 9, 79,
521 73, -1, 12, 30, -1, 71, 13, -1, -1, 73, 523 31, -1, 70, 74, -1, 12, 31, -1, 72, 13,
522 74, -1, 73, 30, -1, 73, 41, -1, 16, 24, 524 -1, -1, 74, 75, -1, 74, 31, -1, 74, 42,
523 80, 30, -1, -1, 76, 79, -1, 25, -1, 26, 525 -1, 16, 25, 83, 31, -1, -1, 76, 77, -1,
524 -1, 5, 30, -1, 8, 30, -1, 15, 30, -1, 526 76, 31, -1, 23, 82, -1, -1, 79, 82, -1,
525 30, -1, 78, 30, -1, -1, 14, 80, -1, 81, 527 26, -1, 27, -1, 5, 31, -1, 8, 31, -1,
526 -1, 81, 33, 81, -1, 81, 27, 81, -1, 29, 528 15, 31, -1, 31, -1, 81, 31, -1, -1, 14,
527 80, 28, -1, 34, 80, -1, 80, 31, 80, -1, 529 83, -1, 84, -1, 84, 34, 84, -1, 84, 28,
528 80, 32, 80, -1, 25, -1, 26, -1, -1, 25, 530 84, -1, 30, 83, 29, -1, 35, 83, -1, 83,
529 -1 531 32, 83, -1, 83, 33, 83, -1, 26, -1, 27,
532 -1, -1, 26, -1
530}; 533};
531 534
532/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 535/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
533static const yytype_uint16 yyrline[] = 536static const yytype_uint16 yyrline[] =
534{ 537{
535 0, 107, 107, 107, 109, 109, 111, 113, 114, 115, 538 0, 108, 108, 108, 110, 110, 112, 114, 115, 116,
536 116, 117, 118, 122, 126, 126, 126, 126, 126, 126, 539 117, 118, 119, 123, 127, 127, 127, 127, 127, 127,
537 126, 130, 131, 132, 133, 134, 135, 139, 140, 146, 540 127, 127, 131, 132, 133, 134, 135, 136, 140, 141,
538 154, 160, 168, 178, 180, 181, 182, 183, 184, 185, 541 147, 155, 161, 169, 179, 181, 182, 183, 184, 185,
539 188, 196, 202, 212, 218, 224, 227, 229, 240, 241, 542 186, 189, 197, 203, 213, 219, 225, 228, 230, 241,
540 246, 255, 260, 268, 271, 273, 274, 275, 276, 277, 543 242, 247, 256, 261, 269, 272, 274, 275, 276, 277,
541 280, 286, 297, 303, 313, 315, 320, 328, 336, 339, 544 278, 281, 287, 298, 304, 314, 316, 321, 329, 337,
542 341, 342, 343, 348, 355, 362, 367, 375, 378, 380, 545 340, 342, 343, 344, 349, 356, 363, 368, 376, 379,
543 381, 382, 385, 393, 400, 407, 413, 420, 422, 423, 546 381, 382, 383, 386, 394, 401, 408, 414, 421, 423,
544 424, 427, 435, 437, 442, 443, 446, 447, 448, 452, 547 424, 425, 428, 436, 438, 439, 442, 449, 451, 456,
545 453, 456, 457, 460, 461, 462, 463, 464, 465, 466, 548 457, 460, 461, 462, 466, 467, 470, 471, 474, 475,
546 469, 470, 473, 474 549 476, 477, 478, 479, 480, 483, 484, 487, 488
547}; 550};
548#endif 551#endif
549 552
@@ -556,7 +559,7 @@ static const char *const yytname[] =
556 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", 559 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
557 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", 560 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
558 "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE", 561 "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE",
559 "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", 562 "T_VISIBLE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL",
560 "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", 563 "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL",
561 "T_NOT", "$accept", "input", "start", "stmt_list", "option_name", 564 "T_NOT", "$accept", "input", "start", "stmt_list", "option_name",
562 "common_stmt", "option_error", "config_entry_start", "config_stmt", 565 "common_stmt", "option_error", "config_entry_start", "config_stmt",
@@ -567,8 +570,8 @@ static const char *const yytname[] =
567 "if_entry", "if_end", "if_stmt", "if_block", "mainmenu_stmt", "menu", 570 "if_entry", "if_end", "if_stmt", "if_block", "mainmenu_stmt", "menu",
568 "menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt", 571 "menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt",
569 "comment", "comment_stmt", "help_start", "help", "depends_list", 572 "comment", "comment_stmt", "help_start", "help", "depends_list",
570 "depends", "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", 573 "depends", "visibility_list", "visible", "prompt_stmt_opt", "prompt",
571 "symbol", "word_opt", 0 574 "end", "nl", "if_expr", "expr", "symbol", "word_opt", 0
572}; 575};
573#endif 576#endif
574 577
@@ -580,25 +583,25 @@ static const yytype_uint16 yytoknum[] =
580 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 583 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
581 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 584 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
582 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 585 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
583 285, 286, 287, 288, 289 586 285, 286, 287, 288, 289, 290
584}; 587};
585# endif 588# endif
586 589
587/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 590/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
588static const yytype_uint8 yyr1[] = 591static const yytype_uint8 yyr1[] =
589{ 592{
590 0, 35, 36, 36, 37, 37, 38, 38, 38, 38, 593 0, 36, 37, 37, 38, 38, 39, 39, 39, 39,
591 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 594 39, 39, 39, 39, 40, 40, 40, 40, 40, 40,
592 39, 40, 40, 40, 40, 40, 40, 41, 41, 42, 595 40, 40, 41, 41, 41, 41, 41, 41, 42, 42,
593 43, 44, 45, 46, 46, 46, 46, 46, 46, 46, 596 43, 44, 45, 46, 47, 47, 47, 47, 47, 47,
594 47, 47, 47, 47, 47, 48, 49, 49, 50, 50, 597 47, 48, 48, 48, 48, 48, 49, 50, 50, 51,
595 51, 52, 53, 54, 55, 55, 55, 55, 55, 55, 598 51, 52, 53, 54, 55, 56, 56, 56, 56, 56,
596 56, 56, 56, 56, 57, 57, 58, 59, 60, 61, 599 56, 57, 57, 57, 57, 58, 58, 59, 60, 61,
597 61, 61, 61, 62, 63, 64, 65, 66, 67, 67, 600 62, 62, 62, 62, 63, 64, 65, 66, 67, 68,
598 67, 67, 68, 69, 70, 71, 72, 73, 73, 73, 601 68, 68, 68, 69, 70, 71, 72, 73, 74, 74,
599 73, 74, 75, 75, 76, 76, 77, 77, 77, 78, 602 74, 74, 75, 76, 76, 76, 77, 78, 78, 79,
600 78, 79, 79, 80, 80, 80, 80, 80, 80, 80, 603 79, 80, 80, 80, 81, 81, 82, 82, 83, 83,
601 81, 81, 82, 82 604 83, 83, 83, 83, 83, 84, 84, 85, 85
602}; 605};
603 606
604/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 607/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -606,16 +609,16 @@ static const yytype_uint8 yyr2[] =
606{ 609{
607 0, 2, 2, 1, 2, 1, 0, 2, 2, 2, 610 0, 2, 2, 1, 2, 1, 0, 2, 2, 2,
608 2, 4, 4, 3, 1, 1, 1, 1, 1, 1, 611 2, 4, 4, 3, 1, 1, 1, 1, 1, 1,
609 1, 1, 1, 1, 1, 1, 1, 3, 2, 3, 612 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
610 2, 3, 2, 0, 2, 2, 2, 2, 2, 2, 613 3, 2, 3, 2, 0, 2, 2, 2, 2, 2,
611 3, 4, 4, 4, 5, 3, 0, 3, 0, 2, 614 2, 3, 4, 4, 4, 5, 3, 0, 3, 0,
612 3, 2, 1, 3, 0, 2, 2, 2, 2, 2, 615 2, 3, 2, 1, 3, 0, 2, 2, 2, 2,
613 4, 3, 2, 4, 0, 2, 3, 1, 3, 0, 616 2, 4, 3, 2, 4, 0, 2, 3, 1, 3,
614 2, 2, 2, 3, 3, 2, 1, 3, 0, 2, 617 0, 2, 2, 2, 3, 3, 3, 1, 3, 0,
615 2, 2, 3, 3, 2, 2, 2, 0, 2, 2, 618 2, 2, 2, 3, 3, 2, 2, 2, 0, 2,
616 2, 4, 0, 2, 1, 1, 2, 2, 2, 1, 619 2, 2, 4, 0, 2, 2, 2, 0, 2, 1,
617 2, 0, 2, 1, 3, 3, 3, 2, 3, 3, 620 1, 2, 2, 2, 1, 2, 0, 2, 1, 3,
618 1, 1, 0, 1 621 3, 3, 2, 3, 3, 1, 1, 0, 1
619}; 622};
620 623
621/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 624/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -623,165 +626,172 @@ static const yytype_uint8 yyr2[] =
623 means the default is an error. */ 626 means the default is an error. */
624static const yytype_uint8 yydefact[] = 627static const yytype_uint8 yydefact[] =
625{ 628{
626 6, 0, 99, 0, 3, 0, 6, 6, 94, 95, 629 6, 0, 104, 0, 3, 0, 6, 6, 99, 100,
627 0, 1, 0, 0, 0, 0, 112, 0, 0, 0, 630 0, 1, 0, 0, 0, 0, 117, 0, 0, 0,
628 0, 0, 0, 14, 18, 15, 16, 20, 17, 19, 631 0, 0, 0, 14, 18, 15, 16, 20, 17, 19,
629 0, 21, 0, 7, 33, 24, 33, 25, 54, 64, 632 21, 0, 22, 0, 7, 34, 25, 34, 26, 55,
630 8, 69, 22, 87, 78, 9, 26, 87, 23, 10, 633 65, 8, 70, 23, 93, 79, 9, 27, 88, 24,
631 0, 100, 2, 73, 13, 0, 96, 0, 113, 0, 634 10, 0, 105, 2, 74, 13, 0, 101, 0, 118,
632 97, 0, 0, 0, 110, 111, 0, 0, 0, 103, 635 0, 102, 0, 0, 0, 115, 116, 0, 0, 0,
633 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 636 108, 103, 0, 0, 0, 0, 0, 0, 0, 88,
634 0, 74, 82, 50, 83, 29, 31, 0, 107, 0, 637 0, 0, 75, 83, 51, 84, 30, 32, 0, 112,
635 0, 66, 0, 0, 11, 12, 0, 0, 0, 0, 638 0, 0, 67, 0, 0, 11, 12, 0, 0, 0,
636 92, 0, 0, 0, 46, 0, 39, 38, 34, 35, 639 0, 97, 0, 0, 0, 47, 0, 40, 39, 35,
637 0, 37, 36, 0, 0, 92, 0, 58, 59, 55, 640 36, 0, 38, 37, 0, 0, 97, 0, 59, 60,
638 57, 56, 65, 53, 52, 70, 72, 68, 71, 67, 641 56, 58, 57, 66, 54, 53, 71, 73, 69, 72,
639 89, 90, 88, 79, 81, 77, 80, 76, 106, 108, 642 68, 106, 95, 0, 94, 80, 82, 78, 81, 77,
640 109, 105, 104, 28, 85, 0, 101, 0, 101, 101, 643 90, 91, 89, 111, 113, 114, 110, 109, 29, 86,
641 101, 0, 0, 0, 86, 62, 101, 0, 101, 0, 644 0, 106, 0, 106, 106, 106, 0, 0, 0, 87,
642 0, 0, 40, 93, 0, 0, 101, 48, 45, 27, 645 63, 106, 0, 106, 0, 96, 0, 0, 41, 98,
643 0, 61, 0, 91, 102, 41, 42, 43, 0, 0, 646 0, 0, 106, 49, 46, 28, 0, 62, 0, 107,
644 47, 60, 63, 44, 49 647 92, 42, 43, 44, 0, 0, 48, 61, 64, 45,
648 50
645}; 649};
646 650
647/* YYDEFGOTO[NTERM-NUM]. */ 651/* YYDEFGOTO[NTERM-NUM]. */
648static const yytype_int16 yydefgoto[] = 652static const yytype_int16 yydefgoto[] =
649{ 653{
650 -1, 3, 4, 5, 32, 33, 107, 34, 35, 36, 654 -1, 3, 4, 5, 33, 34, 108, 35, 36, 37,
651 37, 73, 108, 109, 152, 180, 38, 39, 123, 40, 655 38, 74, 109, 110, 157, 186, 39, 40, 124, 41,
652 75, 119, 76, 41, 127, 42, 77, 6, 43, 44, 656 76, 120, 77, 42, 128, 43, 78, 6, 44, 45,
653 135, 45, 79, 46, 47, 48, 110, 111, 78, 112, 657 137, 46, 80, 47, 48, 49, 111, 112, 81, 113,
654 147, 148, 49, 7, 161, 68, 69, 59 658 79, 134, 152, 153, 50, 7, 165, 69, 70, 60
655}; 659};
656 660
657/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 661/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
658 STATE-NUM. */ 662 STATE-NUM. */
659#define YYPACT_NINF -89 663#define YYPACT_NINF -90
660static const yytype_int16 yypact[] = 664static const yytype_int16 yypact[] =
661{ 665{
662 3, 4, -89, 20, -89, 100, -89, 7, -89, -89, 666 4, 42, -90, 96, -90, 111, -90, 15, -90, -90,
663 -8, -89, 17, 4, 28, 4, 37, 36, 4, 68, 667 75, -90, 82, 42, 104, 42, 110, 107, 42, 115,
664 87, -18, 69, -89, -89, -89, -89, -89, -89, -89, 668 125, -4, 121, -90, -90, -90, -90, -90, -90, -90,
665 128, -89, 138, -89, -89, -89, -89, -89, -89, -89, 669 -90, 162, -90, 163, -90, -90, -90, -90, -90, -90,
666 -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, 670 -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
667 127, -89, -89, 110, -89, 126, -89, 136, -89, 137, 671 -90, 139, -90, -90, 138, -90, 142, -90, 143, -90,
668 -89, 147, 150, 152, -89, -89, -18, -18, 171, -14, 672 152, -90, 164, 167, 168, -90, -90, -4, -4, 77,
669 -89, 153, 157, 34, 67, 180, 233, 220, 207, 220, 673 -18, -90, 177, 185, 33, 71, 195, 247, 236, -2,
670 154, -89, -89, -89, -89, -89, -89, 0, -89, -18, 674 236, 171, -90, -90, -90, -90, -90, -90, 41, -90,
671 -18, 110, 44, 44, -89, -89, 163, 174, 182, 4, 675 -4, -4, 138, 97, 97, -90, -90, 186, 187, 194,
672 4, -18, 194, 44, -89, 219, -89, -89, -89, -89, 676 42, 42, -4, 196, 97, -90, 219, -90, -90, -90,
673 223, -89, -89, 203, 4, 4, 215, -89, -89, -89, 677 -90, 210, -90, -90, 204, 42, 42, 199, -90, -90,
674 -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, 678 -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
675 -89, -89, -89, -89, -89, -89, -89, -89, -89, 213, 679 -90, 222, -90, 223, -90, -90, -90, -90, -90, -90,
676 -89, -89, -89, -89, -89, -18, 232, 227, 232, -5, 680 -90, -90, -90, -90, 215, -90, -90, -90, -90, -90,
677 232, 44, 35, 234, -89, -89, 232, 235, 232, 224, 681 -4, 222, 228, 222, -5, 222, 97, 35, 229, -90,
678 -18, 236, -89, -89, 237, 238, 232, 216, -89, -89, 682 -90, 222, 232, 222, -4, -90, 135, 233, -90, -90,
679 240, -89, 241, -89, 71, -89, -89, -89, 242, 4, 683 234, 235, 222, 240, -90, -90, 237, -90, 239, -13,
680 -89, -89, -89, -89, -89 684 -90, -90, -90, -90, 244, 42, -90, -90, -90, -90,
685 -90
681}; 686};
682 687
683/* YYPGOTO[NTERM-NUM]. */ 688/* YYPGOTO[NTERM-NUM]. */
684static const yytype_int16 yypgoto[] = 689static const yytype_int16 yypgoto[] =
685{ 690{
686 -89, -89, 255, 267, -89, 47, -57, -89, -89, -89, 691 -90, -90, 269, 271, -90, 23, -70, -90, -90, -90,
687 -89, 239, -89, -89, -89, -89, -89, -89, -89, 130, 692 -90, 243, -90, -90, -90, -90, -90, -90, -90, -48,
688 -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, 693 -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
689 -89, 181, -89, -89, -89, -89, -89, 199, 229, 16, 694 -90, -20, -90, -90, -90, -90, -90, 206, 205, -68,
690 162, -1, 74, -7, 103, -65, -88, -89 695 -90, -90, 169, -1, 27, -7, 118, -66, -89, -90
691}; 696};
692 697
693/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 698/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
694 positive, shift that token. If negative, reduce the rule which 699 positive, shift that token. If negative, reduce the rule which
695 number is the opposite. If zero, do what YYDEFACT says. 700 number is the opposite. If zero, do what YYDEFACT says.
696 If YYTABLE_NINF, syntax error. */ 701 If YYTABLE_NINF, syntax error. */
697#define YYTABLE_NINF -85 702#define YYTABLE_NINF -86
698static const yytype_int16 yytable[] = 703static const yytype_int16 yytable[] =
699{ 704{
700 10, 87, 88, 53, 141, 142, 1, 64, 65, 160, 705 10, 88, 89, 54, 146, 147, 119, 1, 122, 164,
701 1, 66, 55, 92, 57, 151, 67, 61, 118, 93, 706 93, 141, 56, 142, 58, 156, 94, 62, 1, 90,
702 11, 131, 2, 131, 139, 140, 89, 90, 138, 8, 707 91, 131, 65, 66, 144, 145, 67, 90, 91, 132,
703 9, 89, 90, 2, -30, 96, 149, 51, -30, -30, 708 127, 68, 136, -31, 97, 2, 154, -31, -31, -31,
704 -30, -30, -30, -30, -30, -30, 97, 54, -30, -30, 709 -31, -31, -31, -31, -31, 98, 52, -31, -31, 99,
705 98, -30, 99, 100, 101, 102, 103, 104, 56, 105, 710 -31, 100, 101, 102, 103, 104, -31, 105, 129, 106,
706 167, 91, 58, 166, 106, 168, 60, -32, 96, 64, 711 138, 173, 92, 141, 107, 142, 174, 172, 8, 9,
707 65, -32, -32, -32, -32, -32, -32, -32, -32, 97, 712 143, -33, 97, 90, 91, -33, -33, -33, -33, -33,
708 159, -32, -32, 98, -32, 99, 100, 101, 102, 103, 713 -33, -33, -33, 98, 166, -33, -33, 99, -33, 100,
709 104, 121, 105, 62, 132, 174, 132, 106, 146, 70, 714 101, 102, 103, 104, -33, 105, 11, 106, 179, 151,
710 -5, 12, 89, 90, 13, 14, 15, 16, 17, 18, 715 123, 126, 107, 135, 125, 130, 2, 139, 2, 90,
711 19, 20, 63, 156, 21, 22, 23, 24, 25, 26, 716 91, -5, 12, 55, 161, 13, 14, 15, 16, 17,
712 27, 28, 29, 122, 125, 30, 133, -4, 12, 71, 717 18, 19, 20, 65, 66, 21, 22, 23, 24, 25,
713 31, 13, 14, 15, 16, 17, 18, 19, 20, 72, 718 26, 27, 28, 29, 30, 57, 59, 31, 61, -4,
714 51, 21, 22, 23, 24, 25, 26, 27, 28, 29, 719 12, 63, 32, 13, 14, 15, 16, 17, 18, 19,
715 124, 129, 30, 137, -84, 96, 81, 31, -84, -84, 720 20, 64, 71, 21, 22, 23, 24, 25, 26, 27,
716 -84, -84, -84, -84, -84, -84, 82, 83, -84, -84, 721 28, 29, 30, 72, 73, 31, 180, 90, 91, 52,
717 98, -84, -84, -84, -84, -84, -84, 84, 184, 105, 722 32, -85, 97, 82, 83, -85, -85, -85, -85, -85,
718 85, 96, 86, 94, 130, -51, -51, 95, -51, -51, 723 -85, -85, -85, 84, 190, -85, -85, 99, -85, -85,
719 -51, -51, 97, 143, -51, -51, 98, 113, 114, 115, 724 -85, -85, -85, -85, -85, 85, 97, 106, 86, 87,
720 116, 2, 89, 90, 144, 105, 145, 126, 96, 134, 725 -52, -52, 140, -52, -52, -52, -52, 98, 95, -52,
721 117, -75, -75, -75, -75, -75, -75, -75, -75, 150, 726 -52, 99, 114, 115, 116, 117, 96, 148, 149, 150,
722 153, -75, -75, 98, 13, 14, 15, 16, 17, 18, 727 158, 106, 155, 159, 97, 163, 118, -76, -76, -76,
723 19, 20, 105, 155, 21, 22, 154, 130, 14, 15, 728 -76, -76, -76, -76, -76, 160, 164, -76, -76, 99,
724 158, 17, 18, 19, 20, 90, 160, 21, 22, 179, 729 13, 14, 15, 16, 17, 18, 19, 20, 91, 106,
725 31, 163, 164, 165, 173, 89, 90, 162, 128, 170, 730 21, 22, 14, 15, 140, 17, 18, 19, 20, 168,
726 136, 172, 52, 31, 169, 171, 175, 176, 177, 178, 731 175, 21, 22, 177, 181, 182, 183, 32, 187, 167,
727 181, 182, 183, 50, 120, 74, 80, 157 732 188, 169, 170, 171, 185, 189, 53, 51, 32, 176,
733 75, 178, 121, 0, 133, 162, 0, 0, 0, 0,
734 184
728}; 735};
729 736
730static const yytype_uint8 yycheck[] = 737static const yytype_int16 yycheck[] =
731{ 738{
732 1, 66, 67, 10, 92, 93, 3, 25, 26, 14, 739 1, 67, 68, 10, 93, 94, 76, 3, 76, 14,
733 3, 29, 13, 27, 15, 103, 34, 18, 75, 33, 740 28, 81, 13, 81, 15, 104, 34, 18, 3, 32,
734 0, 78, 30, 80, 89, 90, 31, 32, 28, 25, 741 33, 23, 26, 27, 90, 91, 30, 32, 33, 31,
735 26, 31, 32, 30, 0, 1, 101, 30, 4, 5, 742 78, 35, 80, 0, 1, 31, 102, 4, 5, 6,
736 6, 7, 8, 9, 10, 11, 12, 30, 14, 15, 743 7, 8, 9, 10, 11, 12, 31, 14, 15, 16,
737 16, 17, 18, 19, 20, 21, 22, 23, 30, 25, 744 17, 18, 19, 20, 21, 22, 23, 24, 78, 26,
738 25, 68, 25, 151, 30, 30, 30, 0, 1, 25, 745 80, 26, 69, 133, 31, 133, 31, 156, 26, 27,
739 26, 4, 5, 6, 7, 8, 9, 10, 11, 12, 746 29, 0, 1, 32, 33, 4, 5, 6, 7, 8,
740 145, 14, 15, 16, 17, 18, 19, 20, 21, 22, 747 9, 10, 11, 12, 150, 14, 15, 16, 17, 18,
741 23, 75, 25, 25, 78, 160, 80, 30, 99, 30, 748 19, 20, 21, 22, 23, 24, 0, 26, 164, 100,
742 0, 1, 31, 32, 4, 5, 6, 7, 8, 9, 749 77, 78, 31, 80, 77, 78, 31, 80, 31, 32,
743 10, 11, 25, 114, 14, 15, 16, 17, 18, 19, 750 33, 0, 1, 31, 115, 4, 5, 6, 7, 8,
744 20, 21, 22, 76, 77, 25, 79, 0, 1, 1, 751 9, 10, 11, 26, 27, 14, 15, 16, 17, 18,
745 30, 4, 5, 6, 7, 8, 9, 10, 11, 1, 752 19, 20, 21, 22, 23, 31, 26, 26, 31, 0,
746 30, 14, 15, 16, 17, 18, 19, 20, 21, 22, 753 1, 26, 31, 4, 5, 6, 7, 8, 9, 10,
747 76, 77, 25, 79, 0, 1, 30, 30, 4, 5, 754 11, 26, 31, 14, 15, 16, 17, 18, 19, 20,
748 6, 7, 8, 9, 10, 11, 30, 30, 14, 15, 755 21, 22, 23, 1, 1, 26, 31, 32, 33, 31,
749 16, 17, 18, 19, 20, 21, 22, 30, 179, 25, 756 31, 0, 1, 31, 31, 4, 5, 6, 7, 8,
750 30, 1, 30, 30, 30, 5, 6, 30, 8, 9, 757 9, 10, 11, 31, 185, 14, 15, 16, 17, 18,
751 10, 11, 12, 30, 14, 15, 16, 17, 18, 19, 758 19, 20, 21, 22, 23, 31, 1, 26, 31, 31,
752 20, 30, 31, 32, 30, 25, 24, 77, 1, 79, 759 5, 6, 31, 8, 9, 10, 11, 12, 31, 14,
753 30, 4, 5, 6, 7, 8, 9, 10, 11, 25, 760 15, 16, 17, 18, 19, 20, 31, 31, 31, 25,
754 1, 14, 15, 16, 4, 5, 6, 7, 8, 9, 761 1, 26, 26, 13, 1, 26, 31, 4, 5, 6,
755 10, 11, 25, 30, 14, 15, 13, 30, 5, 6, 762 7, 8, 9, 10, 11, 31, 14, 14, 15, 16,
756 25, 8, 9, 10, 11, 32, 14, 14, 15, 33, 763 4, 5, 6, 7, 8, 9, 10, 11, 33, 26,
757 30, 148, 149, 150, 30, 31, 32, 30, 77, 156, 764 14, 15, 5, 6, 31, 8, 9, 10, 11, 31,
758 79, 158, 7, 30, 30, 30, 30, 30, 30, 166, 765 31, 14, 15, 31, 31, 31, 31, 31, 31, 151,
759 30, 30, 30, 6, 75, 36, 47, 115 766 31, 153, 154, 155, 34, 31, 7, 6, 31, 161,
767 37, 163, 76, -1, 79, 116, -1, -1, -1, -1,
768 172
760}; 769};
761 770
762/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 771/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
763 symbol of state STATE-NUM. */ 772 symbol of state STATE-NUM. */
764static const yytype_uint8 yystos[] = 773static const yytype_uint8 yystos[] =
765{ 774{
766 0, 3, 30, 36, 37, 38, 62, 78, 25, 26, 775 0, 3, 31, 37, 38, 39, 63, 81, 26, 27,
767 76, 0, 1, 4, 5, 6, 7, 8, 9, 10, 776 79, 0, 1, 4, 5, 6, 7, 8, 9, 10,
768 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 777 11, 14, 15, 16, 17, 18, 19, 20, 21, 22,
769 25, 30, 39, 40, 42, 43, 44, 45, 51, 52, 778 23, 26, 31, 40, 41, 43, 44, 45, 46, 52,
770 54, 58, 60, 63, 64, 66, 68, 69, 70, 77, 779 53, 55, 59, 61, 64, 65, 67, 69, 70, 71,
771 38, 30, 37, 78, 30, 76, 30, 76, 25, 82, 780 80, 39, 31, 38, 81, 31, 79, 31, 79, 26,
772 30, 76, 25, 25, 25, 26, 29, 34, 80, 81, 781 85, 31, 79, 26, 26, 26, 27, 30, 35, 83,
773 30, 1, 1, 46, 46, 55, 57, 61, 73, 67, 782 84, 31, 1, 1, 47, 47, 56, 58, 62, 76,
774 73, 30, 30, 30, 30, 30, 30, 80, 80, 31, 783 68, 74, 31, 31, 31, 31, 31, 31, 83, 83,
775 32, 78, 27, 33, 30, 30, 1, 12, 16, 18, 784 32, 33, 81, 28, 34, 31, 31, 1, 12, 16,
776 19, 20, 21, 22, 23, 25, 30, 41, 47, 48, 785 18, 19, 20, 21, 22, 24, 26, 31, 42, 48,
777 71, 72, 74, 17, 18, 19, 20, 30, 41, 56, 786 49, 72, 73, 75, 17, 18, 19, 20, 31, 42,
778 72, 74, 40, 53, 77, 40, 54, 59, 66, 77, 787 57, 73, 75, 41, 54, 80, 41, 55, 60, 67,
779 30, 41, 74, 40, 54, 65, 66, 77, 28, 80, 788 80, 23, 31, 74, 77, 41, 55, 66, 67, 80,
780 80, 81, 81, 30, 30, 24, 76, 75, 76, 80, 789 31, 42, 75, 29, 83, 83, 84, 84, 31, 31,
781 25, 81, 49, 1, 13, 30, 76, 75, 25, 80, 790 25, 79, 78, 79, 83, 26, 84, 50, 1, 13,
782 14, 79, 30, 79, 79, 79, 81, 25, 30, 30, 791 31, 79, 78, 26, 14, 82, 83, 82, 31, 82,
783 79, 30, 79, 30, 80, 30, 30, 30, 79, 33, 792 82, 82, 84, 26, 31, 31, 82, 31, 82, 83,
784 50, 30, 30, 30, 76 793 31, 31, 31, 31, 82, 34, 51, 31, 31, 31,
794 79
785}; 795};
786 796
787#define yyerrok (yyerrstatus = 0) 797#define yyerrok (yyerrstatus = 0)
@@ -1292,7 +1302,7 @@ yydestruct (yymsg, yytype, yyvaluep)
1292 1302
1293 switch (yytype) 1303 switch (yytype)
1294 { 1304 {
1295 case 52: /* "choice_entry" */ 1305 case 53: /* "choice_entry" */
1296 1306
1297 { 1307 {
1298 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1308 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -1302,7 +1312,7 @@ yydestruct (yymsg, yytype, yyvaluep)
1302}; 1312};
1303 1313
1304 break; 1314 break;
1305 case 58: /* "if_entry" */ 1315 case 59: /* "if_entry" */
1306 1316
1307 { 1317 {
1308 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1318 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -1312,7 +1322,7 @@ yydestruct (yymsg, yytype, yyvaluep)
1312}; 1322};
1313 1323
1314 break; 1324 break;
1315 case 64: /* "menu_entry" */ 1325 case 65: /* "menu_entry" */
1316 1326
1317 { 1327 {
1318 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1328 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -1644,17 +1654,17 @@ yyreduce:
1644 { zconf_error("invalid statement"); ;} 1654 { zconf_error("invalid statement"); ;}
1645 break; 1655 break;
1646 1656
1647 case 27: 1657 case 28:
1648 1658
1649 { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;} 1659 { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;}
1650 break; 1660 break;
1651 1661
1652 case 28: 1662 case 29:
1653 1663
1654 { zconf_error("invalid option"); ;} 1664 { zconf_error("invalid option"); ;}
1655 break; 1665 break;
1656 1666
1657 case 29: 1667 case 30:
1658 1668
1659 { 1669 {
1660 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); 1670 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
@@ -1664,7 +1674,7 @@ yyreduce:
1664;} 1674;}
1665 break; 1675 break;
1666 1676
1667 case 30: 1677 case 31:
1668 1678
1669 { 1679 {
1670 menu_end_entry(); 1680 menu_end_entry();
@@ -1672,7 +1682,7 @@ yyreduce:
1672;} 1682;}
1673 break; 1683 break;
1674 1684
1675 case 31: 1685 case 32:
1676 1686
1677 { 1687 {
1678 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); 1688 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
@@ -1682,7 +1692,7 @@ yyreduce:
1682;} 1692;}
1683 break; 1693 break;
1684 1694
1685 case 32: 1695 case 33:
1686 1696
1687 { 1697 {
1688 if (current_entry->prompt) 1698 if (current_entry->prompt)
@@ -1694,7 +1704,7 @@ yyreduce:
1694;} 1704;}
1695 break; 1705 break;
1696 1706
1697 case 40: 1707 case 41:
1698 1708
1699 { 1709 {
1700 menu_set_type((yyvsp[(1) - (3)].id)->stype); 1710 menu_set_type((yyvsp[(1) - (3)].id)->stype);
@@ -1704,7 +1714,7 @@ yyreduce:
1704;} 1714;}
1705 break; 1715 break;
1706 1716
1707 case 41: 1717 case 42:
1708 1718
1709 { 1719 {
1710 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); 1720 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
@@ -1712,7 +1722,7 @@ yyreduce:
1712;} 1722;}
1713 break; 1723 break;
1714 1724
1715 case 42: 1725 case 43:
1716 1726
1717 { 1727 {
1718 menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr)); 1728 menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr));
@@ -1724,7 +1734,7 @@ yyreduce:
1724;} 1734;}
1725 break; 1735 break;
1726 1736
1727 case 43: 1737 case 44:
1728 1738
1729 { 1739 {
1730 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); 1740 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
@@ -1732,7 +1742,7 @@ yyreduce:
1732;} 1742;}
1733 break; 1743 break;
1734 1744
1735 case 44: 1745 case 45:
1736 1746
1737 { 1747 {
1738 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr)); 1748 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr));
@@ -1740,7 +1750,7 @@ yyreduce:
1740;} 1750;}
1741 break; 1751 break;
1742 1752
1743 case 47: 1753 case 48:
1744 1754
1745 { 1755 {
1746 struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string))); 1756 struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
@@ -1752,17 +1762,17 @@ yyreduce:
1752;} 1762;}
1753 break; 1763 break;
1754 1764
1755 case 48: 1765 case 49:
1756 1766
1757 { (yyval.string) = NULL; ;} 1767 { (yyval.string) = NULL; ;}
1758 break; 1768 break;
1759 1769
1760 case 49: 1770 case 50:
1761 1771
1762 { (yyval.string) = (yyvsp[(2) - (2)].string); ;} 1772 { (yyval.string) = (yyvsp[(2) - (2)].string); ;}
1763 break; 1773 break;
1764 1774
1765 case 50: 1775 case 51:
1766 1776
1767 { 1777 {
1768 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE); 1778 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE);
@@ -1773,14 +1783,14 @@ yyreduce:
1773;} 1783;}
1774 break; 1784 break;
1775 1785
1776 case 51: 1786 case 52:
1777 1787
1778 { 1788 {
1779 (yyval.menu) = menu_add_menu(); 1789 (yyval.menu) = menu_add_menu();
1780;} 1790;}
1781 break; 1791 break;
1782 1792
1783 case 52: 1793 case 53:
1784 1794
1785 { 1795 {
1786 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) { 1796 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) {
@@ -1790,7 +1800,7 @@ yyreduce:
1790;} 1800;}
1791 break; 1801 break;
1792 1802
1793 case 60: 1803 case 61:
1794 1804
1795 { 1805 {
1796 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); 1806 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
@@ -1798,7 +1808,7 @@ yyreduce:
1798;} 1808;}
1799 break; 1809 break;
1800 1810
1801 case 61: 1811 case 62:
1802 1812
1803 { 1813 {
1804 if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) { 1814 if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) {
@@ -1811,7 +1821,7 @@ yyreduce:
1811;} 1821;}
1812 break; 1822 break;
1813 1823
1814 case 62: 1824 case 63:
1815 1825
1816 { 1826 {
1817 current_entry->sym->flags |= SYMBOL_OPTIONAL; 1827 current_entry->sym->flags |= SYMBOL_OPTIONAL;
@@ -1819,7 +1829,7 @@ yyreduce:
1819;} 1829;}
1820 break; 1830 break;
1821 1831
1822 case 63: 1832 case 64:
1823 1833
1824 { 1834 {
1825 if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) { 1835 if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) {
@@ -1831,7 +1841,7 @@ yyreduce:
1831;} 1841;}
1832 break; 1842 break;
1833 1843
1834 case 66: 1844 case 67:
1835 1845
1836 { 1846 {
1837 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); 1847 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
@@ -1841,7 +1851,7 @@ yyreduce:
1841;} 1851;}
1842 break; 1852 break;
1843 1853
1844 case 67: 1854 case 68:
1845 1855
1846 { 1856 {
1847 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) { 1857 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) {
@@ -1851,14 +1861,14 @@ yyreduce:
1851;} 1861;}
1852 break; 1862 break;
1853 1863
1854 case 73: 1864 case 74:
1855 1865
1856 { 1866 {
1857 menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL); 1867 menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
1858;} 1868;}
1859 break; 1869 break;
1860 1870
1861 case 74: 1871 case 75:
1862 1872
1863 { 1873 {
1864 menu_add_entry(NULL); 1874 menu_add_entry(NULL);
@@ -1867,14 +1877,14 @@ yyreduce:
1867;} 1877;}
1868 break; 1878 break;
1869 1879
1870 case 75: 1880 case 76:
1871 1881
1872 { 1882 {
1873 (yyval.menu) = menu_add_menu(); 1883 (yyval.menu) = menu_add_menu();
1874;} 1884;}
1875 break; 1885 break;
1876 1886
1877 case 76: 1887 case 77:
1878 1888
1879 { 1889 {
1880 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) { 1890 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) {
@@ -1884,7 +1894,7 @@ yyreduce:
1884;} 1894;}
1885 break; 1895 break;
1886 1896
1887 case 82: 1897 case 83:
1888 1898
1889 { 1899 {
1890 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); 1900 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
@@ -1892,7 +1902,7 @@ yyreduce:
1892;} 1902;}
1893 break; 1903 break;
1894 1904
1895 case 83: 1905 case 84:
1896 1906
1897 { 1907 {
1898 menu_add_entry(NULL); 1908 menu_add_entry(NULL);
@@ -1901,14 +1911,14 @@ yyreduce:
1901;} 1911;}
1902 break; 1912 break;
1903 1913
1904 case 84: 1914 case 85:
1905 1915
1906 { 1916 {
1907 menu_end_entry(); 1917 menu_end_entry();
1908;} 1918;}
1909 break; 1919 break;
1910 1920
1911 case 85: 1921 case 86:
1912 1922
1913 { 1923 {
1914 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); 1924 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
@@ -1916,14 +1926,14 @@ yyreduce:
1916;} 1926;}
1917 break; 1927 break;
1918 1928
1919 case 86: 1929 case 87:
1920 1930
1921 { 1931 {
1922 current_entry->help = (yyvsp[(2) - (2)].string); 1932 current_entry->help = (yyvsp[(2) - (2)].string);
1923;} 1933;}
1924 break; 1934 break;
1925 1935
1926 case 91: 1936 case 92:
1927 1937
1928 { 1938 {
1929 menu_add_dep((yyvsp[(3) - (4)].expr)); 1939 menu_add_dep((yyvsp[(3) - (4)].expr));
@@ -1931,84 +1941,91 @@ yyreduce:
1931;} 1941;}
1932 break; 1942 break;
1933 1943
1934 case 93: 1944 case 96:
1945
1946 {
1947 menu_add_visibility((yyvsp[(2) - (2)].expr));
1948;}
1949 break;
1950
1951 case 98:
1935 1952
1936 { 1953 {
1937 menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr)); 1954 menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr));
1938;} 1955;}
1939 break; 1956 break;
1940 1957
1941 case 96: 1958 case 101:
1942 1959
1943 { (yyval.id) = (yyvsp[(1) - (2)].id); ;} 1960 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
1944 break; 1961 break;
1945 1962
1946 case 97: 1963 case 102:
1947 1964
1948 { (yyval.id) = (yyvsp[(1) - (2)].id); ;} 1965 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
1949 break; 1966 break;
1950 1967
1951 case 98: 1968 case 103:
1952 1969
1953 { (yyval.id) = (yyvsp[(1) - (2)].id); ;} 1970 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
1954 break; 1971 break;
1955 1972
1956 case 101: 1973 case 106:
1957 1974
1958 { (yyval.expr) = NULL; ;} 1975 { (yyval.expr) = NULL; ;}
1959 break; 1976 break;
1960 1977
1961 case 102: 1978 case 107:
1962 1979
1963 { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;} 1980 { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;}
1964 break; 1981 break;
1965 1982
1966 case 103: 1983 case 108:
1967 1984
1968 { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;} 1985 { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;}
1969 break; 1986 break;
1970 1987
1971 case 104: 1988 case 109:
1972 1989
1973 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} 1990 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
1974 break; 1991 break;
1975 1992
1976 case 105: 1993 case 110:
1977 1994
1978 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} 1995 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
1979 break; 1996 break;
1980 1997
1981 case 106: 1998 case 111:
1982 1999
1983 { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} 2000 { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;}
1984 break; 2001 break;
1985 2002
1986 case 107: 2003 case 112:
1987 2004
1988 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;} 2005 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;}
1989 break; 2006 break;
1990 2007
1991 case 108: 2008 case 113:
1992 2009
1993 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 2010 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
1994 break; 2011 break;
1995 2012
1996 case 109: 2013 case 114:
1997 2014
1998 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 2015 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
1999 break; 2016 break;
2000 2017
2001 case 110: 2018 case 115:
2002 2019
2003 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;} 2020 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;}
2004 break; 2021 break;
2005 2022
2006 case 111: 2023 case 116:
2007 2024
2008 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); ;} 2025 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); ;}
2009 break; 2026 break;
2010 2027
2011 case 112: 2028 case 117:
2012 2029
2013 { (yyval.string) = NULL; ;} 2030 { (yyval.string) = NULL; ;}
2014 break; 2031 break;
@@ -2278,6 +2295,7 @@ static const char *zconf_tokenname(int token)
2278 case T_IF: return "if"; 2295 case T_IF: return "if";
2279 case T_ENDIF: return "endif"; 2296 case T_ENDIF: return "endif";
2280 case T_DEPENDS: return "depends"; 2297 case T_DEPENDS: return "depends";
2298 case T_VISIBLE: return "visible";
2281 } 2299 }
2282 return "<token>"; 2300 return "<token>";
2283} 2301}
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 2abd3c7ff15d..49fb4ab664c3 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -36,7 +36,7 @@ static struct menu *current_menu, *current_entry;
36#define YYERROR_VERBOSE 36#define YYERROR_VERBOSE
37#endif 37#endif
38%} 38%}
39%expect 28 39%expect 30
40 40
41%union 41%union
42{ 42{
@@ -68,6 +68,7 @@ static struct menu *current_menu, *current_entry;
68%token <id>T_DEFAULT 68%token <id>T_DEFAULT
69%token <id>T_SELECT 69%token <id>T_SELECT
70%token <id>T_RANGE 70%token <id>T_RANGE
71%token <id>T_VISIBLE
71%token <id>T_OPTION 72%token <id>T_OPTION
72%token <id>T_ON 73%token <id>T_ON
73%token <string> T_WORD 74%token <string> T_WORD
@@ -123,7 +124,7 @@ stmt_list:
123; 124;
124 125
125option_name: 126option_name:
126 T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT 127 T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE
127; 128;
128 129
129common_stmt: 130common_stmt:
@@ -359,7 +360,7 @@ menu: T_MENU prompt T_EOL
359 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 360 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
360}; 361};
361 362
362menu_entry: menu depends_list 363menu_entry: menu visibility_list depends_list
363{ 364{
364 $$ = menu_add_menu(); 365 $$ = menu_add_menu();
365}; 366};
@@ -430,6 +431,19 @@ depends: T_DEPENDS T_ON expr T_EOL
430 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); 431 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
431}; 432};
432 433
434/* visibility option */
435
436visibility_list:
437 /* empty */
438 | visibility_list visible
439 | visibility_list T_EOL
440;
441
442visible: T_VISIBLE if_expr
443{
444 menu_add_visibility($2);
445};
446
433/* prompt statement */ 447/* prompt statement */
434 448
435prompt_stmt_opt: 449prompt_stmt_opt:
@@ -526,6 +540,7 @@ static const char *zconf_tokenname(int token)
526 case T_IF: return "if"; 540 case T_IF: return "if";
527 case T_ENDIF: return "endif"; 541 case T_ENDIF: return "endif";
528 case T_DEPENDS: return "depends"; 542 case T_DEPENDS: return "depends";
543 case T_VISIBLE: return "visible";
529 } 544 }
530 return "<token>"; 545 return "<token>";
531} 546}