kconfig: remove keyword lookup table entirely

Commit 7a88488bbc ("[PATCH] kconfig: use gperf for kconfig keywords")
introduced gperf for the keyword lookup.

Then, commit bb3290d916 ("Remove gperf usage from toolchain") killed
the gperf use. As a result, the linear keyword search was left behind.

If we do not use gperf, there is no reason to have the separate table
of the keywords. Move all keywords back to the lexer.

I also refactored the lexer to remove the COMMAND and PARAM states.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
Masahiro Yamada
2018-12-11 20:01:10 +09:00
parent 4b31a32caf
commit 979f2b2f79
4 changed files with 69 additions and 147 deletions

View File

@@ -30,9 +30,6 @@ static inline const char *CONFIG_prefix(void)
#undef CONFIG_
#define CONFIG_ CONFIG_prefix()
#define TF_COMMAND 0x0001
#define TF_PARAM 0x0002
enum conf_def_mode {
def_default,
def_yes,
@@ -41,12 +38,6 @@ enum conf_def_mode {
def_random
};
struct kconf_id {
const char *name;
int token;
unsigned int flags;
};
extern int yylineno;
void zconfdump(FILE *out);
void zconf_starthelp(void);