aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/zconf.y
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/zconf.y')
-rw-r--r--scripts/kconfig/zconf.y13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index d9b96ba8e38c..9710b82466f2 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -91,7 +91,7 @@ static struct menu *current_menu, *current_entry;
91%type <id> end 91%type <id> end
92%type <id> option_name 92%type <id> option_name
93%type <menu> if_entry menu_entry choice_entry 93%type <menu> if_entry menu_entry choice_entry
94%type <string> symbol_option_arg 94%type <string> symbol_option_arg word_opt
95 95
96%destructor { 96%destructor {
97 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 97 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -239,10 +239,10 @@ symbol_option_arg:
239 239
240/* choice entry */ 240/* choice entry */
241 241
242choice: T_CHOICE T_EOL 242choice: T_CHOICE word_opt T_EOL
243{ 243{
244 struct symbol *sym = sym_lookup(NULL, 0); 244 struct symbol *sym = sym_lookup($2, SYMBOL_CHOICE);
245 sym->flags |= SYMBOL_CHOICE; 245 sym->flags |= SYMBOL_AUTO;
246 menu_add_entry(sym); 246 menu_add_entry(sym);
247 menu_add_expr(P_CHOICE, NULL, NULL); 247 menu_add_expr(P_CHOICE, NULL, NULL);
248 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); 248 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
@@ -456,9 +456,12 @@ expr: symbol { $$ = expr_alloc_symbol($1); }
456; 456;
457 457
458symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); } 458symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); }
459 | T_WORD_QUOTE { $$ = sym_lookup($1, 1); free($1); } 459 | T_WORD_QUOTE { $$ = sym_lookup($1, SYMBOL_CONST); free($1); }
460; 460;
461 461
462word_opt: /* empty */ { $$ = NULL; }
463 | T_WORD
464
462%% 465%%
463 466
464void conf_parse(const char *name) 467void conf_parse(const char *name)