Commit 09899c93 authored by Arnaud Lacombe's avatar Arnaud Lacombe Committed by Mauro Carvalho Chehab

kconfig: regen parser

Signed-off-by: default avatarArnaud Lacombe <lacombar@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 86e187ff
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
struct kconf_id; struct kconf_id;
static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
/* maximum key range = 47, duplicates = 0 */ /* maximum key range = 50, duplicates = 0 */
#ifdef __GNUC__ #ifdef __GNUC__
__inline __inline
...@@ -46,32 +46,32 @@ kconf_id_hash (register const char *str, register unsigned int len) ...@@ -46,32 +46,32 @@ kconf_id_hash (register const char *str, register unsigned int len)
{ {
static unsigned char asso_values[] = static unsigned char asso_values[] =
{ {
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 11, 5, 52, 52, 52, 52, 52, 52, 52, 52, 40, 5,
0, 0, 5, 49, 5, 20, 49, 49, 5, 20, 0, 0, 5, 52, 0, 20, 52, 52, 10, 20,
5, 0, 30, 49, 0, 15, 0, 10, 0, 49, 5, 0, 35, 52, 0, 30, 0, 15, 0, 52,
25, 49, 49, 49, 49, 49, 49, 49, 49, 49, 15, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
49, 49, 49, 49, 49, 49 52, 52, 52, 52, 52, 52
}; };
register int hval = len; register int hval = len;
...@@ -102,25 +102,26 @@ struct kconf_id_strings_t ...@@ -102,25 +102,26 @@ struct kconf_id_strings_t
char kconf_id_strings_str12[sizeof("default")]; char kconf_id_strings_str12[sizeof("default")];
char kconf_id_strings_str13[sizeof("def_bool")]; char kconf_id_strings_str13[sizeof("def_bool")];
char kconf_id_strings_str14[sizeof("help")]; char kconf_id_strings_str14[sizeof("help")];
char kconf_id_strings_str15[sizeof("bool")];
char kconf_id_strings_str16[sizeof("config")]; char kconf_id_strings_str16[sizeof("config")];
char kconf_id_strings_str17[sizeof("def_tristate")]; char kconf_id_strings_str17[sizeof("def_tristate")];
char kconf_id_strings_str18[sizeof("boolean")]; char kconf_id_strings_str18[sizeof("hex")];
char kconf_id_strings_str19[sizeof("defconfig_list")]; char kconf_id_strings_str19[sizeof("defconfig_list")];
char kconf_id_strings_str21[sizeof("string")];
char kconf_id_strings_str22[sizeof("if")]; char kconf_id_strings_str22[sizeof("if")];
char kconf_id_strings_str23[sizeof("int")]; char kconf_id_strings_str23[sizeof("int")];
char kconf_id_strings_str26[sizeof("select")];
char kconf_id_strings_str27[sizeof("modules")]; char kconf_id_strings_str27[sizeof("modules")];
char kconf_id_strings_str28[sizeof("tristate")]; char kconf_id_strings_str28[sizeof("tristate")];
char kconf_id_strings_str29[sizeof("menu")]; char kconf_id_strings_str29[sizeof("menu")];
char kconf_id_strings_str31[sizeof("source")];
char kconf_id_strings_str32[sizeof("comment")]; char kconf_id_strings_str32[sizeof("comment")];
char kconf_id_strings_str33[sizeof("hex")];
char kconf_id_strings_str35[sizeof("menuconfig")]; char kconf_id_strings_str35[sizeof("menuconfig")];
char kconf_id_strings_str36[sizeof("prompt")]; char kconf_id_strings_str36[sizeof("string")];
char kconf_id_strings_str37[sizeof("depends")]; char kconf_id_strings_str37[sizeof("visible")];
char kconf_id_strings_str41[sizeof("prompt")];
char kconf_id_strings_str42[sizeof("depends")];
char kconf_id_strings_str44[sizeof("bool")];
char kconf_id_strings_str46[sizeof("select")];
char kconf_id_strings_str47[sizeof("boolean")];
char kconf_id_strings_str48[sizeof("mainmenu")]; char kconf_id_strings_str48[sizeof("mainmenu")];
char kconf_id_strings_str51[sizeof("source")];
}; };
static struct kconf_id_strings_t kconf_id_strings_contents = static struct kconf_id_strings_t kconf_id_strings_contents =
{ {
...@@ -136,25 +137,26 @@ static struct kconf_id_strings_t kconf_id_strings_contents = ...@@ -136,25 +137,26 @@ static struct kconf_id_strings_t kconf_id_strings_contents =
"default", "default",
"def_bool", "def_bool",
"help", "help",
"bool",
"config", "config",
"def_tristate", "def_tristate",
"boolean", "hex",
"defconfig_list", "defconfig_list",
"string",
"if", "if",
"int", "int",
"select",
"modules", "modules",
"tristate", "tristate",
"menu", "menu",
"source",
"comment", "comment",
"hex",
"menuconfig", "menuconfig",
"string",
"visible",
"prompt", "prompt",
"depends", "depends",
"mainmenu" "bool",
"select",
"boolean",
"mainmenu",
"source"
}; };
#define kconf_id_strings ((const char *) &kconf_id_strings_contents) #define kconf_id_strings ((const char *) &kconf_id_strings_contents)
#ifdef __GNUC__ #ifdef __GNUC__
...@@ -168,11 +170,11 @@ kconf_id_lookup (register const char *str, register unsigned int len) ...@@ -168,11 +170,11 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{ {
enum enum
{ {
TOTAL_KEYWORDS = 31, TOTAL_KEYWORDS = 32,
MIN_WORD_LENGTH = 2, MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 14, MAX_WORD_LENGTH = 14,
MIN_HASH_VALUE = 2, MIN_HASH_VALUE = 2,
MAX_HASH_VALUE = 48 MAX_HASH_VALUE = 51
}; };
static struct kconf_id wordlist[] = static struct kconf_id wordlist[] =
...@@ -191,31 +193,35 @@ kconf_id_lookup (register const char *str, register unsigned int len) ...@@ -191,31 +193,35 @@ kconf_id_lookup (register const char *str, register unsigned int len)
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str15, T_TYPE, TF_COMMAND, S_BOOLEAN}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_BOOLEAN}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_HEX},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION},
{-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_TYPE, TF_COMMAND, S_STRING},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT},
{-1}, {-1}, {-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SELECT, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
{-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SOURCE, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_TYPE, TF_COMMAND, S_HEX}, {-1}, {-1},
{-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_PROMPT, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_TYPE, TF_COMMAND, S_STRING},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_DEPENDS, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_VISIBLE, TF_COMMAND},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_PROMPT, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_DEPENDS, TF_COMMAND},
{-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND} {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str44, T_TYPE, TF_COMMAND, S_BOOLEAN},
{-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND},
{-1}, {-1},
{(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_SOURCE, TF_COMMAND}
}; };
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment