Skip to content

Commit

Permalink
kconfig: remove 'prompt' symbol
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Masahiro Yamada committed Jan 6, 2020
1 parent 801b27d commit 1be6e79
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions scripts/kconfig/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
};
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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"; }
Expand Down

0 comments on commit 1be6e79

Please sign in to comment.