summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-12-11 12:01:07 +0100
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-12-21 16:25:55 +0100
commitb3d1d9d3c36214a50c18ba377b47152c021768df (patch)
tree74ff277d9e3d1129be576d7a9615cde862d655ec /scripts
parentkconfig: refactor end token rules (diff)
downloadlinux-b3d1d9d3c36214a50c18ba377b47152c021768df.tar.xz
linux-b3d1d9d3c36214a50c18ba377b47152c021768df.zip
kconfig: stop associating kconf_id with yylval
The lexer has conventionally associated kconf_id data with yylval to carry additional information to the parser. No token is relying on this any more. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/zconf.l2
-rw-r--r--scripts/kconfig/zconf.y41
2 files changed, 20 insertions, 23 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
index 90d2f37159dc..ed0d0a3b0d62 100644
--- a/scripts/kconfig/zconf.l
+++ b/scripts/kconfig/zconf.l
@@ -104,7 +104,6 @@ n [A-Za-z0-9_-]
current_pos.lineno = yylineno;
if (id && id->flags & TF_COMMAND) {
BEGIN(PARAM);
- yylval.id = id;
return id->token;
}
alloc_string(yytext, yyleng);
@@ -163,7 +162,6 @@ n [A-Za-z0-9_-]
{n}+ {
const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
if (id && id->flags & TF_PARAM) {
- yylval.id = id;
return id->token;
}
alloc_string(yytext, yyleng);
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 71c2fe737e37..3a3ada6f0729 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -40,50 +40,49 @@ static struct menu *current_menu, *current_entry;
struct symbol *symbol;
struct expr *expr;
struct menu *menu;
- const struct kconf_id *id;
enum symbol_type type;
enum variable_flavor flavor;
}
-%token <id>T_MAINMENU
-%token <id>T_MENU
-%token <id>T_ENDMENU
-%token <id>T_SOURCE
-%token <id>T_CHOICE
-%token <id>T_ENDCHOICE
-%token <id>T_COMMENT
-%token <id>T_CONFIG
-%token <id>T_MENUCONFIG
-%token <id>T_HELP
%token <string> T_HELPTEXT
-%token <id>T_IF
-%token <id>T_ENDIF
-%token <id>T_DEPENDS
-%token <id>T_OPTIONAL
-%token <id>T_PROMPT
-%token <id>T_SELECT
-%token <id>T_IMPLY
-%token <id>T_RANGE
-%token <id>T_VISIBLE
-%token <id>T_ON
%token <string> T_WORD
%token <string> T_WORD_QUOTE
%token T_ALLNOCONFIG_Y
%token T_BOOL
+%token T_CHOICE
%token T_CLOSE_PAREN
%token T_COLON_EQUAL
+%token T_COMMENT
+%token T_CONFIG
%token T_DEFAULT
%token T_DEFCONFIG_LIST
%token T_DEF_BOOL
%token T_DEF_TRISTATE
+%token T_DEPENDS
+%token T_ENDCHOICE
+%token T_ENDIF
+%token T_ENDMENU
+%token T_HELP
%token T_HEX
+%token T_IF
+%token T_IMPLY
%token T_INT
+%token T_MAINMENU
+%token T_MENU
+%token T_MENUCONFIG
%token T_MODULES
+%token T_ON
%token T_OPEN_PAREN
%token T_OPTION
+%token T_OPTIONAL
%token T_PLUS_EQUAL
+%token T_PROMPT
+%token T_RANGE
+%token T_SELECT
+%token T_SOURCE
%token T_STRING
%token T_TRISTATE
+%token T_VISIBLE
%token T_EOL
%token <string> T_ASSIGN_VAL