kconfig: remove 'prompt' symbol

Now that 'prompt' is only reduced from T_WORD_QUOTE without any action,
use T_WORD_QUOTE directly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Masahiro Yamada 2019-12-17 13:14:19 +09:00
parent 801b27db46
commit 1be6e79138

View File

@ -90,7 +90,6 @@ static struct menu *current_menu, *current_entry;
%left T_LESS T_LESS_EQUAL T_GREATER T_GREATER_EQUAL
%nonassoc T_NOT
%type <string> prompt
%type <symbol> nonconst_symbol
%type <symbol> symbol
%type <type> type logic_type default
@ -113,7 +112,7 @@ input: mainmenu_stmt stmt_list | stmt_list;
/* mainmenu entry */
mainmenu_stmt: T_MAINMENU prompt T_EOL
mainmenu_stmt: T_MAINMENU T_WORD_QUOTE T_EOL
{
menu_add_prompt(P_MENU, $2, NULL);
};
@ -181,7 +180,7 @@ config_option: type prompt_stmt_opt T_EOL
$1);
};
config_option: T_PROMPT prompt if_expr T_EOL
config_option: T_PROMPT T_WORD_QUOTE if_expr T_EOL
{
menu_add_prompt(P_PROMPT, $2, $3);
printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
@ -265,7 +264,7 @@ choice_option_list:
| choice_option_list help
;
choice_option: T_PROMPT prompt if_expr T_EOL
choice_option: T_PROMPT T_WORD_QUOTE if_expr T_EOL
{
menu_add_prompt(P_PROMPT, $2, $3);
printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
@ -334,7 +333,7 @@ if_stmt: if_entry stmt_list if_end
/* menu entry */
menu: T_MENU prompt T_EOL
menu: T_MENU T_WORD_QUOTE T_EOL
{
menu_add_entry(NULL);
menu_add_prompt(P_MENU, $2, NULL);
@ -363,7 +362,7 @@ menu_option_list:
| menu_option_list depends
;
source_stmt: T_SOURCE prompt T_EOL
source_stmt: T_SOURCE T_WORD_QUOTE T_EOL
{
printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2);
zconf_nextfile($2);
@ -372,7 +371,7 @@ source_stmt: T_SOURCE prompt T_EOL
/* comment entry */
comment: T_COMMENT prompt T_EOL
comment: T_COMMENT T_WORD_QUOTE T_EOL
{
menu_add_entry(NULL);
menu_add_prompt(P_COMMENT, $2, NULL);
@ -429,13 +428,11 @@ visible: T_VISIBLE if_expr T_EOL
prompt_stmt_opt:
/* empty */
| prompt if_expr
| T_WORD_QUOTE if_expr
{
menu_add_prompt(P_PROMPT, $1, $2);
};
prompt: T_WORD_QUOTE
end: T_ENDMENU T_EOL { $$ = "menu"; }
| T_ENDCHOICE T_EOL { $$ = "choice"; }
| T_ENDIF T_EOL { $$ = "if"; }