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.y23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 1f61fba6aa28..9d08582f2aa6 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -71,6 +71,7 @@ static struct menu *current_menu, *current_entry;
71%token <id>T_DEFAULT 71%token <id>T_DEFAULT
72%token <id>T_SELECT 72%token <id>T_SELECT
73%token <id>T_RANGE 73%token <id>T_RANGE
74%token <id>T_OPTION
74%token <id>T_ON 75%token <id>T_ON
75%token <string> T_WORD 76%token <string> T_WORD
76%token <string> T_WORD_QUOTE 77%token <string> T_WORD_QUOTE
@@ -91,6 +92,7 @@ static struct menu *current_menu, *current_entry;
91%type <id> end 92%type <id> end
92%type <id> option_name 93%type <id> option_name
93%type <menu> if_entry menu_entry choice_entry 94%type <menu> if_entry menu_entry choice_entry
95%type <string> symbol_option_arg
94 96
95%destructor { 97%destructor {
96 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 98 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -173,6 +175,7 @@ menuconfig_stmt: menuconfig_entry_start config_option_list
173config_option_list: 175config_option_list:
174 /* empty */ 176 /* empty */
175 | config_option_list config_option 177 | config_option_list config_option
178 | config_option_list symbol_option
176 | config_option_list depends 179 | config_option_list depends
177 | config_option_list help 180 | config_option_list help
178 | config_option_list option_error 181 | config_option_list option_error
@@ -215,6 +218,26 @@ config_option: T_RANGE symbol symbol if_expr T_EOL
215 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); 218 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
216}; 219};
217 220
221symbol_option: T_OPTION symbol_option_list T_EOL
222;
223
224symbol_option_list:
225 /* empty */
226 | symbol_option_list T_WORD symbol_option_arg
227{
228 struct kconf_id *id = kconf_id_lookup($2, strlen($2));
229 if (id && id->flags & TF_OPTION)
230 menu_add_option(id->token, $3);
231 else
232 zconfprint("warning: ignoring unknown option %s", $2);
233 free($2);
234};
235
236symbol_option_arg:
237 /* empty */ { $$ = NULL; }
238 | T_EQUAL prompt { $$ = $2; }
239;
240
218/* choice entry */ 241/* choice entry */
219 242
220choice: T_CHOICE T_EOL 243choice: T_CHOICE T_EOL