-rw-r--r-- | scripts/kconfig/zconf.y | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index c3f1bd0..996b10a 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
@@ -206,67 +206,65 @@ choice_stmt: | |||
206 | printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno); | 206 | printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno); |
207 | zconfnerrs++; | 207 | zconfnerrs++; |
208 | }; | 208 | }; |
209 | 209 | ||
210 | choice_option_list: | 210 | choice_option_list: |
211 | /* empty */ | 211 | /* empty */ |
212 | | choice_option_list choice_option T_EOL | 212 | | choice_option_list choice_option T_EOL |
213 | | choice_option_list depends T_EOL | 213 | | choice_option_list depends T_EOL |
214 | | choice_option_list help | 214 | | choice_option_list help |
215 | | choice_option_list T_EOL | 215 | | choice_option_list T_EOL |
216 | ; | 216 | ; |
217 | 217 | ||
218 | choice_option: T_PROMPT prompt if_expr | 218 | choice_option: T_PROMPT prompt if_expr |
219 | { | 219 | { |
220 | menu_add_prop(P_PROMPT, $2, NULL, $3); | 220 | menu_add_prop(P_PROMPT, $2, NULL, $3); |
221 | printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); | 221 | printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); |
222 | }; | 222 | }; |
223 | 223 | ||
224 | choice_option: T_OPTIONAL | 224 | choice_option: T_OPTIONAL |
225 | { | 225 | { |
226 | current_entry->sym->flags |= SYMBOL_OPTIONAL; | 226 | current_entry->sym->flags |= SYMBOL_OPTIONAL; |
227 | printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); | 227 | printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); |
228 | }; | 228 | }; |
229 | 229 | ||
230 | choice_option: T_DEFAULT symbol | 230 | choice_option: T_DEFAULT symbol if_expr |
231 | { | 231 | { |
232 | menu_add_prop(P_DEFAULT, NULL, $2, NULL); | 232 | menu_add_prop(P_DEFAULT, NULL, $2, $3); |
233 | //current_choice->prop->def = $2; | ||
234 | printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); | 233 | printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); |
235 | }; | 234 | }; |
236 | 235 | ||
237 | choice_block: | 236 | choice_block: |
238 | /* empty */ | 237 | /* empty */ |
239 | | choice_block common_block | 238 | | choice_block common_block |
240 | ; | 239 | ; |
241 | 240 | ||
242 | /* if entry */ | 241 | /* if entry */ |
243 | 242 | ||
244 | if: T_IF expr | 243 | if: T_IF expr |
245 | { | 244 | { |
246 | printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); | 245 | printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); |
247 | menu_add_entry(NULL); | 246 | menu_add_entry(NULL); |
248 | //current_entry->prompt = menu_add_prop(T_IF, NULL, NULL, $2); | ||
249 | menu_add_dep($2); | 247 | menu_add_dep($2); |
250 | menu_end_entry(); | 248 | menu_end_entry(); |
251 | menu_add_menu(); | 249 | menu_add_menu(); |
252 | }; | 250 | }; |
253 | 251 | ||
254 | if_end: end | 252 | if_end: end |
255 | { | 253 | { |
256 | if (zconf_endtoken($1, T_IF, T_ENDIF)) { | 254 | if (zconf_endtoken($1, T_IF, T_ENDIF)) { |
257 | menu_end_menu(); | 255 | menu_end_menu(); |
258 | printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); | 256 | printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); |
259 | } | 257 | } |
260 | }; | 258 | }; |
261 | 259 | ||
262 | if_stmt: | 260 | if_stmt: |
263 | if T_EOL if_block if_end T_EOL | 261 | if T_EOL if_block if_end T_EOL |
264 | | if T_EOL if_block | 262 | | if T_EOL if_block |
265 | { | 263 | { |
266 | printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno); | 264 | printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno); |
267 | zconfnerrs++; | 265 | zconfnerrs++; |
268 | }; | 266 | }; |
269 | 267 | ||
270 | if_block: | 268 | if_block: |
271 | /* empty */ | 269 | /* empty */ |
272 | | if_block common_block | 270 | | if_block common_block |