aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-06-23 17:00:16 -0400
committerMichal Marek <mmarek@suse.cz>2011-06-23 17:00:16 -0400
commit5e05981b5b79afb42adb754c558ee050092d2d85 (patch)
treeb9bbdea5a3d95cb759f48fb3c1dd8faa6bfd3f82 /scripts
parent2e483528cebad089d0bb3f9aebb0ada22d968ffa (diff)
parentedfc86aadad371b76d95b11d0bc8eb36c2376d1e (diff)
Merge branch 'kbuild-implicit-parser-rule' of git://github.com/lacombar/linux-2.6 into kbuild/kbuild
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include4
-rw-r--r--scripts/Makefile.lib40
-rw-r--r--scripts/dtc/Makefile28
-rw-r--r--scripts/dtc/dtc-lexer.lex.c_shipped59
-rw-r--r--scripts/dtc/dtc-parser.tab.c_shipped116
-rw-r--r--scripts/dtc/dtc-parser.tab.h_shipped11
-rw-r--r--scripts/genksyms/.gitignore7
-rw-r--r--scripts/genksyms/Makefile48
-rw-r--r--scripts/genksyms/keywords.gperf3
-rw-r--r--scripts/genksyms/keywords.hash.c_shipped (renamed from scripts/genksyms/keywords.c_shipped)96
-rw-r--r--scripts/genksyms/lex.l4
-rw-r--r--scripts/genksyms/lex.lex.c_shipped (renamed from scripts/genksyms/lex.c_shipped)359
-rw-r--r--scripts/genksyms/parse.tab.c_shipped (renamed from scripts/genksyms/parse.c_shipped)198
-rw-r--r--scripts/genksyms/parse.tab.h_shipped (renamed from scripts/genksyms/parse.h_shipped)7
-rw-r--r--scripts/kconfig/.gitignore2
-rw-r--r--scripts/kconfig/Makefile34
-rw-r--r--scripts/kconfig/lkc.h2
-rw-r--r--scripts/kconfig/zconf.gperf2
-rw-r--r--scripts/kconfig/zconf.hash.c_shipped273
-rw-r--r--scripts/kconfig/zconf.l8
-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_shipped68
-rw-r--r--scripts/kconfig/zconf.y18
23 files changed, 370 insertions, 1043 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index be39cd1c74cf..d897278b1f97 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -21,6 +21,10 @@ depfile = $(subst $(comma),_,$(dot-target).d)
21basetarget = $(basename $(notdir $@)) 21basetarget = $(basename $(notdir $@))
22 22
23### 23###
24# filename of first prerequisite with directory and extension stripped
25baseprereq = $(basename $(notdir $<))
26
27###
24# Escape single quote for use in echo statements 28# Escape single quote for use in echo statements
25escsq = $(subst $(squote),'\$(squote)',$1) 29escsq = $(subst $(squote),'\$(squote)',$1)
26 30
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 93b2b5938a2e..aeea84a24836 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -160,13 +160,51 @@ ld_flags = $(LDFLAGS) $(ldflags-y)
160modname-multi = $(sort $(foreach m,$(multi-used),\ 160modname-multi = $(sort $(foreach m,$(multi-used),\
161 $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=)))) 161 $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=))))
162 162
163ifdef REGENERATE_PARSERS
164
165# GPERF
166# ---------------------------------------------------------------------------
167quiet_cmd_gperf = GPERF $@
168 cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $<
169
170$(src)/%.hash.c_shipped: $(src)/%.gperf
171 $(call cmd,gperf)
172
173# LEX
174# ---------------------------------------------------------------------------
175LEX_PREFIX = $(if $(LEX_PREFIX_${baseprereq}),$(LEX_PREFIX_${baseprereq}),yy)
176
177quiet_cmd_flex = LEX $@
178 cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $<
179
180$(src)/%.lex.c_shipped: $(src)/%.l
181 $(call cmd,flex)
182
183# YACC
184# ---------------------------------------------------------------------------
185YACC_PREFIX = $(if $(YACC_PREFIX_${baseprereq}),$(YACC_PREFIX_${baseprereq}),yy)
186
187quiet_cmd_bison = YACC $@
188 cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $<
189
190$(src)/%.tab.c_shipped: $(src)/%.y
191 $(call cmd,bison)
192
193quiet_cmd_bison_h = YACC $@
194 cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $<
195
196$(src)/%.tab.h_shipped: $(src)/%.y
197 $(call cmd,bison_h)
198
199endif
200
163# Shipped files 201# Shipped files
164# =========================================================================== 202# ===========================================================================
165 203
166quiet_cmd_shipped = SHIPPED $@ 204quiet_cmd_shipped = SHIPPED $@
167cmd_shipped = cat $< > $@ 205cmd_shipped = cat $< > $@
168 206
169$(obj)/%:: $(src)/%_shipped 207$(obj)/%: $(src)/%_shipped
170 $(call cmd,shipped) 208 $(call cmd,shipped)
171 209
172# Commands useful for building a boot image 210# Commands useful for building a boot image
diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
index 04a31c17639f..6d1c6bb9f224 100644
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -25,31 +25,5 @@ HOSTCFLAGS_dtc-lexer.lex.o := $(HOSTCFLAGS_DTC)
25HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC) 25HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC)
26 26
27# dependencies on generated files need to be listed explicitly 27# dependencies on generated files need to be listed explicitly
28$(obj)/dtc-parser.tab.o: $(obj)/dtc-parser.tab.c $(obj)/dtc-parser.tab.h 28$(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
29$(obj)/dtc-lexer.lex.o: $(obj)/dtc-lexer.lex.c $(obj)/dtc-parser.tab.h
30 29
31targets += dtc-parser.tab.c dtc-lexer.lex.c
32
33clean-files += dtc-parser.tab.h
34
35# GENERATE_PARSER := 1 # Uncomment to rebuild flex/bison output
36
37ifdef GENERATE_PARSER
38
39BISON = bison
40FLEX = flex
41
42quiet_cmd_bison = BISON $@
43 cmd_bison = $(BISON) -o$@ -d $<; cp $@ $@_shipped
44quiet_cmd_flex = FLEX $@
45 cmd_flex = $(FLEX) -o$@ $<; cp $@ $@_shipped
46
47$(obj)/dtc-parser.tab.c: $(src)/dtc-parser.y FORCE
48 $(call if_changed,bison)
49
50$(obj)/dtc-parser.tab.h: $(obj)/dtc-parser.tab.c
51
52$(obj)/dtc-lexer.lex.c: $(src)/dtc-lexer.l FORCE
53 $(call if_changed,flex)
54
55endif
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
index 50c4420b4b2c..8bbe12817050 100644
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
@@ -1,6 +1,5 @@
1#line 2 "dtc-lexer.lex.c"
2 1
3#line 4 "dtc-lexer.lex.c" 2#line 3 "scripts/dtc/dtc-lexer.lex.c_shipped"
4 3
5#define YY_INT_ALIGNED short int 4#define YY_INT_ALIGNED short int
6 5
@@ -54,6 +53,7 @@ typedef int flex_int32_t;
54typedef unsigned char flex_uint8_t; 53typedef unsigned char flex_uint8_t;
55typedef unsigned short int flex_uint16_t; 54typedef unsigned short int flex_uint16_t;
56typedef unsigned int flex_uint32_t; 55typedef unsigned int flex_uint32_t;
56#endif /* ! C99 */
57 57
58/* Limits of integral types. */ 58/* Limits of integral types. */
59#ifndef INT8_MIN 59#ifndef INT8_MIN
@@ -84,8 +84,6 @@ typedef unsigned int flex_uint32_t;
84#define UINT32_MAX (4294967295U) 84#define UINT32_MAX (4294967295U)
85#endif 85#endif
86 86
87#endif /* ! C99 */
88
89#endif /* ! FLEXINT_H */ 87#endif /* ! FLEXINT_H */
90 88
91#ifdef __cplusplus 89#ifdef __cplusplus
@@ -142,15 +140,7 @@ typedef unsigned int flex_uint32_t;
142 140
143/* Size of default input buffer. */ 141/* Size of default input buffer. */
144#ifndef YY_BUF_SIZE 142#ifndef YY_BUF_SIZE
145#ifdef __ia64__
146/* On IA-64, the buffer size is 16k, not 8k.
147 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
148 * Ditto for the __ia64__ case accordingly.
149 */
150#define YY_BUF_SIZE 32768
151#else
152#define YY_BUF_SIZE 16384 143#define YY_BUF_SIZE 16384
153#endif /* __ia64__ */
154#endif 144#endif
155 145
156/* The state buf must be large enough to hold one state per character in the main buffer. 146/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -550,7 +540,6 @@ int yy_flex_debug = 0;
550#define YY_MORE_ADJ 0 540#define YY_MORE_ADJ 0
551#define YY_RESTORE_YY_MORE_OFFSET 541#define YY_RESTORE_YY_MORE_OFFSET
552char *yytext; 542char *yytext;
553#line 1 "dtc-lexer.l"
554/* 543/*
555 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. 544 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
556 * 545 *
@@ -572,10 +561,6 @@ char *yytext;
572 */ 561 */
573#define YY_NO_INPUT 1 562#define YY_NO_INPUT 1
574 563
575
576
577
578#line 37 "dtc-lexer.l"
579#include "dtc.h" 564#include "dtc.h"
580#include "srcpos.h" 565#include "srcpos.h"
581#include "dtc-parser.tab.h" 566#include "dtc-parser.tab.h"
@@ -603,7 +588,6 @@ static int dts_version = 1;
603 588
604static void push_input_file(const char *filename); 589static void push_input_file(const char *filename);
605static int pop_input_file(void); 590static int pop_input_file(void);
606#line 607 "dtc-lexer.lex.c"
607 591
608#define INITIAL 0 592#define INITIAL 0
609#define INCLUDE 1 593#define INCLUDE 1
@@ -686,12 +670,7 @@ static int input (void );
686 670
687/* Amount of stuff to slurp up with each read. */ 671/* Amount of stuff to slurp up with each read. */
688#ifndef YY_READ_BUF_SIZE 672#ifndef YY_READ_BUF_SIZE
689#ifdef __ia64__
690/* On IA-64, the buffer size is 16k, not 8k */
691#define YY_READ_BUF_SIZE 16384
692#else
693#define YY_READ_BUF_SIZE 8192 673#define YY_READ_BUF_SIZE 8192
694#endif /* __ia64__ */
695#endif 674#endif
696 675
697/* Copy whatever the last rule matched to the standard output. */ 676/* Copy whatever the last rule matched to the standard output. */
@@ -710,7 +689,7 @@ static int input (void );
710 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 689 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
711 { \ 690 { \
712 int c = '*'; \ 691 int c = '*'; \
713 size_t n; \ 692 unsigned n; \
714 for ( n = 0; n < max_size && \ 693 for ( n = 0; n < max_size && \
715 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 694 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
716 buf[n] = (char) c; \ 695 buf[n] = (char) c; \
@@ -792,10 +771,6 @@ YY_DECL
792 register char *yy_cp, *yy_bp; 771 register char *yy_cp, *yy_bp;
793 register int yy_act; 772 register int yy_act;
794 773
795#line 66 "dtc-lexer.l"
796
797#line 798 "dtc-lexer.lex.c"
798
799 if ( !(yy_init) ) 774 if ( !(yy_init) )
800 { 775 {
801 (yy_init) = 1; 776 (yy_init) = 1;
@@ -876,7 +851,6 @@ do_action: /* This label is used only to access EOF actions. */
876case 1: 851case 1:
877/* rule 1 can match eol */ 852/* rule 1 can match eol */
878YY_RULE_SETUP 853YY_RULE_SETUP
879#line 67 "dtc-lexer.l"
880{ 854{
881 char *name = strchr(yytext, '\"') + 1; 855 char *name = strchr(yytext, '\"') + 1;
882 yytext[yyleng-1] = '\0'; 856 yytext[yyleng-1] = '\0';
@@ -888,7 +862,6 @@ case YY_STATE_EOF(INCLUDE):
888case YY_STATE_EOF(BYTESTRING): 862case YY_STATE_EOF(BYTESTRING):
889case YY_STATE_EOF(PROPNODENAME): 863case YY_STATE_EOF(PROPNODENAME):
890case YY_STATE_EOF(V1): 864case YY_STATE_EOF(V1):
891#line 73 "dtc-lexer.l"
892{ 865{
893 if (!pop_input_file()) { 866 if (!pop_input_file()) {
894 yyterminate(); 867 yyterminate();
@@ -898,7 +871,6 @@ case YY_STATE_EOF(V1):
898case 2: 871case 2:
899/* rule 2 can match eol */ 872/* rule 2 can match eol */
900YY_RULE_SETUP 873YY_RULE_SETUP
901#line 79 "dtc-lexer.l"
902{ 874{
903 DPRINT("String: %s\n", yytext); 875 DPRINT("String: %s\n", yytext);
904 yylval.data = data_copy_escape_string(yytext+1, 876 yylval.data = data_copy_escape_string(yytext+1,
@@ -908,7 +880,6 @@ YY_RULE_SETUP
908 YY_BREAK 880 YY_BREAK
909case 3: 881case 3:
910YY_RULE_SETUP 882YY_RULE_SETUP
911#line 86 "dtc-lexer.l"
912{ 883{
913 DPRINT("Keyword: /dts-v1/\n"); 884 DPRINT("Keyword: /dts-v1/\n");
914 dts_version = 1; 885 dts_version = 1;
@@ -918,7 +889,6 @@ YY_RULE_SETUP
918 YY_BREAK 889 YY_BREAK
919case 4: 890case 4:
920YY_RULE_SETUP 891YY_RULE_SETUP
921#line 93 "dtc-lexer.l"
922{ 892{
923 DPRINT("Keyword: /memreserve/\n"); 893 DPRINT("Keyword: /memreserve/\n");
924 BEGIN_DEFAULT(); 894 BEGIN_DEFAULT();
@@ -927,7 +897,6 @@ YY_RULE_SETUP
927 YY_BREAK 897 YY_BREAK
928case 5: 898case 5:
929YY_RULE_SETUP 899YY_RULE_SETUP
930#line 99 "dtc-lexer.l"
931{ 900{
932 DPRINT("Label: %s\n", yytext); 901 DPRINT("Label: %s\n", yytext);
933 yylval.labelref = xstrdup(yytext); 902 yylval.labelref = xstrdup(yytext);
@@ -937,7 +906,6 @@ YY_RULE_SETUP
937 YY_BREAK 906 YY_BREAK
938case 6: 907case 6:
939YY_RULE_SETUP 908YY_RULE_SETUP
940#line 106 "dtc-lexer.l"
941{ 909{
942 yylval.literal = xstrdup(yytext); 910 yylval.literal = xstrdup(yytext);
943 DPRINT("Literal: '%s'\n", yylval.literal); 911 DPRINT("Literal: '%s'\n", yylval.literal);
@@ -946,7 +914,6 @@ YY_RULE_SETUP
946 YY_BREAK 914 YY_BREAK
947case 7: 915case 7:
948YY_RULE_SETUP 916YY_RULE_SETUP
949#line 112 "dtc-lexer.l"
950{ /* label reference */ 917{ /* label reference */
951 DPRINT("Ref: %s\n", yytext+1); 918 DPRINT("Ref: %s\n", yytext+1);
952 yylval.labelref = xstrdup(yytext+1); 919 yylval.labelref = xstrdup(yytext+1);
@@ -955,7 +922,6 @@ YY_RULE_SETUP
955 YY_BREAK 922 YY_BREAK
956case 8: 923case 8:
957YY_RULE_SETUP 924YY_RULE_SETUP
958#line 118 "dtc-lexer.l"
959{ /* new-style path reference */ 925{ /* new-style path reference */
960 yytext[yyleng-1] = '\0'; 926 yytext[yyleng-1] = '\0';
961 DPRINT("Ref: %s\n", yytext+2); 927 DPRINT("Ref: %s\n", yytext+2);
@@ -965,7 +931,6 @@ YY_RULE_SETUP
965 YY_BREAK 931 YY_BREAK
966case 9: 932case 9:
967YY_RULE_SETUP 933YY_RULE_SETUP
968#line 125 "dtc-lexer.l"
969{ 934{
970 yylval.byte = strtol(yytext, NULL, 16); 935 yylval.byte = strtol(yytext, NULL, 16);
971 DPRINT("Byte: %02x\n", (int)yylval.byte); 936 DPRINT("Byte: %02x\n", (int)yylval.byte);
@@ -974,7 +939,6 @@ YY_RULE_SETUP
974 YY_BREAK 939 YY_BREAK
975case 10: 940case 10:
976YY_RULE_SETUP 941YY_RULE_SETUP
977#line 131 "dtc-lexer.l"
978{ 942{
979 DPRINT("/BYTESTRING\n"); 943 DPRINT("/BYTESTRING\n");
980 BEGIN_DEFAULT(); 944 BEGIN_DEFAULT();
@@ -983,7 +947,6 @@ YY_RULE_SETUP
983 YY_BREAK 947 YY_BREAK
984case 11: 948case 11:
985YY_RULE_SETUP 949YY_RULE_SETUP
986#line 137 "dtc-lexer.l"
987{ 950{
988 DPRINT("PropNodeName: %s\n", yytext); 951 DPRINT("PropNodeName: %s\n", yytext);
989 yylval.propnodename = xstrdup(yytext); 952 yylval.propnodename = xstrdup(yytext);
@@ -993,7 +956,6 @@ YY_RULE_SETUP
993 YY_BREAK 956 YY_BREAK
994case 12: 957case 12:
995YY_RULE_SETUP 958YY_RULE_SETUP
996#line 144 "dtc-lexer.l"
997{ 959{
998 DPRINT("Binary Include\n"); 960 DPRINT("Binary Include\n");
999 return DT_INCBIN; 961 return DT_INCBIN;
@@ -1002,24 +964,20 @@ YY_RULE_SETUP
1002case 13: 964case 13:
1003/* rule 13 can match eol */ 965/* rule 13 can match eol */
1004YY_RULE_SETUP 966YY_RULE_SETUP
1005#line 149 "dtc-lexer.l"
1006/* eat whitespace */ 967/* eat whitespace */
1007 YY_BREAK 968 YY_BREAK
1008case 14: 969case 14:
1009/* rule 14 can match eol */ 970/* rule 14 can match eol */
1010YY_RULE_SETUP 971YY_RULE_SETUP
1011#line 150 "dtc-lexer.l"
1012/* eat C-style comments */ 972/* eat C-style comments */
1013 YY_BREAK 973 YY_BREAK
1014case 15: 974case 15:
1015/* rule 15 can match eol */ 975/* rule 15 can match eol */
1016YY_RULE_SETUP 976YY_RULE_SETUP
1017#line 151 "dtc-lexer.l"
1018/* eat C++-style comments */ 977/* eat C++-style comments */
1019 YY_BREAK 978 YY_BREAK
1020case 16: 979case 16:
1021YY_RULE_SETUP 980YY_RULE_SETUP
1022#line 153 "dtc-lexer.l"
1023{ 981{
1024 DPRINT("Char: %c (\\x%02x)\n", yytext[0], 982 DPRINT("Char: %c (\\x%02x)\n", yytext[0],
1025 (unsigned)yytext[0]); 983 (unsigned)yytext[0]);
@@ -1037,10 +995,8 @@ YY_RULE_SETUP
1037 YY_BREAK 995 YY_BREAK
1038case 17: 996case 17:
1039YY_RULE_SETUP 997YY_RULE_SETUP
1040#line 168 "dtc-lexer.l"
1041ECHO; 998ECHO;
1042 YY_BREAK 999 YY_BREAK
1043#line 1044 "dtc-lexer.lex.c"
1044 1000
1045 case YY_END_OF_BUFFER: 1001 case YY_END_OF_BUFFER:
1046 { 1002 {
@@ -1756,8 +1712,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1756 1712
1757/** Setup the input buffer state to scan the given bytes. The next call to yylex() will 1713/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1758 * scan from a @e copy of @a bytes. 1714 * scan from a @e copy of @a bytes.
1759 * @param yybytes the byte buffer to scan 1715 * @param bytes the byte buffer to scan
1760 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 1716 * @param len the number of bytes in the buffer pointed to by @a bytes.
1761 * 1717 *
1762 * @return the newly allocated buffer state object. 1718 * @return the newly allocated buffer state object.
1763 */ 1719 */
@@ -1996,10 +1952,6 @@ void yyfree (void * ptr )
1996 1952
1997#define YYTABLES_NAME "yytables" 1953#define YYTABLES_NAME "yytables"
1998 1954
1999#line 168 "dtc-lexer.l"
2000
2001
2002
2003static void push_input_file(const char *filename) 1955static void push_input_file(const char *filename)
2004{ 1956{
2005 assert(filename); 1957 assert(filename);
@@ -2011,7 +1963,6 @@ static void push_input_file(const char *filename)
2011 yypush_buffer_state(yy_create_buffer(yyin,YY_BUF_SIZE)); 1963 yypush_buffer_state(yy_create_buffer(yyin,YY_BUF_SIZE));
2012} 1964}
2013 1965
2014
2015static int pop_input_file(void) 1966static int pop_input_file(void)
2016{ 1967{
2017 if (srcfile_pop() == 0) 1968 if (srcfile_pop() == 0)
diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped
index 9be2eea18a30..b05921e1e848 100644
--- a/scripts/dtc/dtc-parser.tab.c_shipped
+++ b/scripts/dtc/dtc-parser.tab.c_shipped
@@ -1,10 +1,9 @@
1 1/* A Bison parser, made by GNU Bison 2.4.3. */
2/* A Bison parser, made by GNU Bison 2.4.1. */
3 2
4/* Skeleton implementation for Bison's Yacc-like parsers in C 3/* Skeleton implementation for Bison's Yacc-like parsers in C
5 4
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
7 Free Software Foundation, Inc. 6 2009, 2010 Free Software Foundation, Inc.
8 7
9 This program is free software: you can redistribute it and/or modify 8 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
46#define YYBISON 1 45#define YYBISON 1
47 46
48/* Bison version. */ 47/* Bison version. */
49#define YYBISON_VERSION "2.4.1" 48#define YYBISON_VERSION "2.4.3"
50 49
51/* Skeleton name. */ 50/* Skeleton name. */
52#define YYSKELETON_NAME "yacc.c" 51#define YYSKELETON_NAME "yacc.c"
@@ -67,8 +66,6 @@
67 66
68/* Copy the first part of user declarations. */ 67/* Copy the first part of user declarations. */
69 68
70/* Line 189 of yacc.c */
71#line 21 "dtc-parser.y"
72 69
73#include <stdio.h> 70#include <stdio.h>
74 71
@@ -87,12 +84,10 @@ extern int treesource_error;
87static unsigned long long eval_literal(const char *s, int base, int bits); 84static unsigned long long eval_literal(const char *s, int base, int bits);
88 85
89 86
90/* Line 189 of yacc.c */
91#line 92 "dtc-parser.tab.c"
92 87
93/* Enabling traces. */ 88/* Enabling traces. */
94#ifndef YYDEBUG 89#ifndef YYDEBUG
95# define YYDEBUG 0 90# define YYDEBUG 1
96#endif 91#endif
97 92
98/* Enabling verbose error messages. */ 93/* Enabling verbose error messages. */
@@ -134,8 +129,6 @@ static unsigned long long eval_literal(const char *s, int base, int bits);
134typedef union YYSTYPE 129typedef union YYSTYPE
135{ 130{
136 131
137/* Line 214 of yacc.c */
138#line 39 "dtc-parser.y"
139 132
140 char *propnodename; 133 char *propnodename;
141 char *literal; 134 char *literal;
@@ -154,8 +147,6 @@ typedef union YYSTYPE
154 147
155 148
156 149
157/* Line 214 of yacc.c */
158#line 159 "dtc-parser.tab.c"
159} YYSTYPE; 150} YYSTYPE;
160# define YYSTYPE_IS_TRIVIAL 1 151# define YYSTYPE_IS_TRIVIAL 1
161# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 152# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -166,8 +157,6 @@ typedef union YYSTYPE
166/* Copy the second part of user declarations. */ 157/* Copy the second part of user declarations. */
167 158
168 159
169/* Line 264 of yacc.c */
170#line 171 "dtc-parser.tab.c"
171 160
172#ifdef short 161#ifdef short
173# undef short 162# undef short
@@ -217,7 +206,7 @@ typedef short int yytype_int16;
217#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 206#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
218 207
219#ifndef YY_ 208#ifndef YY_
220# if YYENABLE_NLS 209# if defined YYENABLE_NLS && YYENABLE_NLS
221# if ENABLE_NLS 210# if ENABLE_NLS
222# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 211# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
223# define YY_(msgid) dgettext ("bison-runtime", msgid) 212# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -607,9 +596,18 @@ static const yytype_uint8 yystos[] =
607 596
608/* Like YYERROR except do call yyerror. This remains here temporarily 597/* Like YYERROR except do call yyerror. This remains here temporarily
609 to ease the transition to the new meaning of YYERROR, for GCC. 598 to ease the transition to the new meaning of YYERROR, for GCC.
610 Once GCC version 2 has supplanted version 1, this can go. */ 599 Once GCC version 2 has supplanted version 1, this can go. However,
600 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
601 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
602 discussed. */
611 603
612#define YYFAIL goto yyerrlab 604#define YYFAIL goto yyerrlab
605#if defined YYFAIL
606 /* This is here to suppress warnings from the GCC cpp's
607 -Wunused-macros. Normally we don't worry about that warning, but
608 some users do, and we want to make it easy for users to remove
609 YYFAIL uses, which will produce warnings from Bison 2.5. */
610#endif
613 611
614#define YYRECOVERING() (!!yyerrstatus) 612#define YYRECOVERING() (!!yyerrstatus)
615 613
@@ -666,7 +664,7 @@ while (YYID (0))
666 we won't break user code: when these are the locations we know. */ 664 we won't break user code: when these are the locations we know. */
667 665
668#ifndef YY_LOCATION_PRINT 666#ifndef YY_LOCATION_PRINT
669# if YYLTYPE_IS_TRIVIAL 667# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
670# define YY_LOCATION_PRINT(File, Loc) \ 668# define YY_LOCATION_PRINT(File, Loc) \
671 fprintf (File, "%d.%d-%d.%d", \ 669 fprintf (File, "%d.%d-%d.%d", \
672 (Loc).first_line, (Loc).first_column, \ 670 (Loc).first_line, (Loc).first_column, \
@@ -1405,8 +1403,6 @@ yyreduce:
1405 { 1403 {
1406 case 2: 1404 case 2:
1407 1405
1408/* Line 1455 of yacc.c */
1409#line 87 "dtc-parser.y"
1410 { 1406 {
1411 the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node), 1407 the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node),
1412 guess_boot_cpuid((yyvsp[(4) - (4)].node))); 1408 guess_boot_cpuid((yyvsp[(4) - (4)].node)));
@@ -1415,8 +1411,6 @@ yyreduce:
1415 1411
1416 case 3: 1412 case 3:
1417 1413
1418/* Line 1455 of yacc.c */
1419#line 95 "dtc-parser.y"
1420 { 1414 {
1421 (yyval.re) = NULL; 1415 (yyval.re) = NULL;
1422 ;} 1416 ;}
@@ -1424,8 +1418,6 @@ yyreduce:
1424 1418
1425 case 4: 1419 case 4:
1426 1420
1427/* Line 1455 of yacc.c */
1428#line 99 "dtc-parser.y"
1429 { 1421 {
1430 (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re)); 1422 (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
1431 ;} 1423 ;}
@@ -1433,8 +1425,6 @@ yyreduce:
1433 1425
1434 case 5: 1426 case 5:
1435 1427
1436/* Line 1455 of yacc.c */
1437#line 106 "dtc-parser.y"
1438 { 1428 {
1439 (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].addr), (yyvsp[(3) - (4)].addr)); 1429 (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].addr), (yyvsp[(3) - (4)].addr));
1440 ;} 1430 ;}
@@ -1442,8 +1432,6 @@ yyreduce:
1442 1432
1443 case 6: 1433 case 6:
1444 1434
1445/* Line 1455 of yacc.c */
1446#line 110 "dtc-parser.y"
1447 { 1435 {
1448 add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref)); 1436 add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
1449 (yyval.re) = (yyvsp[(2) - (2)].re); 1437 (yyval.re) = (yyvsp[(2) - (2)].re);
@@ -1452,8 +1440,6 @@ yyreduce:
1452 1440
1453 case 7: 1441 case 7:
1454 1442
1455/* Line 1455 of yacc.c */
1456#line 118 "dtc-parser.y"
1457 { 1443 {
1458 (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64); 1444 (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
1459 ;} 1445 ;}
@@ -1461,8 +1447,6 @@ yyreduce:
1461 1447
1462 case 8: 1448 case 8:
1463 1449
1464/* Line 1455 of yacc.c */
1465#line 125 "dtc-parser.y"
1466 { 1450 {
1467 (yyval.node) = name_node((yyvsp[(2) - (2)].node), ""); 1451 (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
1468 ;} 1452 ;}
@@ -1470,8 +1454,6 @@ yyreduce:
1470 1454
1471 case 9: 1455 case 9:
1472 1456
1473/* Line 1455 of yacc.c */
1474#line 129 "dtc-parser.y"
1475 { 1457 {
1476 (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 1458 (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
1477 ;} 1459 ;}
@@ -1479,8 +1461,6 @@ yyreduce:
1479 1461
1480 case 10: 1462 case 10:
1481 1463
1482/* Line 1455 of yacc.c */
1483#line 133 "dtc-parser.y"
1484 { 1464 {
1485 struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref)); 1465 struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
1486 1466
@@ -1494,8 +1474,6 @@ yyreduce:
1494 1474
1495 case 11: 1475 case 11:
1496 1476
1497/* Line 1455 of yacc.c */
1498#line 146 "dtc-parser.y"
1499 { 1477 {
1500 (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist)); 1478 (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
1501 ;} 1479 ;}
@@ -1503,8 +1481,6 @@ yyreduce:
1503 1481
1504 case 12: 1482 case 12:
1505 1483
1506/* Line 1455 of yacc.c */
1507#line 153 "dtc-parser.y"
1508 { 1484 {
1509 (yyval.proplist) = NULL; 1485 (yyval.proplist) = NULL;
1510 ;} 1486 ;}
@@ -1512,8 +1488,6 @@ yyreduce:
1512 1488
1513 case 13: 1489 case 13:
1514 1490
1515/* Line 1455 of yacc.c */
1516#line 157 "dtc-parser.y"
1517 { 1491 {
1518 (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist)); 1492 (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
1519 ;} 1493 ;}
@@ -1521,8 +1495,6 @@ yyreduce:
1521 1495
1522 case 14: 1496 case 14:
1523 1497
1524/* Line 1455 of yacc.c */
1525#line 164 "dtc-parser.y"
1526 { 1498 {
1527 (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data)); 1499 (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
1528 ;} 1500 ;}
@@ -1530,8 +1502,6 @@ yyreduce:
1530 1502
1531 case 15: 1503 case 15:
1532 1504
1533/* Line 1455 of yacc.c */
1534#line 168 "dtc-parser.y"
1535 { 1505 {
1536 (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data); 1506 (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
1537 ;} 1507 ;}
@@ -1539,8 +1509,6 @@ yyreduce:
1539 1509
1540 case 16: 1510 case 16:
1541 1511
1542/* Line 1455 of yacc.c */
1543#line 172 "dtc-parser.y"
1544 { 1512 {
1545 add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref)); 1513 add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
1546 (yyval.prop) = (yyvsp[(2) - (2)].prop); 1514 (yyval.prop) = (yyvsp[(2) - (2)].prop);
@@ -1549,8 +1517,6 @@ yyreduce:
1549 1517
1550 case 17: 1518 case 17:
1551 1519
1552/* Line 1455 of yacc.c */
1553#line 180 "dtc-parser.y"
1554 { 1520 {
1555 (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data)); 1521 (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
1556 ;} 1522 ;}
@@ -1558,8 +1524,6 @@ yyreduce:
1558 1524
1559 case 18: 1525 case 18:
1560 1526
1561/* Line 1455 of yacc.c */
1562#line 184 "dtc-parser.y"
1563 { 1527 {
1564 (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data)); 1528 (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
1565 ;} 1529 ;}
@@ -1567,8 +1531,6 @@ yyreduce:
1567 1531
1568 case 19: 1532 case 19:
1569 1533
1570/* Line 1455 of yacc.c */
1571#line 188 "dtc-parser.y"
1572 { 1534 {
1573 (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data)); 1535 (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
1574 ;} 1536 ;}
@@ -1576,8 +1538,6 @@ yyreduce:
1576 1538
1577 case 20: 1539 case 20:
1578 1540
1579/* Line 1455 of yacc.c */
1580#line 192 "dtc-parser.y"
1581 { 1541 {
1582 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref)); 1542 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
1583 ;} 1543 ;}
@@ -1585,8 +1545,6 @@ yyreduce:
1585 1545
1586 case 21: 1546 case 21:
1587 1547
1588/* Line 1455 of yacc.c */
1589#line 196 "dtc-parser.y"
1590 { 1548 {
1591 FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL); 1549 FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
1592 struct data d; 1550 struct data d;
@@ -1607,8 +1565,6 @@ yyreduce:
1607 1565
1608 case 22: 1566 case 22:
1609 1567
1610/* Line 1455 of yacc.c */
1611#line 213 "dtc-parser.y"
1612 { 1568 {
1613 FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL); 1569 FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
1614 struct data d = empty_data; 1570 struct data d = empty_data;
@@ -1622,8 +1578,6 @@ yyreduce:
1622 1578
1623 case 23: 1579 case 23:
1624 1580
1625/* Line 1455 of yacc.c */
1626#line 223 "dtc-parser.y"
1627 { 1581 {
1628 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); 1582 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1629 ;} 1583 ;}
@@ -1631,8 +1585,6 @@ yyreduce:
1631 1585
1632 case 24: 1586 case 24:
1633 1587
1634/* Line 1455 of yacc.c */
1635#line 230 "dtc-parser.y"
1636 { 1588 {
1637 (yyval.data) = empty_data; 1589 (yyval.data) = empty_data;
1638 ;} 1590 ;}
@@ -1640,8 +1592,6 @@ yyreduce:
1640 1592
1641 case 25: 1593 case 25:
1642 1594
1643/* Line 1455 of yacc.c */
1644#line 234 "dtc-parser.y"
1645 { 1595 {
1646 (yyval.data) = (yyvsp[(1) - (2)].data); 1596 (yyval.data) = (yyvsp[(1) - (2)].data);
1647 ;} 1597 ;}
@@ -1649,8 +1599,6 @@ yyreduce:
1649 1599
1650 case 26: 1600 case 26:
1651 1601
1652/* Line 1455 of yacc.c */
1653#line 238 "dtc-parser.y"
1654 { 1602 {
1655 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); 1603 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1656 ;} 1604 ;}
@@ -1658,8 +1606,6 @@ yyreduce:
1658 1606
1659 case 27: 1607 case 27:
1660 1608
1661/* Line 1455 of yacc.c */
1662#line 245 "dtc-parser.y"
1663 { 1609 {
1664 (yyval.data) = empty_data; 1610 (yyval.data) = empty_data;
1665 ;} 1611 ;}
@@ -1667,8 +1613,6 @@ yyreduce:
1667 1613
1668 case 28: 1614 case 28:
1669 1615
1670/* Line 1455 of yacc.c */
1671#line 249 "dtc-parser.y"
1672 { 1616 {
1673 (yyval.data) = data_append_cell((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].cell)); 1617 (yyval.data) = data_append_cell((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].cell));
1674 ;} 1618 ;}
@@ -1676,8 +1620,6 @@ yyreduce:
1676 1620
1677 case 29: 1621 case 29:
1678 1622
1679/* Line 1455 of yacc.c */
1680#line 253 "dtc-parser.y"
1681 { 1623 {
1682 (yyval.data) = data_append_cell(data_add_marker((yyvsp[(1) - (2)].data), REF_PHANDLE, 1624 (yyval.data) = data_append_cell(data_add_marker((yyvsp[(1) - (2)].data), REF_PHANDLE,
1683 (yyvsp[(2) - (2)].labelref)), -1); 1625 (yyvsp[(2) - (2)].labelref)), -1);
@@ -1686,8 +1628,6 @@ yyreduce:
1686 1628
1687 case 30: 1629 case 30:
1688 1630
1689/* Line 1455 of yacc.c */
1690#line 258 "dtc-parser.y"
1691 { 1631 {
1692 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); 1632 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1693 ;} 1633 ;}
@@ -1695,8 +1635,6 @@ yyreduce:
1695 1635
1696 case 31: 1636 case 31:
1697 1637
1698/* Line 1455 of yacc.c */
1699#line 265 "dtc-parser.y"
1700 { 1638 {
1701 (yyval.cell) = eval_literal((yyvsp[(1) - (1)].literal), 0, 32); 1639 (yyval.cell) = eval_literal((yyvsp[(1) - (1)].literal), 0, 32);
1702 ;} 1640 ;}
@@ -1704,8 +1642,6 @@ yyreduce:
1704 1642
1705 case 32: 1643 case 32:
1706 1644
1707/* Line 1455 of yacc.c */
1708#line 272 "dtc-parser.y"
1709 { 1645 {
1710 (yyval.data) = empty_data; 1646 (yyval.data) = empty_data;
1711 ;} 1647 ;}
@@ -1713,8 +1649,6 @@ yyreduce:
1713 1649
1714 case 33: 1650 case 33:
1715 1651
1716/* Line 1455 of yacc.c */
1717#line 276 "dtc-parser.y"
1718 { 1652 {
1719 (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte)); 1653 (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
1720 ;} 1654 ;}
@@ -1722,8 +1656,6 @@ yyreduce:
1722 1656
1723 case 34: 1657 case 34:
1724 1658
1725/* Line 1455 of yacc.c */
1726#line 280 "dtc-parser.y"
1727 { 1659 {
1728 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); 1660 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1729 ;} 1661 ;}
@@ -1731,8 +1663,6 @@ yyreduce:
1731 1663
1732 case 35: 1664 case 35:
1733 1665
1734/* Line 1455 of yacc.c */
1735#line 287 "dtc-parser.y"
1736 { 1666 {
1737 (yyval.nodelist) = NULL; 1667 (yyval.nodelist) = NULL;
1738 ;} 1668 ;}
@@ -1740,8 +1670,6 @@ yyreduce:
1740 1670
1741 case 36: 1671 case 36:
1742 1672
1743/* Line 1455 of yacc.c */
1744#line 291 "dtc-parser.y"
1745 { 1673 {
1746 (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist)); 1674 (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
1747 ;} 1675 ;}
@@ -1749,8 +1677,6 @@ yyreduce:
1749 1677
1750 case 37: 1678 case 37:
1751 1679
1752/* Line 1455 of yacc.c */
1753#line 295 "dtc-parser.y"
1754 { 1680 {
1755 print_error("syntax error: properties must precede subnodes"); 1681 print_error("syntax error: properties must precede subnodes");
1756 YYERROR; 1682 YYERROR;
@@ -1759,8 +1685,6 @@ yyreduce:
1759 1685
1760 case 38: 1686 case 38:
1761 1687
1762/* Line 1455 of yacc.c */
1763#line 303 "dtc-parser.y"
1764 { 1688 {
1765 (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename)); 1689 (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
1766 ;} 1690 ;}
@@ -1768,8 +1692,6 @@ yyreduce:
1768 1692
1769 case 39: 1693 case 39:
1770 1694
1771/* Line 1455 of yacc.c */
1772#line 307 "dtc-parser.y"
1773 { 1695 {
1774 add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref)); 1696 add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
1775 (yyval.node) = (yyvsp[(2) - (2)].node); 1697 (yyval.node) = (yyvsp[(2) - (2)].node);
@@ -1778,8 +1700,6 @@ yyreduce:
1778 1700
1779 1701
1780 1702
1781/* Line 1455 of yacc.c */
1782#line 1783 "dtc-parser.tab.c"
1783 default: break; 1703 default: break;
1784 } 1704 }
1785 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1705 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1990,8 +1910,6 @@ yyreturn:
1990 1910
1991 1911
1992 1912
1993/* Line 1675 of yacc.c */
1994#line 313 "dtc-parser.y"
1995 1913
1996 1914
1997void print_error(char const *fmt, ...) 1915void print_error(char const *fmt, ...)
diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped
index 95c9547adea5..4ee682bb7d33 100644
--- a/scripts/dtc/dtc-parser.tab.h_shipped
+++ b/scripts/dtc/dtc-parser.tab.h_shipped
@@ -1,10 +1,9 @@
1 1/* A Bison parser, made by GNU Bison 2.4.3. */
2/* A Bison parser, made by GNU Bison 2.4.1. */
3 2
4/* Skeleton interface for Bison's Yacc-like parsers in C 3/* Skeleton interface for Bison's Yacc-like parsers in C
5 4
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
7 Free Software Foundation, Inc. 6 2009, 2010 Free Software Foundation, Inc.
8 7
9 This program is free software: you can redistribute it and/or modify 8 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
@@ -58,8 +57,6 @@
58typedef union YYSTYPE 57typedef union YYSTYPE
59{ 58{
60 59
61/* Line 1676 of yacc.c */
62#line 39 "dtc-parser.y"
63 60
64 char *propnodename; 61 char *propnodename;
65 char *literal; 62 char *literal;
@@ -78,8 +75,6 @@ typedef union YYSTYPE
78 75
79 76
80 77
81/* Line 1676 of yacc.c */
82#line 83 "dtc-parser.tab.h"
83} YYSTYPE; 78} YYSTYPE;
84# define YYSTYPE_IS_TRIVIAL 1 79# define YYSTYPE_IS_TRIVIAL 1
85# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 80# define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/scripts/genksyms/.gitignore b/scripts/genksyms/.gitignore
index be5cadb1b907..86dc07a01b43 100644
--- a/scripts/genksyms/.gitignore
+++ b/scripts/genksyms/.gitignore
@@ -1,4 +1,5 @@
1keywords.c 1*.hash.c
2lex.c 2*.lex.c
3parse.[ch] 3*.tab.c
4*.tab.h
4genksyms 5genksyms
diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile
index 13d03cf05d95..a5510903e874 100644
--- a/scripts/genksyms/Makefile
+++ b/scripts/genksyms/Makefile
@@ -2,52 +2,12 @@
2hostprogs-y := genksyms 2hostprogs-y := genksyms
3always := $(hostprogs-y) 3always := $(hostprogs-y)
4 4
5genksyms-objs := genksyms.o parse.o lex.o 5genksyms-objs := genksyms.o parse.tab.o lex.lex.o
6 6
7# -I needed for generated C source (shipped source) 7# -I needed for generated C source (shipped source)
8HOSTCFLAGS_parse.o := -Wno-uninitialized -I$(src) 8HOSTCFLAGS_parse.tab.o := -I$(src)
9HOSTCFLAGS_lex.lex.o := -I$(src)
9 10
10# dependencies on generated files need to be listed explicitly 11# dependencies on generated files need to be listed explicitly
11$(obj)/lex.o: $(obj)/parse.h $(obj)/keywords.c 12$(obj)/lex.lex.o: $(obj)/keywords.hash.c $(obj)/parse.tab.h
12 13
13# -I needed for generated C source (shipped source)
14HOSTCFLAGS_lex.o := -I$(src)
15
16ifdef GENERATE_PARSER
17
18# gperf
19
20quiet_cmd_keywords.c = GPERF $@
21 cmd_keywords.c = gperf -L ANSI-C -a -C -E -g -H is_reserved_hash \
22 -k 1,3,$$ -N is_reserved_word -p -t $< > $@
23
24$(obj)/keywords.c: $(obj)/keywords.gperf FORCE
25 $(call if_changed,keywords.c)
26 cp $@ $@_shipped
27
28# flex
29
30quiet_cmd_lex.c = FLEX $@
31 cmd_lex.c = flex -o$@ -d $<
32
33$(obj)/lex.c: $(obj)/lex.l $(obj)/keywords.c FORCE
34 $(call if_changed,lex.c)
35 cp $@ $@_shipped
36
37# bison
38
39quiet_cmd_parse.c = BISON $@
40 cmd_parse.c = bison -o$@ -dtv $(filter-out FORCE,$^)
41
42$(obj)/parse.c: $(obj)/parse.y FORCE
43 $(call if_changed,parse.c)
44 cp $@ $@_shipped
45 cp $(@:.c=.h) $(@:.c=.h)_shipped
46
47$(obj)/parse.h: $(obj)/parse.c ;
48
49clean-files += parse.output
50
51endif
52
53targets += keywords.c lex.c parse.c parse.h
diff --git a/scripts/genksyms/keywords.gperf b/scripts/genksyms/keywords.gperf
index e6349acb6f2f..3e77a943e7b7 100644
--- a/scripts/genksyms/keywords.gperf
+++ b/scripts/genksyms/keywords.gperf
@@ -1,3 +1,6 @@
1%language=ANSI-C
2%define hash-function-name is_reserved_hash
3%define lookup-function-name is_reserved_word
1%{ 4%{
2struct resword; 5struct resword;
3static const struct resword *is_reserved_word(register const char *str, register unsigned int len); 6static const struct resword *is_reserved_word(register const char *str, register unsigned int len);
diff --git a/scripts/genksyms/keywords.c_shipped b/scripts/genksyms/keywords.hash.c_shipped
index 8060e06798b3..82062607e8c0 100644
--- a/scripts/genksyms/keywords.c_shipped
+++ b/scripts/genksyms/keywords.hash.c_shipped
@@ -1,5 +1,5 @@
1/* ANSI-C code produced by gperf version 3.0.4 */ 1/* ANSI-C code produced by gperf version 3.0.4 */
2/* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ 2/* Command-line: gperf -t --output-file scripts/genksyms/keywords.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/genksyms/keywords.gperf */
3 3
4#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ 4#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
5 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ 5 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
@@ -28,11 +28,11 @@
28#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>."
29#endif 29#endif
30 30
31#line 1 "scripts/genksyms/keywords.gperf" 31#line 4 "scripts/genksyms/keywords.gperf"
32 32
33struct resword; 33struct resword;
34static const struct resword *is_reserved_word(register const char *str, register unsigned int len); 34static const struct resword *is_reserved_word(register const char *str, register unsigned int len);
35#line 5 "scripts/genksyms/keywords.gperf" 35#line 8 "scripts/genksyms/keywords.gperf"
36struct resword { const char *name; int token; }; 36struct resword { const char *name; int token; };
37/* maximum key range = 64, duplicates = 0 */ 37/* maximum key range = 64, duplicates = 0 */
38 38
@@ -99,108 +99,108 @@ is_reserved_word (register const char *str, register unsigned int len)
99 static const struct resword wordlist[] = 99 static const struct resword wordlist[] =
100 { 100 {
101 {""}, {""}, {""}, 101 {""}, {""}, {""},
102#line 30 "scripts/genksyms/keywords.gperf" 102#line 33 "scripts/genksyms/keywords.gperf"
103 {"asm", ASM_KEYW}, 103 {"asm", ASM_KEYW},
104 {""}, 104 {""},
105#line 12 "scripts/genksyms/keywords.gperf" 105#line 15 "scripts/genksyms/keywords.gperf"
106 {"__asm", ASM_KEYW}, 106 {"__asm", ASM_KEYW},
107 {""}, 107 {""},
108#line 13 "scripts/genksyms/keywords.gperf" 108#line 16 "scripts/genksyms/keywords.gperf"
109 {"__asm__", ASM_KEYW}, 109 {"__asm__", ASM_KEYW},
110 {""}, {""}, 110 {""}, {""},
111#line 56 "scripts/genksyms/keywords.gperf" 111#line 59 "scripts/genksyms/keywords.gperf"
112 {"__typeof__", TYPEOF_KEYW}, 112 {"__typeof__", TYPEOF_KEYW},
113 {""}, 113 {""},
114#line 16 "scripts/genksyms/keywords.gperf" 114#line 19 "scripts/genksyms/keywords.gperf"
115 {"__const", CONST_KEYW}, 115 {"__const", CONST_KEYW},
116#line 15 "scripts/genksyms/keywords.gperf" 116#line 18 "scripts/genksyms/keywords.gperf"
117 {"__attribute__", ATTRIBUTE_KEYW}, 117 {"__attribute__", ATTRIBUTE_KEYW},
118#line 17 "scripts/genksyms/keywords.gperf" 118#line 20 "scripts/genksyms/keywords.gperf"
119 {"__const__", CONST_KEYW}, 119 {"__const__", CONST_KEYW},
120#line 22 "scripts/genksyms/keywords.gperf" 120#line 25 "scripts/genksyms/keywords.gperf"
121 {"__signed__", SIGNED_KEYW}, 121 {"__signed__", SIGNED_KEYW},
122#line 48 "scripts/genksyms/keywords.gperf" 122#line 51 "scripts/genksyms/keywords.gperf"
123 {"static", STATIC_KEYW}, 123 {"static", STATIC_KEYW},
124 {""}, 124 {""},
125#line 43 "scripts/genksyms/keywords.gperf" 125#line 46 "scripts/genksyms/keywords.gperf"
126 {"int", INT_KEYW}, 126 {"int", INT_KEYW},
127#line 36 "scripts/genksyms/keywords.gperf" 127#line 39 "scripts/genksyms/keywords.gperf"
128 {"char", CHAR_KEYW}, 128 {"char", CHAR_KEYW},
129#line 37 "scripts/genksyms/keywords.gperf" 129#line 40 "scripts/genksyms/keywords.gperf"
130 {"const", CONST_KEYW}, 130 {"const", CONST_KEYW},
131#line 49 "scripts/genksyms/keywords.gperf" 131#line 52 "scripts/genksyms/keywords.gperf"
132 {"struct", STRUCT_KEYW}, 132 {"struct", STRUCT_KEYW},
133#line 28 "scripts/genksyms/keywords.gperf" 133#line 31 "scripts/genksyms/keywords.gperf"
134 {"__restrict__", RESTRICT_KEYW}, 134 {"__restrict__", RESTRICT_KEYW},
135#line 29 "scripts/genksyms/keywords.gperf" 135#line 32 "scripts/genksyms/keywords.gperf"
136 {"restrict", RESTRICT_KEYW}, 136 {"restrict", RESTRICT_KEYW},
137#line 9 "scripts/genksyms/keywords.gperf" 137#line 12 "scripts/genksyms/keywords.gperf"
138 {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, 138 {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW},
139#line 20 "scripts/genksyms/keywords.gperf" 139#line 23 "scripts/genksyms/keywords.gperf"
140 {"__inline__", INLINE_KEYW}, 140 {"__inline__", INLINE_KEYW},
141 {""}, 141 {""},
142#line 24 "scripts/genksyms/keywords.gperf" 142#line 27 "scripts/genksyms/keywords.gperf"
143 {"__volatile__", VOLATILE_KEYW}, 143 {"__volatile__", VOLATILE_KEYW},
144#line 7 "scripts/genksyms/keywords.gperf" 144#line 10 "scripts/genksyms/keywords.gperf"
145 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, 145 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW},
146#line 27 "scripts/genksyms/keywords.gperf" 146#line 30 "scripts/genksyms/keywords.gperf"
147 {"_restrict", RESTRICT_KEYW}, 147 {"_restrict", RESTRICT_KEYW},
148 {""}, 148 {""},
149#line 14 "scripts/genksyms/keywords.gperf" 149#line 17 "scripts/genksyms/keywords.gperf"
150 {"__attribute", ATTRIBUTE_KEYW}, 150 {"__attribute", ATTRIBUTE_KEYW},
151#line 8 "scripts/genksyms/keywords.gperf" 151#line 11 "scripts/genksyms/keywords.gperf"
152 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, 152 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
153#line 18 "scripts/genksyms/keywords.gperf" 153#line 21 "scripts/genksyms/keywords.gperf"
154 {"__extension__", EXTENSION_KEYW}, 154 {"__extension__", EXTENSION_KEYW},
155#line 39 "scripts/genksyms/keywords.gperf" 155#line 42 "scripts/genksyms/keywords.gperf"
156 {"enum", ENUM_KEYW}, 156 {"enum", ENUM_KEYW},
157#line 10 "scripts/genksyms/keywords.gperf" 157#line 13 "scripts/genksyms/keywords.gperf"
158 {"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW}, 158 {"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW},
159#line 40 "scripts/genksyms/keywords.gperf" 159#line 43 "scripts/genksyms/keywords.gperf"
160 {"extern", EXTERN_KEYW}, 160 {"extern", EXTERN_KEYW},
161 {""}, 161 {""},
162#line 21 "scripts/genksyms/keywords.gperf" 162#line 24 "scripts/genksyms/keywords.gperf"
163 {"__signed", SIGNED_KEYW}, 163 {"__signed", SIGNED_KEYW},
164#line 11 "scripts/genksyms/keywords.gperf" 164#line 14 "scripts/genksyms/keywords.gperf"
165 {"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, 165 {"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
166#line 51 "scripts/genksyms/keywords.gperf" 166#line 54 "scripts/genksyms/keywords.gperf"
167 {"union", UNION_KEYW}, 167 {"union", UNION_KEYW},
168#line 55 "scripts/genksyms/keywords.gperf" 168#line 58 "scripts/genksyms/keywords.gperf"
169 {"typeof", TYPEOF_KEYW}, 169 {"typeof", TYPEOF_KEYW},
170#line 50 "scripts/genksyms/keywords.gperf" 170#line 53 "scripts/genksyms/keywords.gperf"
171 {"typedef", TYPEDEF_KEYW}, 171 {"typedef", TYPEDEF_KEYW},
172#line 19 "scripts/genksyms/keywords.gperf" 172#line 22 "scripts/genksyms/keywords.gperf"
173 {"__inline", INLINE_KEYW}, 173 {"__inline", INLINE_KEYW},
174#line 35 "scripts/genksyms/keywords.gperf" 174#line 38 "scripts/genksyms/keywords.gperf"
175 {"auto", AUTO_KEYW}, 175 {"auto", AUTO_KEYW},
176#line 23 "scripts/genksyms/keywords.gperf" 176#line 26 "scripts/genksyms/keywords.gperf"
177 {"__volatile", VOLATILE_KEYW}, 177 {"__volatile", VOLATILE_KEYW},
178 {""}, {""}, 178 {""}, {""},
179#line 52 "scripts/genksyms/keywords.gperf" 179#line 55 "scripts/genksyms/keywords.gperf"
180 {"unsigned", UNSIGNED_KEYW}, 180 {"unsigned", UNSIGNED_KEYW},
181 {""}, 181 {""},
182#line 46 "scripts/genksyms/keywords.gperf" 182#line 49 "scripts/genksyms/keywords.gperf"
183 {"short", SHORT_KEYW}, 183 {"short", SHORT_KEYW},
184#line 42 "scripts/genksyms/keywords.gperf" 184#line 45 "scripts/genksyms/keywords.gperf"
185 {"inline", INLINE_KEYW}, 185 {"inline", INLINE_KEYW},
186 {""}, 186 {""},
187#line 54 "scripts/genksyms/keywords.gperf" 187#line 57 "scripts/genksyms/keywords.gperf"
188 {"volatile", VOLATILE_KEYW}, 188 {"volatile", VOLATILE_KEYW},
189#line 44 "scripts/genksyms/keywords.gperf" 189#line 47 "scripts/genksyms/keywords.gperf"
190 {"long", LONG_KEYW}, 190 {"long", LONG_KEYW},
191#line 26 "scripts/genksyms/keywords.gperf" 191#line 29 "scripts/genksyms/keywords.gperf"
192 {"_Bool", BOOL_KEYW}, 192 {"_Bool", BOOL_KEYW},
193 {""}, {""}, 193 {""}, {""},
194#line 45 "scripts/genksyms/keywords.gperf" 194#line 48 "scripts/genksyms/keywords.gperf"
195 {"register", REGISTER_KEYW}, 195 {"register", REGISTER_KEYW},
196#line 53 "scripts/genksyms/keywords.gperf" 196#line 56 "scripts/genksyms/keywords.gperf"
197 {"void", VOID_KEYW}, 197 {"void", VOID_KEYW},
198#line 41 "scripts/genksyms/keywords.gperf" 198#line 44 "scripts/genksyms/keywords.gperf"
199 {"float", FLOAT_KEYW}, 199 {"float", FLOAT_KEYW},
200#line 38 "scripts/genksyms/keywords.gperf" 200#line 41 "scripts/genksyms/keywords.gperf"
201 {"double", DOUBLE_KEYW}, 201 {"double", DOUBLE_KEYW},
202 {""}, {""}, {""}, {""}, 202 {""}, {""}, {""}, {""},
203#line 47 "scripts/genksyms/keywords.gperf" 203#line 50 "scripts/genksyms/keywords.gperf"
204 {"signed", SIGNED_KEYW} 204 {"signed", SIGNED_KEYW}
205 }; 205 };
206 206
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
index e4ddd493fec3..400ae06a70df 100644
--- a/scripts/genksyms/lex.l
+++ b/scripts/genksyms/lex.l
@@ -29,7 +29,7 @@
29#include <ctype.h> 29#include <ctype.h>
30 30
31#include "genksyms.h" 31#include "genksyms.h"
32#include "parse.h" 32#include "parse.tab.h"
33 33
34/* We've got a two-level lexer here. We let flex do basic tokenization 34/* We've got a two-level lexer here. We let flex do basic tokenization
35 and then we categorize those basic tokens in the second stage. */ 35 and then we categorize those basic tokens in the second stage. */
@@ -94,7 +94,7 @@ MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>)
94 94
95/* Bring in the keyword recognizer. */ 95/* Bring in the keyword recognizer. */
96 96
97#include "keywords.c" 97#include "keywords.hash.c"
98 98
99 99
100/* Macros to append to our phrase collection list. */ 100/* Macros to append to our phrase collection list. */
diff --git a/scripts/genksyms/lex.c_shipped b/scripts/genksyms/lex.lex.c_shipped
index af4939041e4b..c83cf60410be 100644
--- a/scripts/genksyms/lex.c_shipped
+++ b/scripts/genksyms/lex.lex.c_shipped
@@ -1,20 +1,10 @@
1#line 2 "scripts/genksyms/lex.c"
2 1
3#line 4 "scripts/genksyms/lex.c" 2#line 3 "scripts/genksyms/lex.lex.c_shipped"
4 3
5#define YY_INT_ALIGNED short int 4#define YY_INT_ALIGNED short int
6 5
7/* A lexical scanner generated by flex */ 6/* A lexical scanner generated by flex */
8 7
9/* %not-for-header */
10
11/* %if-c-only */
12/* %if-not-reentrant */
13
14/* %endif */
15/* %endif */
16/* %ok-for-header */
17
18#define FLEX_SCANNER 8#define FLEX_SCANNER
19#define YY_FLEX_MAJOR_VERSION 2 9#define YY_FLEX_MAJOR_VERSION 2
20#define YY_FLEX_MINOR_VERSION 5 10#define YY_FLEX_MINOR_VERSION 5
@@ -23,32 +13,16 @@
23#define FLEX_BETA 13#define FLEX_BETA
24#endif 14#endif
25 15
26/* %if-c++-only */
27/* %endif */
28
29/* %if-c-only */
30
31/* %endif */
32
33/* %if-c-only */
34
35/* %endif */
36
37/* First, we deal with platform-specific or compiler-specific issues. */ 16/* First, we deal with platform-specific or compiler-specific issues. */
38 17
39/* begin standard C headers. */ 18/* begin standard C headers. */
40/* %if-c-only */
41#include <stdio.h> 19#include <stdio.h>
42#include <string.h> 20#include <string.h>
43#include <errno.h> 21#include <errno.h>
44#include <stdlib.h> 22#include <stdlib.h>
45/* %endif */
46 23
47/* %if-tables-serialization */
48/* %endif */
49/* end standard C headers. */ 24/* end standard C headers. */
50 25
51/* %if-c-or-c++ */
52/* flex integer type definitions */ 26/* flex integer type definitions */
53 27
54#ifndef FLEXINT_H 28#ifndef FLEXINT_H
@@ -112,11 +86,6 @@ typedef unsigned int flex_uint32_t;
112 86
113#endif /* ! FLEXINT_H */ 87#endif /* ! FLEXINT_H */
114 88
115/* %endif */
116
117/* %if-c++-only */
118/* %endif */
119
120#ifdef __cplusplus 89#ifdef __cplusplus
121 90
122/* The "const" storage-class-modifier is valid. */ 91/* The "const" storage-class-modifier is valid. */
@@ -138,13 +107,8 @@ typedef unsigned int flex_uint32_t;
138#define yyconst 107#define yyconst
139#endif 108#endif
140 109
141/* %not-for-header */
142
143/* Returned upon end-of-file. */ 110/* Returned upon end-of-file. */
144#define YY_NULL 0 111#define YY_NULL 0
145/* %ok-for-header */
146
147/* %not-for-header */
148 112
149/* Promotes a possibly negative, possibly signed char to an unsigned 113/* Promotes a possibly negative, possibly signed char to an unsigned
150 * integer for use as an array index. If the signed char is negative, 114 * integer for use as an array index. If the signed char is negative,
@@ -152,14 +116,6 @@ typedef unsigned int flex_uint32_t;
152 * double cast. 116 * double cast.
153 */ 117 */
154#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 118#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
155/* %ok-for-header */
156
157/* %if-reentrant */
158/* %endif */
159
160/* %if-not-reentrant */
161
162/* %endif */
163 119
164/* Enter a start condition. This macro really ought to take a parameter, 120/* Enter a start condition. This macro really ought to take a parameter,
165 * but we do it the disgusting crufty way forced on us by the ()-less 121 * but we do it the disgusting crufty way forced on us by the ()-less
@@ -196,15 +152,9 @@ typedef unsigned int flex_uint32_t;
196typedef struct yy_buffer_state *YY_BUFFER_STATE; 152typedef struct yy_buffer_state *YY_BUFFER_STATE;
197#endif 153#endif
198 154
199/* %if-not-reentrant */
200extern int yyleng; 155extern int yyleng;
201/* %endif */
202 156
203/* %if-c-only */
204/* %if-not-reentrant */
205extern FILE *yyin, *yyout; 157extern FILE *yyin, *yyout;
206/* %endif */
207/* %endif */
208 158
209#define EOB_ACT_CONTINUE_SCAN 0 159#define EOB_ACT_CONTINUE_SCAN 0
210#define EOB_ACT_END_OF_FILE 1 160#define EOB_ACT_END_OF_FILE 1
@@ -237,12 +187,7 @@ typedef size_t yy_size_t;
237#define YY_STRUCT_YY_BUFFER_STATE 187#define YY_STRUCT_YY_BUFFER_STATE
238struct yy_buffer_state 188struct yy_buffer_state
239 { 189 {
240/* %if-c-only */
241 FILE *yy_input_file; 190 FILE *yy_input_file;
242/* %endif */
243
244/* %if-c++-only */
245/* %endif */
246 191
247 char *yy_ch_buf; /* input buffer */ 192 char *yy_ch_buf; /* input buffer */
248 char *yy_buf_pos; /* current position in input buffer */ 193 char *yy_buf_pos; /* current position in input buffer */
@@ -303,19 +248,10 @@ struct yy_buffer_state
303 }; 248 };
304#endif /* !YY_STRUCT_YY_BUFFER_STATE */ 249#endif /* !YY_STRUCT_YY_BUFFER_STATE */
305 250
306/* %if-c-only Standard (non-C++) definition */
307/* %not-for-header */
308
309/* %if-not-reentrant */
310
311/* Stack of input buffers. */ 251/* Stack of input buffers. */
312static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 252static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
313static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 253static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
314static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 254static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
315/* %endif */
316/* %ok-for-header */
317
318/* %endif */
319 255
320/* We provide macros for accessing buffer states in case in the 256/* We provide macros for accessing buffer states in case in the
321 * future we want to put the buffer states in a more general 257 * future we want to put the buffer states in a more general
@@ -332,11 +268,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
332 */ 268 */
333#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 269#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
334 270
335/* %if-c-only Standard (non-C++) definition */
336
337/* %if-not-reentrant */
338/* %not-for-header */
339
340/* yy_hold_char holds the character lost when yytext is formed. */ 271/* yy_hold_char holds the character lost when yytext is formed. */
341static char yy_hold_char; 272static char yy_hold_char;
342static int yy_n_chars; /* number of characters read into yy_ch_buf */ 273static int yy_n_chars; /* number of characters read into yy_ch_buf */
@@ -351,9 +282,6 @@ static int yy_start = 0; /* start state number */
351 * instead of setting up a fresh yyin. A bit of a hack ... 282 * instead of setting up a fresh yyin. A bit of a hack ...
352 */ 283 */
353static int yy_did_buffer_switch_on_eof; 284static int yy_did_buffer_switch_on_eof;
354/* %ok-for-header */
355
356/* %endif */
357 285
358void yyrestart (FILE *input_file ); 286void yyrestart (FILE *input_file );
359void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 287void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
@@ -373,8 +301,6 @@ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
373YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); 301YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
374YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); 302YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
375 303
376/* %endif */
377
378void *yyalloc (yy_size_t ); 304void *yyalloc (yy_size_t );
379void *yyrealloc (void *,yy_size_t ); 305void *yyrealloc (void *,yy_size_t );
380void yyfree (void * ); 306void yyfree (void * );
@@ -403,14 +329,11 @@ void yyfree (void * );
403 329
404#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 330#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
405 331
406/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
407/* Begin user sect3 */ 332/* Begin user sect3 */
408 333
409#define yywrap(n) 1 334#define yywrap(n) 1
410#define YY_SKIP_YYWRAP 335#define YY_SKIP_YYWRAP
411 336
412#define FLEX_DEBUG
413
414typedef unsigned char YY_CHAR; 337typedef unsigned char YY_CHAR;
415 338
416FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 339FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
@@ -424,28 +347,21 @@ int yylineno = 1;
424extern char *yytext; 347extern char *yytext;
425#define yytext_ptr yytext 348#define yytext_ptr yytext
426 349
427/* %if-c-only Standard (non-C++) definition */
428
429static yy_state_type yy_get_previous_state (void ); 350static yy_state_type yy_get_previous_state (void );
430static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 351static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
431static int yy_get_next_buffer (void ); 352static int yy_get_next_buffer (void );
432static void yy_fatal_error (yyconst char msg[] ); 353static void yy_fatal_error (yyconst char msg[] );
433 354
434/* %endif */
435
436/* Done after the current pattern has been matched and before the 355/* Done after the current pattern has been matched and before the
437 * corresponding action - sets up yytext. 356 * corresponding action - sets up yytext.
438 */ 357 */
439#define YY_DO_BEFORE_ACTION \ 358#define YY_DO_BEFORE_ACTION \
440 (yytext_ptr) = yy_bp; \ 359 (yytext_ptr) = yy_bp; \
441/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
442 yyleng = (size_t) (yy_cp - yy_bp); \ 360 yyleng = (size_t) (yy_cp - yy_bp); \
443 (yy_hold_char) = *yy_cp; \ 361 (yy_hold_char) = *yy_cp; \
444 *yy_cp = '\0'; \ 362 *yy_cp = '\0'; \
445/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
446 (yy_c_buf_p) = yy_cp; 363 (yy_c_buf_p) = yy_cp;
447 364
448/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
449#define YY_NUM_RULES 13 365#define YY_NUM_RULES 13
450#define YY_END_OF_BUFFER 14 366#define YY_END_OF_BUFFER 14
451/* This struct is not used in this scanner, 367/* This struct is not used in this scanner,
@@ -610,13 +526,7 @@ static yy_state_type yy_last_accepting_state;
610static char *yy_last_accepting_cpos; 526static char *yy_last_accepting_cpos;
611 527
612extern int yy_flex_debug; 528extern int yy_flex_debug;
613int yy_flex_debug = 1; 529int yy_flex_debug = 0;
614
615static yyconst flex_int16_t yy_rule_linenum[13] =
616 { 0,
617 67, 68, 69, 72, 75, 76, 77, 83, 84, 85,
618 87, 90
619 } ;
620 530
621/* The intent behind this definition is that it'll catch 531/* The intent behind this definition is that it'll catch
622 * any uses of REJECT which flex missed. 532 * any uses of REJECT which flex missed.
@@ -626,7 +536,6 @@ static yyconst flex_int16_t yy_rule_linenum[13] =
626#define YY_MORE_ADJ 0 536#define YY_MORE_ADJ 0
627#define YY_RESTORE_YY_MORE_OFFSET 537#define YY_RESTORE_YY_MORE_OFFSET
628char *yytext; 538char *yytext;
629#line 1 "scripts/genksyms/lex.l"
630/* Lexical analysis for genksyms. 539/* Lexical analysis for genksyms.
631 Copyright 1996, 1997 Linux International. 540 Copyright 1996, 1997 Linux International.
632 541
@@ -648,7 +557,6 @@ char *yytext;
648 You should have received a copy of the GNU General Public License 557 You should have received a copy of the GNU General Public License
649 along with this program; if not, write to the Free Software Foundation, 558 along with this program; if not, write to the Free Software Foundation,
650 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 559 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
651#line 25 "scripts/genksyms/lex.l"
652 560
653#include <limits.h> 561#include <limits.h>
654#include <stdlib.h> 562#include <stdlib.h>
@@ -656,7 +564,7 @@ char *yytext;
656#include <ctype.h> 564#include <ctype.h>
657 565
658#include "genksyms.h" 566#include "genksyms.h"
659#include "parse.h" 567#include "parse.tab.h"
660 568
661/* We've got a two-level lexer here. We let flex do basic tokenization 569/* We've got a two-level lexer here. We let flex do basic tokenization
662 and then we categorize those basic tokens in the second stage. */ 570 and then we categorize those basic tokens in the second stage. */
@@ -664,7 +572,6 @@ char *yytext;
664 572
665/* We don't do multiple input files. */ 573/* We don't do multiple input files. */
666#define YY_NO_INPUT 1 574#define YY_NO_INPUT 1
667#line 668 "scripts/genksyms/lex.c"
668 575
669#define INITIAL 0 576#define INITIAL 0
670 577
@@ -673,28 +580,15 @@ char *yytext;
673 * down here because we want the user's section 1 to have been scanned first. 580 * down here because we want the user's section 1 to have been scanned first.
674 * The user has a chance to override it with an option. 581 * The user has a chance to override it with an option.
675 */ 582 */
676/* %if-c-only */
677#include <unistd.h> 583#include <unistd.h>
678/* %endif */
679/* %if-c++-only */
680/* %endif */
681#endif 584#endif
682 585
683#ifndef YY_EXTRA_TYPE 586#ifndef YY_EXTRA_TYPE
684#define YY_EXTRA_TYPE void * 587#define YY_EXTRA_TYPE void *
685#endif 588#endif
686 589
687/* %if-c-only Reentrant structure and macros (non-C++). */
688/* %if-reentrant */
689/* %if-c-only */
690
691static int yy_init_globals (void ); 590static int yy_init_globals (void );
692 591
693/* %endif */
694/* %if-reentrant */
695/* %endif */
696/* %endif End reentrant structures and macros. */
697
698/* Accessor methods to globals. 592/* Accessor methods to globals.
699 These are made visible to non-reentrant scanners for convenience. */ 593 These are made visible to non-reentrant scanners for convenience. */
700 594
@@ -724,9 +618,6 @@ int yyget_lineno (void );
724 618
725void yyset_lineno (int line_number ); 619void yyset_lineno (int line_number );
726 620
727/* %if-bison-bridge */
728/* %endif */
729
730/* Macros after this point can all be overridden by user definitions in 621/* Macros after this point can all be overridden by user definitions in
731 * section 1. 622 * section 1.
732 */ 623 */
@@ -739,14 +630,8 @@ extern int yywrap (void );
739#endif 630#endif
740#endif 631#endif
741 632
742/* %not-for-header */
743
744 static void yyunput (int c,char *buf_ptr ); 633 static void yyunput (int c,char *buf_ptr );
745 634
746/* %ok-for-header */
747
748/* %endif */
749
750#ifndef yytext_ptr 635#ifndef yytext_ptr
751static void yy_flex_strncpy (char *,yyconst char *,int ); 636static void yy_flex_strncpy (char *,yyconst char *,int );
752#endif 637#endif
@@ -756,23 +641,15 @@ static int yy_flex_strlen (yyconst char * );
756#endif 641#endif
757 642
758#ifndef YY_NO_INPUT 643#ifndef YY_NO_INPUT
759/* %if-c-only Standard (non-C++) definition */
760/* %not-for-header */
761 644
762#ifdef __cplusplus 645#ifdef __cplusplus
763static int yyinput (void ); 646static int yyinput (void );
764#else 647#else
765static int input (void ); 648static int input (void );
766#endif 649#endif
767/* %ok-for-header */
768 650
769/* %endif */
770#endif 651#endif
771 652
772/* %if-c-only */
773
774/* %endif */
775
776/* Amount of stuff to slurp up with each read. */ 653/* Amount of stuff to slurp up with each read. */
777#ifndef YY_READ_BUF_SIZE 654#ifndef YY_READ_BUF_SIZE
778#define YY_READ_BUF_SIZE 8192 655#define YY_READ_BUF_SIZE 8192
@@ -780,14 +657,10 @@ static int input (void );
780 657
781/* Copy whatever the last rule matched to the standard output. */ 658/* Copy whatever the last rule matched to the standard output. */
782#ifndef ECHO 659#ifndef ECHO
783/* %if-c-only Standard (non-C++) definition */
784/* This used to be an fputs(), but since the string might contain NUL's, 660/* This used to be an fputs(), but since the string might contain NUL's,
785 * we now use fwrite(). 661 * we now use fwrite().
786 */ 662 */
787#define ECHO fwrite( yytext, yyleng, 1, yyout ) 663#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
788/* %endif */
789/* %if-c++-only C++ definition */
790/* %endif */
791#endif 664#endif
792 665
793/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 666/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -795,11 +668,10 @@ static int input (void );
795 */ 668 */
796#ifndef YY_INPUT 669#ifndef YY_INPUT
797#define YY_INPUT(buf,result,max_size) \ 670#define YY_INPUT(buf,result,max_size) \
798/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
799 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 671 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
800 { \ 672 { \
801 int c = '*'; \ 673 int c = '*'; \
802 int n; \ 674 unsigned n; \
803 for ( n = 0; n < max_size && \ 675 for ( n = 0; n < max_size && \
804 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 676 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
805 buf[n] = (char) c; \ 677 buf[n] = (char) c; \
@@ -824,8 +696,6 @@ static int input (void );
824 } \ 696 } \
825 }\ 697 }\
826\ 698\
827/* %if-c++-only C++ definition \ */\
828/* %endif */
829 699
830#endif 700#endif
831 701
@@ -844,39 +714,20 @@ static int input (void );
844 714
845/* Report a fatal error. */ 715/* Report a fatal error. */
846#ifndef YY_FATAL_ERROR 716#ifndef YY_FATAL_ERROR
847/* %if-c-only */
848#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 717#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
849/* %endif */
850/* %if-c++-only */
851/* %endif */
852#endif 718#endif
853 719
854/* %if-tables-serialization structures and prototypes */
855/* %not-for-header */
856
857/* %ok-for-header */
858
859/* %not-for-header */
860
861/* %tables-yydmap generated elements */
862/* %endif */
863/* end tables serialization structures and prototypes */ 720/* end tables serialization structures and prototypes */
864 721
865/* %ok-for-header */
866
867/* Default declaration of generated scanner - a define so the user can 722/* Default declaration of generated scanner - a define so the user can
868 * easily add parameters. 723 * easily add parameters.
869 */ 724 */
870#ifndef YY_DECL 725#ifndef YY_DECL
871#define YY_DECL_IS_OURS 1 726#define YY_DECL_IS_OURS 1
872/* %if-c-only Standard (non-C++) definition */
873 727
874extern int yylex (void); 728extern int yylex (void);
875 729
876#define YY_DECL int yylex (void) 730#define YY_DECL int yylex (void)
877/* %endif */
878/* %if-c++-only C++ definition */
879/* %endif */
880#endif /* !YY_DECL */ 731#endif /* !YY_DECL */
881 732
882/* Code executed at the beginning of each rule, after yytext and yyleng 733/* Code executed at the beginning of each rule, after yytext and yyleng
@@ -891,15 +742,12 @@ extern int yylex (void);
891#define YY_BREAK break; 742#define YY_BREAK break;
892#endif 743#endif
893 744
894/* %% [6.0] YY_RULE_SETUP definition goes here */
895#define YY_RULE_SETUP \ 745#define YY_RULE_SETUP \
896 if ( yyleng > 0 ) \ 746 if ( yyleng > 0 ) \
897 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ 747 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
898 (yytext[yyleng - 1] == '\n'); \ 748 (yytext[yyleng - 1] == '\n'); \
899 YY_USER_ACTION 749 YY_USER_ACTION
900 750
901/* %not-for-header */
902
903/** The main scanner function which does all the work. 751/** The main scanner function which does all the work.
904 */ 752 */
905YY_DECL 753YY_DECL
@@ -908,13 +756,7 @@ YY_DECL
908 register char *yy_cp, *yy_bp; 756 register char *yy_cp, *yy_bp;
909 register int yy_act; 757 register int yy_act;
910 758
911/* %% [7.0] user's declarations go here */
912#line 63 "scripts/genksyms/lex.l"
913
914
915
916 /* Keep track of our location in the original source files. */ 759 /* Keep track of our location in the original source files. */
917#line 918 "scripts/genksyms/lex.c"
918 760
919 if ( !(yy_init) ) 761 if ( !(yy_init) )
920 { 762 {
@@ -928,18 +770,10 @@ YY_DECL
928 (yy_start) = 1; /* first start state */ 770 (yy_start) = 1; /* first start state */
929 771
930 if ( ! yyin ) 772 if ( ! yyin )
931/* %if-c-only */
932 yyin = stdin; 773 yyin = stdin;
933/* %endif */
934/* %if-c++-only */
935/* %endif */
936 774
937 if ( ! yyout ) 775 if ( ! yyout )
938/* %if-c-only */
939 yyout = stdout; 776 yyout = stdout;
940/* %endif */
941/* %if-c++-only */
942/* %endif */
943 777
944 if ( ! YY_CURRENT_BUFFER ) { 778 if ( ! YY_CURRENT_BUFFER ) {
945 yyensure_buffer_stack (); 779 yyensure_buffer_stack ();
@@ -952,7 +786,6 @@ YY_DECL
952 786
953 while ( 1 ) /* loops until end-of-file is reached */ 787 while ( 1 ) /* loops until end-of-file is reached */
954 { 788 {
955/* %% [8.0] yymore()-related code goes here */
956 yy_cp = (yy_c_buf_p); 789 yy_cp = (yy_c_buf_p);
957 790
958 /* Support of yytext. */ 791 /* Support of yytext. */
@@ -963,7 +796,6 @@ YY_DECL
963 */ 796 */
964 yy_bp = yy_cp; 797 yy_bp = yy_cp;
965 798
966/* %% [9.0] code to set up and find next match goes here */
967 yy_current_state = (yy_start); 799 yy_current_state = (yy_start);
968 yy_current_state += YY_AT_BOL(); 800 yy_current_state += YY_AT_BOL();
969yy_match: 801yy_match:
@@ -987,7 +819,6 @@ yy_match:
987 while ( yy_base[yy_current_state] != 266 ); 819 while ( yy_base[yy_current_state] != 266 );
988 820
989yy_find_action: 821yy_find_action:
990/* %% [10.0] code to find the action number goes here */
991 yy_act = yy_accept[yy_current_state]; 822 yy_act = yy_accept[yy_current_state];
992 if ( yy_act == 0 ) 823 if ( yy_act == 0 )
993 { /* have to back up */ 824 { /* have to back up */
@@ -998,30 +829,10 @@ yy_find_action:
998 829
999 YY_DO_BEFORE_ACTION; 830 YY_DO_BEFORE_ACTION;
1000 831
1001/* %% [11.0] code for yylineno update goes here */
1002
1003do_action: /* This label is used only to access EOF actions. */ 832do_action: /* This label is used only to access EOF actions. */
1004 833
1005/* %% [12.0] debug code goes here */
1006 if ( yy_flex_debug )
1007 {
1008 if ( yy_act == 0 )
1009 fprintf( stderr, "--scanner backing up\n" );
1010 else if ( yy_act < 13 )
1011 fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
1012 (long)yy_rule_linenum[yy_act], yytext );
1013 else if ( yy_act == 13 )
1014 fprintf( stderr, "--accepting default rule (\"%s\")\n",
1015 yytext );
1016 else if ( yy_act == 14 )
1017 fprintf( stderr, "--(end of buffer or a NUL)\n" );
1018 else
1019 fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
1020 }
1021
1022 switch ( yy_act ) 834 switch ( yy_act )
1023 { /* beginning of action switch */ 835 { /* beginning of action switch */
1024/* %% [13.0] actions go here */
1025 case 0: /* must back up */ 836 case 0: /* must back up */
1026 /* undo the effects of YY_DO_BEFORE_ACTION */ 837 /* undo the effects of YY_DO_BEFORE_ACTION */
1027 *yy_cp = (yy_hold_char); 838 *yy_cp = (yy_hold_char);
@@ -1032,42 +843,35 @@ do_action: /* This label is used only to access EOF actions. */
1032case 1: 843case 1:
1033/* rule 1 can match eol */ 844/* rule 1 can match eol */
1034YY_RULE_SETUP 845YY_RULE_SETUP
1035#line 67 "scripts/genksyms/lex.l"
1036return FILENAME; 846return FILENAME;
1037 YY_BREAK 847 YY_BREAK
1038case 2: 848case 2:
1039/* rule 2 can match eol */ 849/* rule 2 can match eol */
1040YY_RULE_SETUP 850YY_RULE_SETUP
1041#line 68 "scripts/genksyms/lex.l"
1042cur_line++; 851cur_line++;
1043 YY_BREAK 852 YY_BREAK
1044case 3: 853case 3:
1045/* rule 3 can match eol */ 854/* rule 3 can match eol */
1046YY_RULE_SETUP 855YY_RULE_SETUP
1047#line 69 "scripts/genksyms/lex.l"
1048cur_line++; 856cur_line++;
1049 YY_BREAK 857 YY_BREAK
1050/* Ignore all other whitespace. */ 858/* Ignore all other whitespace. */
1051case 4: 859case 4:
1052YY_RULE_SETUP 860YY_RULE_SETUP
1053#line 72 "scripts/genksyms/lex.l"
1054; 861;
1055 YY_BREAK 862 YY_BREAK
1056case 5: 863case 5:
1057/* rule 5 can match eol */ 864/* rule 5 can match eol */
1058YY_RULE_SETUP 865YY_RULE_SETUP
1059#line 75 "scripts/genksyms/lex.l"
1060return STRING; 866return STRING;
1061 YY_BREAK 867 YY_BREAK
1062case 6: 868case 6:
1063/* rule 6 can match eol */ 869/* rule 6 can match eol */
1064YY_RULE_SETUP 870YY_RULE_SETUP
1065#line 76 "scripts/genksyms/lex.l"
1066return CHAR; 871return CHAR;
1067 YY_BREAK 872 YY_BREAK
1068case 7: 873case 7:
1069YY_RULE_SETUP 874YY_RULE_SETUP
1070#line 77 "scripts/genksyms/lex.l"
1071return IDENT; 875return IDENT;
1072 YY_BREAK 876 YY_BREAK
1073/* The Pedant requires that the other C multi-character tokens be 877/* The Pedant requires that the other C multi-character tokens be
@@ -1076,36 +880,29 @@ return IDENT;
1076 around them properly. */ 880 around them properly. */
1077case 8: 881case 8:
1078YY_RULE_SETUP 882YY_RULE_SETUP
1079#line 83 "scripts/genksyms/lex.l"
1080return OTHER; 883return OTHER;
1081 YY_BREAK 884 YY_BREAK
1082case 9: 885case 9:
1083YY_RULE_SETUP 886YY_RULE_SETUP
1084#line 84 "scripts/genksyms/lex.l"
1085return INT; 887return INT;
1086 YY_BREAK 888 YY_BREAK
1087case 10: 889case 10:
1088YY_RULE_SETUP 890YY_RULE_SETUP
1089#line 85 "scripts/genksyms/lex.l"
1090return REAL; 891return REAL;
1091 YY_BREAK 892 YY_BREAK
1092case 11: 893case 11:
1093YY_RULE_SETUP 894YY_RULE_SETUP
1094#line 87 "scripts/genksyms/lex.l"
1095return DOTS; 895return DOTS;
1096 YY_BREAK 896 YY_BREAK
1097/* All other tokens are single characters. */ 897/* All other tokens are single characters. */
1098case 12: 898case 12:
1099YY_RULE_SETUP 899YY_RULE_SETUP
1100#line 90 "scripts/genksyms/lex.l"
1101return yytext[0]; 900return yytext[0];
1102 YY_BREAK 901 YY_BREAK
1103case 13: 902case 13:
1104YY_RULE_SETUP 903YY_RULE_SETUP
1105#line 93 "scripts/genksyms/lex.l"
1106ECHO; 904ECHO;
1107 YY_BREAK 905 YY_BREAK
1108#line 1109 "scripts/genksyms/lex.c"
1109case YY_STATE_EOF(INITIAL): 906case YY_STATE_EOF(INITIAL):
1110 yyterminate(); 907 yyterminate();
1111 908
@@ -1172,7 +969,6 @@ case YY_STATE_EOF(INITIAL):
1172 969
1173 else 970 else
1174 { 971 {
1175/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
1176 yy_cp = (yy_c_buf_p); 972 yy_cp = (yy_c_buf_p);
1177 goto yy_find_action; 973 goto yy_find_action;
1178 } 974 }
@@ -1238,14 +1034,6 @@ case YY_STATE_EOF(INITIAL):
1238 } /* end of action switch */ 1034 } /* end of action switch */
1239 } /* end of scanning one token */ 1035 } /* end of scanning one token */
1240} /* end of yylex */ 1036} /* end of yylex */
1241/* %ok-for-header */
1242
1243/* %if-c++-only */
1244/* %not-for-header */
1245
1246/* %ok-for-header */
1247
1248/* %endif */
1249 1037
1250/* yy_get_next_buffer - try to read in a new buffer 1038/* yy_get_next_buffer - try to read in a new buffer
1251 * 1039 *
@@ -1254,11 +1042,7 @@ case YY_STATE_EOF(INITIAL):
1254 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 1042 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1255 * EOB_ACT_END_OF_FILE - end of file 1043 * EOB_ACT_END_OF_FILE - end of file
1256 */ 1044 */
1257/* %if-c-only */
1258static int yy_get_next_buffer (void) 1045static int yy_get_next_buffer (void)
1259/* %endif */
1260/* %if-c++-only */
1261/* %endif */
1262{ 1046{
1263 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 1047 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1264 register char *source = (yytext_ptr); 1048 register char *source = (yytext_ptr);
@@ -1392,24 +1176,16 @@ static int yy_get_next_buffer (void)
1392 1176
1393/* yy_get_previous_state - get the state just before the EOB char was reached */ 1177/* yy_get_previous_state - get the state just before the EOB char was reached */
1394 1178
1395/* %if-c-only */
1396/* %not-for-header */
1397
1398 static yy_state_type yy_get_previous_state (void) 1179 static yy_state_type yy_get_previous_state (void)
1399/* %endif */
1400/* %if-c++-only */
1401/* %endif */
1402{ 1180{
1403 register yy_state_type yy_current_state; 1181 register yy_state_type yy_current_state;
1404 register char *yy_cp; 1182 register char *yy_cp;
1405 1183
1406/* %% [15.0] code to get the start state into yy_current_state goes here */
1407 yy_current_state = (yy_start); 1184 yy_current_state = (yy_start);
1408 yy_current_state += YY_AT_BOL(); 1185 yy_current_state += YY_AT_BOL();
1409 1186
1410 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 1187 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1411 { 1188 {
1412/* %% [16.0] code to find the next state goes here */
1413 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1189 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1414 if ( yy_accept[yy_current_state] ) 1190 if ( yy_accept[yy_current_state] )
1415 { 1191 {
@@ -1433,15 +1209,10 @@ static int yy_get_next_buffer (void)
1433 * synopsis 1209 * synopsis
1434 * next_state = yy_try_NUL_trans( current_state ); 1210 * next_state = yy_try_NUL_trans( current_state );
1435 */ 1211 */
1436/* %if-c-only */
1437 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 1212 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1438/* %endif */
1439/* %if-c++-only */
1440/* %endif */
1441{ 1213{
1442 register int yy_is_jam; 1214 register int yy_is_jam;
1443 /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ 1215 register char *yy_cp = (yy_c_buf_p);
1444 register char *yy_cp = (yy_c_buf_p);
1445 1216
1446 register YY_CHAR yy_c = 1; 1217 register YY_CHAR yy_c = 1;
1447 if ( yy_accept[yy_current_state] ) 1218 if ( yy_accept[yy_current_state] )
@@ -1461,12 +1232,7 @@ static int yy_get_next_buffer (void)
1461 return yy_is_jam ? 0 : yy_current_state; 1232 return yy_is_jam ? 0 : yy_current_state;
1462} 1233}
1463 1234
1464/* %if-c-only */
1465
1466 static void yyunput (int c, register char * yy_bp ) 1235 static void yyunput (int c, register char * yy_bp )
1467/* %endif */
1468/* %if-c++-only */
1469/* %endif */
1470{ 1236{
1471 register char *yy_cp; 1237 register char *yy_cp;
1472 1238
@@ -1498,17 +1264,11 @@ static int yy_get_next_buffer (void)
1498 1264
1499 *--yy_cp = (char) c; 1265 *--yy_cp = (char) c;
1500 1266
1501/* %% [18.0] update yylineno here */
1502
1503 (yytext_ptr) = yy_bp; 1267 (yytext_ptr) = yy_bp;
1504 (yy_hold_char) = *yy_cp; 1268 (yy_hold_char) = *yy_cp;
1505 (yy_c_buf_p) = yy_cp; 1269 (yy_c_buf_p) = yy_cp;
1506} 1270}
1507/* %if-c-only */
1508
1509/* %endif */
1510 1271
1511/* %if-c-only */
1512#ifndef YY_NO_INPUT 1272#ifndef YY_NO_INPUT
1513#ifdef __cplusplus 1273#ifdef __cplusplus
1514 static int yyinput (void) 1274 static int yyinput (void)
@@ -1516,9 +1276,6 @@ static int yy_get_next_buffer (void)
1516 static int input (void) 1276 static int input (void)
1517#endif 1277#endif
1518 1278
1519/* %endif */
1520/* %if-c++-only */
1521/* %endif */
1522{ 1279{
1523 int c; 1280 int c;
1524 1281
@@ -1582,25 +1339,18 @@ static int yy_get_next_buffer (void)
1582 *(yy_c_buf_p) = '\0'; /* preserve yytext */ 1339 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1583 (yy_hold_char) = *++(yy_c_buf_p); 1340 (yy_hold_char) = *++(yy_c_buf_p);
1584 1341
1585/* %% [19.0] update BOL and yylineno */
1586 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); 1342 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1587 1343
1588 return c; 1344 return c;
1589} 1345}
1590/* %if-c-only */
1591#endif /* ifndef YY_NO_INPUT */ 1346#endif /* ifndef YY_NO_INPUT */
1592/* %endif */
1593 1347
1594/** Immediately switch to a different input stream. 1348/** Immediately switch to a different input stream.
1595 * @param input_file A readable stream. 1349 * @param input_file A readable stream.
1596 * 1350 *
1597 * @note This function does not reset the start condition to @c INITIAL . 1351 * @note This function does not reset the start condition to @c INITIAL .
1598 */ 1352 */
1599/* %if-c-only */
1600 void yyrestart (FILE * input_file ) 1353 void yyrestart (FILE * input_file )
1601/* %endif */
1602/* %if-c++-only */
1603/* %endif */
1604{ 1354{
1605 1355
1606 if ( ! YY_CURRENT_BUFFER ){ 1356 if ( ! YY_CURRENT_BUFFER ){
@@ -1617,11 +1367,7 @@ static int yy_get_next_buffer (void)
1617 * @param new_buffer The new input buffer. 1367 * @param new_buffer The new input buffer.
1618 * 1368 *
1619 */ 1369 */
1620/* %if-c-only */
1621 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 1370 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1622/* %endif */
1623/* %if-c++-only */
1624/* %endif */
1625{ 1371{
1626 1372
1627 /* TODO. We should be able to replace this entire function body 1373 /* TODO. We should be able to replace this entire function body
@@ -1652,11 +1398,7 @@ static int yy_get_next_buffer (void)
1652 (yy_did_buffer_switch_on_eof) = 1; 1398 (yy_did_buffer_switch_on_eof) = 1;
1653} 1399}
1654 1400
1655/* %if-c-only */
1656static void yy_load_buffer_state (void) 1401static void yy_load_buffer_state (void)
1657/* %endif */
1658/* %if-c++-only */
1659/* %endif */
1660{ 1402{
1661 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1403 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1662 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 1404 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
@@ -1670,11 +1412,7 @@ static void yy_load_buffer_state (void)
1670 * 1412 *
1671 * @return the allocated buffer state. 1413 * @return the allocated buffer state.
1672 */ 1414 */
1673/* %if-c-only */
1674 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) 1415 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1675/* %endif */
1676/* %if-c++-only */
1677/* %endif */
1678{ 1416{
1679 YY_BUFFER_STATE b; 1417 YY_BUFFER_STATE b;
1680 1418
@@ -1702,11 +1440,7 @@ static void yy_load_buffer_state (void)
1702 * @param b a buffer created with yy_create_buffer() 1440 * @param b a buffer created with yy_create_buffer()
1703 * 1441 *
1704 */ 1442 */
1705/* %if-c-only */
1706 void yy_delete_buffer (YY_BUFFER_STATE b ) 1443 void yy_delete_buffer (YY_BUFFER_STATE b )
1707/* %endif */
1708/* %if-c++-only */
1709/* %endif */
1710{ 1444{
1711 1445
1712 if ( ! b ) 1446 if ( ! b )
@@ -1721,26 +1455,15 @@ static void yy_load_buffer_state (void)
1721 yyfree((void *) b ); 1455 yyfree((void *) b );
1722} 1456}
1723 1457
1724/* %if-c-only */
1725
1726#ifndef __cplusplus 1458#ifndef __cplusplus
1727extern int isatty (int ); 1459extern int isatty (int );
1728#endif /* __cplusplus */ 1460#endif /* __cplusplus */
1729 1461
1730/* %endif */
1731
1732/* %if-c++-only */
1733/* %endif */
1734
1735/* Initializes or reinitializes a buffer. 1462/* Initializes or reinitializes a buffer.
1736 * This function is sometimes called more than once on the same buffer, 1463 * This function is sometimes called more than once on the same buffer,
1737 * such as during a yyrestart() or at EOF. 1464 * such as during a yyrestart() or at EOF.
1738 */ 1465 */
1739/* %if-c-only */
1740 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 1466 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1741/* %endif */
1742/* %if-c++-only */
1743/* %endif */
1744 1467
1745{ 1468{
1746 int oerrno = errno; 1469 int oerrno = errno;
@@ -1759,13 +1482,8 @@ extern int isatty (int );
1759 b->yy_bs_column = 0; 1482 b->yy_bs_column = 0;
1760 } 1483 }
1761 1484
1762/* %if-c-only */
1763
1764 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1485 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1765 1486
1766/* %endif */
1767/* %if-c++-only */
1768/* %endif */
1769 errno = oerrno; 1487 errno = oerrno;
1770} 1488}
1771 1489
@@ -1773,11 +1491,7 @@ extern int isatty (int );
1773 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 1491 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1774 * 1492 *
1775 */ 1493 */
1776/* %if-c-only */
1777 void yy_flush_buffer (YY_BUFFER_STATE b ) 1494 void yy_flush_buffer (YY_BUFFER_STATE b )
1778/* %endif */
1779/* %if-c++-only */
1780/* %endif */
1781{ 1495{
1782 if ( ! b ) 1496 if ( ! b )
1783 return; 1497 return;
@@ -1800,18 +1514,13 @@ extern int isatty (int );
1800 yy_load_buffer_state( ); 1514 yy_load_buffer_state( );
1801} 1515}
1802 1516
1803/* %if-c-or-c++ */
1804/** Pushes the new state onto the stack. The new state becomes 1517/** Pushes the new state onto the stack. The new state becomes
1805 * the current state. This function will allocate the stack 1518 * the current state. This function will allocate the stack
1806 * if necessary. 1519 * if necessary.
1807 * @param new_buffer The new state. 1520 * @param new_buffer The new state.
1808 * 1521 *
1809 */ 1522 */
1810/* %if-c-only */
1811void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 1523void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1812/* %endif */
1813/* %if-c++-only */
1814/* %endif */
1815{ 1524{
1816 if (new_buffer == NULL) 1525 if (new_buffer == NULL)
1817 return; 1526 return;
@@ -1836,18 +1545,12 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1836 yy_load_buffer_state( ); 1545 yy_load_buffer_state( );
1837 (yy_did_buffer_switch_on_eof) = 1; 1546 (yy_did_buffer_switch_on_eof) = 1;
1838} 1547}
1839/* %endif */
1840 1548
1841/* %if-c-or-c++ */
1842/** Removes and deletes the top of the stack, if present. 1549/** Removes and deletes the top of the stack, if present.
1843 * The next element becomes the new top. 1550 * The next element becomes the new top.
1844 * 1551 *
1845 */ 1552 */
1846/* %if-c-only */
1847void yypop_buffer_state (void) 1553void yypop_buffer_state (void)
1848/* %endif */
1849/* %if-c++-only */
1850/* %endif */
1851{ 1554{
1852 if (!YY_CURRENT_BUFFER) 1555 if (!YY_CURRENT_BUFFER)
1853 return; 1556 return;
@@ -1862,17 +1565,11 @@ void yypop_buffer_state (void)
1862 (yy_did_buffer_switch_on_eof) = 1; 1565 (yy_did_buffer_switch_on_eof) = 1;
1863 } 1566 }
1864} 1567}
1865/* %endif */
1866 1568
1867/* %if-c-or-c++ */
1868/* Allocates the stack if it does not exist. 1569/* Allocates the stack if it does not exist.
1869 * Guarantees space for at least one push. 1570 * Guarantees space for at least one push.
1870 */ 1571 */
1871/* %if-c-only */
1872static void yyensure_buffer_stack (void) 1572static void yyensure_buffer_stack (void)
1873/* %endif */
1874/* %if-c++-only */
1875/* %endif */
1876{ 1573{
1877 int num_to_alloc; 1574 int num_to_alloc;
1878 1575
@@ -1914,9 +1611,7 @@ static void yyensure_buffer_stack (void)
1914 (yy_buffer_stack_max) = num_to_alloc; 1611 (yy_buffer_stack_max) = num_to_alloc;
1915 } 1612 }
1916} 1613}
1917/* %endif */
1918 1614
1919/* %if-c-only */
1920/** Setup the input buffer state to scan directly from a user-specified character buffer. 1615/** Setup the input buffer state to scan directly from a user-specified character buffer.
1921 * @param base the character buffer 1616 * @param base the character buffer
1922 * @param size the size in bytes of the character buffer 1617 * @param size the size in bytes of the character buffer
@@ -1951,9 +1646,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1951 1646
1952 return b; 1647 return b;
1953} 1648}
1954/* %endif */
1955 1649
1956/* %if-c-only */
1957/** Setup the input buffer state to scan a string. The next call to yylex() will 1650/** Setup the input buffer state to scan a string. The next call to yylex() will
1958 * scan from a @e copy of @a str. 1651 * scan from a @e copy of @a str.
1959 * @param yystr a NUL-terminated string to scan 1652 * @param yystr a NUL-terminated string to scan
@@ -1967,9 +1660,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1967 1660
1968 return yy_scan_bytes(yystr,strlen(yystr) ); 1661 return yy_scan_bytes(yystr,strlen(yystr) );
1969} 1662}
1970/* %endif */
1971 1663
1972/* %if-c-only */
1973/** Setup the input buffer state to scan the given bytes. The next call to yylex() will 1664/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1974 * scan from a @e copy of @a bytes. 1665 * scan from a @e copy of @a bytes.
1975 * @param bytes the byte buffer to scan 1666 * @param bytes the byte buffer to scan
@@ -2006,21 +1697,16 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2006 1697
2007 return b; 1698 return b;
2008} 1699}
2009/* %endif */
2010 1700
2011#ifndef YY_EXIT_FAILURE 1701#ifndef YY_EXIT_FAILURE
2012#define YY_EXIT_FAILURE 2 1702#define YY_EXIT_FAILURE 2
2013#endif 1703#endif
2014 1704
2015/* %if-c-only */
2016static void yy_fatal_error (yyconst char* msg ) 1705static void yy_fatal_error (yyconst char* msg )
2017{ 1706{
2018 (void) fprintf( stderr, "%s\n", msg ); 1707 (void) fprintf( stderr, "%s\n", msg );
2019 exit( YY_EXIT_FAILURE ); 1708 exit( YY_EXIT_FAILURE );
2020} 1709}
2021/* %endif */
2022/* %if-c++-only */
2023/* %endif */
2024 1710
2025/* Redefine yyless() so it works in section 3 code. */ 1711/* Redefine yyless() so it works in section 3 code. */
2026 1712
@@ -2041,10 +1727,6 @@ static void yy_fatal_error (yyconst char* msg )
2041 1727
2042/* Accessor methods (get/set functions) to struct members. */ 1728/* Accessor methods (get/set functions) to struct members. */
2043 1729
2044/* %if-c-only */
2045/* %if-reentrant */
2046/* %endif */
2047
2048/** Get the current line number. 1730/** Get the current line number.
2049 * 1731 *
2050 */ 1732 */
@@ -2087,9 +1769,6 @@ char *yyget_text (void)
2087 return yytext; 1769 return yytext;
2088} 1770}
2089 1771
2090/* %if-reentrant */
2091/* %endif */
2092
2093/** Set the current line number. 1772/** Set the current line number.
2094 * @param line_number 1773 * @param line_number
2095 * 1774 *
@@ -2126,14 +1805,6 @@ void yyset_debug (int bdebug )
2126 yy_flex_debug = bdebug ; 1805 yy_flex_debug = bdebug ;
2127} 1806}
2128 1807
2129/* %endif */
2130
2131/* %if-reentrant */
2132/* %if-bison-bridge */
2133/* %endif */
2134/* %endif if-c-only */
2135
2136/* %if-c-only */
2137static int yy_init_globals (void) 1808static int yy_init_globals (void)
2138{ 1809{
2139 /* Initialization is the same as for the non-reentrant scanner. 1810 /* Initialization is the same as for the non-reentrant scanner.
@@ -2161,9 +1832,7 @@ static int yy_init_globals (void)
2161 */ 1832 */
2162 return 0; 1833 return 0;
2163} 1834}
2164/* %endif */
2165 1835
2166/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
2167/* yylex_destroy is for both reentrant and non-reentrant scanners. */ 1836/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2168int yylex_destroy (void) 1837int yylex_destroy (void)
2169{ 1838{
@@ -2183,11 +1852,8 @@ int yylex_destroy (void)
2183 * yylex() is called, initialization will occur. */ 1852 * yylex() is called, initialization will occur. */
2184 yy_init_globals( ); 1853 yy_init_globals( );
2185 1854
2186/* %if-reentrant */
2187/* %endif */
2188 return 0; 1855 return 0;
2189} 1856}
2190/* %endif */
2191 1857
2192/* 1858/*
2193 * Internal utility routines. 1859 * Internal utility routines.
@@ -2235,21 +1901,11 @@ void yyfree (void * ptr )
2235 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ 1901 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2236} 1902}
2237 1903
2238/* %if-tables-serialization definitions */
2239/* %define-yytables The name for this specific scanner's tables. */
2240#define YYTABLES_NAME "yytables" 1904#define YYTABLES_NAME "yytables"
2241/* %endif */
2242
2243/* %ok-for-header */
2244
2245#line 93 "scripts/genksyms/lex.l"
2246
2247
2248 1905
2249/* Bring in the keyword recognizer. */ 1906/* Bring in the keyword recognizer. */
2250 1907
2251#include "keywords.c" 1908#include "keywords.hash.c"
2252
2253 1909
2254/* Macros to append to our phrase collection list. */ 1910/* Macros to append to our phrase collection list. */
2255 1911
@@ -2274,7 +1930,6 @@ void yyfree (void * ptr )
2274 1930
2275#define APP _APP(yytext, yyleng) 1931#define APP _APP(yytext, yyleng)
2276 1932
2277
2278/* The second stage lexer. Here we incorporate knowledge of the state 1933/* The second stage lexer. Here we incorporate knowledge of the state
2279 of the parser to tailor the tokens that are returned. */ 1934 of the parser to tailor the tokens that are returned. */
2280 1935
diff --git a/scripts/genksyms/parse.c_shipped b/scripts/genksyms/parse.tab.c_shipped
index 1a0b8607fb0e..61d4a5d09856 100644
--- a/scripts/genksyms/parse.c_shipped
+++ b/scripts/genksyms/parse.tab.c_shipped
@@ -1,10 +1,9 @@
1 1/* A Bison parser, made by GNU Bison 2.4.3. */
2/* A Bison parser, made by GNU Bison 2.4.1. */
3 2
4/* Skeleton implementation for Bison's Yacc-like parsers in C 3/* Skeleton implementation for Bison's Yacc-like parsers in C
5 4
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
7 Free Software Foundation, Inc. 6 2009, 2010 Free Software Foundation, Inc.
8 7
9 This program is free software: you can redistribute it and/or modify 8 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
46#define YYBISON 1 45#define YYBISON 1
47 46
48/* Bison version. */ 47/* Bison version. */
49#define YYBISON_VERSION "2.4.1" 48#define YYBISON_VERSION "2.4.3"
50 49
51/* Skeleton name. */ 50/* Skeleton name. */
52#define YYSKELETON_NAME "yacc.c" 51#define YYSKELETON_NAME "yacc.c"
@@ -67,8 +66,6 @@
67 66
68/* Copy the first part of user declarations. */ 67/* Copy the first part of user declarations. */
69 68
70/* Line 189 of yacc.c */
71#line 24 "scripts/genksyms/parse.y"
72 69
73 70
74#include <assert.h> 71#include <assert.h>
@@ -101,8 +98,6 @@ remove_list(struct string_list **pb, struct string_list **pe)
101 98
102 99
103 100
104/* Line 189 of yacc.c */
105#line 106 "scripts/genksyms/parse.c"
106 101
107/* Enabling traces. */ 102/* Enabling traces. */
108#ifndef YYDEBUG 103#ifndef YYDEBUG
@@ -186,8 +181,6 @@ typedef int YYSTYPE;
186/* Copy the second part of user declarations. */ 181/* Copy the second part of user declarations. */
187 182
188 183
189/* Line 264 of yacc.c */
190#line 191 "scripts/genksyms/parse.c"
191 184
192#ifdef short 185#ifdef short
193# undef short 186# undef short
@@ -237,7 +230,7 @@ typedef short int yytype_int16;
237#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 230#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
238 231
239#ifndef YY_ 232#ifndef YY_
240# if YYENABLE_NLS 233# if defined YYENABLE_NLS && YYENABLE_NLS
241# if ENABLE_NLS 234# if ENABLE_NLS
242# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 235# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
243# define YY_(msgid) dgettext ("bison-runtime", msgid) 236# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -855,9 +848,18 @@ static const yytype_uint8 yystos[] =
855 848
856/* Like YYERROR except do call yyerror. This remains here temporarily 849/* Like YYERROR except do call yyerror. This remains here temporarily
857 to ease the transition to the new meaning of YYERROR, for GCC. 850 to ease the transition to the new meaning of YYERROR, for GCC.
858 Once GCC version 2 has supplanted version 1, this can go. */ 851 Once GCC version 2 has supplanted version 1, this can go. However,
852 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
853 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
854 discussed. */
859 855
860#define YYFAIL goto yyerrlab 856#define YYFAIL goto yyerrlab
857#if defined YYFAIL
858 /* This is here to suppress warnings from the GCC cpp's
859 -Wunused-macros. Normally we don't worry about that warning, but
860 some users do, and we want to make it easy for users to remove
861 YYFAIL uses, which will produce warnings from Bison 2.5. */
862#endif
861 863
862#define YYRECOVERING() (!!yyerrstatus) 864#define YYRECOVERING() (!!yyerrstatus)
863 865
@@ -914,7 +916,7 @@ while (YYID (0))
914 we won't break user code: when these are the locations we know. */ 916 we won't break user code: when these are the locations we know. */
915 917
916#ifndef YY_LOCATION_PRINT 918#ifndef YY_LOCATION_PRINT
917# if YYLTYPE_IS_TRIVIAL 919# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
918# define YY_LOCATION_PRINT(File, Loc) \ 920# define YY_LOCATION_PRINT(File, Loc) \
919 fprintf (File, "%d.%d-%d.%d", \ 921 fprintf (File, "%d.%d-%d.%d", \
920 (Loc).first_line, (Loc).first_column, \ 922 (Loc).first_line, (Loc).first_column, \
@@ -1653,64 +1655,46 @@ yyreduce:
1653 { 1655 {
1654 case 4: 1656 case 4:
1655 1657
1656/* Line 1455 of yacc.c */
1657#line 109 "scripts/genksyms/parse.y"
1658 { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;} 1658 { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;}
1659 break; 1659 break;
1660 1660
1661 case 5: 1661 case 5:
1662 1662
1663/* Line 1455 of yacc.c */
1664#line 111 "scripts/genksyms/parse.y"
1665 { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;} 1663 { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;}
1666 break; 1664 break;
1667 1665
1668 case 6: 1666 case 6:
1669 1667
1670/* Line 1455 of yacc.c */
1671#line 115 "scripts/genksyms/parse.y"
1672 { is_typedef = 1; ;} 1668 { is_typedef = 1; ;}
1673 break; 1669 break;
1674 1670
1675 case 7: 1671 case 7:
1676 1672
1677/* Line 1455 of yacc.c */
1678#line 116 "scripts/genksyms/parse.y"
1679 { (yyval) = (yyvsp[(4) - (4)]); ;} 1673 { (yyval) = (yyvsp[(4) - (4)]); ;}
1680 break; 1674 break;
1681 1675
1682 case 8: 1676 case 8:
1683 1677
1684/* Line 1455 of yacc.c */
1685#line 117 "scripts/genksyms/parse.y"
1686 { is_typedef = 1; ;} 1678 { is_typedef = 1; ;}
1687 break; 1679 break;
1688 1680
1689 case 9: 1681 case 9:
1690 1682
1691/* Line 1455 of yacc.c */
1692#line 118 "scripts/genksyms/parse.y"
1693 { (yyval) = (yyvsp[(3) - (3)]); ;} 1683 { (yyval) = (yyvsp[(3) - (3)]); ;}
1694 break; 1684 break;
1695 1685
1696 case 14: 1686 case 14:
1697 1687
1698/* Line 1455 of yacc.c */
1699#line 123 "scripts/genksyms/parse.y"
1700 { (yyval) = (yyvsp[(2) - (2)]); ;} 1688 { (yyval) = (yyvsp[(2) - (2)]); ;}
1701 break; 1689 break;
1702 1690
1703 case 15: 1691 case 15:
1704 1692
1705/* Line 1455 of yacc.c */
1706#line 124 "scripts/genksyms/parse.y"
1707 { (yyval) = (yyvsp[(2) - (2)]); ;} 1693 { (yyval) = (yyvsp[(2) - (2)]); ;}
1708 break; 1694 break;
1709 1695
1710 case 16: 1696 case 16:
1711 1697
1712/* Line 1455 of yacc.c */
1713#line 129 "scripts/genksyms/parse.y"
1714 { if (current_name) { 1698 { if (current_name) {
1715 struct string_list *decl = (*(yyvsp[(3) - (3)]))->next; 1699 struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
1716 (*(yyvsp[(3) - (3)]))->next = NULL; 1700 (*(yyvsp[(3) - (3)]))->next = NULL;
@@ -1725,15 +1709,11 @@ yyreduce:
1725 1709
1726 case 17: 1710 case 17:
1727 1711
1728/* Line 1455 of yacc.c */
1729#line 142 "scripts/genksyms/parse.y"
1730 { (yyval) = NULL; ;} 1712 { (yyval) = NULL; ;}
1731 break; 1713 break;
1732 1714
1733 case 19: 1715 case 19:
1734 1716
1735/* Line 1455 of yacc.c */
1736#line 148 "scripts/genksyms/parse.y"
1737 { struct string_list *decl = *(yyvsp[(1) - (1)]); 1717 { struct string_list *decl = *(yyvsp[(1) - (1)]);
1738 *(yyvsp[(1) - (1)]) = NULL; 1718 *(yyvsp[(1) - (1)]) = NULL;
1739 add_symbol(current_name, 1719 add_symbol(current_name,
@@ -1745,8 +1725,6 @@ yyreduce:
1745 1725
1746 case 20: 1726 case 20:
1747 1727
1748/* Line 1455 of yacc.c */
1749#line 156 "scripts/genksyms/parse.y"
1750 { struct string_list *decl = *(yyvsp[(3) - (3)]); 1728 { struct string_list *decl = *(yyvsp[(3) - (3)]);
1751 *(yyvsp[(3) - (3)]) = NULL; 1729 *(yyvsp[(3) - (3)]) = NULL;
1752 free_list(*(yyvsp[(2) - (3)]), NULL); 1730 free_list(*(yyvsp[(2) - (3)]), NULL);
@@ -1760,36 +1738,26 @@ yyreduce:
1760 1738
1761 case 21: 1739 case 21:
1762 1740
1763/* Line 1455 of yacc.c */
1764#line 169 "scripts/genksyms/parse.y"
1765 { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;} 1741 { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;}
1766 break; 1742 break;
1767 1743
1768 case 22: 1744 case 22:
1769 1745
1770/* Line 1455 of yacc.c */
1771#line 174 "scripts/genksyms/parse.y"
1772 { decl_spec = NULL; ;} 1746 { decl_spec = NULL; ;}
1773 break; 1747 break;
1774 1748
1775 case 24: 1749 case 24:
1776 1750
1777/* Line 1455 of yacc.c */
1778#line 179 "scripts/genksyms/parse.y"
1779 { decl_spec = *(yyvsp[(1) - (1)]); ;} 1751 { decl_spec = *(yyvsp[(1) - (1)]); ;}
1780 break; 1752 break;
1781 1753
1782 case 25: 1754 case 25:
1783 1755
1784/* Line 1455 of yacc.c */
1785#line 180 "scripts/genksyms/parse.y"
1786 { decl_spec = *(yyvsp[(2) - (2)]); ;} 1756 { decl_spec = *(yyvsp[(2) - (2)]); ;}
1787 break; 1757 break;
1788 1758
1789 case 26: 1759 case 26:
1790 1760
1791/* Line 1455 of yacc.c */
1792#line 185 "scripts/genksyms/parse.y"
1793 { /* Version 2 checksumming ignores storage class, as that 1761 { /* Version 2 checksumming ignores storage class, as that
1794 is really irrelevant to the linkage. */ 1762 is really irrelevant to the linkage. */
1795 remove_node((yyvsp[(1) - (1)])); 1763 remove_node((yyvsp[(1) - (1)]));
@@ -1799,43 +1767,31 @@ yyreduce:
1799 1767
1800 case 31: 1768 case 31:
1801 1769
1802/* Line 1455 of yacc.c */
1803#line 197 "scripts/genksyms/parse.y"
1804 { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;} 1770 { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;}
1805 break; 1771 break;
1806 1772
1807 case 32: 1773 case 32:
1808 1774
1809/* Line 1455 of yacc.c */
1810#line 198 "scripts/genksyms/parse.y"
1811 { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;} 1775 { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;}
1812 break; 1776 break;
1813 1777
1814 case 37: 1778 case 37:
1815 1779
1816/* Line 1455 of yacc.c */
1817#line 210 "scripts/genksyms/parse.y"
1818 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;} 1780 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;}
1819 break; 1781 break;
1820 1782
1821 case 38: 1783 case 38:
1822 1784
1823/* Line 1455 of yacc.c */
1824#line 212 "scripts/genksyms/parse.y"
1825 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;} 1785 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;}
1826 break; 1786 break;
1827 1787
1828 case 39: 1788 case 39:
1829 1789
1830/* Line 1455 of yacc.c */
1831#line 214 "scripts/genksyms/parse.y"
1832 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;} 1790 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;}
1833 break; 1791 break;
1834 1792
1835 case 40: 1793 case 40:
1836 1794
1837/* Line 1455 of yacc.c */
1838#line 218 "scripts/genksyms/parse.y"
1839 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r; 1795 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1840 r = copy_node(i); r->tag = SYM_STRUCT; 1796 r = copy_node(i); r->tag = SYM_STRUCT;
1841 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL; 1797 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
@@ -1846,8 +1802,6 @@ yyreduce:
1846 1802
1847 case 41: 1803 case 41:
1848 1804
1849/* Line 1455 of yacc.c */
1850#line 225 "scripts/genksyms/parse.y"
1851 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r; 1805 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1852 r = copy_node(i); r->tag = SYM_UNION; 1806 r = copy_node(i); r->tag = SYM_UNION;
1853 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL; 1807 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
@@ -1858,8 +1812,6 @@ yyreduce:
1858 1812
1859 case 42: 1813 case 42:
1860 1814
1861/* Line 1455 of yacc.c */
1862#line 232 "scripts/genksyms/parse.y"
1863 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r; 1815 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1864 r = copy_node(i); r->tag = SYM_ENUM; 1816 r = copy_node(i); r->tag = SYM_ENUM;
1865 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL; 1817 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
@@ -1870,57 +1822,41 @@ yyreduce:
1870 1822
1871 case 43: 1823 case 43:
1872 1824
1873/* Line 1455 of yacc.c */
1874#line 242 "scripts/genksyms/parse.y"
1875 { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); ;} 1825 { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); ;}
1876 break; 1826 break;
1877 1827
1878 case 44: 1828 case 44:
1879 1829
1880/* Line 1455 of yacc.c */
1881#line 244 "scripts/genksyms/parse.y"
1882 { (yyval) = (yyvsp[(2) - (2)]); ;} 1830 { (yyval) = (yyvsp[(2) - (2)]); ;}
1883 break; 1831 break;
1884 1832
1885 case 45: 1833 case 45:
1886 1834
1887/* Line 1455 of yacc.c */
1888#line 245 "scripts/genksyms/parse.y"
1889 { (yyval) = (yyvsp[(2) - (2)]); ;} 1835 { (yyval) = (yyvsp[(2) - (2)]); ;}
1890 break; 1836 break;
1891 1837
1892 case 56: 1838 case 56:
1893 1839
1894/* Line 1455 of yacc.c */
1895#line 259 "scripts/genksyms/parse.y"
1896 { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;} 1840 { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;}
1897 break; 1841 break;
1898 1842
1899 case 57: 1843 case 57:
1900 1844
1901/* Line 1455 of yacc.c */
1902#line 264 "scripts/genksyms/parse.y"
1903 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} 1845 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
1904 break; 1846 break;
1905 1847
1906 case 58: 1848 case 58:
1907 1849
1908/* Line 1455 of yacc.c */
1909#line 268 "scripts/genksyms/parse.y"
1910 { (yyval) = NULL; ;} 1850 { (yyval) = NULL; ;}
1911 break; 1851 break;
1912 1852
1913 case 61: 1853 case 61:
1914 1854
1915/* Line 1455 of yacc.c */
1916#line 274 "scripts/genksyms/parse.y"
1917 { (yyval) = (yyvsp[(2) - (2)]); ;} 1855 { (yyval) = (yyvsp[(2) - (2)]); ;}
1918 break; 1856 break;
1919 1857
1920 case 65: 1858 case 65:
1921 1859
1922/* Line 1455 of yacc.c */
1923#line 280 "scripts/genksyms/parse.y"
1924 { /* restrict has no effect in prototypes so ignore it */ 1860 { /* restrict has no effect in prototypes so ignore it */
1925 remove_node((yyvsp[(1) - (1)])); 1861 remove_node((yyvsp[(1) - (1)]));
1926 (yyval) = (yyvsp[(1) - (1)]); 1862 (yyval) = (yyvsp[(1) - (1)]);
@@ -1929,15 +1865,11 @@ yyreduce:
1929 1865
1930 case 66: 1866 case 66:
1931 1867
1932/* Line 1455 of yacc.c */
1933#line 287 "scripts/genksyms/parse.y"
1934 { (yyval) = (yyvsp[(2) - (2)]); ;} 1868 { (yyval) = (yyvsp[(2) - (2)]); ;}
1935 break; 1869 break;
1936 1870
1937 case 68: 1871 case 68:
1938 1872
1939/* Line 1455 of yacc.c */
1940#line 293 "scripts/genksyms/parse.y"
1941 { if (current_name != NULL) { 1873 { if (current_name != NULL) {
1942 error_with_pos("unexpected second declaration name"); 1874 error_with_pos("unexpected second declaration name");
1943 YYERROR; 1875 YYERROR;
@@ -1950,134 +1882,96 @@ yyreduce:
1950 1882
1951 case 69: 1883 case 69:
1952 1884
1953/* Line 1455 of yacc.c */
1954#line 302 "scripts/genksyms/parse.y"
1955 { (yyval) = (yyvsp[(4) - (4)]); ;} 1885 { (yyval) = (yyvsp[(4) - (4)]); ;}
1956 break; 1886 break;
1957 1887
1958 case 70: 1888 case 70:
1959 1889
1960/* Line 1455 of yacc.c */
1961#line 304 "scripts/genksyms/parse.y"
1962 { (yyval) = (yyvsp[(4) - (4)]); ;} 1890 { (yyval) = (yyvsp[(4) - (4)]); ;}
1963 break; 1891 break;
1964 1892
1965 case 71: 1893 case 71:
1966 1894
1967/* Line 1455 of yacc.c */
1968#line 306 "scripts/genksyms/parse.y"
1969 { (yyval) = (yyvsp[(2) - (2)]); ;} 1895 { (yyval) = (yyvsp[(2) - (2)]); ;}
1970 break; 1896 break;
1971 1897
1972 case 72: 1898 case 72:
1973 1899
1974/* Line 1455 of yacc.c */
1975#line 308 "scripts/genksyms/parse.y"
1976 { (yyval) = (yyvsp[(3) - (3)]); ;} 1900 { (yyval) = (yyvsp[(3) - (3)]); ;}
1977 break; 1901 break;
1978 1902
1979 case 73: 1903 case 73:
1980 1904
1981/* Line 1455 of yacc.c */
1982#line 310 "scripts/genksyms/parse.y"
1983 { (yyval) = (yyvsp[(3) - (3)]); ;} 1905 { (yyval) = (yyvsp[(3) - (3)]); ;}
1984 break; 1906 break;
1985 1907
1986 case 74: 1908 case 74:
1987 1909
1988/* Line 1455 of yacc.c */
1989#line 316 "scripts/genksyms/parse.y"
1990 { (yyval) = (yyvsp[(2) - (2)]); ;} 1910 { (yyval) = (yyvsp[(2) - (2)]); ;}
1991 break; 1911 break;
1992 1912
1993 case 78: 1913 case 78:
1994 1914
1995/* Line 1455 of yacc.c */
1996#line 324 "scripts/genksyms/parse.y"
1997 { (yyval) = (yyvsp[(4) - (4)]); ;} 1915 { (yyval) = (yyvsp[(4) - (4)]); ;}
1998 break; 1916 break;
1999 1917
2000 case 79: 1918 case 79:
2001 1919
2002/* Line 1455 of yacc.c */
2003#line 326 "scripts/genksyms/parse.y"
2004 { (yyval) = (yyvsp[(4) - (4)]); ;} 1920 { (yyval) = (yyvsp[(4) - (4)]); ;}
2005 break; 1921 break;
2006 1922
2007 case 80: 1923 case 80:
2008 1924
2009/* Line 1455 of yacc.c */
2010#line 328 "scripts/genksyms/parse.y"
2011 { (yyval) = (yyvsp[(2) - (2)]); ;} 1925 { (yyval) = (yyvsp[(2) - (2)]); ;}
2012 break; 1926 break;
2013 1927
2014 case 81: 1928 case 81:
2015 1929
2016/* Line 1455 of yacc.c */
2017#line 330 "scripts/genksyms/parse.y"
2018 { (yyval) = (yyvsp[(3) - (3)]); ;} 1930 { (yyval) = (yyvsp[(3) - (3)]); ;}
2019 break; 1931 break;
2020 1932
2021 case 82: 1933 case 82:
2022 1934
2023/* Line 1455 of yacc.c */
2024#line 332 "scripts/genksyms/parse.y"
2025 { (yyval) = (yyvsp[(3) - (3)]); ;} 1935 { (yyval) = (yyvsp[(3) - (3)]); ;}
2026 break; 1936 break;
2027 1937
2028 case 83: 1938 case 83:
2029 1939
2030/* Line 1455 of yacc.c */
2031#line 336 "scripts/genksyms/parse.y"
2032 { (yyval) = (yyvsp[(2) - (2)]); ;} 1940 { (yyval) = (yyvsp[(2) - (2)]); ;}
2033 break; 1941 break;
2034 1942
2035 case 85: 1943 case 85:
2036 1944
2037/* Line 1455 of yacc.c */
2038#line 338 "scripts/genksyms/parse.y"
2039 { (yyval) = (yyvsp[(3) - (3)]); ;} 1945 { (yyval) = (yyvsp[(3) - (3)]); ;}
2040 break; 1946 break;
2041 1947
2042 case 86: 1948 case 86:
2043 1949
2044/* Line 1455 of yacc.c */
2045#line 342 "scripts/genksyms/parse.y"
2046 { (yyval) = NULL; ;} 1950 { (yyval) = NULL; ;}
2047 break; 1951 break;
2048 1952
2049 case 89: 1953 case 89:
2050 1954
2051/* Line 1455 of yacc.c */
2052#line 349 "scripts/genksyms/parse.y"
2053 { (yyval) = (yyvsp[(3) - (3)]); ;} 1955 { (yyval) = (yyvsp[(3) - (3)]); ;}
2054 break; 1956 break;
2055 1957
2056 case 90: 1958 case 90:
2057 1959
2058/* Line 1455 of yacc.c */
2059#line 354 "scripts/genksyms/parse.y"
2060 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} 1960 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
2061 break; 1961 break;
2062 1962
2063 case 91: 1963 case 91:
2064 1964
2065/* Line 1455 of yacc.c */
2066#line 359 "scripts/genksyms/parse.y"
2067 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} 1965 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
2068 break; 1966 break;
2069 1967
2070 case 93: 1968 case 93:
2071 1969
2072/* Line 1455 of yacc.c */
2073#line 364 "scripts/genksyms/parse.y"
2074 { (yyval) = NULL; ;} 1970 { (yyval) = NULL; ;}
2075 break; 1971 break;
2076 1972
2077 case 94: 1973 case 94:
2078 1974
2079/* Line 1455 of yacc.c */
2080#line 366 "scripts/genksyms/parse.y"
2081 { /* For version 2 checksums, we don't want to remember 1975 { /* For version 2 checksums, we don't want to remember
2082 private parameter names. */ 1976 private parameter names. */
2083 remove_node((yyvsp[(1) - (1)])); 1977 remove_node((yyvsp[(1) - (1)]));
@@ -2087,8 +1981,6 @@ yyreduce:
2087 1981
2088 case 95: 1982 case 95:
2089 1983
2090/* Line 1455 of yacc.c */
2091#line 374 "scripts/genksyms/parse.y"
2092 { remove_node((yyvsp[(1) - (1)])); 1984 { remove_node((yyvsp[(1) - (1)]));
2093 (yyval) = (yyvsp[(1) - (1)]); 1985 (yyval) = (yyvsp[(1) - (1)]);
2094 ;} 1986 ;}
@@ -2096,43 +1988,31 @@ yyreduce:
2096 1988
2097 case 96: 1989 case 96:
2098 1990
2099/* Line 1455 of yacc.c */
2100#line 378 "scripts/genksyms/parse.y"
2101 { (yyval) = (yyvsp[(4) - (4)]); ;} 1991 { (yyval) = (yyvsp[(4) - (4)]); ;}
2102 break; 1992 break;
2103 1993
2104 case 97: 1994 case 97:
2105 1995
2106/* Line 1455 of yacc.c */
2107#line 380 "scripts/genksyms/parse.y"
2108 { (yyval) = (yyvsp[(4) - (4)]); ;} 1996 { (yyval) = (yyvsp[(4) - (4)]); ;}
2109 break; 1997 break;
2110 1998
2111 case 98: 1999 case 98:
2112 2000
2113/* Line 1455 of yacc.c */
2114#line 382 "scripts/genksyms/parse.y"
2115 { (yyval) = (yyvsp[(2) - (2)]); ;} 2001 { (yyval) = (yyvsp[(2) - (2)]); ;}
2116 break; 2002 break;
2117 2003
2118 case 99: 2004 case 99:
2119 2005
2120/* Line 1455 of yacc.c */
2121#line 384 "scripts/genksyms/parse.y"
2122 { (yyval) = (yyvsp[(3) - (3)]); ;} 2006 { (yyval) = (yyvsp[(3) - (3)]); ;}
2123 break; 2007 break;
2124 2008
2125 case 100: 2009 case 100:
2126 2010
2127/* Line 1455 of yacc.c */
2128#line 386 "scripts/genksyms/parse.y"
2129 { (yyval) = (yyvsp[(3) - (3)]); ;} 2011 { (yyval) = (yyvsp[(3) - (3)]); ;}
2130 break; 2012 break;
2131 2013
2132 case 101: 2014 case 101:
2133 2015
2134/* Line 1455 of yacc.c */
2135#line 391 "scripts/genksyms/parse.y"
2136 { struct string_list *decl = *(yyvsp[(2) - (3)]); 2016 { struct string_list *decl = *(yyvsp[(2) - (3)]);
2137 *(yyvsp[(2) - (3)]) = NULL; 2017 *(yyvsp[(2) - (3)]) = NULL;
2138 add_symbol(current_name, SYM_NORMAL, decl, is_extern); 2018 add_symbol(current_name, SYM_NORMAL, decl, is_extern);
@@ -2142,120 +2022,86 @@ yyreduce:
2142 2022
2143 case 102: 2023 case 102:
2144 2024
2145/* Line 1455 of yacc.c */
2146#line 399 "scripts/genksyms/parse.y"
2147 { (yyval) = NULL; ;} 2025 { (yyval) = NULL; ;}
2148 break; 2026 break;
2149 2027
2150 case 104: 2028 case 104:
2151 2029
2152/* Line 1455 of yacc.c */
2153#line 406 "scripts/genksyms/parse.y"
2154 { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;} 2030 { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;}
2155 break; 2031 break;
2156 2032
2157 case 105: 2033 case 105:
2158 2034
2159/* Line 1455 of yacc.c */
2160#line 410 "scripts/genksyms/parse.y"
2161 { (yyval) = (yyvsp[(3) - (3)]); ;} 2035 { (yyval) = (yyvsp[(3) - (3)]); ;}
2162 break; 2036 break;
2163 2037
2164 case 106: 2038 case 106:
2165 2039
2166/* Line 1455 of yacc.c */
2167#line 411 "scripts/genksyms/parse.y"
2168 { (yyval) = (yyvsp[(3) - (3)]); ;} 2040 { (yyval) = (yyvsp[(3) - (3)]); ;}
2169 break; 2041 break;
2170 2042
2171 case 107: 2043 case 107:
2172 2044
2173/* Line 1455 of yacc.c */
2174#line 415 "scripts/genksyms/parse.y"
2175 { (yyval) = NULL; ;} 2045 { (yyval) = NULL; ;}
2176 break; 2046 break;
2177 2047
2178 case 110: 2048 case 110:
2179 2049
2180/* Line 1455 of yacc.c */
2181#line 421 "scripts/genksyms/parse.y"
2182 { (yyval) = (yyvsp[(2) - (2)]); ;} 2050 { (yyval) = (yyvsp[(2) - (2)]); ;}
2183 break; 2051 break;
2184 2052
2185 case 111: 2053 case 111:
2186 2054
2187/* Line 1455 of yacc.c */
2188#line 426 "scripts/genksyms/parse.y"
2189 { (yyval) = (yyvsp[(3) - (3)]); ;} 2055 { (yyval) = (yyvsp[(3) - (3)]); ;}
2190 break; 2056 break;
2191 2057
2192 case 112: 2058 case 112:
2193 2059
2194/* Line 1455 of yacc.c */
2195#line 428 "scripts/genksyms/parse.y"
2196 { (yyval) = (yyvsp[(2) - (2)]); ;} 2060 { (yyval) = (yyvsp[(2) - (2)]); ;}
2197 break; 2061 break;
2198 2062
2199 case 113: 2063 case 113:
2200 2064
2201/* Line 1455 of yacc.c */
2202#line 432 "scripts/genksyms/parse.y"
2203 { (yyval) = NULL; ;} 2065 { (yyval) = NULL; ;}
2204 break; 2066 break;
2205 2067
2206 case 116: 2068 case 116:
2207 2069
2208/* Line 1455 of yacc.c */
2209#line 438 "scripts/genksyms/parse.y"
2210 { (yyval) = (yyvsp[(3) - (3)]); ;} 2070 { (yyval) = (yyvsp[(3) - (3)]); ;}
2211 break; 2071 break;
2212 2072
2213 case 117: 2073 case 117:
2214 2074
2215/* Line 1455 of yacc.c */
2216#line 442 "scripts/genksyms/parse.y"
2217 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} 2075 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
2218 break; 2076 break;
2219 2077
2220 case 118: 2078 case 118:
2221 2079
2222/* Line 1455 of yacc.c */
2223#line 443 "scripts/genksyms/parse.y"
2224 { (yyval) = (yyvsp[(2) - (2)]); ;} 2080 { (yyval) = (yyvsp[(2) - (2)]); ;}
2225 break; 2081 break;
2226 2082
2227 case 120: 2083 case 120:
2228 2084
2229/* Line 1455 of yacc.c */
2230#line 448 "scripts/genksyms/parse.y"
2231 { (yyval) = (yyvsp[(2) - (2)]); ;} 2085 { (yyval) = (yyvsp[(2) - (2)]); ;}
2232 break; 2086 break;
2233 2087
2234 case 121: 2088 case 121:
2235 2089
2236/* Line 1455 of yacc.c */
2237#line 452 "scripts/genksyms/parse.y"
2238 { (yyval) = NULL; ;} 2090 { (yyval) = NULL; ;}
2239 break; 2091 break;
2240 2092
2241 case 123: 2093 case 123:
2242 2094
2243/* Line 1455 of yacc.c */
2244#line 457 "scripts/genksyms/parse.y"
2245 { (yyval) = (yyvsp[(3) - (3)]); ;} 2095 { (yyval) = (yyvsp[(3) - (3)]); ;}
2246 break; 2096 break;
2247 2097
2248 case 124: 2098 case 124:
2249 2099
2250/* Line 1455 of yacc.c */
2251#line 458 "scripts/genksyms/parse.y"
2252 { (yyval) = (yyvsp[(4) - (4)]); ;} 2100 { (yyval) = (yyvsp[(4) - (4)]); ;}
2253 break; 2101 break;
2254 2102
2255 case 127: 2103 case 127:
2256 2104
2257/* Line 1455 of yacc.c */
2258#line 467 "scripts/genksyms/parse.y"
2259 { 2105 {
2260 const char *name = strdup((*(yyvsp[(1) - (1)]))->string); 2106 const char *name = strdup((*(yyvsp[(1) - (1)]))->string);
2261 add_symbol(name, SYM_ENUM_CONST, NULL, 0); 2107 add_symbol(name, SYM_ENUM_CONST, NULL, 0);
@@ -2264,8 +2110,6 @@ yyreduce:
2264 2110
2265 case 128: 2111 case 128:
2266 2112
2267/* Line 1455 of yacc.c */
2268#line 472 "scripts/genksyms/parse.y"
2269 { 2113 {
2270 const char *name = strdup((*(yyvsp[(1) - (3)]))->string); 2114 const char *name = strdup((*(yyvsp[(1) - (3)]))->string);
2271 struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)])); 2115 struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)]));
@@ -2275,29 +2119,21 @@ yyreduce:
2275 2119
2276 case 129: 2120 case 129:
2277 2121
2278/* Line 1455 of yacc.c */
2279#line 479 "scripts/genksyms/parse.y"
2280 { (yyval) = (yyvsp[(2) - (2)]); ;} 2122 { (yyval) = (yyvsp[(2) - (2)]); ;}
2281 break; 2123 break;
2282 2124
2283 case 130: 2125 case 130:
2284 2126
2285/* Line 1455 of yacc.c */
2286#line 483 "scripts/genksyms/parse.y"
2287 { (yyval) = NULL; ;} 2127 { (yyval) = NULL; ;}
2288 break; 2128 break;
2289 2129
2290 case 132: 2130 case 132:
2291 2131
2292/* Line 1455 of yacc.c */
2293#line 489 "scripts/genksyms/parse.y"
2294 { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;} 2132 { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;}
2295 break; 2133 break;
2296 2134
2297 2135
2298 2136
2299/* Line 1455 of yacc.c */
2300#line 2301 "scripts/genksyms/parse.c"
2301 default: break; 2137 default: break;
2302 } 2138 }
2303 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 2139 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2508,8 +2344,6 @@ yyreturn:
2508 2344
2509 2345
2510 2346
2511/* Line 1675 of yacc.c */
2512#line 493 "scripts/genksyms/parse.y"
2513 2347
2514 2348
2515static void 2349static void
diff --git a/scripts/genksyms/parse.h_shipped b/scripts/genksyms/parse.tab.h_shipped
index 517523669251..350c2b403e21 100644
--- a/scripts/genksyms/parse.h_shipped
+++ b/scripts/genksyms/parse.tab.h_shipped
@@ -1,10 +1,9 @@
1 1/* A Bison parser, made by GNU Bison 2.4.3. */
2/* A Bison parser, made by GNU Bison 2.4.1. */
3 2
4/* Skeleton interface for Bison's Yacc-like parsers in C 3/* Skeleton interface for Bison's Yacc-like parsers in C
5 4
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
7 Free Software Foundation, Inc. 6 2009, 2010 Free Software Foundation, Inc.
8 7
9 This program is free software: you can redistribute it and/or modify 8 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore
index 624f6502e03e..ee120d441565 100644
--- a/scripts/kconfig/.gitignore
+++ b/scripts/kconfig/.gitignore
@@ -2,7 +2,7 @@
2# Generated files 2# Generated files
3# 3#
4config* 4config*
5lex.*.c 5*.lex.c
6*.tab.c 6*.tab.c
7*.tab.h 7*.tab.h
8zconf.hash.c 8zconf.hash.c
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index faa9a4701b6f..0b4276c047b2 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -204,7 +204,7 @@ ifeq ($(gconf-target),1)
204endif 204endif
205 205
206clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck 206clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck
207clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h 207clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
208clean-files += mconf qconf gconf nconf 208clean-files += mconf qconf gconf nconf
209clean-files += config.pot linux.pot 209clean-files += config.pot linux.pot
210 210
@@ -220,9 +220,12 @@ always := dochecklxdialog
220HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) 220HOST_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
223HOSTCFLAGS_lex.zconf.o := -I$(src) 223HOSTCFLAGS_zconf.lex.o := -I$(src)
224HOSTCFLAGS_zconf.tab.o := -I$(src) 224HOSTCFLAGS_zconf.tab.o := -I$(src)
225 225
226LEX_PREFIX_zconf := zconf
227YACC_PREFIX_zconf := zconf
228
226HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl 229HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
227HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK 230HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
228 231
@@ -316,7 +319,7 @@ $(obj)/.tmp_gtkcheck:
316 fi 319 fi
317endif 320endif
318 321
319$(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
320 323
321$(obj)/kconfig_load.o: $(obj)/lkc_defs.h 324$(obj)/kconfig_load.o: $(obj)/lkc_defs.h
322 325
@@ -335,28 +338,3 @@ $(obj)/gconf.glade.h: $(obj)/gconf.glade
335 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ 338 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
336 $(obj)/gconf.glade 339 $(obj)/gconf.glade
337 340
338###
339# The following requires flex/bison/gperf
340# By default we use the _shipped versions, uncomment the following line if
341# you are modifying the flex/bison src.
342# LKC_GENPARSER := 1
343
344ifdef LKC_GENPARSER
345
346$(obj)/zconf.tab.c: $(src)/zconf.y
347$(obj)/lex.zconf.c: $(src)/zconf.l
348$(obj)/zconf.hash.c: $(src)/zconf.gperf
349
350%.tab.c: %.y
351 bison -l -b $* -p $(notdir $*) $<
352 cp $@ $@_shipped
353
354lex.%.c: %.l
355 flex -L -P$(notdir $*) -o$@ $<
356 cp $@ $@_shipped
357
358%.hash.c: %.gperf
359 gperf < $< > $@
360 cp $@ $@_shipped
361
362endif
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index febf0c94d558..f34a0a9b50f1 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -68,9 +68,7 @@ struct kconf_id {
68 enum symbol_type stype; 68 enum symbol_type stype;
69}; 69};
70 70
71#ifdef YYDEBUG
72extern int zconfdebug; 71extern int zconfdebug;
73#endif
74 72
75int zconfparse(void); 73int zconfparse(void);
76void zconfdump(FILE *out); 74void zconfdump(FILE *out);
diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf
index c9e690eb7545..f14ab41154b6 100644
--- a/scripts/kconfig/zconf.gperf
+++ b/scripts/kconfig/zconf.gperf
@@ -9,7 +9,7 @@
9 9
10struct kconf_id; 10struct kconf_id;
11 11
12static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); 12static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
13 13
14%% 14%%
15mainmenu, T_MAINMENU, TF_COMMAND 15mainmenu, T_MAINMENU, TF_COMMAND
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"
32struct kconf_id; 32struct kconf_id;
33 33
34static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); 34static 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
44static unsigned int 44static unsigned int
45kconf_id_hash (register const char *str, register unsigned int len) 45kconf_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
91struct kconf_id_strings_t 91struct 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")]; 96 char kconf_id_strings_str7[sizeof("default")];
97 char kconf_id_strings_str7[sizeof("endmenu")]; 97 char kconf_id_strings_str8[sizeof("tristate")];
98 char kconf_id_strings_str8[sizeof("optional")];
99 char kconf_id_strings_str9[sizeof("endchoice")]; 98 char kconf_id_strings_str9[sizeof("endchoice")];
100 char kconf_id_strings_str10[sizeof("range")]; 99 char kconf_id_strings_str12[sizeof("def_tristate")];
101 char kconf_id_strings_str11[sizeof("choice")];
102 char kconf_id_strings_str12[sizeof("default")];
103 char kconf_id_strings_str13[sizeof("def_bool")]; 100 char kconf_id_strings_str13[sizeof("def_bool")];
104 char kconf_id_strings_str14[sizeof("help")]; 101 char kconf_id_strings_str14[sizeof("defconfig_list")];
105 char kconf_id_strings_str16[sizeof("config")]; 102 char kconf_id_strings_str17[sizeof("on")];
106 char kconf_id_strings_str17[sizeof("def_tristate")]; 103 char kconf_id_strings_str18[sizeof("optional")];
107 char kconf_id_strings_str18[sizeof("hex")]; 104 char kconf_id_strings_str21[sizeof("option")];
108 char kconf_id_strings_str19[sizeof("defconfig_list")]; 105 char kconf_id_strings_str22[sizeof("endmenu")];
109 char kconf_id_strings_str22[sizeof("if")]; 106 char kconf_id_strings_str23[sizeof("mainmenu")];
110 char kconf_id_strings_str23[sizeof("int")]; 107 char kconf_id_strings_str25[sizeof("menuconfig")];
111 char kconf_id_strings_str27[sizeof("modules")]; 108 char kconf_id_strings_str27[sizeof("modules")];
112 char kconf_id_strings_str28[sizeof("tristate")];
113 char kconf_id_strings_str29[sizeof("menu")]; 109 char kconf_id_strings_str29[sizeof("menu")];
110 char kconf_id_strings_str31[sizeof("select")];
114 char kconf_id_strings_str32[sizeof("comment")]; 111 char kconf_id_strings_str32[sizeof("comment")];
115 char kconf_id_strings_str35[sizeof("menuconfig")]; 112 char kconf_id_strings_str33[sizeof("env")];
116 char kconf_id_strings_str36[sizeof("string")]; 113 char kconf_id_strings_str35[sizeof("range")];
117 char kconf_id_strings_str37[sizeof("visible")]; 114 char kconf_id_strings_str36[sizeof("choice")];
118 char kconf_id_strings_str41[sizeof("prompt")]; 115 char kconf_id_strings_str39[sizeof("bool")];
119 char kconf_id_strings_str42[sizeof("depends")]; 116 char kconf_id_strings_str41[sizeof("source")];
120 char kconf_id_strings_str44[sizeof("bool")]; 117 char kconf_id_strings_str42[sizeof("visible")];
121 char kconf_id_strings_str46[sizeof("select")]; 118 char kconf_id_strings_str43[sizeof("hex")];
119 char kconf_id_strings_str46[sizeof("config")];
122 char kconf_id_strings_str47[sizeof("boolean")]; 120 char kconf_id_strings_str47[sizeof("boolean")];
123 char kconf_id_strings_str48[sizeof("mainmenu")]; 121 char kconf_id_strings_str51[sizeof("string")];
124 char kconf_id_strings_str51[sizeof("source")]; 122 char kconf_id_strings_str54[sizeof("help")];
123 char kconf_id_strings_str56[sizeof("prompt")];
124 char kconf_id_strings_str72[sizeof("depends")];
125 }; 125 };
126static struct kconf_id_strings_t kconf_id_strings_contents = 126static const struct kconf_id_strings_t kconf_id_strings_contents =
127 { 127 {
128 "on", 128 "if",
129 "env", 129 "int",
130 "endif", 130 "endif",
131 "option",
132 "endmenu",
133 "optional",
134 "endchoice",
135 "range",
136 "choice",
137 "default", 131 "default",
138 "def_bool", 132 "tristate",
139 "help", 133 "endchoice",
140 "config",
141 "def_tristate", 134 "def_tristate",
142 "hex", 135 "def_bool",
143 "defconfig_list", 136 "defconfig_list",
144 "if", 137 "on",
145 "int", 138 "optional",
139 "option",
140 "endmenu",
141 "mainmenu",
142 "menuconfig",
146 "modules", 143 "modules",
147 "tristate",
148 "menu", 144 "menu",
145 "select",
149 "comment", 146 "comment",
150 "menuconfig", 147 "env",
151 "string", 148 "range",
152 "visible", 149 "choice",
153 "prompt",
154 "depends",
155 "bool", 150 "bool",
156 "select", 151 "source",
152 "visible",
153 "hex",
154 "config",
157 "boolean", 155 "boolean",
158 "mainmenu", 156 "string",
159 "source" 157 "help",
158 "prompt",
159 "depends"
160 }; 160 };
161#define kconf_id_strings ((const char *) &kconf_id_strings_contents) 161#define kconf_id_strings ((const char *) &kconf_id_strings_contents)
162#ifdef __GNUC__ 162#ifdef __GNUC__
163__inline 163__inline
164#ifdef __GNUC_STDC_INLINE__ 164#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
165__attribute__ ((__gnu_inline__)) 165__attribute__ ((__gnu_inline__))
166#endif 166#endif
167#endif 167#endif
168struct kconf_id * 168const struct kconf_id *
169kconf_id_lookup (register const char *str, register unsigned int len) 169kconf_id_lookup (register const char *str, register unsigned int len)
170{ 170{
171 enum 171 enum
@@ -174,54 +174,94 @@ kconf_id_lookup (register const char *str, register unsigned int len)
174 MIN_WORD_LENGTH = 2, 174 MIN_WORD_LENGTH = 2,
175 MAX_WORD_LENGTH = 14, 175 MAX_WORD_LENGTH = 14,
176 MIN_HASH_VALUE = 2, 176 MIN_HASH_VALUE = 2,
177 MAX_HASH_VALUE = 51 177 MAX_HASH_VALUE = 72
178 }; 178 };
179 179
180 static struct kconf_id wordlist[] = 180 static const struct kconf_id wordlist[] =
181 { 181 {
182 {-1}, {-1}, 182 {-1}, {-1},
183 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM}, 183#line 25 "scripts/kconfig/zconf.gperf"
184 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_OPT_ENV, TF_OPTION}, 184 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM},
185#line 36 "scripts/kconfig/zconf.gperf"
186 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT},
185 {-1}, 187 {-1},
188#line 26 "scripts/kconfig/zconf.gperf"
186 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND}, 189 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND},
187 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_OPTION, TF_COMMAND}, 190 {-1},
188 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND}, 191#line 29 "scripts/kconfig/zconf.gperf"
189 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_OPTIONAL, TF_COMMAND}, 192 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
193#line 31 "scripts/kconfig/zconf.gperf"
194 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE},
195#line 20 "scripts/kconfig/zconf.gperf"
190 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND}, 196 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND},
191 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND}, 197 {-1}, {-1},
192 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_CHOICE, TF_COMMAND}, 198#line 32 "scripts/kconfig/zconf.gperf"
193 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, 199 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE},
200#line 35 "scripts/kconfig/zconf.gperf"
194 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, 201 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
195 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND}, 202#line 45 "scripts/kconfig/zconf.gperf"
196 {-1}, 203 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
197 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND},
198 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
199 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_HEX},
200 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION},
201 {-1}, {-1}, 204 {-1}, {-1},
202 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM}, 205#line 43 "scripts/kconfig/zconf.gperf"
203 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT}, 206 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM},
204 {-1}, {-1}, {-1}, 207#line 28 "scripts/kconfig/zconf.gperf"
208 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
209 {-1}, {-1},
210#line 42 "scripts/kconfig/zconf.gperf"
211 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND},
212#line 17 "scripts/kconfig/zconf.gperf"
213 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND},
214#line 15 "scripts/kconfig/zconf.gperf"
215 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_MAINMENU, TF_COMMAND},
216 {-1},
217#line 23 "scripts/kconfig/zconf.gperf"
218 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND},
219 {-1},
220#line 44 "scripts/kconfig/zconf.gperf"
205 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, 221 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
206 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE}, 222 {-1},
223#line 16 "scripts/kconfig/zconf.gperf"
207 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, 224 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
208 {-1}, {-1}, 225 {-1},
226#line 39 "scripts/kconfig/zconf.gperf"
227 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND},
228#line 21 "scripts/kconfig/zconf.gperf"
209 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, 229 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
210 {-1}, {-1}, 230#line 46 "scripts/kconfig/zconf.gperf"
211 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND}, 231 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION},
212 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_TYPE, TF_COMMAND, S_STRING},
213 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_VISIBLE, TF_COMMAND},
214 {-1}, {-1}, {-1},
215 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_PROMPT, TF_COMMAND},
216 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_DEPENDS, TF_COMMAND},
217 {-1}, 232 {-1},
218 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str44, T_TYPE, TF_COMMAND, S_BOOLEAN}, 233#line 40 "scripts/kconfig/zconf.gperf"
234 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND},
235#line 19 "scripts/kconfig/zconf.gperf"
236 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND},
237 {-1}, {-1},
238#line 33 "scripts/kconfig/zconf.gperf"
239 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_TYPE, TF_COMMAND, S_BOOLEAN},
219 {-1}, 240 {-1},
220 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND}, 241#line 18 "scripts/kconfig/zconf.gperf"
242 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND},
243#line 41 "scripts/kconfig/zconf.gperf"
244 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND},
245#line 37 "scripts/kconfig/zconf.gperf"
246 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX},
247 {-1}, {-1},
248#line 22 "scripts/kconfig/zconf.gperf"
249 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND},
250#line 34 "scripts/kconfig/zconf.gperf"
221 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN}, 251 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
222 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND}, 252 {-1}, {-1}, {-1},
253#line 38 "scripts/kconfig/zconf.gperf"
254 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING},
223 {-1}, {-1}, 255 {-1}, {-1},
224 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_SOURCE, TF_COMMAND} 256#line 24 "scripts/kconfig/zconf.gperf"
257 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54, T_HELP, TF_COMMAND},
258 {-1},
259#line 30 "scripts/kconfig/zconf.gperf"
260 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56, T_PROMPT, TF_COMMAND},
261 {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
262 {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
263#line 27 "scripts/kconfig/zconf.gperf"
264 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72, T_DEPENDS, TF_COMMAND}
225 }; 265 };
226 266
227 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) 267 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -242,4 +282,5 @@ kconf_id_lookup (register const char *str, register unsigned int len)
242 } 282 }
243 return 0; 283 return 0;
244} 284}
285#line 47 "scripts/kconfig/zconf.gperf"
245 286
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
index b22f884f9022..ddee5fc51811 100644
--- a/scripts/kconfig/zconf.l
+++ b/scripts/kconfig/zconf.l
@@ -1,5 +1,5 @@
1%option backup nostdinit noyywrap never-interactive full ecs 1%option nostdinit noyywrap never-interactive full ecs
2%option 8bit backup nodefault perf-report perf-report 2%option 8bit nodefault perf-report perf-report
3%option noinput 3%option noinput
4%x COMMAND HELP STRING PARAM 4%x COMMAND HELP STRING PARAM
5%{ 5%{
@@ -96,7 +96,7 @@ n [A-Za-z0-9_]
96 96
97<COMMAND>{ 97<COMMAND>{
98 {n}+ { 98 {n}+ {
99 struct kconf_id *id = kconf_id_lookup(yytext, yyleng); 99 const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
100 BEGIN(PARAM); 100 BEGIN(PARAM);
101 current_pos.file = current_file; 101 current_pos.file = current_file;
102 current_pos.lineno = current_file->lineno; 102 current_pos.lineno = current_file->lineno;
@@ -132,7 +132,7 @@ n [A-Za-z0-9_]
132 \n BEGIN(INITIAL); current_file->lineno++; return T_EOL; 132 \n BEGIN(INITIAL); current_file->lineno++; return T_EOL;
133 --- /* ignore */ 133 --- /* ignore */
134 ({n}|[-/.])+ { 134 ({n}|[-/.])+ {
135 struct kconf_id *id = kconf_id_lookup(yytext, yyleng); 135 const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
136 if (id && id->flags & TF_PARAM) { 136 if (id && id->flags & TF_PARAM) {
137 zconflval.id = id; 137 zconflval.id = id;
138 return id->token; 138 return id->token;
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/zconf.lex.c_shipped
index d9182916f724..906c09911748 100644
--- a/scripts/kconfig/lex.zconf.c_shipped
+++ b/scripts/kconfig/zconf.lex.c_shipped
@@ -1,5 +1,5 @@
1 1
2#line 3 "scripts/kconfig/lex.zconf.c" 2#line 3 "scripts/kconfig/zconf.lex.c_shipped"
3 3
4#define YY_INT_ALIGNED short int 4#define YY_INT_ALIGNED short int
5 5
@@ -72,6 +72,7 @@ typedef int flex_int32_t;
72typedef unsigned char flex_uint8_t; 72typedef unsigned char flex_uint8_t;
73typedef unsigned short int flex_uint16_t; 73typedef unsigned short int flex_uint16_t;
74typedef unsigned int flex_uint32_t; 74typedef unsigned int flex_uint32_t;
75#endif /* ! C99 */
75 76
76/* Limits of integral types. */ 77/* Limits of integral types. */
77#ifndef INT8_MIN 78#ifndef INT8_MIN
@@ -102,8 +103,6 @@ typedef unsigned int flex_uint32_t;
102#define UINT32_MAX (4294967295U) 103#define UINT32_MAX (4294967295U)
103#endif 104#endif
104 105
105#endif /* ! C99 */
106
107#endif /* ! FLEXINT_H */ 106#endif /* ! FLEXINT_H */
108 107
109#ifdef __cplusplus 108#ifdef __cplusplus
@@ -160,15 +159,7 @@ typedef unsigned int flex_uint32_t;
160 159
161/* Size of default input buffer. */ 160/* Size of default input buffer. */
162#ifndef YY_BUF_SIZE 161#ifndef YY_BUF_SIZE
163#ifdef __ia64__
164/* On IA-64, the buffer size is 16k, not 8k.
165 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
166 * Ditto for the __ia64__ case accordingly.
167 */
168#define YY_BUF_SIZE 32768
169#else
170#define YY_BUF_SIZE 16384 162#define YY_BUF_SIZE 16384
171#endif /* __ia64__ */
172#endif 163#endif
173 164
174/* The state buf must be large enough to hold one state per character in the main buffer. 165/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -922,12 +913,7 @@ static int input (void );
922 913
923/* Amount of stuff to slurp up with each read. */ 914/* Amount of stuff to slurp up with each read. */
924#ifndef YY_READ_BUF_SIZE 915#ifndef YY_READ_BUF_SIZE
925#ifdef __ia64__
926/* On IA-64, the buffer size is 16k, not 8k */
927#define YY_READ_BUF_SIZE 16384
928#else
929#define YY_READ_BUF_SIZE 8192 916#define YY_READ_BUF_SIZE 8192
930#endif /* __ia64__ */
931#endif 917#endif
932 918
933/* Copy whatever the last rule matched to the standard output. */ 919/* Copy whatever the last rule matched to the standard output. */
@@ -1100,7 +1086,7 @@ YY_RULE_SETUP
1100case 6: 1086case 6:
1101YY_RULE_SETUP 1087YY_RULE_SETUP
1102{ 1088{
1103 struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); 1089 const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
1104 BEGIN(PARAM); 1090 BEGIN(PARAM);
1105 current_pos.file = current_file; 1091 current_pos.file = current_file;
1106 current_pos.lineno = current_file->lineno; 1092 current_pos.lineno = current_file->lineno;
@@ -1175,7 +1161,7 @@ YY_RULE_SETUP
1175case 19: 1161case 19:
1176YY_RULE_SETUP 1162YY_RULE_SETUP
1177{ 1163{
1178 struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); 1164 const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
1179 if (id && id->flags & TF_PARAM) { 1165 if (id && id->flags & TF_PARAM) {
1180 zconflval.id = id; 1166 zconflval.id = id;
1181 return id->token; 1167 return id->token;
@@ -2073,8 +2059,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
2073 2059
2074/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will 2060/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
2075 * scan from a @e copy of @a bytes. 2061 * scan from a @e copy of @a bytes.
2076 * @param yybytes the byte buffer to scan 2062 * @param bytes the byte buffer to scan
2077 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 2063 * @param len the number of bytes in the buffer pointed to by @a bytes.
2078 * 2064 *
2079 * @return the newly allocated buffer state object. 2065 * @return the newly allocated buffer state object.
2080 */ 2066 */
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index 4c5495ea205e..211e1a277037 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1,10 +1,9 @@
1 1/* A Bison parser, made by GNU Bison 2.4.3. */
2/* A Bison parser, made by GNU Bison 2.4.1. */
3 2
4/* Skeleton implementation for Bison's Yacc-like parsers in C 3/* Skeleton implementation for Bison's Yacc-like parsers in C
5 4
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
7 Free Software Foundation, Inc. 6 2009, 2010 Free Software Foundation, Inc.
8 7
9 This program is free software: you can redistribute it and/or modify 8 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
46#define YYBISON 1 45#define YYBISON 1
47 46
48/* Bison version. */ 47/* Bison version. */
49#define YYBISON_VERSION "2.4.1" 48#define YYBISON_VERSION "2.4.3"
50 49
51/* Skeleton name. */ 50/* Skeleton name. */
52#define YYSKELETON_NAME "yacc.c" 51#define YYSKELETON_NAME "yacc.c"
@@ -102,22 +101,18 @@ extern int zconflex(void);
102static void zconfprint(const char *err, ...); 101static void zconfprint(const char *err, ...);
103static void zconf_error(const char *err, ...); 102static void zconf_error(const char *err, ...);
104static void zconferror(const char *err); 103static void zconferror(const char *err);
105static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); 104static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
106 105
107struct symbol *symbol_hash[SYMBOL_HASHSIZE]; 106struct symbol *symbol_hash[SYMBOL_HASHSIZE];
108 107
109static struct menu *current_menu, *current_entry; 108static struct menu *current_menu, *current_entry;
110 109
111#define YYDEBUG 0
112#if YYDEBUG
113#define YYERROR_VERBOSE
114#endif
115 110
116 111
117 112
118/* Enabling traces. */ 113/* Enabling traces. */
119#ifndef YYDEBUG 114#ifndef YYDEBUG
120# define YYDEBUG 0 115# define YYDEBUG 1
121#endif 116#endif
122 117
123/* Enabling verbose error messages. */ 118/* Enabling verbose error messages. */
@@ -188,7 +183,7 @@ typedef union YYSTYPE
188 struct symbol *symbol; 183 struct symbol *symbol;
189 struct expr *expr; 184 struct expr *expr;
190 struct menu *menu; 185 struct menu *menu;
191 struct kconf_id *id; 186 const struct kconf_id *id;
192 187
193 188
194 189
@@ -255,7 +250,7 @@ typedef short int yytype_int16;
255#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 250#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
256 251
257#ifndef YY_ 252#ifndef YY_
258# if YYENABLE_NLS 253# if defined YYENABLE_NLS && YYENABLE_NLS
259# if ENABLE_NLS 254# if ENABLE_NLS
260# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 255# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
261# define YY_(msgid) dgettext ("bison-runtime", msgid) 256# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -535,18 +530,18 @@ static const yytype_int8 yyrhs[] =
535/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 530/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
536static const yytype_uint16 yyrline[] = 531static const yytype_uint16 yyrline[] =
537{ 532{
538 0, 108, 108, 108, 110, 110, 112, 114, 115, 116, 533 0, 104, 104, 104, 106, 106, 108, 110, 111, 112,
539 117, 118, 119, 123, 127, 127, 127, 127, 127, 127, 534 113, 114, 115, 119, 123, 123, 123, 123, 123, 123,
540 127, 127, 131, 132, 133, 134, 135, 136, 140, 141, 535 123, 123, 127, 128, 129, 130, 131, 132, 136, 137,
541 147, 155, 161, 169, 179, 181, 182, 183, 184, 185, 536 143, 151, 157, 165, 175, 177, 178, 179, 180, 181,
542 186, 189, 197, 203, 213, 219, 225, 228, 230, 241, 537 182, 185, 193, 199, 209, 215, 221, 224, 226, 237,
543 242, 247, 256, 261, 269, 272, 274, 275, 276, 277, 538 238, 243, 252, 257, 265, 268, 270, 271, 272, 273,
544 278, 281, 287, 298, 304, 314, 316, 321, 329, 337, 539 274, 277, 283, 294, 300, 310, 312, 317, 325, 333,
545 340, 342, 343, 344, 349, 356, 363, 368, 376, 379, 540 336, 338, 339, 340, 345, 352, 359, 364, 372, 375,
546 381, 382, 383, 386, 394, 401, 408, 414, 421, 423, 541 377, 378, 379, 382, 390, 397, 404, 410, 417, 419,
547 424, 425, 428, 436, 438, 439, 442, 449, 451, 456, 542 420, 421, 424, 432, 434, 435, 438, 445, 447, 452,
548 457, 460, 461, 462, 466, 467, 470, 471, 474, 475, 543 453, 456, 457, 458, 462, 463, 466, 467, 470, 471,
549 476, 477, 478, 479, 480, 483, 484, 487, 488 544 472, 473, 474, 475, 476, 479, 480, 483, 484
550}; 545};
551#endif 546#endif
552 547
@@ -806,9 +801,18 @@ static const yytype_uint8 yystos[] =
806 801
807/* Like YYERROR except do call yyerror. This remains here temporarily 802/* Like YYERROR except do call yyerror. This remains here temporarily
808 to ease the transition to the new meaning of YYERROR, for GCC. 803 to ease the transition to the new meaning of YYERROR, for GCC.
809 Once GCC version 2 has supplanted version 1, this can go. */ 804 Once GCC version 2 has supplanted version 1, this can go. However,
805 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
806 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
807 discussed. */
810 808
811#define YYFAIL goto yyerrlab 809#define YYFAIL goto yyerrlab
810#if defined YYFAIL
811 /* This is here to suppress warnings from the GCC cpp's
812 -Wunused-macros. Normally we don't worry about that warning, but
813 some users do, and we want to make it easy for users to remove
814 YYFAIL uses, which will produce warnings from Bison 2.5. */
815#endif
812 816
813#define YYRECOVERING() (!!yyerrstatus) 817#define YYRECOVERING() (!!yyerrstatus)
814 818
@@ -865,7 +869,7 @@ while (YYID (0))
865 we won't break user code: when these are the locations we know. */ 869 we won't break user code: when these are the locations we know. */
866 870
867#ifndef YY_LOCATION_PRINT 871#ifndef YY_LOCATION_PRINT
868# if YYLTYPE_IS_TRIVIAL 872# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
869# define YY_LOCATION_PRINT(File, Loc) \ 873# define YY_LOCATION_PRINT(File, Loc) \
870 fprintf (File, "%d.%d-%d.%d", \ 874 fprintf (File, "%d.%d-%d.%d", \
871 (Loc).first_line, (Loc).first_column, \ 875 (Loc).first_line, (Loc).first_column, \
@@ -1753,7 +1757,7 @@ yyreduce:
1753 case 48: 1757 case 48:
1754 1758
1755 { 1759 {
1756 struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string))); 1760 const struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
1757 if (id && id->flags & TF_OPTION) 1761 if (id && id->flags & TF_OPTION)
1758 menu_add_option(id->token, (yyvsp[(3) - (3)].string)); 1762 menu_add_option(id->token, (yyvsp[(3) - (3)].string));
1759 else 1763 else
@@ -2258,10 +2262,8 @@ void conf_parse(const char *name)
2258 modules_sym->flags |= SYMBOL_AUTO; 2262 modules_sym->flags |= SYMBOL_AUTO;
2259 rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); 2263 rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
2260 2264
2261#if YYDEBUG
2262 if (getenv("ZCONF_DEBUG")) 2265 if (getenv("ZCONF_DEBUG"))
2263 zconfdebug = 1; 2266 zconfdebug = 1;
2264#endif
2265 zconfparse(); 2267 zconfparse();
2266 if (zconfnerrs) 2268 if (zconfnerrs)
2267 exit(1); 2269 exit(1);
@@ -2300,7 +2302,7 @@ static const char *zconf_tokenname(int token)
2300 return "<token>"; 2302 return "<token>";
2301} 2303}
2302 2304
2303static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken) 2305static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken)
2304{ 2306{
2305 if (id->token != endtoken) { 2307 if (id->token != endtoken) {
2306 zconf_error("unexpected '%s' within %s block", 2308 zconf_error("unexpected '%s' within %s block",
@@ -2345,9 +2347,7 @@ static void zconf_error(const char *err, ...)
2345 2347
2346static void zconferror(const char *err) 2348static void zconferror(const char *err)
2347{ 2349{
2348#if YYDEBUG
2349 fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); 2350 fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
2350#endif
2351} 2351}
2352 2352
2353static void print_quoted_string(FILE *out, const char *str) 2353static void print_quoted_string(FILE *out, const char *str)
@@ -2496,7 +2496,7 @@ void zconfdump(FILE *out)
2496 } 2496 }
2497} 2497}
2498 2498
2499#include "lex.zconf.c" 2499#include "zconf.lex.c"
2500#include "util.c" 2500#include "util.c"
2501#include "confdata.c" 2501#include "confdata.c"
2502#include "expr.c" 2502#include "expr.c"
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 49fb4ab664c3..c38cc5aa8ed1 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -25,16 +25,12 @@ extern int zconflex(void);
25static void zconfprint(const char *err, ...); 25static void zconfprint(const char *err, ...);
26static void zconf_error(const char *err, ...); 26static void zconf_error(const char *err, ...);
27static void zconferror(const char *err); 27static void zconferror(const char *err);
28static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); 28static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
29 29
30struct symbol *symbol_hash[SYMBOL_HASHSIZE]; 30struct symbol *symbol_hash[SYMBOL_HASHSIZE];
31 31
32static struct menu *current_menu, *current_entry; 32static struct menu *current_menu, *current_entry;
33 33
34#define YYDEBUG 0
35#if YYDEBUG
36#define YYERROR_VERBOSE
37#endif
38%} 34%}
39%expect 30 35%expect 30
40 36
@@ -45,7 +41,7 @@ static struct menu *current_menu, *current_entry;
45 struct symbol *symbol; 41 struct symbol *symbol;
46 struct expr *expr; 42 struct expr *expr;
47 struct menu *menu; 43 struct menu *menu;
48 struct kconf_id *id; 44 const struct kconf_id *id;
49} 45}
50 46
51%token <id>T_MAINMENU 47%token <id>T_MAINMENU
@@ -229,7 +225,7 @@ symbol_option_list:
229 /* empty */ 225 /* empty */
230 | symbol_option_list T_WORD symbol_option_arg 226 | symbol_option_list T_WORD symbol_option_arg
231{ 227{
232 struct kconf_id *id = kconf_id_lookup($2, strlen($2)); 228 const struct kconf_id *id = kconf_id_lookup($2, strlen($2));
233 if (id && id->flags & TF_OPTION) 229 if (id && id->flags & TF_OPTION)
234 menu_add_option(id->token, $3); 230 menu_add_option(id->token, $3);
235 else 231 else
@@ -503,10 +499,8 @@ void conf_parse(const char *name)
503 modules_sym->flags |= SYMBOL_AUTO; 499 modules_sym->flags |= SYMBOL_AUTO;
504 rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); 500 rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
505 501
506#if YYDEBUG
507 if (getenv("ZCONF_DEBUG")) 502 if (getenv("ZCONF_DEBUG"))
508 zconfdebug = 1; 503 zconfdebug = 1;
509#endif
510 zconfparse(); 504 zconfparse();
511 if (zconfnerrs) 505 if (zconfnerrs)
512 exit(1); 506 exit(1);
@@ -545,7 +539,7 @@ static const char *zconf_tokenname(int token)
545 return "<token>"; 539 return "<token>";
546} 540}
547 541
548static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken) 542static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken)
549{ 543{
550 if (id->token != endtoken) { 544 if (id->token != endtoken) {
551 zconf_error("unexpected '%s' within %s block", 545 zconf_error("unexpected '%s' within %s block",
@@ -590,9 +584,7 @@ static void zconf_error(const char *err, ...)
590 584
591static void zconferror(const char *err) 585static void zconferror(const char *err)
592{ 586{
593#if YYDEBUG
594 fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); 587 fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
595#endif
596} 588}
597 589
598static void print_quoted_string(FILE *out, const char *str) 590static void print_quoted_string(FILE *out, const char *str)
@@ -741,7 +733,7 @@ void zconfdump(FILE *out)
741 } 733 }
742} 734}
743 735
744#include "lex.zconf.c" 736#include "zconf.lex.c"
745#include "util.c" 737#include "util.c"
746#include "confdata.c" 738#include "confdata.c"
747#include "expr.c" 739#include "expr.c"