aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-09 01:12:44 -0400
committerSam Ravnborg <sam@mars.ravnborg.org>2006-06-09 01:31:30 -0400
commitf6a88aa86027bdecfc74ef7c6bf6c68233e86bb3 (patch)
tree524a366add362ffae3fa550fd822293ffd84984e
parentf1d28fb043b325dad8944647a52b20287e59d8a1 (diff)
kconfig: add symbol option config syntax
This adds the general framework to the parser to define options for config symbols with a syntax like: config FOO option bar[="arg"] Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r--scripts/kconfig/lex.zconf.c_shipped91
-rw-r--r--scripts/kconfig/lkc.h5
-rw-r--r--scripts/kconfig/menu.c4
-rw-r--r--scripts/kconfig/zconf.gperf3
-rw-r--r--scripts/kconfig/zconf.hash.c_shipped181
-rw-r--r--scripts/kconfig/zconf.tab.c_shipped920
-rw-r--r--scripts/kconfig/zconf.y23
7 files changed, 735 insertions, 492 deletions
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped
index 24e3c8cbb7ac..800f8c71c407 100644
--- a/scripts/kconfig/lex.zconf.c_shipped
+++ b/scripts/kconfig/lex.zconf.c_shipped
@@ -8,7 +8,7 @@
8#define FLEX_SCANNER 8#define FLEX_SCANNER
9#define YY_FLEX_MAJOR_VERSION 2 9#define YY_FLEX_MAJOR_VERSION 2
10#define YY_FLEX_MINOR_VERSION 5 10#define YY_FLEX_MINOR_VERSION 5
11#define YY_FLEX_SUBMINOR_VERSION 31 11#define YY_FLEX_SUBMINOR_VERSION 33
12#if YY_FLEX_SUBMINOR_VERSION > 0 12#if YY_FLEX_SUBMINOR_VERSION > 0
13#define FLEX_BETA 13#define FLEX_BETA
14#endif 14#endif
@@ -30,7 +30,15 @@
30 30
31/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 31/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32 32
33#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L 33#if __STDC_VERSION__ >= 199901L
34
35/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
37 */
38#ifndef __STDC_LIMIT_MACROS
39#define __STDC_LIMIT_MACROS 1
40#endif
41
34#include <inttypes.h> 42#include <inttypes.h>
35typedef int8_t flex_int8_t; 43typedef int8_t flex_int8_t;
36typedef uint8_t flex_uint8_t; 44typedef uint8_t flex_uint8_t;
@@ -134,6 +142,10 @@ typedef unsigned int flex_uint32_t;
134#define YY_BUF_SIZE 16384 142#define YY_BUF_SIZE 16384
135#endif 143#endif
136 144
145/* The state buf must be large enough to hold one state per character in the main buffer.
146 */
147#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
148
137#ifndef YY_TYPEDEF_YY_BUFFER_STATE 149#ifndef YY_TYPEDEF_YY_BUFFER_STATE
138#define YY_TYPEDEF_YY_BUFFER_STATE 150#define YY_TYPEDEF_YY_BUFFER_STATE
139typedef struct yy_buffer_state *YY_BUFFER_STATE; 151typedef struct yy_buffer_state *YY_BUFFER_STATE;
@@ -267,7 +279,7 @@ int zconfleng;
267 279
268/* Points to current character in buffer. */ 280/* Points to current character in buffer. */
269static char *yy_c_buf_p = (char *) 0; 281static char *yy_c_buf_p = (char *) 0;
270static int yy_init = 1; /* whether we need to initialize */ 282static int yy_init = 0; /* whether we need to initialize */
271static int yy_start = 0; /* start state number */ 283static int yy_start = 0; /* start state number */
272 284
273/* Flag which is used to allow zconfwrap()'s to do buffer switches 285/* Flag which is used to allow zconfwrap()'s to do buffer switches
@@ -820,6 +832,8 @@ void alloc_string(const char *str, int size)
820#define YY_EXTRA_TYPE void * 832#define YY_EXTRA_TYPE void *
821#endif 833#endif
822 834
835static int yy_init_globals (void );
836
823/* Macros after this point can all be overridden by user definitions in 837/* Macros after this point can all be overridden by user definitions in
824 * section 1. 838 * section 1.
825 */ 839 */
@@ -942,9 +956,9 @@ YY_DECL
942 int str = 0; 956 int str = 0;
943 int ts, i; 957 int ts, i;
944 958
945 if ( (yy_init) ) 959 if ( !(yy_init) )
946 { 960 {
947 (yy_init) = 0; 961 (yy_init) = 1;
948 962
949#ifdef YY_USER_INIT 963#ifdef YY_USER_INIT
950 YY_USER_INIT; 964 YY_USER_INIT;
@@ -1452,7 +1466,7 @@ static int yy_get_next_buffer (void)
1452 1466
1453 else 1467 else
1454 { 1468 {
1455 size_t num_to_read = 1469 int num_to_read =
1456 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 1470 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1457 1471
1458 while ( num_to_read <= 0 ) 1472 while ( num_to_read <= 0 )
@@ -1969,16 +1983,16 @@ YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
1969 1983
1970/** Setup the input buffer state to scan a string. The next call to zconflex() will 1984/** Setup the input buffer state to scan a string. The next call to zconflex() will
1971 * scan from a @e copy of @a str. 1985 * scan from a @e copy of @a str.
1972 * @param yy_str a NUL-terminated string to scan 1986 * @param yystr a NUL-terminated string to scan
1973 * 1987 *
1974 * @return the newly allocated buffer state object. 1988 * @return the newly allocated buffer state object.
1975 * @note If you want to scan bytes that may contain NUL values, then use 1989 * @note If you want to scan bytes that may contain NUL values, then use
1976 * zconf_scan_bytes() instead. 1990 * zconf_scan_bytes() instead.
1977 */ 1991 */
1978YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str ) 1992YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
1979{ 1993{
1980 1994
1981 return zconf_scan_bytes(yy_str,strlen(yy_str) ); 1995 return zconf_scan_bytes(yystr,strlen(yystr) );
1982} 1996}
1983 1997
1984/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will 1998/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
@@ -1988,7 +2002,7 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str )
1988 * 2002 *
1989 * @return the newly allocated buffer state object. 2003 * @return the newly allocated buffer state object.
1990 */ 2004 */
1991YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) 2005YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len )
1992{ 2006{
1993 YY_BUFFER_STATE b; 2007 YY_BUFFER_STATE b;
1994 char *buf; 2008 char *buf;
@@ -1996,15 +2010,15 @@ YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len )
1996 int i; 2010 int i;
1997 2011
1998 /* Get memory for full buffer, including space for trailing EOB's. */ 2012 /* Get memory for full buffer, including space for trailing EOB's. */
1999 n = len + 2; 2013 n = _yybytes_len + 2;
2000 buf = (char *) zconfalloc(n ); 2014 buf = (char *) zconfalloc(n );
2001 if ( ! buf ) 2015 if ( ! buf )
2002 YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" ); 2016 YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );
2003 2017
2004 for ( i = 0; i < len; ++i ) 2018 for ( i = 0; i < _yybytes_len; ++i )
2005 buf[i] = bytes[i]; 2019 buf[i] = yybytes[i];
2006 2020
2007 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 2021 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2008 2022
2009 b = zconf_scan_buffer(buf,n ); 2023 b = zconf_scan_buffer(buf,n );
2010 if ( ! b ) 2024 if ( ! b )
@@ -2125,6 +2139,34 @@ void zconfset_debug (int bdebug )
2125 zconf_flex_debug = bdebug ; 2139 zconf_flex_debug = bdebug ;
2126} 2140}
2127 2141
2142static int yy_init_globals (void)
2143{
2144 /* Initialization is the same as for the non-reentrant scanner.
2145 * This function is called from zconflex_destroy(), so don't allocate here.
2146 */
2147
2148 (yy_buffer_stack) = 0;
2149 (yy_buffer_stack_top) = 0;
2150 (yy_buffer_stack_max) = 0;
2151 (yy_c_buf_p) = (char *) 0;
2152 (yy_init) = 0;
2153 (yy_start) = 0;
2154
2155/* Defined in main.c */
2156#ifdef YY_STDINIT
2157 zconfin = stdin;
2158 zconfout = stdout;
2159#else
2160 zconfin = (FILE *) 0;
2161 zconfout = (FILE *) 0;
2162#endif
2163
2164 /* For future reference: Set errno on error, since we are called by
2165 * zconflex_init()
2166 */
2167 return 0;
2168}
2169
2128/* zconflex_destroy is for both reentrant and non-reentrant scanners. */ 2170/* zconflex_destroy is for both reentrant and non-reentrant scanners. */
2129int zconflex_destroy (void) 2171int zconflex_destroy (void)
2130{ 2172{
@@ -2140,6 +2182,10 @@ int zconflex_destroy (void)
2140 zconffree((yy_buffer_stack) ); 2182 zconffree((yy_buffer_stack) );
2141 (yy_buffer_stack) = NULL; 2183 (yy_buffer_stack) = NULL;
2142 2184
2185 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2186 * zconflex() is called, initialization will occur. */
2187 yy_init_globals( );
2188
2143 return 0; 2189 return 0;
2144} 2190}
2145 2191
@@ -2151,7 +2197,7 @@ int zconflex_destroy (void)
2151static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 2197static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2152{ 2198{
2153 register int i; 2199 register int i;
2154 for ( i = 0; i < n; ++i ) 2200 for ( i = 0; i < n; ++i )
2155 s1[i] = s2[i]; 2201 s1[i] = s2[i];
2156} 2202}
2157#endif 2203#endif
@@ -2160,7 +2206,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2160static int yy_flex_strlen (yyconst char * s ) 2206static int yy_flex_strlen (yyconst char * s )
2161{ 2207{
2162 register int n; 2208 register int n;
2163 for ( n = 0; s[n]; ++n ) 2209 for ( n = 0; s[n]; ++n )
2164 ; 2210 ;
2165 2211
2166 return n; 2212 return n;
@@ -2191,19 +2237,6 @@ void zconffree (void * ptr )
2191 2237
2192#define YYTABLES_NAME "yytables" 2238#define YYTABLES_NAME "yytables"
2193 2239
2194#undef YY_NEW_FILE
2195#undef YY_FLUSH_BUFFER
2196#undef yy_set_bol
2197#undef yy_new_buffer
2198#undef yy_set_interactive
2199#undef yytext_ptr
2200#undef YY_DO_BEFORE_ACTION
2201
2202#ifdef YY_DECL_IS_OURS
2203#undef YY_DECL_IS_OURS
2204#undef YY_DECL
2205#endif
2206
2207void zconf_starthelp(void) 2240void zconf_starthelp(void)
2208{ 2241{
2209 new_string(); 2242 new_string();
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 52c296e0440e..8e89d342889e 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -40,6 +40,10 @@ extern "C" {
40 40
41#define TF_COMMAND 0x0001 41#define TF_COMMAND 0x0001
42#define TF_PARAM 0x0002 42#define TF_PARAM 0x0002
43#define TF_OPTION 0x0004
44
45#define T_OPT_MODULES 1
46#define T_OPT_DEFCONFIG_LIST 2
43 47
44struct kconf_id { 48struct kconf_id {
45 int name; 49 int name;
@@ -78,6 +82,7 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
78struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); 82struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
79void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); 83void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
80void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); 84void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
85void menu_add_option(int token, char *arg);
81void menu_finalize(struct menu *parent); 86void menu_finalize(struct menu *parent);
82void menu_set_type(int type); 87void menu_set_type(int type);
83 88
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 0fce20cb7f3c..151ef2168a2c 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -152,6 +152,10 @@ void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep)
152 menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); 152 menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep);
153} 153}
154 154
155void menu_add_option(int token, char *arg)
156{
157}
158
155static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2) 159static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2)
156{ 160{
157 return sym2->type == S_INT || sym2->type == S_HEX || 161 return sym2->type == S_INT || sym2->type == S_HEX ||
diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf
index b03220600b3a..9b44c80dd899 100644
--- a/scripts/kconfig/zconf.gperf
+++ b/scripts/kconfig/zconf.gperf
@@ -39,5 +39,8 @@ string, T_TYPE, TF_COMMAND, S_STRING
39select, T_SELECT, TF_COMMAND 39select, T_SELECT, TF_COMMAND
40enable, T_SELECT, TF_COMMAND 40enable, T_SELECT, TF_COMMAND
41range, T_RANGE, TF_COMMAND 41range, T_RANGE, TF_COMMAND
42option, T_OPTION, TF_COMMAND
42on, T_ON, TF_PARAM 43on, T_ON, TF_PARAM
44modules, T_OPT_MODULES, TF_OPTION
45defconfig_list, T_OPT_DEFCONFIG_LIST,TF_OPTION
43%% 46%%
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped
index 345f0fc07ca3..47c8b5babf34 100644
--- a/scripts/kconfig/zconf.hash.c_shipped
+++ b/scripts/kconfig/zconf.hash.c_shipped
@@ -53,10 +53,10 @@ kconf_id_hash (register const char *str, register unsigned int len)
53 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 53 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
54 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 54 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
55 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 55 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
56 47, 47, 47, 47, 47, 47, 47, 25, 10, 15, 56 47, 47, 47, 47, 47, 47, 47, 25, 30, 15,
57 0, 0, 5, 47, 0, 0, 47, 47, 0, 10, 57 0, 15, 0, 47, 5, 15, 47, 47, 30, 20,
58 0, 20, 20, 20, 5, 0, 0, 20, 47, 47, 58 5, 0, 25, 15, 0, 0, 10, 35, 47, 47,
59 20, 47, 47, 47, 47, 47, 47, 47, 47, 47, 59 5, 47, 47, 47, 47, 47, 47, 47, 47, 47,
60 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 60 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
61 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 61 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
62 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 62 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
@@ -88,69 +88,75 @@ kconf_id_hash (register const char *str, register unsigned int len)
88 88
89struct kconf_id_strings_t 89struct kconf_id_strings_t
90 { 90 {
91 char kconf_id_strings_str2[sizeof("if")]; 91 char kconf_id_strings_str2[sizeof("on")];
92 char kconf_id_strings_str3[sizeof("int")]; 92 char kconf_id_strings_str6[sizeof("string")];
93 char kconf_id_strings_str4[sizeof("help")]; 93 char kconf_id_strings_str7[sizeof("default")];
94 char kconf_id_strings_str5[sizeof("endif")]; 94 char kconf_id_strings_str8[sizeof("def_bool")];
95 char kconf_id_strings_str6[sizeof("select")];
96 char kconf_id_strings_str7[sizeof("endmenu")];
97 char kconf_id_strings_str8[sizeof("tristate")];
98 char kconf_id_strings_str9[sizeof("endchoice")];
99 char kconf_id_strings_str10[sizeof("range")]; 95 char kconf_id_strings_str10[sizeof("range")];
100 char kconf_id_strings_str11[sizeof("string")]; 96 char kconf_id_strings_str11[sizeof("def_boolean")];
101 char kconf_id_strings_str12[sizeof("default")]; 97 char kconf_id_strings_str12[sizeof("def_tristate")];
102 char kconf_id_strings_str13[sizeof("def_bool")]; 98 char kconf_id_strings_str13[sizeof("hex")];
103 char kconf_id_strings_str14[sizeof("menu")]; 99 char kconf_id_strings_str14[sizeof("defconfig_list")];
104 char kconf_id_strings_str16[sizeof("def_boolean")]; 100 char kconf_id_strings_str16[sizeof("option")];
105 char kconf_id_strings_str17[sizeof("def_tristate")]; 101 char kconf_id_strings_str17[sizeof("if")];
106 char kconf_id_strings_str18[sizeof("mainmenu")]; 102 char kconf_id_strings_str18[sizeof("optional")];
107 char kconf_id_strings_str20[sizeof("menuconfig")]; 103 char kconf_id_strings_str20[sizeof("endif")];
108 char kconf_id_strings_str21[sizeof("config")]; 104 char kconf_id_strings_str21[sizeof("choice")];
109 char kconf_id_strings_str22[sizeof("on")]; 105 char kconf_id_strings_str22[sizeof("endmenu")];
110 char kconf_id_strings_str23[sizeof("hex")]; 106 char kconf_id_strings_str23[sizeof("requires")];
111 char kconf_id_strings_str26[sizeof("source")]; 107 char kconf_id_strings_str24[sizeof("endchoice")];
112 char kconf_id_strings_str27[sizeof("depends")]; 108 char kconf_id_strings_str26[sizeof("config")];
113 char kconf_id_strings_str28[sizeof("optional")]; 109 char kconf_id_strings_str27[sizeof("modules")];
114 char kconf_id_strings_str31[sizeof("enable")]; 110 char kconf_id_strings_str28[sizeof("int")];
115 char kconf_id_strings_str32[sizeof("comment")]; 111 char kconf_id_strings_str29[sizeof("menu")];
116 char kconf_id_strings_str33[sizeof("requires")]; 112 char kconf_id_strings_str31[sizeof("prompt")];
113 char kconf_id_strings_str32[sizeof("depends")];
114 char kconf_id_strings_str33[sizeof("tristate")];
117 char kconf_id_strings_str34[sizeof("bool")]; 115 char kconf_id_strings_str34[sizeof("bool")];
116 char kconf_id_strings_str35[sizeof("menuconfig")];
117 char kconf_id_strings_str36[sizeof("select")];
118 char kconf_id_strings_str37[sizeof("boolean")]; 118 char kconf_id_strings_str37[sizeof("boolean")];
119 char kconf_id_strings_str41[sizeof("choice")]; 119 char kconf_id_strings_str39[sizeof("help")];
120 char kconf_id_strings_str46[sizeof("prompt")]; 120 char kconf_id_strings_str41[sizeof("source")];
121 char kconf_id_strings_str42[sizeof("comment")];
122 char kconf_id_strings_str43[sizeof("mainmenu")];
123 char kconf_id_strings_str46[sizeof("enable")];
121 }; 124 };
122static struct kconf_id_strings_t kconf_id_strings_contents = 125static struct kconf_id_strings_t kconf_id_strings_contents =
123 { 126 {
124 "if", 127 "on",
125 "int",
126 "help",
127 "endif",
128 "select",
129 "endmenu",
130 "tristate",
131 "endchoice",
132 "range",
133 "string", 128 "string",
134 "default", 129 "default",
135 "def_bool", 130 "def_bool",
136 "menu", 131 "range",
137 "def_boolean", 132 "def_boolean",
138 "def_tristate", 133 "def_tristate",
139 "mainmenu",
140 "menuconfig",
141 "config",
142 "on",
143 "hex", 134 "hex",
144 "source", 135 "defconfig_list",
145 "depends", 136 "option",
137 "if",
146 "optional", 138 "optional",
147 "enable", 139 "endif",
148 "comment", 140 "choice",
141 "endmenu",
149 "requires", 142 "requires",
143 "endchoice",
144 "config",
145 "modules",
146 "int",
147 "menu",
148 "prompt",
149 "depends",
150 "tristate",
150 "bool", 151 "bool",
152 "menuconfig",
153 "select",
151 "boolean", 154 "boolean",
152 "choice", 155 "help",
153 "prompt" 156 "source",
157 "comment",
158 "mainmenu",
159 "enable"
154 }; 160 };
155#define kconf_id_strings ((const char *) &kconf_id_strings_contents) 161#define kconf_id_strings ((const char *) &kconf_id_strings_contents)
156#ifdef __GNUC__ 162#ifdef __GNUC__
@@ -161,9 +167,9 @@ kconf_id_lookup (register const char *str, register unsigned int len)
161{ 167{
162 enum 168 enum
163 { 169 {
164 TOTAL_KEYWORDS = 30, 170 TOTAL_KEYWORDS = 33,
165 MIN_WORD_LENGTH = 2, 171 MIN_WORD_LENGTH = 2,
166 MAX_WORD_LENGTH = 12, 172 MAX_WORD_LENGTH = 14,
167 MIN_HASH_VALUE = 2, 173 MIN_HASH_VALUE = 2,
168 MAX_HASH_VALUE = 46 174 MAX_HASH_VALUE = 46
169 }; 175 };
@@ -171,43 +177,48 @@ kconf_id_lookup (register const char *str, register unsigned int len)
171 static struct kconf_id wordlist[] = 177 static struct kconf_id wordlist[] =
172 { 178 {
173 {-1}, {-1}, 179 {-1}, {-1},
174 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM}, 180 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM},
175 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT}, 181 {-1}, {-1}, {-1},
176 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str4, T_HELP, TF_COMMAND}, 182 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_TYPE, TF_COMMAND, S_STRING},
177 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND}, 183 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
178 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_SELECT, TF_COMMAND}, 184 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
179 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND}, 185 {-1},
180 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE},
181 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND},
182 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND}, 186 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND},
183 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_TYPE, TF_COMMAND, S_STRING}, 187 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
184 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, 188 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE},
185 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, 189 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_TYPE, TF_COMMAND, S_HEX},
186 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_MENU, TF_COMMAND}, 190 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
187 {-1}, 191 {-1},
188 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, 192 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_OPTION, TF_COMMAND},
189 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE}, 193 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_IF, TF_COMMAND|TF_PARAM},
190 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_MAINMENU, TF_COMMAND}, 194 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
191 {-1}, 195 {-1},
192 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_MENUCONFIG, TF_COMMAND}, 196 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_ENDIF, TF_COMMAND},
193 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CONFIG, TF_COMMAND}, 197 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CHOICE, TF_COMMAND},
194 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ON, TF_PARAM}, 198 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND},
195 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_HEX}, 199 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_REQUIRES, TF_COMMAND},
196 {-1}, {-1}, 200 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str24, T_ENDCHOICE, TF_COMMAND},
197 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SOURCE, TF_COMMAND}, 201 {-1},
198 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_DEPENDS, TF_COMMAND}, 202 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_CONFIG, TF_COMMAND},
199 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPTIONAL, TF_COMMAND}, 203 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
200 {-1}, {-1}, 204 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_INT},
201 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND}, 205 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
202 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, 206 {-1},
203 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_REQUIRES, TF_COMMAND}, 207 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_PROMPT, TF_COMMAND},
208 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_DEPENDS, TF_COMMAND},
209 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_TYPE, TF_COMMAND, S_TRISTATE},
204 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str34, T_TYPE, TF_COMMAND, S_BOOLEAN}, 210 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str34, T_TYPE, TF_COMMAND, S_BOOLEAN},
205 {-1}, {-1}, 211 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND},
212 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_SELECT, TF_COMMAND},
206 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN}, 213 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN},
207 {-1}, {-1}, {-1}, 214 {-1},
208 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_CHOICE, TF_COMMAND}, 215 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_HELP, TF_COMMAND},
209 {-1}, {-1}, {-1}, {-1}, 216 {-1},
210 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_PROMPT, TF_COMMAND} 217 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND},
218 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_COMMENT, TF_COMMAND},
219 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_MAINMENU, TF_COMMAND},
220 {-1}, {-1},
221 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND}
211 }; 222 };
212 223
213 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) 224 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index ea7755da82f5..137426e507ec 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1,7 +1,7 @@
1/* A Bison parser, made by GNU Bison 2.0. */ 1/* A Bison parser, made by GNU Bison 2.1. */
2 2
3/* Skeleton parser for Yacc-like parsing with Bison, 3/* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, 18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02111-1307, USA. */ 19 Boston, MA 02110-1301, USA. */
20 20
21/* As a special exception, when this file is copied by Bison into a 21/* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction. 22 Bison output file, you may use that output file without restriction.
@@ -36,6 +36,9 @@
36/* Identify Bison output. */ 36/* Identify Bison output. */
37#define YYBISON 1 37#define YYBISON 1
38 38
39/* Bison version. */
40#define YYBISON_VERSION "2.1"
41
39/* Skeleton name. */ 42/* Skeleton name. */
40#define YYSKELETON_NAME "yacc.c" 43#define YYSKELETON_NAME "yacc.c"
41 44
@@ -82,19 +85,21 @@
82 T_DEFAULT = 276, 85 T_DEFAULT = 276,
83 T_SELECT = 277, 86 T_SELECT = 277,
84 T_RANGE = 278, 87 T_RANGE = 278,
85 T_ON = 279, 88 T_OPTION = 279,
86 T_WORD = 280, 89 T_ON = 280,
87 T_WORD_QUOTE = 281, 90 T_WORD = 281,
88 T_UNEQUAL = 282, 91 T_WORD_QUOTE = 282,
89 T_CLOSE_PAREN = 283, 92 T_UNEQUAL = 283,
90 T_OPEN_PAREN = 284, 93 T_CLOSE_PAREN = 284,
91 T_EOL = 285, 94 T_OPEN_PAREN = 285,
92 T_OR = 286, 95 T_EOL = 286,
93 T_AND = 287, 96 T_OR = 287,
94 T_EQUAL = 288, 97 T_AND = 288,
95 T_NOT = 289 98 T_EQUAL = 289,
99 T_NOT = 290
96 }; 100 };
97#endif 101#endif
102/* Tokens. */
98#define T_MAINMENU 258 103#define T_MAINMENU 258
99#define T_MENU 259 104#define T_MENU 259
100#define T_ENDMENU 260 105#define T_ENDMENU 260
@@ -116,17 +121,18 @@
116#define T_DEFAULT 276 121#define T_DEFAULT 276
117#define T_SELECT 277 122#define T_SELECT 277
118#define T_RANGE 278 123#define T_RANGE 278
119#define T_ON 279 124#define T_OPTION 279
120#define T_WORD 280 125#define T_ON 280
121#define T_WORD_QUOTE 281 126#define T_WORD 281
122#define T_UNEQUAL 282 127#define T_WORD_QUOTE 282
123#define T_CLOSE_PAREN 283 128#define T_UNEQUAL 283
124#define T_OPEN_PAREN 284 129#define T_CLOSE_PAREN 284
125#define T_EOL 285 130#define T_OPEN_PAREN 285
126#define T_OR 286 131#define T_EOL 286
127#define T_AND 287 132#define T_OR 287
128#define T_EQUAL 288 133#define T_AND 288
129#define T_NOT 289 134#define T_EQUAL 289
135#define T_NOT 290
130 136
131 137
132 138
@@ -187,6 +193,11 @@ static struct menu *current_menu, *current_entry;
187# define YYERROR_VERBOSE 0 193# define YYERROR_VERBOSE 0
188#endif 194#endif
189 195
196/* Enabling the token table. */
197#ifndef YYTOKEN_TABLE
198# define YYTOKEN_TABLE 0
199#endif
200
190#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 201#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
191 202
192typedef union YYSTYPE { 203typedef union YYSTYPE {
@@ -197,7 +208,7 @@ typedef union YYSTYPE {
197 struct menu *menu; 208 struct menu *menu;
198 struct kconf_id *id; 209 struct kconf_id *id;
199} YYSTYPE; 210} YYSTYPE;
200/* Line 190 of yacc.c. */ 211/* Line 196 of yacc.c. */
201 212
202# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 213# define yystype YYSTYPE /* obsolescent; will be withdrawn */
203# define YYSTYPE_IS_DECLARED 1 214# define YYSTYPE_IS_DECLARED 1
@@ -209,17 +220,36 @@ typedef union YYSTYPE {
209/* Copy the second part of user declarations. */ 220/* Copy the second part of user declarations. */
210 221
211 222
212/* Line 213 of yacc.c. */ 223/* Line 219 of yacc.c. */
213 224
214 225
215#if ! defined (yyoverflow) || YYERROR_VERBOSE 226#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
227# define YYSIZE_T __SIZE_TYPE__
228#endif
229#if ! defined (YYSIZE_T) && defined (size_t)
230# define YYSIZE_T size_t
231#endif
232#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
233# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
234# define YYSIZE_T size_t
235#endif
236#if ! defined (YYSIZE_T)
237# define YYSIZE_T unsigned int
238#endif
216 239
217# ifndef YYFREE 240#ifndef YY_
218# define YYFREE free 241# if YYENABLE_NLS
242# if ENABLE_NLS
243# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
244# define YY_(msgid) dgettext ("bison-runtime", msgid)
245# endif
219# endif 246# endif
220# ifndef YYMALLOC 247# ifndef YY_
221# define YYMALLOC malloc 248# define YY_(msgid) msgid
222# endif 249# endif
250#endif
251
252#if ! defined (yyoverflow) || YYERROR_VERBOSE
223 253
224/* The parser invokes alloca or malloc; define the necessary symbols. */ 254/* The parser invokes alloca or malloc; define the necessary symbols. */
225 255
@@ -229,6 +259,10 @@ typedef union YYSTYPE {
229# define YYSTACK_ALLOC __builtin_alloca 259# define YYSTACK_ALLOC __builtin_alloca
230# else 260# else
231# define YYSTACK_ALLOC alloca 261# define YYSTACK_ALLOC alloca
262# if defined (__STDC__) || defined (__cplusplus)
263# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
264# define YYINCLUDED_STDLIB_H
265# endif
232# endif 266# endif
233# endif 267# endif
234# endif 268# endif
@@ -236,13 +270,39 @@ typedef union YYSTYPE {
236# ifdef YYSTACK_ALLOC 270# ifdef YYSTACK_ALLOC
237 /* Pacify GCC's `empty if-body' warning. */ 271 /* Pacify GCC's `empty if-body' warning. */
238# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 272# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
239# else 273# ifndef YYSTACK_ALLOC_MAXIMUM
240# if defined (__STDC__) || defined (__cplusplus) 274 /* The OS might guarantee only one guard page at the bottom of the stack,
241# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 275 and a page size can be as small as 4096 bytes. So we cannot safely
242# define YYSIZE_T size_t 276 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
277 to allow for a few compiler-allocated temporary stack slots. */
278# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
243# endif 279# endif
280# else
244# define YYSTACK_ALLOC YYMALLOC 281# define YYSTACK_ALLOC YYMALLOC
245# define YYSTACK_FREE YYFREE 282# define YYSTACK_FREE YYFREE
283# ifndef YYSTACK_ALLOC_MAXIMUM
284# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
285# endif
286# ifdef __cplusplus
287extern "C" {
288# endif
289# ifndef YYMALLOC
290# define YYMALLOC malloc
291# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
292 && (defined (__STDC__) || defined (__cplusplus)))
293void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
294# endif
295# endif
296# ifndef YYFREE
297# define YYFREE free
298# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
299 && (defined (__STDC__) || defined (__cplusplus)))
300void free (void *); /* INFRINGES ON USER NAME SPACE */
301# endif
302# endif
303# ifdef __cplusplus
304}
305# endif
246# endif 306# endif
247#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ 307#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
248 308
@@ -277,7 +337,7 @@ union yyalloc
277# define YYCOPY(To, From, Count) \ 337# define YYCOPY(To, From, Count) \
278 do \ 338 do \
279 { \ 339 { \
280 register YYSIZE_T yyi; \ 340 YYSIZE_T yyi; \
281 for (yyi = 0; yyi < (Count); yyi++) \ 341 for (yyi = 0; yyi < (Count); yyi++) \
282 (To)[yyi] = (From)[yyi]; \ 342 (To)[yyi] = (From)[yyi]; \
283 } \ 343 } \
@@ -312,22 +372,22 @@ union yyalloc
312/* YYFINAL -- State number of the termination state. */ 372/* YYFINAL -- State number of the termination state. */
313#define YYFINAL 3 373#define YYFINAL 3
314/* YYLAST -- Last index in YYTABLE. */ 374/* YYLAST -- Last index in YYTABLE. */
315#define YYLAST 264 375#define YYLAST 275
316 376
317/* YYNTOKENS -- Number of terminals. */ 377/* YYNTOKENS -- Number of terminals. */
318#define YYNTOKENS 35 378#define YYNTOKENS 36
319/* YYNNTS -- Number of nonterminals. */ 379/* YYNNTS -- Number of nonterminals. */
320#define YYNNTS 42 380#define YYNNTS 45
321/* YYNRULES -- Number of rules. */ 381/* YYNRULES -- Number of rules. */
322#define YYNRULES 104 382#define YYNRULES 110
323/* YYNRULES -- Number of states. */ 383/* YYNRULES -- Number of states. */
324#define YYNSTATES 175 384#define YYNSTATES 183
325 385
326/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 386/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
327#define YYUNDEFTOK 2 387#define YYUNDEFTOK 2
328#define YYMAXUTOK 289 388#define YYMAXUTOK 290
329 389
330#define YYTRANSLATE(YYX) \ 390#define YYTRANSLATE(YYX) \
331 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 391 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
332 392
333/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 393/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
@@ -361,7 +421,8 @@ static const unsigned char yytranslate[] =
361 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 421 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
362 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 422 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
363 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 423 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
364 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 424 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
425 35
365}; 426};
366 427
367#if YYDEBUG 428#if YYDEBUG
@@ -372,72 +433,75 @@ static const unsigned short int yyprhs[] =
372 0, 0, 3, 5, 6, 9, 12, 15, 20, 23, 433 0, 0, 3, 5, 6, 9, 12, 15, 20, 23,
373 28, 33, 37, 39, 41, 43, 45, 47, 49, 51, 434 28, 33, 37, 39, 41, 43, 45, 47, 49, 51,
374 53, 55, 57, 59, 61, 63, 67, 70, 74, 77, 435 53, 55, 57, 59, 61, 63, 67, 70, 74, 77,
375 81, 84, 85, 88, 91, 94, 97, 100, 104, 109, 436 81, 84, 85, 88, 91, 94, 97, 100, 103, 107,
376 114, 119, 125, 128, 131, 133, 137, 138, 141, 144, 437 112, 117, 122, 128, 132, 133, 137, 138, 141, 144,
377 147, 150, 153, 158, 162, 165, 170, 171, 174, 178, 438 147, 149, 153, 154, 157, 160, 163, 166, 169, 174,
378 180, 184, 185, 188, 191, 194, 198, 201, 203, 207, 439 178, 181, 186, 187, 190, 194, 196, 200, 201, 204,
379 208, 211, 214, 217, 221, 225, 228, 231, 234, 235, 440 207, 210, 214, 217, 219, 223, 224, 227, 230, 233,
380 238, 241, 244, 249, 253, 257, 258, 261, 263, 265, 441 237, 241, 244, 247, 250, 251, 254, 257, 260, 265,
381 268, 271, 274, 276, 279, 280, 283, 285, 289, 293, 442 269, 273, 274, 277, 279, 281, 284, 287, 290, 292,
382 297, 300, 304, 308, 310 443 295, 296, 299, 301, 305, 309, 313, 316, 320, 324,
444 326
383}; 445};
384 446
385/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 447/* YYRHS -- A `-1'-separated list of the rules' RHS. */
386static const yysigned_char yyrhs[] = 448static const yysigned_char yyrhs[] =
387{ 449{
388 36, 0, -1, 37, -1, -1, 37, 39, -1, 37, 450 37, 0, -1, 38, -1, -1, 38, 40, -1, 38,
389 50, -1, 37, 61, -1, 37, 3, 71, 73, -1, 451 54, -1, 38, 65, -1, 38, 3, 75, 77, -1,
390 37, 72, -1, 37, 25, 1, 30, -1, 37, 38, 452 38, 76, -1, 38, 26, 1, 31, -1, 38, 39,
391 1, 30, -1, 37, 1, 30, -1, 16, -1, 19, 453 1, 31, -1, 38, 1, 31, -1, 16, -1, 19,
392 -1, 20, -1, 22, -1, 18, -1, 23, -1, 21, 454 -1, 20, -1, 22, -1, 18, -1, 23, -1, 21,
393 -1, 30, -1, 56, -1, 65, -1, 42, -1, 44, 455 -1, 31, -1, 60, -1, 69, -1, 43, -1, 45,
394 -1, 63, -1, 25, 1, 30, -1, 1, 30, -1, 456 -1, 67, -1, 26, 1, 31, -1, 1, 31, -1,
395 10, 25, 30, -1, 41, 45, -1, 11, 25, 30, 457 10, 26, 31, -1, 42, 46, -1, 11, 26, 31,
396 -1, 43, 45, -1, -1, 45, 46, -1, 45, 69, 458 -1, 44, 46, -1, -1, 46, 47, -1, 46, 48,
397 -1, 45, 67, -1, 45, 40, -1, 45, 30, -1, 459 -1, 46, 73, -1, 46, 71, -1, 46, 41, -1,
398 20, 70, 30, -1, 19, 71, 74, 30, -1, 21, 460 46, 31, -1, 20, 74, 31, -1, 19, 75, 78,
399 75, 74, 30, -1, 22, 25, 74, 30, -1, 23, 461 31, -1, 21, 79, 78, 31, -1, 22, 26, 78,
400 76, 76, 74, 30, -1, 7, 30, -1, 47, 51, 462 31, -1, 23, 80, 80, 78, 31, -1, 24, 49,
401 -1, 72, -1, 48, 53, 49, -1, -1, 51, 52, 463 31, -1, -1, 49, 26, 50, -1, -1, 34, 75,
402 -1, 51, 69, -1, 51, 67, -1, 51, 30, -1, 464 -1, 7, 31, -1, 51, 55, -1, 76, -1, 52,
403 51, 40, -1, 19, 71, 74, 30, -1, 20, 70, 465 57, 53, -1, -1, 55, 56, -1, 55, 73, -1,
404 30, -1, 18, 30, -1, 21, 25, 74, 30, -1, 466 55, 71, -1, 55, 31, -1, 55, 41, -1, 19,
405 -1, 53, 39, -1, 14, 75, 73, -1, 72, -1, 467 75, 78, 31, -1, 20, 74, 31, -1, 18, 31,
406 54, 57, 55, -1, -1, 57, 39, -1, 57, 61, 468 -1, 21, 26, 78, 31, -1, -1, 57, 40, -1,
407 -1, 57, 50, -1, 4, 71, 30, -1, 58, 68, 469 14, 79, 77, -1, 76, -1, 58, 61, 59, -1,
408 -1, 72, -1, 59, 62, 60, -1, -1, 62, 39, 470 -1, 61, 40, -1, 61, 65, -1, 61, 54, -1,
409 -1, 62, 61, -1, 62, 50, -1, 6, 71, 30, 471 4, 75, 31, -1, 62, 72, -1, 76, -1, 63,
410 -1, 9, 71, 30, -1, 64, 68, -1, 12, 30, 472 66, 64, -1, -1, 66, 40, -1, 66, 65, -1,
411 -1, 66, 13, -1, -1, 68, 69, -1, 68, 30, 473 66, 54, -1, 6, 75, 31, -1, 9, 75, 31,
412 -1, 68, 40, -1, 16, 24, 75, 30, -1, 16, 474 -1, 68, 72, -1, 12, 31, -1, 70, 13, -1,
413 75, 30, -1, 17, 75, 30, -1, -1, 71, 74, 475 -1, 72, 73, -1, 72, 31, -1, 72, 41, -1,
414 -1, 25, -1, 26, -1, 5, 30, -1, 8, 30, 476 16, 25, 79, 31, -1, 16, 79, 31, -1, 17,
415 -1, 15, 30, -1, 30, -1, 73, 30, -1, -1, 477 79, 31, -1, -1, 75, 78, -1, 26, -1, 27,
416 14, 75, -1, 76, -1, 76, 33, 76, -1, 76, 478 -1, 5, 31, -1, 8, 31, -1, 15, 31, -1,
417 27, 76, -1, 29, 75, 28, -1, 34, 75, -1, 479 31, -1, 77, 31, -1, -1, 14, 79, -1, 80,
418 75, 31, 75, -1, 75, 32, 75, -1, 25, -1, 480 -1, 80, 34, 80, -1, 80, 28, 80, -1, 30,
419 26, -1 481 79, 29, -1, 35, 79, -1, 79, 32, 79, -1,
482 79, 33, 79, -1, 26, -1, 27, -1
420}; 483};
421 484
422/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 485/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
423static const unsigned short int yyrline[] = 486static const unsigned short int yyrline[] =
424{ 487{
425 0, 103, 103, 105, 107, 108, 109, 110, 111, 112, 488 0, 105, 105, 107, 109, 110, 111, 112, 113, 114,
426 113, 117, 121, 121, 121, 121, 121, 121, 121, 125, 489 115, 119, 123, 123, 123, 123, 123, 123, 123, 127,
427 126, 127, 128, 129, 130, 134, 135, 141, 149, 155, 490 128, 129, 130, 131, 132, 136, 137, 143, 151, 157,
428 163, 173, 175, 176, 177, 178, 179, 182, 190, 196, 491 165, 175, 177, 178, 179, 180, 181, 182, 185, 193,
429 206, 212, 220, 229, 234, 242, 245, 247, 248, 249, 492 199, 209, 215, 221, 224, 226, 237, 238, 243, 252,
430 250, 251, 254, 260, 271, 277, 287, 289, 294, 302, 493 257, 265, 268, 270, 271, 272, 273, 274, 277, 283,
431 310, 313, 315, 316, 317, 322, 329, 334, 342, 345, 494 294, 300, 310, 312, 317, 325, 333, 336, 338, 339,
432 347, 348, 349, 352, 360, 367, 374, 380, 387, 389, 495 340, 345, 352, 357, 365, 368, 370, 371, 372, 375,
433 390, 391, 394, 399, 404, 412, 414, 419, 420, 423, 496 383, 390, 397, 403, 410, 412, 413, 414, 417, 422,
434 424, 425, 429, 430, 433, 434, 437, 438, 439, 440, 497 427, 435, 437, 442, 443, 446, 447, 448, 452, 453,
435 441, 442, 443, 446, 447 498 456, 457, 460, 461, 462, 463, 464, 465, 466, 469,
499 470
436}; 500};
437#endif 501#endif
438 502
439#if YYDEBUG || YYERROR_VERBOSE 503#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
440/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 504/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
441 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 505 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
442static const char *const yytname[] = 506static const char *const yytname[] =
443{ 507{
@@ -445,17 +509,18 @@ static const char *const yytname[] =
445 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", 509 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
446 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", 510 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
447 "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", 511 "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT",
448 "T_SELECT", "T_RANGE", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", 512 "T_SELECT", "T_RANGE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE",
449 "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", 513 "T_UNEQUAL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND",
450 "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt", 514 "T_EQUAL", "T_NOT", "$accept", "input", "stmt_list", "option_name",
451 "option_error", "config_entry_start", "config_stmt", 515 "common_stmt", "option_error", "config_entry_start", "config_stmt",
452 "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", 516 "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
453 "config_option", "choice", "choice_entry", "choice_end", "choice_stmt", 517 "config_option", "symbol_option", "symbol_option_list",
454 "choice_option_list", "choice_option", "choice_block", "if_entry", 518 "symbol_option_arg", "choice", "choice_entry", "choice_end",
455 "if_end", "if_stmt", "if_block", "menu", "menu_entry", "menu_end", 519 "choice_stmt", "choice_option_list", "choice_option", "choice_block",
456 "menu_stmt", "menu_block", "source_stmt", "comment", "comment_stmt", 520 "if_entry", "if_end", "if_stmt", "if_block", "menu", "menu_entry",
457 "help_start", "help", "depends_list", "depends", "prompt_stmt_opt", 521 "menu_end", "menu_stmt", "menu_block", "source_stmt", "comment",
458 "prompt", "end", "nl", "if_expr", "expr", "symbol", 0 522 "comment_stmt", "help_start", "help", "depends_list", "depends",
523 "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", "symbol", 0
459}; 524};
460#endif 525#endif
461 526
@@ -467,24 +532,25 @@ static const unsigned short int yytoknum[] =
467 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 532 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
468 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 533 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
469 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 534 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
470 285, 286, 287, 288, 289 535 285, 286, 287, 288, 289, 290
471}; 536};
472# endif 537# endif
473 538
474/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 539/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
475static const unsigned char yyr1[] = 540static const unsigned char yyr1[] =
476{ 541{
477 0, 35, 36, 37, 37, 37, 37, 37, 37, 37, 542 0, 36, 37, 38, 38, 38, 38, 38, 38, 38,
478 37, 37, 38, 38, 38, 38, 38, 38, 38, 39, 543 38, 38, 39, 39, 39, 39, 39, 39, 39, 40,
479 39, 39, 39, 39, 39, 40, 40, 41, 42, 43, 544 40, 40, 40, 40, 40, 41, 41, 42, 43, 44,
480 44, 45, 45, 45, 45, 45, 45, 46, 46, 46, 545 45, 46, 46, 46, 46, 46, 46, 46, 47, 47,
481 46, 46, 47, 48, 49, 50, 51, 51, 51, 51, 546 47, 47, 47, 48, 49, 49, 50, 50, 51, 52,
482 51, 51, 52, 52, 52, 52, 53, 53, 54, 55, 547 53, 54, 55, 55, 55, 55, 55, 55, 56, 56,
483 56, 57, 57, 57, 57, 58, 59, 60, 61, 62, 548 56, 56, 57, 57, 58, 59, 60, 61, 61, 61,
484 62, 62, 62, 63, 64, 65, 66, 67, 68, 68, 549 61, 62, 63, 64, 65, 66, 66, 66, 66, 67,
485 68, 68, 69, 69, 69, 70, 70, 71, 71, 72, 550 68, 69, 70, 71, 72, 72, 72, 72, 73, 73,
486 72, 72, 73, 73, 74, 74, 75, 75, 75, 75, 551 73, 74, 74, 75, 75, 76, 76, 76, 77, 77,
487 75, 75, 75, 76, 76 552 78, 78, 79, 79, 79, 79, 79, 79, 79, 80,
553 80
488}; 554};
489 555
490/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 556/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -493,14 +559,15 @@ static const unsigned char yyr2[] =
493 0, 2, 1, 0, 2, 2, 2, 4, 2, 4, 559 0, 2, 1, 0, 2, 2, 2, 4, 2, 4,
494 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 560 4, 3, 1, 1, 1, 1, 1, 1, 1, 1,
495 1, 1, 1, 1, 1, 3, 2, 3, 2, 3, 561 1, 1, 1, 1, 1, 3, 2, 3, 2, 3,
496 2, 0, 2, 2, 2, 2, 2, 3, 4, 4, 562 2, 0, 2, 2, 2, 2, 2, 2, 3, 4,
497 4, 5, 2, 2, 1, 3, 0, 2, 2, 2, 563 4, 4, 5, 3, 0, 3, 0, 2, 2, 2,
498 2, 2, 4, 3, 2, 4, 0, 2, 3, 1, 564 1, 3, 0, 2, 2, 2, 2, 2, 4, 3,
499 3, 0, 2, 2, 2, 3, 2, 1, 3, 0, 565 2, 4, 0, 2, 3, 1, 3, 0, 2, 2,
500 2, 2, 2, 3, 3, 2, 2, 2, 0, 2, 566 2, 3, 2, 1, 3, 0, 2, 2, 2, 3,
501 2, 2, 4, 3, 3, 0, 2, 1, 1, 2, 567 3, 2, 2, 2, 0, 2, 2, 2, 4, 3,
502 2, 2, 1, 2, 0, 2, 1, 3, 3, 3, 568 3, 0, 2, 1, 1, 2, 2, 2, 1, 2,
503 2, 3, 3, 1, 1 569 0, 2, 1, 3, 3, 3, 2, 3, 3, 1,
570 1
504}; 571};
505 572
506/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 573/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -511,175 +578,164 @@ static const unsigned char yydefact[] =
511 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 578 3, 0, 0, 1, 0, 0, 0, 0, 0, 0,
512 0, 0, 0, 0, 0, 0, 12, 16, 13, 14, 579 0, 0, 0, 0, 0, 0, 12, 16, 13, 14,
513 18, 15, 17, 0, 19, 0, 4, 31, 22, 31, 580 18, 15, 17, 0, 19, 0, 4, 31, 22, 31,
514 23, 46, 56, 5, 61, 20, 78, 69, 6, 24, 581 23, 52, 62, 5, 67, 20, 84, 75, 6, 24,
515 78, 21, 8, 11, 87, 88, 0, 0, 89, 0, 582 84, 21, 8, 11, 93, 94, 0, 0, 95, 0,
516 42, 90, 0, 0, 0, 103, 104, 0, 0, 0, 583 48, 96, 0, 0, 0, 109, 110, 0, 0, 0,
517 96, 91, 0, 0, 0, 0, 0, 0, 0, 0, 584 102, 97, 0, 0, 0, 0, 0, 0, 0, 0,
518 0, 0, 92, 7, 65, 73, 74, 27, 29, 0, 585 0, 0, 98, 7, 71, 79, 80, 27, 29, 0,
519 100, 0, 0, 58, 0, 0, 9, 10, 0, 0, 586 106, 0, 0, 64, 0, 0, 9, 10, 0, 0,
520 0, 0, 0, 85, 0, 0, 0, 0, 36, 35, 587 0, 0, 0, 91, 0, 0, 0, 44, 0, 37,
521 32, 0, 34, 33, 0, 0, 85, 0, 50, 51, 588 36, 32, 33, 0, 35, 34, 0, 0, 91, 0,
522 47, 49, 48, 57, 45, 44, 62, 64, 60, 63, 589 56, 57, 53, 55, 54, 63, 51, 50, 68, 70,
523 59, 80, 81, 79, 70, 72, 68, 71, 67, 93, 590 66, 69, 65, 86, 87, 85, 76, 78, 74, 77,
524 99, 101, 102, 98, 97, 26, 76, 0, 0, 0, 591 73, 99, 105, 107, 108, 104, 103, 26, 82, 0,
525 94, 0, 94, 94, 94, 0, 0, 77, 54, 94, 592 0, 0, 100, 0, 100, 100, 100, 0, 0, 0,
526 0, 94, 0, 83, 84, 0, 0, 37, 86, 0, 593 83, 60, 100, 0, 100, 0, 89, 90, 0, 0,
527 0, 94, 25, 0, 53, 0, 82, 95, 38, 39, 594 38, 92, 0, 0, 100, 46, 43, 25, 0, 59,
528 40, 0, 52, 55, 41 595 0, 88, 101, 39, 40, 41, 0, 0, 45, 58,
596 61, 42, 47
529}; 597};
530 598
531/* YYDEFGOTO[NTERM-NUM]. */ 599/* YYDEFGOTO[NTERM-NUM]. */
532static const short int yydefgoto[] = 600static const short int yydefgoto[] =
533{ 601{
534 -1, 1, 2, 25, 26, 99, 27, 28, 29, 30, 602 -1, 1, 2, 25, 26, 100, 27, 28, 29, 30,
535 64, 100, 31, 32, 114, 33, 66, 110, 67, 34, 603 64, 101, 102, 148, 178, 31, 32, 116, 33, 66,
536 118, 35, 68, 36, 37, 126, 38, 70, 39, 40, 604 112, 67, 34, 120, 35, 68, 36, 37, 128, 38,
537 41, 101, 102, 69, 103, 141, 142, 42, 73, 156, 605 70, 39, 40, 41, 103, 104, 69, 105, 143, 144,
538 59, 60 606 42, 73, 159, 59, 60
539}; 607};
540 608
541/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 609/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
542 STATE-NUM. */ 610 STATE-NUM. */
543#define YYPACT_NINF -78 611#define YYPACT_NINF -135
544static const short int yypact[] = 612static const short int yypact[] =
545{ 613{
546 -78, 2, 159, -78, -21, 0, 0, -12, 0, 1, 614 -135, 2, 170, -135, -14, 56, 56, -8, 56, 24,
547 4, 0, 27, 38, 60, 58, -78, -78, -78, -78, 615 67, 56, 7, 14, 62, 97, -135, -135, -135, -135,
548 -78, -78, -78, 100, -78, 104, -78, -78, -78, -78, 616 -135, -135, -135, 156, -135, 166, -135, -135, -135, -135,
549 -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 617 -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
550 -78, -78, -78, -78, -78, -78, 86, 113, -78, 114, 618 -135, -135, -135, -135, -135, -135, 138, 151, -135, 152,
551 -78, -78, 125, 127, 128, -78, -78, 60, 60, 210, 619 -135, -135, 163, 167, 176, -135, -135, 62, 62, 185,
552 65, -78, 141, 142, 39, 103, 182, 200, 6, 66, 620 -19, -135, 188, 190, 42, 103, 194, 85, 70, 222,
553 6, 131, -78, 146, -78, -78, -78, -78, -78, 196, 621 70, 132, -135, 191, -135, -135, -135, -135, -135, 127,
554 -78, 60, 60, 146, 40, 40, -78, -78, 155, 156, 622 -135, 62, 62, 191, 104, 104, -135, -135, 193, 203,
555 -2, 60, 0, 0, 60, 105, 40, 194, -78, -78, 623 9, 62, 56, 56, 62, 161, 104, -135, 196, -135,
556 -78, 206, -78, -78, 183, 0, 0, 195, -78, -78, 624 -135, -135, -135, 233, -135, -135, 204, 56, 56, 221,
557 -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 625 -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
558 -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 626 -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
559 -78, 197, -78, -78, -78, -78, -78, 60, 213, 216, 627 -135, -135, -135, 219, -135, -135, -135, -135, -135, 62,
560 212, 203, 212, 190, 212, 40, 208, -78, -78, 212, 628 209, 212, 240, 224, 240, -1, 240, 104, 41, 225,
561 222, 212, 219, -78, -78, 60, 223, -78, -78, 224, 629 -135, -135, 240, 226, 240, 218, -135, -135, 62, 227,
562 225, 212, -78, 226, -78, 227, -78, 47, -78, -78, 630 -135, -135, 228, 229, 240, 230, -135, -135, 231, -135,
563 -78, 228, -78, -78, -78 631 232, -135, 112, -135, -135, -135, 234, 56, -135, -135,
632 -135, -135, -135
564}; 633};
565 634
566/* YYPGOTO[NTERM-NUM]. */ 635/* YYPGOTO[NTERM-NUM]. */
567static const short int yypgoto[] = 636static const short int yypgoto[] =
568{ 637{
569 -78, -78, -78, -78, 164, -36, -78, -78, -78, -78, 638 -135, -135, -135, -135, 94, -45, -135, -135, -135, -135,
570 230, -78, -78, -78, -78, 29, -78, -78, -78, -78, 639 237, -135, -135, -135, -135, -135, -135, -135, -54, -135,
571 -78, -78, -78, -78, -78, -78, 59, -78, -78, -78, 640 -135, -135, -135, -135, -135, -135, -135, -135, -135, 1,
572 -78, -78, 198, 220, 24, 157, -5, 169, 202, 74, 641 -135, -135, -135, -135, -135, 195, 235, -44, 159, -5,
573 -53, -77 642 98, 210, -134, -53, -77
574}; 643};
575 644
576/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 645/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
577 positive, shift that token. If negative, reduce the rule which 646 positive, shift that token. If negative, reduce the rule which
578 number is the opposite. If zero, do what YYDEFACT says. 647 number is the opposite. If zero, do what YYDEFACT says.
579 If YYTABLE_NINF, syntax error. */ 648 If YYTABLE_NINF, syntax error. */
580#define YYTABLE_NINF -76 649#define YYTABLE_NINF -82
581static const short int yytable[] = 650static const short int yytable[] =
582{ 651{
583 46, 47, 3, 49, 79, 80, 52, 133, 134, 43, 652 46, 47, 3, 49, 79, 80, 52, 135, 136, 84,
584 6, 7, 8, 9, 10, 11, 12, 13, 48, 145, 653 161, 162, 163, 158, 119, 85, 127, 43, 168, 147,
585 14, 15, 137, 55, 56, 44, 45, 57, 131, 132, 654 170, 111, 114, 48, 124, 125, 124, 125, 133, 134,
586 109, 50, 58, 122, 51, 122, 24, 138, 139, -28, 655 176, 81, 82, 53, 139, 55, 56, 140, 141, 57,
587 88, 143, -28, -28, -28, -28, -28, -28, -28, -28, 656 54, 145, -28, 88, 58, -28, -28, -28, -28, -28,
588 -28, 89, 53, -28, -28, 90, 91, -28, 92, 93, 657 -28, -28, -28, -28, 89, 50, -28, -28, 90, 91,
589 94, 95, 96, 54, 97, 55, 56, 88, 161, 98, 658 -28, 92, 93, 94, 95, 96, 97, 165, 98, 121,
590 -66, -66, -66, -66, -66, -66, -66, -66, 81, 82, 659 164, 129, 166, 99, 6, 7, 8, 9, 10, 11,
591 -66, -66, 90, 91, 152, 55, 56, 140, 61, 57, 660 12, 13, 44, 45, 14, 15, 155, 142, 55, 56,
592 112, 97, 84, 123, 58, 123, 121, 117, 85, 125, 661 7, 8, 57, 10, 11, 12, 13, 58, 51, 14,
593 149, 62, 167, -30, 88, 63, -30, -30, -30, -30, 662 15, 24, 152, -30, 88, 172, -30, -30, -30, -30,
594 -30, -30, -30, -30, -30, 89, 72, -30, -30, 90, 663 -30, -30, -30, -30, -30, 89, 24, -30, -30, 90,
595 91, -30, 92, 93, 94, 95, 96, 119, 97, 127, 664 91, -30, 92, 93, 94, 95, 96, 97, 61, 98,
596 144, -75, 88, 98, -75, -75, -75, -75, -75, -75, 665 55, 56, -81, 88, 99, -81, -81, -81, -81, -81,
597 -75, -75, -75, 74, 75, -75, -75, 90, 91, -75, 666 -81, -81, -81, -81, 81, 82, -81, -81, 90, 91,
598 -75, -75, -75, -75, -75, 76, 97, 77, 78, -2, 667 -81, -81, -81, -81, -81, -81, 132, 62, 98, 81,
599 4, 121, 5, 6, 7, 8, 9, 10, 11, 12, 668 82, 115, 118, 123, 126, 117, 122, 63, 130, 72,
600 13, 86, 87, 14, 15, 16, 129, 17, 18, 19, 669 -2, 4, 182, 5, 6, 7, 8, 9, 10, 11,
601 20, 21, 22, 88, 23, 135, 136, -43, -43, 24, 670 12, 13, 74, 75, 14, 15, 16, 146, 17, 18,
602 -43, -43, -43, -43, 89, 146, -43, -43, 90, 91, 671 19, 20, 21, 22, 76, 88, 23, 149, 77, -49,
603 104, 105, 106, 107, 155, 7, 8, 97, 10, 11, 672 -49, 24, -49, -49, -49, -49, 89, 78, -49, -49,
604 12, 13, 108, 148, 14, 15, 158, 159, 160, 147, 673 90, 91, 106, 107, 108, 109, 72, 81, 82, 86,
605 151, 81, 82, 163, 130, 165, 155, 81, 82, 82, 674 98, 87, 131, 88, 137, 110, -72, -72, -72, -72,
606 24, 113, 116, 157, 124, 171, 115, 120, 162, 128, 675 -72, -72, -72, -72, 138, 151, -72, -72, 90, 91,
607 72, 81, 82, 153, 81, 82, 154, 81, 82, 166, 676 156, 81, 82, 157, 81, 82, 150, 154, 98, 171,
608 81, 82, 164, 168, 169, 170, 172, 173, 174, 65, 677 81, 82, 82, 123, 158, 160, 167, 169, 173, 174,
609 71, 83, 0, 150, 111 678 175, 113, 179, 180, 177, 181, 65, 153, 0, 83,
679 0, 0, 0, 0, 0, 71
610}; 680};
611 681
612static const short int yycheck[] = 682static const short int yycheck[] =
613{ 683{
614 5, 6, 0, 8, 57, 58, 11, 84, 85, 30, 684 5, 6, 0, 8, 57, 58, 11, 84, 85, 28,
615 4, 5, 6, 7, 8, 9, 10, 11, 30, 96, 685 144, 145, 146, 14, 68, 34, 70, 31, 152, 96,
616 14, 15, 24, 25, 26, 25, 26, 29, 81, 82, 686 154, 66, 66, 31, 69, 69, 71, 71, 81, 82,
617 66, 30, 34, 69, 30, 71, 30, 90, 91, 0, 687 164, 32, 33, 26, 25, 26, 27, 90, 91, 30,
618 1, 94, 3, 4, 5, 6, 7, 8, 9, 10, 688 26, 94, 0, 1, 35, 3, 4, 5, 6, 7,
619 11, 12, 25, 14, 15, 16, 17, 18, 19, 20, 689 8, 9, 10, 11, 12, 31, 14, 15, 16, 17,
620 21, 22, 23, 25, 25, 25, 26, 1, 145, 30, 690 18, 19, 20, 21, 22, 23, 24, 26, 26, 68,
621 4, 5, 6, 7, 8, 9, 10, 11, 31, 32, 691 147, 70, 31, 31, 4, 5, 6, 7, 8, 9,
622 14, 15, 16, 17, 137, 25, 26, 92, 30, 29, 692 10, 11, 26, 27, 14, 15, 139, 92, 26, 27,
623 66, 25, 27, 69, 34, 71, 30, 68, 33, 70, 693 5, 6, 30, 8, 9, 10, 11, 35, 31, 14,
624 105, 1, 155, 0, 1, 1, 3, 4, 5, 6, 694 15, 31, 107, 0, 1, 158, 3, 4, 5, 6,
625 7, 8, 9, 10, 11, 12, 30, 14, 15, 16, 695 7, 8, 9, 10, 11, 12, 31, 14, 15, 16,
626 17, 18, 19, 20, 21, 22, 23, 68, 25, 70, 696 17, 18, 19, 20, 21, 22, 23, 24, 31, 26,
627 25, 0, 1, 30, 3, 4, 5, 6, 7, 8, 697 26, 27, 0, 1, 31, 3, 4, 5, 6, 7,
628 9, 10, 11, 30, 30, 14, 15, 16, 17, 18, 698 8, 9, 10, 11, 32, 33, 14, 15, 16, 17,
629 19, 20, 21, 22, 23, 30, 25, 30, 30, 0, 699 18, 19, 20, 21, 22, 23, 29, 1, 26, 32,
630 1, 30, 3, 4, 5, 6, 7, 8, 9, 10, 700 33, 67, 68, 31, 70, 67, 68, 1, 70, 31,
631 11, 30, 30, 14, 15, 16, 30, 18, 19, 20, 701 0, 1, 177, 3, 4, 5, 6, 7, 8, 9,
632 21, 22, 23, 1, 25, 30, 30, 5, 6, 30, 702 10, 11, 31, 31, 14, 15, 16, 26, 18, 19,
633 8, 9, 10, 11, 12, 1, 14, 15, 16, 17, 703 20, 21, 22, 23, 31, 1, 26, 1, 31, 5,
634 18, 19, 20, 21, 14, 5, 6, 25, 8, 9, 704 6, 31, 8, 9, 10, 11, 12, 31, 14, 15,
635 10, 11, 30, 30, 14, 15, 142, 143, 144, 13, 705 16, 17, 18, 19, 20, 21, 31, 32, 33, 31,
636 25, 31, 32, 149, 28, 151, 14, 31, 32, 32, 706 26, 31, 31, 1, 31, 31, 4, 5, 6, 7,
637 30, 67, 68, 30, 70, 161, 67, 68, 30, 70, 707 8, 9, 10, 11, 31, 31, 14, 15, 16, 17,
638 30, 31, 32, 30, 31, 32, 30, 31, 32, 30, 708 31, 32, 33, 31, 32, 33, 13, 26, 26, 31,
639 31, 32, 30, 30, 30, 30, 30, 30, 30, 29, 709 32, 33, 33, 31, 14, 31, 31, 31, 31, 31,
640 40, 59, -1, 106, 66 710 31, 66, 31, 31, 34, 31, 29, 108, -1, 59,
711 -1, -1, -1, -1, -1, 40
641}; 712};
642 713
643/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 714/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
644 symbol of state STATE-NUM. */ 715 symbol of state STATE-NUM. */
645static const unsigned char yystos[] = 716static const unsigned char yystos[] =
646{ 717{
647 0, 36, 37, 0, 1, 3, 4, 5, 6, 7, 718 0, 37, 38, 0, 1, 3, 4, 5, 6, 7,
648 8, 9, 10, 11, 14, 15, 16, 18, 19, 20, 719 8, 9, 10, 11, 14, 15, 16, 18, 19, 20,
649 21, 22, 23, 25, 30, 38, 39, 41, 42, 43, 720 21, 22, 23, 26, 31, 39, 40, 42, 43, 44,
650 44, 47, 48, 50, 54, 56, 58, 59, 61, 63, 721 45, 51, 52, 54, 58, 60, 62, 63, 65, 67,
651 64, 65, 72, 30, 25, 26, 71, 71, 30, 71, 722 68, 69, 76, 31, 26, 27, 75, 75, 31, 75,
652 30, 30, 71, 25, 25, 25, 26, 29, 34, 75, 723 31, 31, 75, 26, 26, 26, 27, 30, 35, 79,
653 76, 30, 1, 1, 45, 45, 51, 53, 57, 68, 724 80, 31, 1, 1, 46, 46, 55, 57, 61, 72,
654 62, 68, 30, 73, 30, 30, 30, 30, 30, 75, 725 66, 72, 31, 77, 31, 31, 31, 31, 31, 79,
655 75, 31, 32, 73, 27, 33, 30, 30, 1, 12, 726 79, 32, 33, 77, 28, 34, 31, 31, 1, 12,
656 16, 17, 19, 20, 21, 22, 23, 25, 30, 40, 727 16, 17, 19, 20, 21, 22, 23, 24, 26, 31,
657 46, 66, 67, 69, 18, 19, 20, 21, 30, 40, 728 41, 47, 48, 70, 71, 73, 18, 19, 20, 21,
658 52, 67, 69, 39, 49, 72, 39, 50, 55, 61, 729 31, 41, 56, 71, 73, 40, 53, 76, 40, 54,
659 72, 30, 40, 69, 39, 50, 60, 61, 72, 30, 730 59, 65, 76, 31, 41, 73, 40, 54, 64, 65,
660 28, 75, 75, 76, 76, 30, 30, 24, 75, 75, 731 76, 31, 29, 79, 79, 80, 80, 31, 31, 25,
661 71, 70, 71, 75, 25, 76, 1, 13, 30, 71, 732 79, 79, 75, 74, 75, 79, 26, 80, 49, 1,
662 70, 25, 75, 30, 30, 14, 74, 30, 74, 74, 733 13, 31, 75, 74, 26, 79, 31, 31, 14, 78,
663 74, 76, 30, 74, 30, 74, 30, 75, 30, 30, 734 31, 78, 78, 78, 80, 26, 31, 31, 78, 31,
664 30, 74, 30, 30, 30 735 78, 31, 79, 31, 31, 31, 78, 34, 50, 31,
736 31, 31, 75
665}; 737};
666 738
667#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
668# define YYSIZE_T __SIZE_TYPE__
669#endif
670#if ! defined (YYSIZE_T) && defined (size_t)
671# define YYSIZE_T size_t
672#endif
673#if ! defined (YYSIZE_T)
674# if defined (__STDC__) || defined (__cplusplus)
675# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
676# define YYSIZE_T size_t
677# endif
678#endif
679#if ! defined (YYSIZE_T)
680# define YYSIZE_T unsigned int
681#endif
682
683#define yyerrok (yyerrstatus = 0) 739#define yyerrok (yyerrstatus = 0)
684#define yyclearin (yychar = YYEMPTY) 740#define yyclearin (yychar = YYEMPTY)
685#define YYEMPTY (-2) 741#define YYEMPTY (-2)
@@ -709,8 +765,8 @@ do \
709 goto yybackup; \ 765 goto yybackup; \
710 } \ 766 } \
711 else \ 767 else \
712 { \ 768 { \
713 yyerror ("syntax error: cannot back up");\ 769 yyerror (YY_("syntax error: cannot back up")); \
714 YYERROR; \ 770 YYERROR; \
715 } \ 771 } \
716while (0) 772while (0)
@@ -789,7 +845,7 @@ do { \
789 if (yydebug) \ 845 if (yydebug) \
790 { \ 846 { \
791 YYFPRINTF (stderr, "%s ", Title); \ 847 YYFPRINTF (stderr, "%s ", Title); \
792 yysymprint (stderr, \ 848 yysymprint (stderr, \
793 Type, Value); \ 849 Type, Value); \
794 YYFPRINTF (stderr, "\n"); \ 850 YYFPRINTF (stderr, "\n"); \
795 } \ 851 } \
@@ -837,13 +893,13 @@ yy_reduce_print (yyrule)
837#endif 893#endif
838{ 894{
839 int yyi; 895 int yyi;
840 unsigned int yylno = yyrline[yyrule]; 896 unsigned long int yylno = yyrline[yyrule];
841 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", 897 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
842 yyrule - 1, yylno); 898 yyrule - 1, yylno);
843 /* Print the symbols being reduced, and their result. */ 899 /* Print the symbols being reduced, and their result. */
844 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) 900 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
845 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); 901 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
846 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); 902 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
847} 903}
848 904
849# define YY_REDUCE_PRINT(Rule) \ 905# define YY_REDUCE_PRINT(Rule) \
@@ -872,7 +928,7 @@ int yydebug;
872 if the built-in stack extension method is used). 928 if the built-in stack extension method is used).
873 929
874 Do not make this value too large; the results are undefined if 930 Do not make this value too large; the results are undefined if
875 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) 931 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
876 evaluated with infinite-precision integer arithmetic. */ 932 evaluated with infinite-precision integer arithmetic. */
877 933
878#ifndef YYMAXDEPTH 934#ifndef YYMAXDEPTH
@@ -896,7 +952,7 @@ yystrlen (yystr)
896 const char *yystr; 952 const char *yystr;
897# endif 953# endif
898{ 954{
899 register const char *yys = yystr; 955 const char *yys = yystr;
900 956
901 while (*yys++ != '\0') 957 while (*yys++ != '\0')
902 continue; 958 continue;
@@ -921,8 +977,8 @@ yystpcpy (yydest, yysrc)
921 const char *yysrc; 977 const char *yysrc;
922# endif 978# endif
923{ 979{
924 register char *yyd = yydest; 980 char *yyd = yydest;
925 register const char *yys = yysrc; 981 const char *yys = yysrc;
926 982
927 while ((*yyd++ = *yys++) != '\0') 983 while ((*yyd++ = *yys++) != '\0')
928 continue; 984 continue;
@@ -932,7 +988,55 @@ yystpcpy (yydest, yysrc)
932# endif 988# endif
933# endif 989# endif
934 990
935#endif /* !YYERROR_VERBOSE */ 991# ifndef yytnamerr
992/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
993 quotes and backslashes, so that it's suitable for yyerror. The
994 heuristic is that double-quoting is unnecessary unless the string
995 contains an apostrophe, a comma, or backslash (other than
996 backslash-backslash). YYSTR is taken from yytname. If YYRES is
997 null, do not copy; instead, return the length of what the result
998 would have been. */
999static YYSIZE_T
1000yytnamerr (char *yyres, const char *yystr)
1001{
1002 if (*yystr == '"')
1003 {
1004 size_t yyn = 0;
1005 char const *yyp = yystr;
1006
1007 for (;;)
1008 switch (*++yyp)
1009 {
1010 case '\'':
1011 case ',':
1012 goto do_not_strip_quotes;
1013
1014 case '\\':
1015 if (*++yyp != '\\')
1016 goto do_not_strip_quotes;
1017 /* Fall through. */
1018 default:
1019 if (yyres)
1020 yyres[yyn] = *yyp;
1021 yyn++;
1022 break;
1023
1024 case '"':
1025 if (yyres)
1026 yyres[yyn] = '\0';
1027 return yyn;
1028 }
1029 do_not_strip_quotes: ;
1030 }
1031
1032 if (! yyres)
1033 return yystrlen (yystr);
1034
1035 return yystpcpy (yyres, yystr) - yyres;
1036}
1037# endif
1038
1039#endif /* YYERROR_VERBOSE */
936 1040
937 1041
938 1042
@@ -998,7 +1102,7 @@ yydestruct (yymsg, yytype, yyvaluep)
998 1102
999 switch (yytype) 1103 switch (yytype)
1000 { 1104 {
1001 case 48: /* choice_entry */ 1105 case 52: /* "choice_entry" */
1002 1106
1003 { 1107 {
1004 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1108 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -1008,7 +1112,7 @@ yydestruct (yymsg, yytype, yyvaluep)
1008}; 1112};
1009 1113
1010 break; 1114 break;
1011 case 54: /* if_entry */ 1115 case 58: /* "if_entry" */
1012 1116
1013 { 1117 {
1014 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1118 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -1018,7 +1122,7 @@ yydestruct (yymsg, yytype, yyvaluep)
1018}; 1122};
1019 1123
1020 break; 1124 break;
1021 case 59: /* menu_entry */ 1125 case 63: /* "menu_entry" */
1022 1126
1023 { 1127 {
1024 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1128 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -1082,13 +1186,13 @@ yyparse (void)
1082#else 1186#else
1083int 1187int
1084yyparse () 1188yyparse ()
1085 1189 ;
1086#endif 1190#endif
1087#endif 1191#endif
1088{ 1192{
1089 1193
1090 register int yystate; 1194 int yystate;
1091 register int yyn; 1195 int yyn;
1092 int yyresult; 1196 int yyresult;
1093 /* Number of tokens to shift before error messages enabled. */ 1197 /* Number of tokens to shift before error messages enabled. */
1094 int yyerrstatus; 1198 int yyerrstatus;
@@ -1106,12 +1210,12 @@ yyparse ()
1106 /* The state stack. */ 1210 /* The state stack. */
1107 short int yyssa[YYINITDEPTH]; 1211 short int yyssa[YYINITDEPTH];
1108 short int *yyss = yyssa; 1212 short int *yyss = yyssa;
1109 register short int *yyssp; 1213 short int *yyssp;
1110 1214
1111 /* The semantic value stack. */ 1215 /* The semantic value stack. */
1112 YYSTYPE yyvsa[YYINITDEPTH]; 1216 YYSTYPE yyvsa[YYINITDEPTH];
1113 YYSTYPE *yyvs = yyvsa; 1217 YYSTYPE *yyvs = yyvsa;
1114 register YYSTYPE *yyvsp; 1218 YYSTYPE *yyvsp;
1115 1219
1116 1220
1117 1221
@@ -1143,9 +1247,6 @@ yyparse ()
1143 yyssp = yyss; 1247 yyssp = yyss;
1144 yyvsp = yyvs; 1248 yyvsp = yyvs;
1145 1249
1146
1147 yyvsp[0] = yylval;
1148
1149 goto yysetstate; 1250 goto yysetstate;
1150 1251
1151/*------------------------------------------------------------. 1252/*------------------------------------------------------------.
@@ -1178,7 +1279,7 @@ yyparse ()
1178 data in use in that stack, in bytes. This used to be a 1279 data in use in that stack, in bytes. This used to be a
1179 conditional around just the two extra args, but that might 1280 conditional around just the two extra args, but that might
1180 be undefined if yyoverflow is a macro. */ 1281 be undefined if yyoverflow is a macro. */
1181 yyoverflow ("parser stack overflow", 1282 yyoverflow (YY_("memory exhausted"),
1182 &yyss1, yysize * sizeof (*yyssp), 1283 &yyss1, yysize * sizeof (*yyssp),
1183 &yyvs1, yysize * sizeof (*yyvsp), 1284 &yyvs1, yysize * sizeof (*yyvsp),
1184 1285
@@ -1189,11 +1290,11 @@ yyparse ()
1189 } 1290 }
1190#else /* no yyoverflow */ 1291#else /* no yyoverflow */
1191# ifndef YYSTACK_RELOCATE 1292# ifndef YYSTACK_RELOCATE
1192 goto yyoverflowlab; 1293 goto yyexhaustedlab;
1193# else 1294# else
1194 /* Extend the stack our own way. */ 1295 /* Extend the stack our own way. */
1195 if (YYMAXDEPTH <= yystacksize) 1296 if (YYMAXDEPTH <= yystacksize)
1196 goto yyoverflowlab; 1297 goto yyexhaustedlab;
1197 yystacksize *= 2; 1298 yystacksize *= 2;
1198 if (YYMAXDEPTH < yystacksize) 1299 if (YYMAXDEPTH < yystacksize)
1199 yystacksize = YYMAXDEPTH; 1300 yystacksize = YYMAXDEPTH;
@@ -1203,7 +1304,7 @@ yyparse ()
1203 union yyalloc *yyptr = 1304 union yyalloc *yyptr =
1204 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1305 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1205 if (! yyptr) 1306 if (! yyptr)
1206 goto yyoverflowlab; 1307 goto yyexhaustedlab;
1207 YYSTACK_RELOCATE (yyss); 1308 YYSTACK_RELOCATE (yyss);
1208 YYSTACK_RELOCATE (yyvs); 1309 YYSTACK_RELOCATE (yyvs);
1209 1310
@@ -1403,7 +1504,7 @@ yyreduce:
1403;} 1504;}
1404 break; 1505 break;
1405 1506
1406 case 37: 1507 case 38:
1407 1508
1408 { 1509 {
1409 menu_set_type((yyvsp[-2].id)->stype); 1510 menu_set_type((yyvsp[-2].id)->stype);
@@ -1413,7 +1514,7 @@ yyreduce:
1413;} 1514;}
1414 break; 1515 break;
1415 1516
1416 case 38: 1517 case 39:
1417 1518
1418 { 1519 {
1419 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); 1520 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
@@ -1421,7 +1522,7 @@ yyreduce:
1421;} 1522;}
1422 break; 1523 break;
1423 1524
1424 case 39: 1525 case 40:
1425 1526
1426 { 1527 {
1427 menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr)); 1528 menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr));
@@ -1433,7 +1534,7 @@ yyreduce:
1433;} 1534;}
1434 break; 1535 break;
1435 1536
1436 case 40: 1537 case 41:
1437 1538
1438 { 1539 {
1439 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr)); 1540 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr));
@@ -1441,7 +1542,7 @@ yyreduce:
1441;} 1542;}
1442 break; 1543 break;
1443 1544
1444 case 41: 1545 case 42:
1445 1546
1446 { 1547 {
1447 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr)); 1548 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr));
@@ -1449,7 +1550,29 @@ yyreduce:
1449;} 1550;}
1450 break; 1551 break;
1451 1552
1452 case 42: 1553 case 45:
1554
1555 {
1556 struct kconf_id *id = kconf_id_lookup((yyvsp[-1].string), strlen((yyvsp[-1].string)));
1557 if (id && id->flags & TF_OPTION)
1558 menu_add_option(id->token, (yyvsp[0].string));
1559 else
1560 zconfprint("warning: ignoring unknown option %s", (yyvsp[-1].string));
1561 free((yyvsp[-1].string));
1562;}
1563 break;
1564
1565 case 46:
1566
1567 { (yyval.string) = NULL; ;}
1568 break;
1569
1570 case 47:
1571
1572 { (yyval.string) = (yyvsp[0].string); ;}
1573 break;
1574
1575 case 48:
1453 1576
1454 { 1577 {
1455 struct symbol *sym = sym_lookup(NULL, 0); 1578 struct symbol *sym = sym_lookup(NULL, 0);
@@ -1460,14 +1583,14 @@ yyreduce:
1460;} 1583;}
1461 break; 1584 break;
1462 1585
1463 case 43: 1586 case 49:
1464 1587
1465 { 1588 {
1466 (yyval.menu) = menu_add_menu(); 1589 (yyval.menu) = menu_add_menu();
1467;} 1590;}
1468 break; 1591 break;
1469 1592
1470 case 44: 1593 case 50:
1471 1594
1472 { 1595 {
1473 if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) { 1596 if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) {
@@ -1477,7 +1600,7 @@ yyreduce:
1477;} 1600;}
1478 break; 1601 break;
1479 1602
1480 case 52: 1603 case 58:
1481 1604
1482 { 1605 {
1483 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); 1606 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
@@ -1485,7 +1608,7 @@ yyreduce:
1485;} 1608;}
1486 break; 1609 break;
1487 1610
1488 case 53: 1611 case 59:
1489 1612
1490 { 1613 {
1491 if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) { 1614 if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) {
@@ -1498,7 +1621,7 @@ yyreduce:
1498;} 1621;}
1499 break; 1622 break;
1500 1623
1501 case 54: 1624 case 60:
1502 1625
1503 { 1626 {
1504 current_entry->sym->flags |= SYMBOL_OPTIONAL; 1627 current_entry->sym->flags |= SYMBOL_OPTIONAL;
@@ -1506,7 +1629,7 @@ yyreduce:
1506;} 1629;}
1507 break; 1630 break;
1508 1631
1509 case 55: 1632 case 61:
1510 1633
1511 { 1634 {
1512 if ((yyvsp[-3].id)->stype == S_UNKNOWN) { 1635 if ((yyvsp[-3].id)->stype == S_UNKNOWN) {
@@ -1518,7 +1641,7 @@ yyreduce:
1518;} 1641;}
1519 break; 1642 break;
1520 1643
1521 case 58: 1644 case 64:
1522 1645
1523 { 1646 {
1524 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); 1647 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
@@ -1528,7 +1651,7 @@ yyreduce:
1528;} 1651;}
1529 break; 1652 break;
1530 1653
1531 case 59: 1654 case 65:
1532 1655
1533 { 1656 {
1534 if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) { 1657 if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) {
@@ -1538,7 +1661,7 @@ yyreduce:
1538;} 1661;}
1539 break; 1662 break;
1540 1663
1541 case 65: 1664 case 71:
1542 1665
1543 { 1666 {
1544 menu_add_entry(NULL); 1667 menu_add_entry(NULL);
@@ -1547,14 +1670,14 @@ yyreduce:
1547;} 1670;}
1548 break; 1671 break;
1549 1672
1550 case 66: 1673 case 72:
1551 1674
1552 { 1675 {
1553 (yyval.menu) = menu_add_menu(); 1676 (yyval.menu) = menu_add_menu();
1554;} 1677;}
1555 break; 1678 break;
1556 1679
1557 case 67: 1680 case 73:
1558 1681
1559 { 1682 {
1560 if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) { 1683 if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) {
@@ -1564,7 +1687,7 @@ yyreduce:
1564;} 1687;}
1565 break; 1688 break;
1566 1689
1567 case 73: 1690 case 79:
1568 1691
1569 { 1692 {
1570 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); 1693 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
@@ -1572,7 +1695,7 @@ yyreduce:
1572;} 1695;}
1573 break; 1696 break;
1574 1697
1575 case 74: 1698 case 80:
1576 1699
1577 { 1700 {
1578 menu_add_entry(NULL); 1701 menu_add_entry(NULL);
@@ -1581,14 +1704,14 @@ yyreduce:
1581;} 1704;}
1582 break; 1705 break;
1583 1706
1584 case 75: 1707 case 81:
1585 1708
1586 { 1709 {
1587 menu_end_entry(); 1710 menu_end_entry();
1588;} 1711;}
1589 break; 1712 break;
1590 1713
1591 case 76: 1714 case 82:
1592 1715
1593 { 1716 {
1594 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); 1717 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
@@ -1596,14 +1719,14 @@ yyreduce:
1596;} 1719;}
1597 break; 1720 break;
1598 1721
1599 case 77: 1722 case 83:
1600 1723
1601 { 1724 {
1602 current_entry->sym->help = (yyvsp[0].string); 1725 current_entry->sym->help = (yyvsp[0].string);
1603;} 1726;}
1604 break; 1727 break;
1605 1728
1606 case 82: 1729 case 88:
1607 1730
1608 { 1731 {
1609 menu_add_dep((yyvsp[-1].expr)); 1732 menu_add_dep((yyvsp[-1].expr));
@@ -1611,7 +1734,7 @@ yyreduce:
1611;} 1734;}
1612 break; 1735 break;
1613 1736
1614 case 83: 1737 case 89:
1615 1738
1616 { 1739 {
1617 menu_add_dep((yyvsp[-1].expr)); 1740 menu_add_dep((yyvsp[-1].expr));
@@ -1619,7 +1742,7 @@ yyreduce:
1619;} 1742;}
1620 break; 1743 break;
1621 1744
1622 case 84: 1745 case 90:
1623 1746
1624 { 1747 {
1625 menu_add_dep((yyvsp[-1].expr)); 1748 menu_add_dep((yyvsp[-1].expr));
@@ -1627,87 +1750,88 @@ yyreduce:
1627;} 1750;}
1628 break; 1751 break;
1629 1752
1630 case 86: 1753 case 92:
1631 1754
1632 { 1755 {
1633 menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr)); 1756 menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr));
1634;} 1757;}
1635 break; 1758 break;
1636 1759
1637 case 89: 1760 case 95:
1638 1761
1639 { (yyval.id) = (yyvsp[-1].id); ;} 1762 { (yyval.id) = (yyvsp[-1].id); ;}
1640 break; 1763 break;
1641 1764
1642 case 90: 1765 case 96:
1643 1766
1644 { (yyval.id) = (yyvsp[-1].id); ;} 1767 { (yyval.id) = (yyvsp[-1].id); ;}
1645 break; 1768 break;
1646 1769
1647 case 91: 1770 case 97:
1648 1771
1649 { (yyval.id) = (yyvsp[-1].id); ;} 1772 { (yyval.id) = (yyvsp[-1].id); ;}
1650 break; 1773 break;
1651 1774
1652 case 94: 1775 case 100:
1653 1776
1654 { (yyval.expr) = NULL; ;} 1777 { (yyval.expr) = NULL; ;}
1655 break; 1778 break;
1656 1779
1657 case 95: 1780 case 101:
1658 1781
1659 { (yyval.expr) = (yyvsp[0].expr); ;} 1782 { (yyval.expr) = (yyvsp[0].expr); ;}
1660 break; 1783 break;
1661 1784
1662 case 96: 1785 case 102:
1663 1786
1664 { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); ;} 1787 { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); ;}
1665 break; 1788 break;
1666 1789
1667 case 97: 1790 case 103:
1668 1791
1669 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} 1792 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;}
1670 break; 1793 break;
1671 1794
1672 case 98: 1795 case 104:
1673 1796
1674 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} 1797 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;}
1675 break; 1798 break;
1676 1799
1677 case 99: 1800 case 105:
1678 1801
1679 { (yyval.expr) = (yyvsp[-1].expr); ;} 1802 { (yyval.expr) = (yyvsp[-1].expr); ;}
1680 break; 1803 break;
1681 1804
1682 case 100: 1805 case 106:
1683 1806
1684 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); ;} 1807 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); ;}
1685 break; 1808 break;
1686 1809
1687 case 101: 1810 case 107:
1688 1811
1689 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} 1812 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;}
1690 break; 1813 break;
1691 1814
1692 case 102: 1815 case 108:
1693 1816
1694 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} 1817 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;}
1695 break; 1818 break;
1696 1819
1697 case 103: 1820 case 109:
1698 1821
1699 { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); ;} 1822 { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); ;}
1700 break; 1823 break;
1701 1824
1702 case 104: 1825 case 110:
1703 1826
1704 { (yyval.symbol) = sym_lookup((yyvsp[0].string), 1); free((yyvsp[0].string)); ;} 1827 { (yyval.symbol) = sym_lookup((yyvsp[0].string), 1); free((yyvsp[0].string)); ;}
1705 break; 1828 break;
1706 1829
1707 1830
1831 default: break;
1708 } 1832 }
1709 1833
1710/* Line 1037 of yacc.c. */ 1834/* Line 1126 of yacc.c. */
1711 1835
1712 1836
1713 yyvsp -= yylen; 1837 yyvsp -= yylen;
@@ -1747,12 +1871,36 @@ yyerrlab:
1747 1871
1748 if (YYPACT_NINF < yyn && yyn < YYLAST) 1872 if (YYPACT_NINF < yyn && yyn < YYLAST)
1749 { 1873 {
1750 YYSIZE_T yysize = 0;
1751 int yytype = YYTRANSLATE (yychar); 1874 int yytype = YYTRANSLATE (yychar);
1752 const char* yyprefix; 1875 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1753 char *yymsg; 1876 YYSIZE_T yysize = yysize0;
1877 YYSIZE_T yysize1;
1878 int yysize_overflow = 0;
1879 char *yymsg = 0;
1880# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
1881 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1754 int yyx; 1882 int yyx;
1755 1883
1884#if 0
1885 /* This is so xgettext sees the translatable formats that are
1886 constructed on the fly. */
1887 YY_("syntax error, unexpected %s");
1888 YY_("syntax error, unexpected %s, expecting %s");
1889 YY_("syntax error, unexpected %s, expecting %s or %s");
1890 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1891 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1892#endif
1893 char *yyfmt;
1894 char const *yyf;
1895 static char const yyunexpected[] = "syntax error, unexpected %s";
1896 static char const yyexpecting[] = ", expecting %s";
1897 static char const yyor[] = " or %s";
1898 char yyformat[sizeof yyunexpected
1899 + sizeof yyexpecting - 1
1900 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1901 * (sizeof yyor - 1))];
1902 char const *yyprefix = yyexpecting;
1903
1756 /* Start YYX at -YYN if negative to avoid negative indexes in 1904 /* Start YYX at -YYN if negative to avoid negative indexes in
1757 YYCHECK. */ 1905 YYCHECK. */
1758 int yyxbegin = yyn < 0 ? -yyn : 0; 1906 int yyxbegin = yyn < 0 ? -yyn : 0;
@@ -1760,48 +1908,68 @@ yyerrlab:
1760 /* Stay within bounds of both yycheck and yytname. */ 1908 /* Stay within bounds of both yycheck and yytname. */
1761 int yychecklim = YYLAST - yyn; 1909 int yychecklim = YYLAST - yyn;
1762 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1910 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1763 int yycount = 0; 1911 int yycount = 1;
1912
1913 yyarg[0] = yytname[yytype];
1914 yyfmt = yystpcpy (yyformat, yyunexpected);
1764 1915
1765 yyprefix = ", expecting ";
1766 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1916 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1767 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1917 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1768 { 1918 {
1769 yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); 1919 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1770 yycount += 1;
1771 if (yycount == 5)
1772 { 1920 {
1773 yysize = 0; 1921 yycount = 1;
1922 yysize = yysize0;
1923 yyformat[sizeof yyunexpected - 1] = '\0';
1774 break; 1924 break;
1775 } 1925 }
1926 yyarg[yycount++] = yytname[yyx];
1927 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1928 yysize_overflow |= yysize1 < yysize;
1929 yysize = yysize1;
1930 yyfmt = yystpcpy (yyfmt, yyprefix);
1931 yyprefix = yyor;
1776 } 1932 }
1777 yysize += (sizeof ("syntax error, unexpected ")
1778 + yystrlen (yytname[yytype]));
1779 yymsg = (char *) YYSTACK_ALLOC (yysize);
1780 if (yymsg != 0)
1781 {
1782 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1783 yyp = yystpcpy (yyp, yytname[yytype]);
1784 1933
1785 if (yycount < 5) 1934 yyf = YY_(yyformat);
1935 yysize1 = yysize + yystrlen (yyf);
1936 yysize_overflow |= yysize1 < yysize;
1937 yysize = yysize1;
1938
1939 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
1940 yymsg = (char *) YYSTACK_ALLOC (yysize);
1941 if (yymsg)
1942 {
1943 /* Avoid sprintf, as that infringes on the user's name space.
1944 Don't have undefined behavior even if the translation
1945 produced a string with the wrong number of "%s"s. */
1946 char *yyp = yymsg;
1947 int yyi = 0;
1948 while ((*yyp = *yyf))
1786 { 1949 {
1787 yyprefix = ", expecting "; 1950 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1788 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1951 {
1789 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1952 yyp += yytnamerr (yyp, yyarg[yyi++]);
1790 { 1953 yyf += 2;
1791 yyp = yystpcpy (yyp, yyprefix); 1954 }
1792 yyp = yystpcpy (yyp, yytname[yyx]); 1955 else
1793 yyprefix = " or "; 1956 {
1794 } 1957 yyp++;
1958 yyf++;
1959 }
1795 } 1960 }
1796 yyerror (yymsg); 1961 yyerror (yymsg);
1797 YYSTACK_FREE (yymsg); 1962 YYSTACK_FREE (yymsg);
1798 } 1963 }
1799 else 1964 else
1800 yyerror ("syntax error; also virtual memory exhausted"); 1965 {
1966 yyerror (YY_("syntax error"));
1967 goto yyexhaustedlab;
1968 }
1801 } 1969 }
1802 else 1970 else
1803#endif /* YYERROR_VERBOSE */ 1971#endif /* YYERROR_VERBOSE */
1804 yyerror ("syntax error"); 1972 yyerror (YY_("syntax error"));
1805 } 1973 }
1806 1974
1807 1975
@@ -1813,18 +1981,9 @@ yyerrlab:
1813 1981
1814 if (yychar <= YYEOF) 1982 if (yychar <= YYEOF)
1815 { 1983 {
1816 /* If at end of input, pop the error token, 1984 /* Return failure if at end of input. */
1817 then the rest of the stack, then return failure. */
1818 if (yychar == YYEOF) 1985 if (yychar == YYEOF)
1819 for (;;) 1986 YYABORT;
1820 {
1821
1822 YYPOPSTACK;
1823 if (yyssp == yyss)
1824 YYABORT;
1825 yydestruct ("Error: popping",
1826 yystos[*yyssp], yyvsp);
1827 }
1828 } 1987 }
1829 else 1988 else
1830 { 1989 {
@@ -1843,12 +2002,11 @@ yyerrlab:
1843`---------------------------------------------------*/ 2002`---------------------------------------------------*/
1844yyerrorlab: 2003yyerrorlab:
1845 2004
1846#ifdef __GNUC__ 2005 /* Pacify compilers like GCC when the user code never invokes
1847 /* Pacify GCC when the user code never invokes YYERROR and the label 2006 YYERROR and the label yyerrorlab therefore never appears in user
1848 yyerrorlab therefore never appears in user code. */ 2007 code. */
1849 if (0) 2008 if (0)
1850 goto yyerrorlab; 2009 goto yyerrorlab;
1851#endif
1852 2010
1853yyvsp -= yylen; 2011yyvsp -= yylen;
1854 yyssp -= yylen; 2012 yyssp -= yylen;
@@ -1911,23 +2069,29 @@ yyacceptlab:
1911| yyabortlab -- YYABORT comes here. | 2069| yyabortlab -- YYABORT comes here. |
1912`-----------------------------------*/ 2070`-----------------------------------*/
1913yyabortlab: 2071yyabortlab:
1914 yydestruct ("Error: discarding lookahead",
1915 yytoken, &yylval);
1916 yychar = YYEMPTY;
1917 yyresult = 1; 2072 yyresult = 1;
1918 goto yyreturn; 2073 goto yyreturn;
1919 2074
1920#ifndef yyoverflow 2075#ifndef yyoverflow
1921/*----------------------------------------------. 2076/*-------------------------------------------------.
1922| yyoverflowlab -- parser overflow comes here. | 2077| yyexhaustedlab -- memory exhaustion comes here. |
1923`----------------------------------------------*/ 2078`-------------------------------------------------*/
1924yyoverflowlab: 2079yyexhaustedlab:
1925 yyerror ("parser stack overflow"); 2080 yyerror (YY_("memory exhausted"));
1926 yyresult = 2; 2081 yyresult = 2;
1927 /* Fall through. */ 2082 /* Fall through. */
1928#endif 2083#endif
1929 2084
1930yyreturn: 2085yyreturn:
2086 if (yychar != YYEOF && yychar != YYEMPTY)
2087 yydestruct ("Cleanup: discarding lookahead",
2088 yytoken, &yylval);
2089 while (yyssp != yyss)
2090 {
2091 yydestruct ("Cleanup: popping",
2092 yystos[*yyssp], yyvsp);
2093 YYPOPSTACK;
2094 }
1931#ifndef yyoverflow 2095#ifndef yyoverflow
1932 if (yyss != yyssa) 2096 if (yyss != yyssa)
1933 YYSTACK_FREE (yyss); 2097 YYSTACK_FREE (yyss);
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 1f61fba6aa28..9d08582f2aa6 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -71,6 +71,7 @@ static struct menu *current_menu, *current_entry;
71%token <id>T_DEFAULT 71%token <id>T_DEFAULT
72%token <id>T_SELECT 72%token <id>T_SELECT
73%token <id>T_RANGE 73%token <id>T_RANGE
74%token <id>T_OPTION
74%token <id>T_ON 75%token <id>T_ON
75%token <string> T_WORD 76%token <string> T_WORD
76%token <string> T_WORD_QUOTE 77%token <string> T_WORD_QUOTE
@@ -91,6 +92,7 @@ static struct menu *current_menu, *current_entry;
91%type <id> end 92%type <id> end
92%type <id> option_name 93%type <id> option_name
93%type <menu> if_entry menu_entry choice_entry 94%type <menu> if_entry menu_entry choice_entry
95%type <string> symbol_option_arg
94 96
95%destructor { 97%destructor {
96 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 98 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -173,6 +175,7 @@ menuconfig_stmt: menuconfig_entry_start config_option_list
173config_option_list: 175config_option_list:
174 /* empty */ 176 /* empty */
175 | config_option_list config_option 177 | config_option_list config_option
178 | config_option_list symbol_option
176 | config_option_list depends 179 | config_option_list depends
177 | config_option_list help 180 | config_option_list help
178 | config_option_list option_error 181 | config_option_list option_error
@@ -215,6 +218,26 @@ config_option: T_RANGE symbol symbol if_expr T_EOL
215 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); 218 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
216}; 219};
217 220
221symbol_option: T_OPTION symbol_option_list T_EOL
222;
223
224symbol_option_list:
225 /* empty */
226 | symbol_option_list T_WORD symbol_option_arg
227{
228 struct kconf_id *id = kconf_id_lookup($2, strlen($2));
229 if (id && id->flags & TF_OPTION)
230 menu_add_option(id->token, $3);
231 else
232 zconfprint("warning: ignoring unknown option %s", $2);
233 free($2);
234};
235
236symbol_option_arg:
237 /* empty */ { $$ = NULL; }
238 | T_EQUAL prompt { $$ = $2; }
239;
240
218/* choice entry */ 241/* choice entry */
219 242
220choice: T_CHOICE T_EOL 243choice: T_CHOICE T_EOL