[PATCH] kconfig: simplify symbol type parsing
This simplifies the parser a bit by merging the various symbol types into a
single token and adds the type to the keyword hash.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
index ec90209..cfcfabd 100644
--- a/scripts/kconfig/zconf.l
+++ b/scripts/kconfig/zconf.l
@@ -90,6 +90,7 @@
struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
if (id && id->flags & TF_COMMAND) {
BEGIN(PARAM);
+ zconflval.id = id;
return id->token;
}
alloc_string(yytext, yyleng);
@@ -117,8 +118,10 @@
--- /* ignore */
({n}|[-/.])+ {
struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
- if (id && id->flags & TF_PARAM)
+ if (id && id->flags & TF_PARAM) {
+ zconflval.id = id;
return id->token;
+ }
alloc_string(yytext, yyleng);
zconflval.string = text;
return T_WORD;