Skip to content

Commit

Permalink
kconfig: drop T_WORD from the RHS of 'prompt' symbol
Browse files Browse the repository at this point in the history
Commit 8636a1f ("treewide: surround Kconfig file paths with double
quotes") killed use-cases to reduce an unquoted string into the 'prompt'
symbol.

Kconfig still allows to use an unquoted string in the context of menu,
source, or prompt.

So, you can omit quoting if the prompt is a single word:

    bool foo

..., but I do not think this is so useful.

Let's require quoting:

    bool "foo"

All the Kconfig files in the kernel are written in this way.

Remove the T_WORD from the right-hand side of the symbol 'prompt'.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
Masahiro Yamada committed Jan 6, 2020
1 parent de026ca commit 801b27d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/kconfig/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,7 @@ prompt_stmt_opt:
menu_add_prompt(P_PROMPT, $1, $2);
};

prompt: T_WORD
| T_WORD_QUOTE
;
prompt: T_WORD_QUOTE

end: T_ENDMENU T_EOL { $$ = "menu"; }
| T_ENDCHOICE T_EOL { $$ = "choice"; }
Expand Down

0 comments on commit 801b27d

Please sign in to comment.