diff options
| author | Arnaud Lacombe <lacombar@gmail.com> | 2011-05-23 01:08:19 -0400 |
|---|---|---|
| committer | Arnaud Lacombe <lacombar@gmail.com> | 2011-06-09 14:04:45 -0400 |
| commit | 2f76b358f9fba35821fa97f0873ec55be88187dc (patch) | |
| tree | 982650f3960cc16176ebf4e4635120298cb3659c /scripts/kconfig | |
| parent | 378dbb2cf5cb51e41e51b115af8b3ecef086e6ff (diff) | |
kconfig: regen parser
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Diffstat (limited to 'scripts/kconfig')
| -rw-r--r-- | scripts/kconfig/Makefile | 6 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.hash.c_shipped | 273 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.lex.c_shipped (renamed from scripts/kconfig/lex.zconf.c_shipped) | 26 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.tab.c_shipped | 68 |
4 files changed, 200 insertions, 173 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index ee3f4fa0e04f..0b4276c047b2 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
| @@ -204,7 +204,7 @@ ifeq ($(gconf-target),1) | |||
| 204 | endif | 204 | endif |
| 205 | 205 | ||
| 206 | clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck | 206 | clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck |
| 207 | clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h | 207 | clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h |
| 208 | clean-files += mconf qconf gconf nconf | 208 | clean-files += mconf qconf gconf nconf |
| 209 | clean-files += config.pot linux.pot | 209 | clean-files += config.pot linux.pot |
| 210 | 210 | ||
| @@ -220,7 +220,7 @@ always := dochecklxdialog | |||
| 220 | HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) | 220 | HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) |
| 221 | 221 | ||
| 222 | # generated files seem to need this to find local include files | 222 | # generated files seem to need this to find local include files |
| 223 | HOSTCFLAGS_lex.zconf.o := -I$(src) | 223 | HOSTCFLAGS_zconf.lex.o := -I$(src) |
| 224 | HOSTCFLAGS_zconf.tab.o := -I$(src) | 224 | HOSTCFLAGS_zconf.tab.o := -I$(src) |
| 225 | 225 | ||
| 226 | LEX_PREFIX_zconf := zconf | 226 | LEX_PREFIX_zconf := zconf |
| @@ -319,7 +319,7 @@ $(obj)/.tmp_gtkcheck: | |||
| 319 | fi | 319 | fi |
| 320 | endif | 320 | endif |
| 321 | 321 | ||
| 322 | $(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c | 322 | $(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c |
| 323 | 323 | ||
| 324 | $(obj)/kconfig_load.o: $(obj)/lkc_defs.h | 324 | $(obj)/kconfig_load.o: $(obj)/lkc_defs.h |
| 325 | 325 | ||
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped index 4055d5de1750..40df0005daa9 100644 --- a/scripts/kconfig/zconf.hash.c_shipped +++ b/scripts/kconfig/zconf.hash.c_shipped | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | /* ANSI-C code produced by gperf version 3.0.3 */ | 1 | /* ANSI-C code produced by gperf version 3.0.4 */ |
| 2 | /* Command-line: gperf */ | 2 | /* Command-line: gperf -t --output-file scripts/kconfig/zconf.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/kconfig/zconf.gperf */ |
| 3 | /* Computed positions: -k'1,3' */ | ||
| 4 | 3 | ||
| 5 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ | 4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ |
| 6 | && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ | 5 | && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ |
| @@ -29,10 +28,11 @@ | |||
| 29 | #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." | 28 | #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." |
| 30 | #endif | 29 | #endif |
| 31 | 30 | ||
| 31 | #line 10 "scripts/kconfig/zconf.gperf" | ||
| 32 | struct kconf_id; | 32 | struct kconf_id; |
| 33 | 33 | ||
| 34 | static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); | 34 | static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); |
| 35 | /* maximum key range = 50, duplicates = 0 */ | 35 | /* maximum key range = 71, duplicates = 0 */ |
| 36 | 36 | ||
| 37 | #ifdef __GNUC__ | 37 | #ifdef __GNUC__ |
| 38 | __inline | 38 | __inline |
| @@ -44,34 +44,34 @@ inline | |||
| 44 | static unsigned int | 44 | static unsigned int |
| 45 | kconf_id_hash (register const char *str, register unsigned int len) | 45 | kconf_id_hash (register const char *str, register unsigned int len) |
| 46 | { | 46 | { |
| 47 | static unsigned char asso_values[] = | 47 | static const unsigned char asso_values[] = |
| 48 | { | 48 | { |
| 49 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 49 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 50 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 50 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 51 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 51 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 52 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 52 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 53 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 53 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 54 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 54 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 55 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 55 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 56 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 56 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 57 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 57 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 58 | 52, 52, 52, 52, 52, 52, 52, 52, 40, 5, | 58 | 73, 73, 73, 73, 73, 73, 73, 73, 25, 25, |
| 59 | 0, 0, 5, 52, 0, 20, 52, 52, 10, 20, | 59 | 0, 0, 0, 5, 0, 0, 73, 73, 5, 0, |
| 60 | 5, 0, 35, 52, 0, 30, 0, 15, 0, 52, | 60 | 10, 5, 45, 73, 20, 20, 0, 15, 15, 73, |
| 61 | 15, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 61 | 20, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 62 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 62 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 63 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 63 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 64 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 64 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 65 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 65 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 66 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 66 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 67 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 67 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 68 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 68 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 69 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 69 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 70 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 70 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 71 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 71 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 72 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 72 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 73 | 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, | 73 | 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, |
| 74 | 52, 52, 52, 52, 52, 52 | 74 | 73, 73, 73, 73, 73, 73 |
| 75 | }; | 75 | }; |
| 76 | register int hval = len; | 76 | register int hval = len; |
| 77 | 77 | ||
| @@ -85,87 +85,87 @@ kconf_id_hash (register const char *str, register unsigned int len) | |||
| 85 | hval += asso_values[(unsigned char)str[0]]; | 85 | hval += asso_values[(unsigned char)str[0]]; |
| 86 | break; | 86 | break; |
| 87 | } | 87 | } |
| 88 | return hval; | 88 | return hval + asso_values[(unsigned char)str[len - 1]]; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | struct kconf_id_strings_t | 91 | struct kconf_id_strings_t |
| 92 | { | 92 | { |
| 93 | char kconf_id_strings_str2[sizeof("on")]; | 93 | char kconf_id_strings_str2[sizeof("if")]; |
| 94 | char kconf_id_strings_str3[sizeof("env")]; | 94 | char kconf_id_strings_str3[sizeof("int")]; |
| 95 | char kconf_id_strings_str5[sizeof("endif")]; | 95 | char kconf_id_strings_str5[sizeof("endif")]; |
| 96 | char kconf_id_strings_str6[sizeof("option")]; | ||
