summaryrefslogtreecommitdiffstats
path: root/package/config/zconf.y
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-07-27 17:24:01 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2009-07-27 17:24:01 +0200
commit76dade1788965d0d31e57d080854dddb5e74783f (patch)
treee40baee34f71aa399937b864b77165e9fc628db2 /package/config/zconf.y
parent6fecd53e99591775a4117e9e1ba18043fda36b27 (diff)
parent6cd6353ff9c0ce93a63e43c4cb61188c6bc0b0f5 (diff)
downloadbuildroot-novena-76dade1788965d0d31e57d080854dddb5e74783f.tar.gz
buildroot-novena-76dade1788965d0d31e57d080854dddb5e74783f.zip
Merge branch 'kconfig-update' of git://git.busybox.net/~tpetazzoni/git/buildroot
Diffstat (limited to 'package/config/zconf.y')
-rw-r--r--package/config/zconf.y13
1 files changed, 8 insertions, 5 deletions
diff --git a/package/config/zconf.y b/package/config/zconf.y
index 34c907b49..62eee9cb8 100644
--- a/package/config/zconf.y
+++ b/package/config/zconf.y
@@ -91,7 +91,7 @@ static struct menu *current_menu, *current_entry;
%type <id> end
%type <id> option_name
%type <menu> if_entry menu_entry choice_entry
-%type <string> symbol_option_arg
+%type <string> symbol_option_arg word_opt
%destructor {
fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -239,10 +239,10 @@ symbol_option_arg:
/* choice entry */
-choice: T_CHOICE T_EOL
+choice: T_CHOICE word_opt T_EOL
{
- struct symbol *sym = sym_lookup(NULL, 0);
- sym->flags |= SYMBOL_CHOICE;
+ struct symbol *sym = sym_lookup($2, SYMBOL_CHOICE);
+ sym->flags |= SYMBOL_AUTO;
menu_add_entry(sym);
menu_add_expr(P_CHOICE, NULL, NULL);
printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
@@ -456,9 +456,12 @@ expr: symbol { $$ = expr_alloc_symbol($1); }
;
symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); }
- | T_WORD_QUOTE { $$ = sym_lookup($1, 1); free($1); }
+ | T_WORD_QUOTE { $$ = sym_lookup($1, SYMBOL_CONST); free($1); }
;
+word_opt: /* empty */ { $$ = NULL; }
+ | T_WORD
+
%%
void conf_parse(const char *name)