summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-12-11 06:01:07 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-12-21 10:25:55 -0500
commitb3d1d9d3c36214a50c18ba377b47152c021768df (patch)
tree74ff277d9e3d1129be576d7a9615cde862d655ec /scripts/kconfig
parentcaaebb3c6de3493c7f11f79a5dddc6691a40e55f (diff)
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/kconfig')
-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_-]
104 current_pos.lineno = yylineno; 104 current_pos.lineno = yylineno;
105 if (id && id->flags & TF_COMMAND) { 105 if (id && id->flags & TF_COMMAND) {
106 BEGIN(PARAM); 106 BEGIN(PARAM);
107 yylval.id = id;
108 return id->token; 107 return id->token;
109 } 108 }
110 alloc_string(yytext, yyleng); 109 alloc_string(yytext, yyleng);
@@ -163,7 +162,6 @@ n [A-Za-z0-9_-]
163 {n}+ { 162 {n}+ {
164 const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); 163 const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
165 if (id && id->flags & TF_PARAM) { 164 if (id && id->flags & TF_PARAM) {
166 yylval.id = id;
167 return id->token; 165 return id->token;
168 } 166 }
169 alloc_string(yytext, yyleng); 167 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;
40 struct symbol *symbol; 40 struct symbol *symbol;
41 struct expr *expr; 41 struct expr *expr;
42 struct menu *menu; 42 struct menu *menu;
43 const struct kconf_id *id;
44 enum symbol_type type; 43 enum symbol_type type;
45 enum variable_flavor flavor; 44 enum variable_flavor flavor;
46} 45}
47 46
48%token <id>T_MAINMENU
49%token <id>T_MENU
50%token <id>T_ENDMENU
51%token <id>T_SOURCE
52%token <id>T_CHOICE
53%token <id>T_ENDCHOICE
54%token <id>T_COMMENT
55%token <id>T_CONFIG
56%token <id>T_MENUCONFIG
57%token <id>T_HELP
58%token <string> T_HELPTEXT 47%token <string> T_HELPTEXT
59%token <id>T_IF
60%token <id>T_ENDIF
61%token <id>T_DEPENDS
62%token <id>T_OPTIONAL
63%token <id>T_PROMPT
64%token <id>T_SELECT
65%token <id>T_IMPLY
66%token <id>T_RANGE
67%token <id>T_VISIBLE
68%token <id>T_ON
69%token <string> T_WORD 48%token <string> T_WORD
70%token <string> T_WORD_QUOTE 49%token <string> T_WORD_QUOTE
71%token T_ALLNOCONFIG_Y 50%token T_ALLNOCONFIG_Y
72%token T_BOOL 51%token T_BOOL
52%token T_CHOICE
73%token T_CLOSE_PAREN 53%token T_CLOSE_PAREN
74%token T_COLON_EQUAL 54%token T_COLON_EQUAL
55%token T_COMMENT
56%token T_CONFIG
75%token T_DEFAULT 57%token T_DEFAULT
76%token T_DEFCONFIG_LIST 58%token T_DEFCONFIG_LIST
77%token T_DEF_BOOL 59%token T_DEF_BOOL
78%token T_DEF_TRISTATE 60%token T_DEF_TRISTATE
61%token T_DEPENDS
62%token T_ENDCHOICE
63%token T_ENDIF
64%token T_ENDMENU
65%token T_HELP
79%token T_HEX 66%token T_HEX
67%token T_IF
68%token T_IMPLY
80%token T_INT 69%token T_INT
70%token T_MAINMENU
71%token T_MENU
72%token T_MENUCONFIG
81%token T_MODULES 73%token T_MODULES
74%token T_ON
82%token T_OPEN_PAREN 75%token T_OPEN_PAREN
83%token T_OPTION 76%token T_OPTION
77%token T_OPTIONAL
84%token T_PLUS_EQUAL 78%token T_PLUS_EQUAL
79%token T_PROMPT
80%token T_RANGE
81%token T_SELECT
82%token T_SOURCE
85%token T_STRING 83%token T_STRING
86%token T_TRISTATE 84%token T_TRISTATE
85%token T_VISIBLE
87%token T_EOL 86%token T_EOL
88%token <string> T_ASSIGN_VAL 87%token <string> T_ASSIGN_VAL
89 88