History

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"]

Roman Zippel committed 20 years ago

Commit f6a88aa1 parent f1d28fb7 files · +735 −492Browse files

Showing the changes to scripts (7 of 7 files). Show all

Unified · Split

7 files
  1. scripts/kconfig/lex.zconf.c_shipped +62 −29
  2. scripts/kconfig/lkc.h +5 −0
  3. scripts/kconfig/menu.c +4 −0
  4. scripts/kconfig/zconf.gperf +3 −0
  5. scripts/kconfig/zconf.hash.c_shipped +96 −85
  6. scripts/kconfig/zconf.tab.c_shipped +542 −378
  7. scripts/kconfig/zconf.y +23 −0
scripts/kconfig/lex.zconf.c_shipped+62−29
@@ -8,7 +8,7 @@ · 7 unmodified lines
88 #define FLEX_SCANNER
99 #define YY_FLEX_MAJOR_VERSION 2
1010 #define YY_FLEX_MINOR_VERSION 5
11−#define YY_FLEX_SUBMINOR_VERSION 31
11+#define YY_FLEX_SUBMINOR_VERSION 33
1212 #if YY_FLEX_SUBMINOR_VERSION > 0
1313 #define FLEX_BETA
1414 #endif
@@ -30,7 +30,15 @@ · 15 unmodified lines
3030
3131 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
3232
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+
3442 #include <inttypes.h>
3543 typedef int8_t flex_int8_t;
3644 typedef uint8_t flex_uint8_t;
@@ -134,6 +142,10 @@ typedef unsigned int flex_uint32_t; · 97 unmodified lines
134142 #define YY_BUF_SIZE 16384
135143 #endif
136144
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+
137149 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
138150 #define YY_TYPEDEF_YY_BUFFER_STATE
139151 typedef struct yy_buffer_state *YY_BUFFER_STATE;
@@ -267,7 +279,7 @@ int zconfleng; · 127 unmodified lines
267279
268280 /* Points to current character in buffer. */
269281 static char *yy_c_buf_p = (char *) 0;
270−static int yy_init = 1; /* whether we need to initialize */
282+static int yy_init = 0; /* whether we need to initialize */
271283 static int yy_start = 0; /* start state number */
272284
273285 /* Flag which is used to allow zconfwrap()'s to do buffer switches
@@ -820,6 +832,8 @@ void alloc_string(const char *str, int size) · 546 unmodified lines
820832 #define YY_EXTRA_TYPE void *
821833 #endif
822834
835+static int yy_init_globals (void );
836+
823837 /* Macros after this point can all be overridden by user definitions in
824838 * section 1.
825839 */
@@ -942,9 +956,9 @@ YY_DECL · 116 unmodified lines
942956 int str = 0;
943957 int ts, i;
944958
945− if ( (yy_init) )
959+ if ( !(yy_init) )
946960 {
947− (yy_init) = 0;
961+ (yy_init) = 1;
948962
949963 #ifdef YY_USER_INIT
950964 YY_USER_INIT;
@@ -1452,7 +1466,7 @@ static int yy_get_next_buffer (void) · 501 unmodified lines
14521466
14531467 else
14541468 {
1455− size_t num_to_read =
1469+ int num_to_read =
14561470 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
14571471
14581472 while ( num_to_read <= 0 )
@@ -1969,16 +1983,16 @@ YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) · 510 unmodified lines
19691983
19701984 /** Setup the input buffer state to scan a string. The next call to zconflex() will
19711985 * 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
19731987 *
19741988 * @return the newly allocated buffer state object.
19751989 * @note If you want to scan bytes that may contain NUL values, then use
19761990 * zconf_scan_bytes() instead.
19771991 */
1978−YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str )
1992+YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
19791993 {
19801994
1981− return zconf_scan_bytes(yy_str,strlen(yy_str) );
1995+ return zconf_scan_bytes(yystr,strlen(yystr) );
19821996 }
19831997
19841998 /** 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 ) · 3 unmodified lines
19882002 *
19892003 * @return the newly allocated buffer state object.
19902004 */
1991−YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len )
2005+YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len )
19922006 {
19932007 YY_BUFFER_STATE b;
19942008 char *buf;
@@ -1996,15 +2010,15 @@ YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) · 1 unmodified line
19962010 int i;
19972011
19982012 /* Get memory for full buffer, including space for trailing EOB's. */
1999− n = len + 2;
2013+ n = _yybytes_len + 2;
20002014 buf = (char *) zconfalloc(n );
20012015 if ( ! buf )
20022016 YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );
20032017
2004− for ( i = 0; i < len; ++i )
2005− buf[i] = bytes[i];
2018+ for ( i = 0; i < _yybytes_len; ++i )
2019+ buf[i] = yybytes[i];
20062020
2007− buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2021+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
20082022
20092023 b = zconf_scan_buffer(buf,n );
20102024 if ( ! b )
@@ -2125,6 +2139,34 @@ void zconfset_debug (int bdebug ) · 114 unmodified lines
21252139 zconf_flex_debug = bdebug ;
21262140 }
21272141
2142+static 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+
21282170 /* zconflex_destroy is for both reentrant and non-reentrant scanners. */
21292171 int zconflex_destroy (void)
21302172 {
@@ -2140,6 +2182,10 @@ int zconflex_destroy (void) · 9 unmodified lines
21402182 zconffree((yy_buffer_stack) );
21412183 (yy_buffer_stack) = NULL;
21422184
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+
21432189 return 0;
21442190 }
21452191
@@ -2151,7 +2197,7 @@ int zconflex_destroy (void) · 5 unmodified lines
21512197 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
21522198 {
21532199 register int i;
2154− for ( i = 0; i < n; ++i )
2200+ for ( i = 0; i < n; ++i )
21552201 s1[i] = s2[i];
21562202 }
21572203 #endif
@@ -2160,7 +2206,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) · 2 unmodified lines
21602206 static int yy_flex_strlen (yyconst char * s )
21612207 {
21622208 register int n;
2163− for ( n = 0; s[n]; ++n )
2209+ for ( n = 0; s[n]; ++n )
21642210 ;
21652211
21662212 return n;
@@ -2191,19 +2237,6 @@ void zconffree (void * ptr ) · 24 unmodified lines
21912237
21922238 #define YYTABLES_NAME "yytables"
21932239
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−
22072240 void zconf_starthelp(void)
22082241 {
22092242 new_string();
scripts/kconfig/lkc.h+5−0
@@ -40,6 +40,10 @@ extern "C" { · 39 unmodified lines
4040
4141 #define TF_COMMAND 0x0001
4242 #define TF_PARAM 0x0002
43+#define TF_OPTION 0x0004
44+
45+#define T_OPT_MODULES 1
46+#define T_OPT_DEFCONFIG_LIST 2
4347
4448 struct kconf_id {
4549 int name;
@@ -78,6 +82,7 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e · 32 unmodified lines
7882 struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
7983 void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
8084 void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
85+void menu_add_option(int token, char *arg);
8186 void menu_finalize(struct menu *parent);
8287 void menu_set_type(int type);
8388
scripts/kconfig/menu.c+4−0
@@ -152,6 +152,10 @@ void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) · 151 unmodified lines
152152 menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep);
153153 }
154154
155+void menu_add_option(int token, char *arg)
156+{
157+}
158+
155159 static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2)
156160 {
157161 return sym2->type == S_INT || sym2->type == S_HEX ||
scripts/kconfig/zconf.gperf+3−0
@@ -39,5 +39,8 @@ string, T_TYPE, TF_COMMAND, S_STRING · 38 unmodified lines
3939 select, T_SELECT, TF_COMMAND
4040 enable, T_SELECT, TF_COMMAND
4141 range, T_RANGE, TF_COMMAND
42+option, T_OPTION, TF_COMMAND
4243 on, T_ON, TF_PARAM
44+modules, T_OPT_MODULES, TF_OPTION
45+defconfig_list, T_OPT_DEFCONFIG_LIST,TF_OPTION
4346 %%
scripts/kconfig/zconf.hash.c_shipped+96−85
@@ -53,10 +53,10 @@ kconf_id_hash (register const char *str, register unsigned int len) · 52 unmodified lines
5353 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
5454 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
5555 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
56− 47, 47, 47, 47, 47, 47, 47, 25, 10, 15,
57− 0, 0, 5, 47, 0, 0, 47, 47, 0, 10,
58− 0, 20, 20, 20, 5, 0, 0, 20, 47, 47,
59− 20, 47, 47, 47, 47, 47, 47, 47, 47, 47,
56+ 47, 47, 47, 47, 47, 47, 47, 25, 30, 15,
57+ 0, 15, 0, 47, 5, 15, 47, 47, 30, 20,
58+ 5, 0, 25, 15, 0, 0, 10, 35, 47, 47,
59+ 5, 47, 47, 47, 47, 47, 47, 47, 47, 47,
6060 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
6161 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
6262 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) · 25 unmodified lines
8888
8989 struct kconf_id_strings_t
9090 {
91− char kconf_id_strings_str2[sizeof("if")];
92− char kconf_id_strings_str3[sizeof("int")];
93− char kconf_id_strings_str4[sizeof("help")];
94− char kconf_id_strings_str5[sizeof("endif")];
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")];
91+ char kconf_id_strings_str2[sizeof("on")];
92+ char kconf_id_strings_str6[sizeof("string")];
93+ char kconf_id_strings_str7[sizeof("default")];
94+ char kconf_id_strings_str8[sizeof("def_bool")];
9995 char kconf_id_strings_str10[sizeof("range")];
100− char kconf_id_strings_str11[sizeof("string")];
101− char kconf_id_strings_str12[sizeof("default")];
102− char kconf_id_strings_str13[sizeof("def_bool")];
103− char kconf_id_strings_str14[sizeof("menu")];
104− char kconf_id_strings_str16[sizeof("def_boolean")];
105− char kconf_id_strings_str17[sizeof("def_tristate")];
106− char kconf_id_strings_str18[sizeof("mainmenu")];
107− char kconf_id_strings_str20[sizeof("menuconfig")];
108− char kconf_id_strings_str21[sizeof("config")];
109− char kconf_id_strings_str22[sizeof("on")];
110− char kconf_id_strings_str23[sizeof("hex")];
111− char kconf_id_strings_str26[sizeof("source")];
112− char kconf_id_strings_str27[sizeof("depends")];
113− char kconf_id_strings_str28[sizeof("optional")];
114− char kconf_id_strings_str31[sizeof("enable")];
115− char kconf_id_strings_str32[sizeof("comment")];
116− char kconf_id_strings_str33[sizeof("requires")];
96+ char kconf_id_strings_str11[sizeof("def_boolean")];
97+ char kconf_id_strings_str12[sizeof("def_tristate")];
98+ char kconf_id_strings_str13[sizeof("hex")];
99+ char kconf_id_strings_str14[sizeof("defconfig_list")];
100+ char kconf_id_strings_str16[sizeof("option")];
101+ char kconf_id_strings_str17[sizeof("if")];
102+ char kconf_id_strings_str18[sizeof("optional")];
103+ char kconf_id_strings_str20[sizeof("endif")];
104+ char kconf_id_strings_str21[sizeof("choice")];
105+ char kconf_id_strings_str22[sizeof("endmenu")];
106+ char kconf_id_strings_str23[sizeof("requires")];
107+ char kconf_id_strings_str24[sizeof("endchoice")];
108+ char kconf_id_strings_str26[sizeof("config")];
109+ char kconf_id_strings_str27[sizeof("modules")];
110+ char kconf_id_strings_str28[sizeof("int")];
111+ char kconf_id_strings_str29[sizeof("menu")];
112+ char kconf_id_strings_str31[sizeof("prompt")];
113+ char kconf_id_strings_str32[sizeof("depends")];
114+ char kconf_id_strings_str33[sizeof("tristate")];
117115 char kconf_id_strings_str34[sizeof("bool")];
116+ char kconf_id_strings_str35[sizeof("menuconfig")];
117+ char kconf_id_strings_str36[sizeof("select")];
118118 char kconf_id_strings_str37[sizeof("boolean")];
119− char kconf_id_strings_str41[sizeof("choice")];
120− char kconf_id_strings_str46[sizeof("prompt")];
119+ char kconf_id_strings_str39[sizeof("help")];
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")];
121124 };
122125 static struct kconf_id_strings_t kconf_id_strings_contents =
123126 {
124− "if",
125− "int",
126− "help",
127− "endif",
128− "select",
129− "endmenu",
130− "tristate",
131− "endchoice",
132− "range",
127+ "on",
133128 "string",
134129 "default",
135130 "def_bool",
136− "menu",
131+ "range",
137132 "def_boolean",
138133 "def_tristate",
139− "mainmenu",
140− "menuconfig",
141− "config",
142− "on",
143134 "hex",
144− "source",
145− "depends",
135+ "defconfig_list",
136+ "option",
137+ "if",
146138 "optional",
147− "enable",
148− "comment",
139+ "endif",
140+ "choice",
141+ "endmenu",
149142 "requires",
143+ "endchoice",
144+ "config",
145+ "modules",
146+ "int",
147+ "menu",
148+ "prompt",
149+ "depends",
150+ "tristate",
150151 "bool",
152+ "menuconfig",
153+ "select",
151154 "boolean",
152− "choice",
153− "prompt"
155+ "help",
156+ "source",
157+ "comment",
158+ "mainmenu",
159+ "enable"
154160 };
155161 #define kconf_id_strings ((const char *) &kconf_id_strings_contents)
156162 #ifdef __GNUC__
@@ -161,9 +167,9 @@ kconf_id_lookup (register const char *str, register unsigned int len) · 4 unmodified lines
161167 {
162168 enum
163169 {
164− TOTAL_KEYWORDS = 30,
170+ TOTAL_KEYWORDS = 33,
165171 MIN_WORD_LENGTH = 2,
166− MAX_WORD_LENGTH = 12,
172+ MAX_WORD_LENGTH = 14,
167173 MIN_HASH_VALUE = 2,
168174 MAX_HASH_VALUE = 46
169175 };
@@ -171,43 +177,48 @@ kconf_id_lookup (register const char *str, register unsigned int len) · 1 unmodified line
171177 static struct kconf_id wordlist[] =
172178 {
173179 {-1}, {-1},
174− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM},
175− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT},
176− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str4, T_HELP, TF_COMMAND},
177− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND},
178− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_SELECT, TF_COMMAND},
179− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND},
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},
180+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM},
181+ {-1}, {-1}, {-1},
182+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_TYPE, TF_COMMAND, S_STRING},
183+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
184+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
185+ {-1},
182186 {(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},
184− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
185− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
186− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_MENU, TF_COMMAND},
187+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
188+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE},
189+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_TYPE, TF_COMMAND, S_HEX},
190+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
187191 {-1},
188− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
189− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
190− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_MAINMENU, TF_COMMAND},
192+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_OPTION, TF_COMMAND},
193+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_IF, TF_COMMAND|TF_PARAM},
194+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
191195 {-1},
192− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_MENUCONFIG, TF_COMMAND},
193− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CONFIG, TF_COMMAND},
194− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ON, TF_PARAM},
195− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_HEX},
196− {-1}, {-1},
197− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SOURCE, TF_COMMAND},
198− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_DEPENDS, TF_COMMAND},
199− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPTIONAL, TF_COMMAND},
200− {-1}, {-1},
201− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND},
202− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
203− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_REQUIRES, TF_COMMAND},
196+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_ENDIF, TF_COMMAND},
197+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CHOICE, TF_COMMAND},
198+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND},
199+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_REQUIRES, TF_COMMAND},
200+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str24, T_ENDCHOICE, TF_COMMAND},
201+ {-1},
202+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_CONFIG, TF_COMMAND},
203+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
204+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_INT},
205+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
206+ {-1},
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},
204210 {(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},
206213 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN},
207− {-1}, {-1}, {-1},
208− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_CHOICE, TF_COMMAND},
209− {-1}, {-1}, {-1}, {-1},
210− {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_PROMPT, TF_COMMAND}
214+ {-1},
215+ {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_HELP, TF_COMMAND},
216+ {-1},
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}
211222 };
212223
213224 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
scripts/kconfig/zconf.tab.c_shipped+542−378
@@ -1,7 +1,7 @@
1−/* A Bison parser, made by GNU Bison 2.0. */
1+/* A Bison parser, made by GNU Bison 2.1. */
22
33 /* 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.
55
66 This program is free software; you can redistribute it and/or modify
77 it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@ · 7 unmodified lines
1515
1616 You should have received a copy of the GNU General Public License
1717 along with this program; if not, write to the Free Software
18− Foundation, Inc., 59 Temple Place - Suite 330,
19− Boston, MA 02111-1307, USA. */
18+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
19+ Boston, MA 02110-1301, USA. */
2020
2121 /* As a special exception, when this file is copied by Bison into a
2222 Bison output file, you may use that output file without restriction.
@@ -36,6 +36,9 @@ · 13 unmodified lines
3636 /* Identify Bison output. */
3737 #define YYBISON 1
3838
39+/* Bison version. */
40+#define YYBISON_VERSION "2.1"
41+
3942 /* Skeleton name. */
4043 #define YYSKELETON_NAME "yacc.c"
4144
@@ -82,19 +85,21 @@ · 40 unmodified lines
8285 T_DEFAULT = 276,
8386 T_SELECT = 277,
8487 T_RANGE = 278,
85− T_ON = 279,
86− T_WORD = 280,
87− T_WORD_QUOTE = 281,
88− T_UNEQUAL = 282,
89− T_CLOSE_PAREN = 283,
90− T_OPEN_PAREN = 284,
91− T_EOL = 285,
92− T_OR = 286,
93− T_AND = 287,
94− T_EQUAL = 288,
95− T_NOT = 289
88+ T_OPTION = 279,
89+ T_ON = 280,
90+ T_WORD = 281,
91+ T_WORD_QUOTE = 282,
92+ T_UNEQUAL = 283,
93+ T_CLOSE_PAREN = 284,
94+ T_OPEN_PAREN = 285,
95+ T_EOL = 286,
96+ T_OR = 287,
97+ T_AND = 288,
98+ T_EQUAL = 289,
99+ T_NOT = 290
96100 };
97101 #endif
102+/* Tokens. */
98103 #define T_MAINMENU 258
99104 #define T_MENU 259
100105 #define T_ENDMENU 260
@@ -116,17 +121,18 @@ · 15 unmodified lines
116121 #define T_DEFAULT 276
117122 #define T_SELECT 277
118123 #define T_RANGE 278
119−#define T_ON 279
120−#define T_WORD 280
121−#define T_WORD_QUOTE 281
122−#define T_UNEQUAL 282
123−#define T_CLOSE_PAREN 283
124−#define T_OPEN_PAREN 284
125−#define T_EOL 285
126−#define T_OR 286
127−#define T_AND 287
128−#define T_EQUAL 288
129−#define T_NOT 289
124+#define T_OPTION 279
125+#define T_ON 280
126+#define T_WORD 281
127+#define T_WORD_QUOTE 282
128+#define T_UNEQUAL 283
129+#define T_CLOSE_PAREN 284
130+#define T_OPEN_PAREN 285
131+#define T_EOL 286
132+#define T_OR 287
133+#define T_AND 288
134+#define T_EQUAL 289
135+#define T_NOT 290
130136
131137
132138
@@ -187,6 +193,11 @@ static struct menu *current_menu, *current_entry; · 54 unmodified lines
187193 # define YYERROR_VERBOSE 0
188194 #endif
189195
196+/* Enabling the token table. */
197+#ifndef YYTOKEN_TABLE
198+# define YYTOKEN_TABLE 0
199+#endif
200+
190201 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
191202
192203 typedef union YYSTYPE {
@@ -197,7 +208,7 @@ typedef union YYSTYPE { · 4 unmodified lines
197208 struct menu *menu;
198209 struct kconf_id *id;
199210 } YYSTYPE;
200−/* Line 190 of yacc.c. */
211+/* Line 196 of yacc.c. */
201212
202213 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
203214 # define YYSTYPE_IS_DECLARED 1
@@ -209,17 +220,36 @@ typedef union YYSTYPE { · 5 unmodified lines
209220 /* Copy the second part of user declarations. */
210221
211222
212−/* Line 213 of yacc.c. */
223+/* Line 219 of yacc.c. */
213224
214225
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
216239
217−# ifndef YYFREE
218−# define YYFREE free
240+#ifndef YY_
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
219246 # endif
220−# ifndef YYMALLOC
221−# define YYMALLOC malloc
247+# ifndef YY_
248+# define YY_(msgid) msgid
222249 # endif
250+#endif
251+
252+#if ! defined (yyoverflow) || YYERROR_VERBOSE
223253
224254 /* The parser invokes alloca or malloc; define the necessary symbols. */
225255
@@ -229,6 +259,10 @@ typedef union YYSTYPE { · 3 unmodified lines
229259 # define YYSTACK_ALLOC __builtin_alloca
230260 # else
231261 # 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
232266 # endif
233267 # endif
234268 # endif
@@ -236,13 +270,39 @@ typedef union YYSTYPE { · 1 unmodified line
236270 # ifdef YYSTACK_ALLOC
237271 /* Pacify GCC's `empty if-body' warning. */
238272 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
239−# else
240−# if defined (__STDC__) || defined (__cplusplus)
241−# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
242−# define YYSIZE_T size_t
273+# ifndef YYSTACK_ALLOC_MAXIMUM
274+ /* The OS might guarantee only one guard page at the bottom of the stack,
275+ and a page size can be as small as 4096 bytes. So we cannot safely
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 */
243279 # endif
280+# else
244281 # define YYSTACK_ALLOC YYMALLOC
245282 # define YYSTACK_FREE YYFREE
283+# ifndef YYSTACK_ALLOC_MAXIMUM
284+# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
285+# endif
286+# ifdef __cplusplus
287+extern "C" {
288+# endif
289+# ifndef YYMALLOC
290+# define YYMALLOC malloc
291+# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
292+ && (defined (__STDC__) || defined (__cplusplus)))
293+void *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)))
300+void free (void *); /* INFRINGES ON USER NAME SPACE */
301+# endif
302+# endif
303+# ifdef __cplusplus
304+}
305+# endif
246306 # endif
247307 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
248308
@@ -277,7 +337,7 @@ union yyalloc · 28 unmodified lines
277337 # define YYCOPY(To, From, Count) \
278338 do \
279339 { \
280− register YYSIZE_T yyi; \
340+ YYSIZE_T yyi; \
281341 for (yyi = 0; yyi < (Count); yyi++) \
282342 (To)[yyi] = (From)[yyi]; \
283343 } \
@@ -312,22 +372,22 @@ union yyalloc · 28 unmodified lines
312372 /* YYFINAL -- State number of the termination state. */
313373 #define YYFINAL 3
314374 /* YYLAST -- Last index in YYTABLE. */
315−#define YYLAST 264
375+#define YYLAST 275
316376
317377 /* YYNTOKENS -- Number of terminals. */
318−#define YYNTOKENS 35
378+#define YYNTOKENS 36
319379 /* YYNNTS -- Number of nonterminals. */
320−#define YYNNTS 42
380+#define YYNNTS 45
321381 /* YYNRULES -- Number of rules. */
322−#define YYNRULES 104
382+#define YYNRULES 110
323383 /* YYNRULES -- Number of states. */
324−#define YYNSTATES 175
384+#define YYNSTATES 183
325385
326386 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
327387 #define YYUNDEFTOK 2
328−#define YYMAXUTOK 289
388+#define YYMAXUTOK 290
329389
330−#define YYTRANSLATE(YYX) \
390+#define YYTRANSLATE(YYX) \
331391 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
332392
333393 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
@@ -361,7 +421,8 @@ static const unsigned char yytranslate[] = · 27 unmodified lines
361421 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
362422 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
363423 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
365426 };
366427
367428 #if YYDEBUG
@@ -372,72 +433,75 @@ static const unsigned short int yyprhs[] = · 4 unmodified lines
372433 0, 0, 3, 5, 6, 9, 12, 15, 20, 23,
373434 28, 33, 37, 39, 41, 43, 45, 47, 49, 51,
374435 53, 55, 57, 59, 61, 63, 67, 70, 74, 77,
375− 81, 84, 85, 88, 91, 94, 97, 100, 104, 109,
376− 114, 119, 125, 128, 131, 133, 137, 138, 141, 144,
377− 147, 150, 153, 158, 162, 165, 170, 171, 174, 178,
378− 180, 184, 185, 188, 191, 194, 198, 201, 203, 207,
379− 208, 211, 214, 217, 221, 225, 228, 231, 234, 235,
380− 238, 241, 244, 249, 253, 257, 258, 261, 263, 265,
381− 268, 271, 274, 276, 279, 280, 283, 285, 289, 293,
382− 297, 300, 304, 308, 310
436+ 81, 84, 85, 88, 91, 94, 97, 100, 103, 107,
437+ 112, 117, 122, 128, 132, 133, 137, 138, 141, 144,
438+ 147, 149, 153, 154, 157, 160, 163, 166, 169, 174,
439+ 178, 181, 186, 187, 190, 194, 196, 200, 201, 204,
440+ 207, 210, 214, 217, 219, 223, 224, 227, 230, 233,
441+ 237, 241, 244, 247, 250, 251, 254, 257, 260, 265,
442+ 269, 273, 274, 277, 279, 281, 284, 287, 290, 292,
443+ 295, 296, 299, 301, 305, 309, 313, 316, 320, 324,
444+ 326
383445 };
384446
385447 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
386448 static const yysigned_char yyrhs[] =
387449 {
388− 36, 0, -1, 37, -1, -1, 37, 39, -1, 37,
389− 50, -1, 37, 61, -1, 37, 3, 71, 73, -1,
390− 37, 72, -1, 37, 25, 1, 30, -1, 37, 38,
391− 1, 30, -1, 37, 1, 30, -1, 16, -1, 19,
450+ 37, 0, -1, 38, -1, -1, 38, 40, -1, 38,
451+ 54, -1, 38, 65, -1, 38, 3, 75, 77, -1,
452+ 38, 76, -1, 38, 26, 1, 31, -1, 38, 39,
453+ 1, 31, -1, 38, 1, 31, -1, 16, -1, 19,
392454 -1, 20, -1, 22, -1, 18, -1, 23, -1, 21,
393− -1, 30, -1, 56, -1, 65, -1, 42, -1, 44,
394− -1, 63, -1, 25, 1, 30, -1, 1, 30, -1,
395− 10, 25, 30, -1, 41, 45, -1, 11, 25, 30,
396− -1, 43, 45, -1, -1, 45, 46, -1, 45, 69,
397− -1, 45, 67, -1, 45, 40, -1, 45, 30, -1,
398− 20, 70, 30, -1, 19, 71, 74, 30, -1, 21,
399− 75, 74, 30, -1, 22, 25, 74, 30, -1, 23,
400− 76, 76, 74, 30, -1, 7, 30, -1, 47, 51,
401− -1, 72, -1, 48, 53, 49, -1, -1, 51, 52,
402− -1, 51, 69, -1, 51, 67, -1, 51, 30, -1,
403− 51, 40, -1, 19, 71, 74, 30, -1, 20, 70,
404− 30, -1, 18, 30, -1, 21, 25, 74, 30, -1,
405− -1, 53, 39, -1, 14, 75, 73, -1, 72, -1,
406− 54, 57, 55, -1, -1, 57, 39, -1, 57, 61,
407− -1, 57, 50, -1, 4, 71, 30, -1, 58, 68,
408− -1, 72, -1, 59, 62, 60, -1, -1, 62, 39,
409− -1, 62, 61, -1, 62, 50, -1, 6, 71, 30,
410− -1, 9, 71, 30, -1, 64, 68, -1, 12, 30,
411− -1, 66, 13, -1, -1, 68, 69, -1, 68, 30,
412− -1, 68, 40, -1, 16, 24, 75, 30, -1, 16,
413− 75, 30, -1, 17, 75, 30, -1, -1, 71, 74,
414− -1, 25, -1, 26, -1, 5, 30, -1, 8, 30,
415− -1, 15, 30, -1, 30, -1, 73, 30, -1, -1,
416− 14, 75, -1, 76, -1, 76, 33, 76, -1, 76,
417− 27, 76, -1, 29, 75, 28, -1, 34, 75, -1,
418− 75, 31, 75, -1, 75, 32, 75, -1, 25, -1,
419− 26, -1
455+ -1, 31, -1, 60, -1, 69, -1, 43, -1, 45,
456+ -1, 67, -1, 26, 1, 31, -1, 1, 31, -1,
457+ 10, 26, 31, -1, 42, 46, -1, 11, 26, 31,
458+ -1, 44, 46, -1, -1, 46, 47, -1, 46, 48,
459+ -1, 46, 73, -1, 46, 71, -1, 46, 41, -1,
460+ 46, 31, -1, 20, 74, 31, -1, 19, 75, 78,
461+ 31, -1, 21, 79, 78, 31, -1, 22, 26, 78,
462+ 31, -1, 23, 80, 80, 78, 31, -1, 24, 49,
463+ 31, -1, -1, 49, 26, 50, -1, -1, 34, 75,
464+ -1, 7, 31, -1, 51, 55, -1, 76, -1, 52,
465+ 57, 53, -1, -1, 55, 56, -1, 55, 73, -1,
466+ 55, 71, -1, 55, 31, -1, 55, 41, -1, 19,
467+ 75, 78, 31, -1, 20, 74, 31, -1, 18, 31,
468+ -1, 21, 26, 78, 31, -1, -1, 57, 40, -1,
469+ 14, 79, 77, -1, 76, -1, 58, 61, 59, -1,
470+ -1, 61, 40, -1, 61, 65, -1, 61, 54, -1,
471+ 4, 75, 31, -1, 62, 72, -1, 76, -1, 63,
472+ 66, 64, -1, -1, 66, 40, -1, 66, 65, -1,
473+ 66, 54, -1, 6, 75, 31, -1, 9, 75, 31,
474+ -1, 68, 72, -1, 12, 31, -1, 70, 13, -1,
475+ -1, 72, 73, -1, 72, 31, -1, 72, 41, -1,
476+ 16, 25, 79, 31, -1, 16, 79, 31, -1, 17,
477+ 79, 31, -1, -1, 75, 78, -1, 26, -1, 27,
478+ -1, 5, 31, -1, 8, 31, -1, 15, 31, -1,
479+ 31, -1, 77, 31, -1, -1, 14, 79, -1, 80,
480+ -1, 80, 34, 80, -1, 80, 28, 80, -1, 30,
481+ 79, 29, -1, 35, 79, -1, 79, 32, 79, -1,
482+ 79, 33, 79, -1, 26, -1, 27, -1
420483 };
421484
422485 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
423486 static const unsigned short int yyrline[] =
424487 {
425− 0, 103, 103, 105, 107, 108, 109, 110, 111, 112,
426− 113, 117, 121, 121, 121, 121, 121, 121, 121, 125,
427− 126, 127, 128, 129, 130, 134, 135, 141, 149, 155,
428− 163, 173, 175, 176, 177, 178, 179, 182, 190, 196,
429− 206, 212, 220, 229, 234, 242, 245, 247, 248, 249,
430− 250, 251, 254, 260, 271, 277, 287, 289, 294, 302,
431− 310, 313, 315, 316, 317, 322, 329, 334, 342, 345,
432− 347, 348, 349, 352, 360, 367, 374, 380, 387, 389,
433− 390, 391, 394, 399, 404, 412, 414, 419, 420, 423,
434− 424, 425, 429, 430, 433, 434, 437, 438, 439, 440,
435− 441, 442, 443, 446, 447
488+ 0, 105, 105, 107, 109, 110, 111, 112, 113, 114,
489+ 115, 119, 123, 123, 123, 123, 123, 123, 123, 127,
490+ 128, 129, 130, 131, 132, 136, 137, 143, 151, 157,
491+ 165, 175, 177, 178, 179, 180, 181, 182, 185, 193,
492+ 199, 209, 215, 221, 224, 226, 237, 238, 243, 252,
493+ 257, 265, 268, 270, 271, 272, 273, 274, 277, 283,
494+ 294, 300, 310, 312, 317, 325, 333, 336, 338, 339,
495+ 340, 345, 352, 357, 365, 368, 370, 371, 372, 375,
496+ 383, 390, 397, 403, 410, 412, 413, 414, 417, 422,
497+ 427, 435, 437, 442, 443, 446, 447, 448, 452, 453,
498+ 456, 457, 460, 461, 462, 463, 464, 465, 466, 469,
499+ 470
436500 };
437501 #endif
438502
439−#if YYDEBUG || YYERROR_VERBOSE
440−/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
503+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
504+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
441505 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
442506 static const char *const yytname[] =
443507 {
@@ -445,17 +509,18 @@ static const char *const yytname[] = · 1 unmodified line
445509 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
446510 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
447511 "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT",
448− "T_SELECT", "T_RANGE", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL",
449− "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL",
450− "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt",
451− "option_error", "config_entry_start", "config_stmt",
512+ "T_SELECT", "T_RANGE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE",
513+ "T_UNEQUAL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND",
514+ "T_EQUAL", "T_NOT", "$accept", "input", "stmt_list", "option_name",
515+ "common_stmt", "option_error", "config_entry_start", "config_stmt",
452516 "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
453− "config_option", "choice", "choice_entry", "choice_end", "choice_stmt",
454− "choice_option_list", "choice_option", "choice_block", "if_entry",
455− "if_end", "if_stmt", "if_block", "menu", "menu_entry", "menu_end",
456− "menu_stmt", "menu_block", "source_stmt", "comment", "comment_stmt",
457− "help_start", "help", "depends_list", "depends", "prompt_stmt_opt",
458− "prompt", "end", "nl", "if_expr", "expr", "symbol", 0
517+ "config_option", "symbol_option", "symbol_option_list",
518+ "symbol_option_arg", "choice", "choice_entry", "choice_end",
519+ "choice_stmt", "choice_option_list", "choice_option", "choice_block",
520+ "if_entry", "if_end", "if_stmt", "if_block", "menu", "menu_entry",
521+ "menu_end", "menu_stmt", "menu_block", "source_stmt", "comment",
522+ "comment_stmt", "help_start", "help", "depends_list", "depends",
523+ "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", "symbol", 0
459524 };
460525 #endif
461526
@@ -467,24 +532,25 @@ static const unsigned short int yytoknum[] = · 5 unmodified lines
467532 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
468533 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
469534 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
470− 285, 286, 287, 288, 289
535+ 285, 286, 287, 288, 289, 290
471536 };
472537 # endif
473538
474539 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
475540 static const unsigned char yyr1[] =
476541 {
477− 0, 35, 36, 37, 37, 37, 37, 37, 37, 37,
478− 37, 37, 38, 38, 38, 38, 38, 38, 38, 39,
479− 39, 39, 39, 39, 39, 40, 40, 41, 42, 43,
480− 44, 45, 45, 45, 45, 45, 45, 46, 46, 46,
481− 46, 46, 47, 48, 49, 50, 51, 51, 51, 51,
482− 51, 51, 52, 52, 52, 52, 53, 53, 54, 55,
483− 56, 57, 57, 57, 57, 58, 59, 60, 61, 62,
484− 62, 62, 62, 63, 64, 65, 66, 67, 68, 68,
485− 68, 68, 69, 69, 69, 70, 70, 71, 71, 72,
486− 72, 72, 73, 73, 74, 74, 75, 75, 75, 75,
487− 75, 75, 75, 76, 76
542+ 0, 36, 37, 38, 38, 38, 38, 38, 38, 38,
543+ 38, 38, 39, 39, 39, 39, 39, 39, 39, 40,
544+ 40, 40, 40, 40, 40, 41, 41, 42, 43, 44,
545+ 45, 46, 46, 46, 46, 46, 46, 46, 47, 47,
546+ 47, 47, 47, 48, 49, 49, 50, 50, 51, 52,
547+ 53, 54, 55, 55, 55, 55, 55, 55, 56, 56,
548+ 56, 56, 57, 57, 58, 59, 60, 61, 61, 61,
549+ 61, 62, 63, 64, 65, 66, 66, 66, 66, 67,
550+ 68, 69, 70, 71, 72, 72, 72, 72, 73, 73,
551+ 73, 74, 74, 75, 75, 76, 76, 76, 77, 77,
552+ 78, 78, 79, 79, 79, 79, 79, 79, 79, 80,
553+ 80
488554 };
489555
490556 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -493,14 +559,15 @@ static const unsigned char yyr2[] = · 2 unmodified lines
493559 0, 2, 1, 0, 2, 2, 2, 4, 2, 4,
494560 4, 3, 1, 1, 1, 1, 1, 1, 1, 1,
495561 1, 1, 1, 1, 1, 3, 2, 3, 2, 3,
496− 2, 0, 2, 2, 2, 2, 2, 3, 4, 4,
497− 4, 5, 2, 2, 1, 3, 0, 2, 2, 2,
498− 2, 2, 4, 3, 2, 4, 0, 2, 3, 1,
499− 3, 0, 2, 2, 2, 3, 2, 1, 3, 0,
500− 2, 2, 2, 3, 3, 2, 2, 2, 0, 2,
501− 2, 2, 4, 3, 3, 0, 2, 1, 1, 2,
502− 2, 2, 1, 2, 0, 2, 1, 3, 3, 3,
503− 2, 3, 3, 1, 1
562+ 2, 0, 2, 2, 2, 2, 2, 2, 3, 4,
563+ 4, 4, 5, 3, 0, 3, 0, 2, 2, 2,
564+ 1, 3, 0, 2, 2, 2, 2, 2, 4, 3,
565+ 2, 4, 0, 2, 3, 1, 3, 0, 2, 2,
566+ 2, 3, 2, 1, 3, 0, 2, 2, 2, 3,
567+ 3, 2, 2, 2, 0, 2, 2, 2, 4, 3,
568+ 3, 0, 2, 1, 1, 2, 2, 2, 1, 2,
569+ 0, 2, 1, 3, 3, 3, 2, 3, 3, 1,
570+ 1
504571 };
505572
506573 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -511,175 +578,164 @@ static const unsigned char yydefact[] = · 4 unmodified lines
511578 3, 0, 0, 1, 0, 0, 0, 0, 0, 0,
512579 0, 0, 0, 0, 0, 0, 12, 16, 13, 14,
513580 18, 15, 17, 0, 19, 0, 4, 31, 22, 31,
514− 23, 46, 56, 5, 61, 20, 78, 69, 6, 24,
515− 78, 21, 8, 11, 87, 88, 0, 0, 89, 0,
516− 42, 90, 0, 0, 0, 103, 104, 0, 0, 0,
517− 96, 91, 0, 0, 0, 0, 0, 0, 0, 0,
518− 0, 0, 92, 7, 65, 73, 74, 27, 29, 0,
519− 100, 0, 0, 58, 0, 0, 9, 10, 0, 0,
520− 0, 0, 0, 85, 0, 0, 0, 0, 36, 35,
521− 32, 0, 34, 33, 0, 0, 85, 0, 50, 51,
522− 47, 49, 48, 57, 45, 44, 62, 64, 60, 63,
523− 59, 80, 81, 79, 70, 72, 68, 71, 67, 93,
524− 99, 101, 102, 98, 97, 26, 76, 0, 0, 0,
525− 94, 0, 94, 94, 94, 0, 0, 77, 54, 94,
526− 0, 94, 0, 83, 84, 0, 0, 37, 86, 0,
527− 0, 94, 25, 0, 53, 0, 82, 95, 38, 39,
528− 40, 0, 52, 55, 41
581+ 23, 52, 62, 5, 67, 20, 84, 75, 6, 24,
582+ 84, 21, 8, 11, 93, 94, 0, 0, 95, 0,
583+ 48, 96, 0, 0, 0, 109, 110, 0, 0, 0,
584+ 102, 97, 0, 0, 0, 0, 0, 0, 0, 0,
585+ 0, 0, 98, 7, 71, 79, 80, 27, 29, 0,
586+ 106, 0, 0, 64, 0, 0, 9, 10, 0, 0,
587+ 0, 0, 0, 91, 0, 0, 0, 44, 0, 37,
588+ 36, 32, 33, 0, 35, 34, 0, 0, 91, 0,
589+ 56, 57, 53, 55, 54, 63, 51, 50, 68, 70,
590+ 66, 69, 65, 86, 87, 85, 76, 78, 74, 77,
591+ 73, 99, 105, 107, 108, 104, 103, 26, 82, 0,
592+ 0, 0, 100, 0, 100, 100, 100, 0, 0, 0,
593+ 83, 60, 100, 0, 100, 0, 89, 90, 0, 0,
594+ 38, 92, 0, 0, 100, 46, 43, 25, 0, 59,
595+ 0, 88, 101, 39, 40, 41, 0, 0, 45, 58,
596+ 61, 42, 47
529597 };
530598
531599 /* YYDEFGOTO[NTERM-NUM]. */
532600 static const short int yydefgoto[] =
533601 {
534− -1, 1, 2, 25, 26, 99, 27, 28, 29, 30,
535− 64, 100, 31, 32, 114, 33, 66, 110, 67, 34,
536− 118, 35, 68, 36, 37, 126, 38, 70, 39, 40,
537− 41, 101, 102, 69, 103, 141, 142, 42, 73, 156,
538− 59, 60
602+ -1, 1, 2, 25, 26, 100, 27, 28, 29, 30,
603+ 64, 101, 102, 148, 178, 31, 32, 116, 33, 66,
604+ 112, 67, 34, 120, 35, 68, 36, 37, 128, 38,
605+ 70, 39, 40, 41, 103, 104, 69, 105, 143, 144,
606+ 42, 73, 159, 59, 60
539607 };
540608
541609 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
542610 STATE-NUM. */
543−#define YYPACT_NINF -78
611+#define YYPACT_NINF -135
544612 static const short int yypact[] =
545613 {
546− -78, 2, 159, -78, -21, 0, 0, -12, 0, 1,
547− 4, 0, 27, 38, 60, 58, -78, -78, -78, -78,
548− -78, -78, -78, 100, -78, 104, -78, -78, -78, -78,
549− -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
550− -78, -78, -78, -78, -78, -78, 86, 113, -78, 114,
551− -78, -78, 125, 127, 128, -78, -78, 60, 60, 210,
552− 65, -78, 141, 142, 39, 103, 182, 200, 6, 66,
553− 6, 131, -78, 146, -78, -78, -78, -78, -78, 196,
554− -78, 60, 60, 146, 40, 40, -78, -78, 155, 156,
555− -2, 60, 0, 0, 60, 105, 40, 194, -78, -78,
556− -78, 206, -78, -78, 183, 0, 0, 195, -78, -78,
557− -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
558− -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
559− -78, 197, -78, -78, -78, -78, -78, 60, 213, 216,
560− 212, 203, 212, 190, 212, 40, 208, -78, -78, 212,
561− 222, 212, 219, -78, -78, 60, 223, -78, -78, 224,
562− 225, 212, -78, 226, -78, 227, -78, 47, -78, -78,
563− -78, 228, -78, -78, -78
614+ -135, 2, 170, -135, -14, 56, 56, -8, 56, 24,
615+ 67, 56, 7, 14, 62, 97, -135, -135, -135, -135,
616+ -135, -135, -135, 156, -135, 166, -135, -135, -135, -135,
617+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
618+ -135, -135, -135, -135, -135, -135, 138, 151, -135, 152,
619+ -135, -135, 163, 167, 176, -135, -135, 62, 62, 185,
620+ -19, -135, 188, 190, 42, 103, 194, 85, 70, 222,
621+ 70, 132, -135, 191, -135, -135, -135, -135, -135, 127,
622+ -135, 62, 62, 191, 104, 104, -135, -135, 193, 203,
623+ 9, 62, 56, 56, 62, 161, 104, -135, 196, -135,
624+ -135, -135, -135, 233, -135, -135, 204, 56, 56, 221,
625+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
626+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
627+ -135, -135, -135, 219, -135, -135, -135, -135, -135, 62,
628+ 209, 212, 240, 224, 240, -1, 240, 104, 41, 225,
629+ -135, -135, 240, 226, 240, 218, -135, -135, 62, 227,
630+ -135, -135, 228, 229, 240, 230, -135, -135, 231, -135,
631+ 232, -135, 112, -135, -135, -135, 234, 56, -135, -135,
632+ -135, -135, -135
564633 };
565634
566635 /* YYPGOTO[NTERM-NUM]. */
567636 static const short int yypgoto[] =
568637 {
569− -78, -78, -78, -78, 164, -36, -78, -78, -78, -78,
570− 230, -78, -78, -78, -78, 29, -78, -78, -78, -78,
571− -78, -78, -78, -78, -78, -78, 59, -78, -78, -78,
572− -78, -78, 198, 220, 24, 157, -5, 169, 202, 74,
573− -53, -77
638+ -135, -135, -135, -135, 94, -45, -135, -135, -135, -135,
639+ 237, -135, -135, -135, -135, -135, -135, -135, -54, -135,
640+ -135, -135, -135, -135, -135, -135, -135, -135, -135, 1,
641+ -135, -135, -135, -135, -135, 195, 235, -44, 159, -5,
642+ 98, 210, -134, -53, -77
574643 };
575644
576645 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
577646 positive, shift that token. If negative, reduce the rule which
578647 number is the opposite. If zero, do what YYDEFACT says.
579648 If YYTABLE_NINF, syntax error. */
580−#define YYTABLE_NINF -76
649+#define YYTABLE_NINF -82
581650 static const short int yytable[] =
582651 {
583− 46, 47, 3, 49, 79, 80, 52, 133, 134, 43,
584− 6, 7, 8, 9, 10, 11, 12, 13, 48, 145,
585− 14, 15, 137, 55, 56, 44, 45, 57, 131, 132,
586− 109, 50, 58, 122, 51, 122, 24, 138, 139, -28,
587− 88, 143, -28, -28, -28, -28, -28, -28, -28, -28,
588− -28, 89, 53, -28, -28, 90, 91, -28, 92, 93,
589− 94, 95, 96, 54, 97, 55, 56, 88, 161, 98,
590− -66, -66, -66, -66, -66, -66, -66, -66, 81, 82,
591− -66, -66, 90, 91, 152, 55, 56, 140, 61, 57,
592− 112, 97, 84, 123, 58, 123, 121, 117, 85, 125,
593− 149, 62, 167, -30, 88, 63, -30, -30, -30, -30,
594− -30, -30, -30, -30, -30, 89, 72, -30, -30, 90,
595− 91, -30, 92, 93, 94, 95, 96, 119, 97, 127,
596− 144, -75, 88, 98, -75, -75, -75, -75, -75, -75,
597− -75, -75, -75, 74, 75, -75, -75, 90, 91, -75,
598− -75, -75, -75, -75, -75, 76, 97, 77, 78, -2,
599− 4, 121, 5, 6, 7, 8, 9, 10, 11, 12,
600− 13, 86, 87, 14, 15, 16, 129, 17, 18, 19,
601− 20, 21, 22, 88, 23, 135, 136, -43, -43, 24,
602− -43, -43, -43, -43, 89, 146, -43, -43, 90, 91,
603− 104, 105, 106, 107, 155, 7, 8, 97, 10, 11,
604− 12, 13, 108, 148, 14, 15, 158, 159, 160, 147,
605− 151, 81, 82, 163, 130, 165, 155, 81, 82, 82,
606− 24, 113, 116, 157, 124, 171, 115, 120, 162, 128,
607− 72, 81, 82, 153, 81, 82, 154, 81, 82, 166,
608− 81, 82, 164, 168, 169, 170, 172, 173, 174, 65,
609− 71, 83, 0, 150, 111
652+ 46, 47, 3, 49, 79, 80, 52, 135, 136, 84,
653+ 161, 162, 163, 158, 119, 85, 127, 43, 168, 147,
654+ 170, 111, 114, 48, 124, 125, 124, 125, 133, 134,
655+ 176, 81, 82, 53, 139, 55, 56, 140, 141, 57,
656+ 54, 145, -28, 88, 58, -28, -28, -28, -28, -28,
657+ -28, -28, -28, -28, 89, 50, -28, -28, 90, 91,
658+ -28, 92, 93, 94, 95, 96, 97, 165, 98, 121,
659+ 164, 129, 166, 99, 6, 7, 8, 9, 10, 11,
660+ 12, 13, 44, 45, 14, 15, 155, 142, 55, 56,
661+ 7, 8, 57, 10, 11, 12, 13, 58, 51, 14,
662+ 15, 24, 152, -30, 88, 172, -30, -30, -30, -30,
663+ -30, -30, -30, -30, -30, 89, 24, -30, -30, 90,
664+ 91, -30, 92, 93, 94, 95, 96, 97, 61, 98,
665+ 55, 56, -81, 88, 99, -81, -81, -81, -81, -81,
666+ -81, -81, -81, -81, 81, 82, -81, -81, 90, 91,
667+ -81, -81, -81, -81, -81, -81, 132, 62, 98, 81,
668+ 82, 115, 118, 123, 126, 117, 122, 63, 130, 72,
669+ -2, 4, 182, 5, 6, 7, 8, 9, 10, 11,
670+ 12, 13, 74, 75, 14, 15, 16, 146, 17, 18,
671+ 19, 20, 21, 22, 76, 88, 23, 149, 77, -49,
672+ -49, 24, -49, -49, -49, -49, 89, 78, -49, -49,
673+ 90, 91, 106, 107, 108, 109, 72, 81, 82, 86,
674+ 98, 87, 131, 88, 137, 110, -72, -72, -72, -72,
675+ -72, -72, -72, -72, 138, 151, -72, -72, 90, 91,
676+ 156, 81, 82, 157, 81, 82, 150, 154, 98, 171,
677+ 81, 82, 82, 123, 158, 160, 167, 169, 173, 174,
678+ 175, 113, 179, 180, 177, 181, 65, 153, 0, 83,
679+ 0, 0, 0, 0, 0, 71
610680 };
611681
612682 static const short int yycheck[] =
613683 {
614− 5, 6, 0, 8, 57, 58, 11, 84, 85, 30,
615− 4, 5, 6, 7, 8, 9, 10, 11, 30, 96,
616− 14, 15, 24, 25, 26, 25, 26, 29, 81, 82,
617− 66, 30, 34, 69, 30, 71, 30, 90, 91, 0,
618− 1, 94, 3, 4, 5, 6, 7, 8, 9, 10,
619− 11, 12, 25, 14, 15, 16, 17, 18, 19, 20,
620− 21, 22, 23, 25, 25, 25, 26, 1, 145, 30,
621− 4, 5, 6, 7, 8, 9, 10, 11, 31, 32,
622− 14, 15, 16, 17, 137, 25, 26, 92, 30, 29,
623− 66, 25, 27, 69, 34, 71, 30, 68, 33, 70,
624− 105, 1, 155, 0, 1, 1, 3, 4, 5, 6,
625− 7, 8, 9, 10, 11, 12, 30, 14, 15, 16,
626− 17, 18, 19, 20, 21, 22, 23, 68, 25, 70,
627− 25, 0, 1, 30, 3, 4, 5, 6, 7, 8,
628− 9, 10, 11, 30, 30, 14, 15, 16, 17, 18,
629− 19, 20, 21, 22, 23, 30, 25, 30, 30, 0,
630− 1, 30, 3, 4, 5, 6, 7, 8, 9, 10,
631− 11, 30, 30, 14, 15, 16, 30, 18, 19, 20,
632− 21, 22, 23, 1, 25, 30, 30, 5, 6, 30,
633− 8, 9, 10, 11, 12, 1, 14, 15, 16, 17,
634− 18, 19, 20, 21, 14, 5, 6, 25, 8, 9,
635− 10, 11, 30, 30, 14, 15, 142, 143, 144, 13,
636− 25, 31, 32, 149, 28, 151, 14, 31, 32, 32,
637− 30, 67, 68, 30, 70, 161, 67, 68, 30, 70,
638− 30, 31, 32, 30, 31, 32, 30, 31, 32, 30,
639− 31, 32, 30, 30, 30, 30, 30, 30, 30, 29,
640− 40, 59, -1, 106, 66
684+ 5, 6, 0, 8, 57, 58, 11, 84, 85, 28,
685+ 144, 145, 146, 14, 68, 34, 70, 31, 152, 96,
686+ 154, 66, 66, 31, 69, 69, 71, 71, 81, 82,
687+ 164, 32, 33, 26, 25, 26, 27, 90, 91, 30,
688+ 26, 94, 0, 1, 35, 3, 4, 5, 6, 7,
689+ 8, 9, 10, 11, 12, 31, 14, 15, 16, 17,
690+ 18, 19, 20, 21, 22, 23, 24, 26, 26, 68,
691+ 147, 70, 31, 31, 4, 5, 6, 7, 8, 9,
692+ 10, 11, 26, 27, 14, 15, 139, 92, 26, 27,
693+ 5, 6, 30, 8, 9, 10, 11, 35, 31, 14,
694+ 15, 31, 107, 0, 1, 158, 3, 4, 5, 6,
695+ 7, 8, 9, 10, 11, 12, 31, 14, 15, 16,
696+ 17, 18, 19, 20, 21, 22, 23, 24, 31, 26,
697+ 26, 27, 0, 1, 31, 3, 4, 5, 6, 7,
698+ 8, 9, 10, 11, 32, 33, 14, 15, 16, 17,
699+ 18, 19, 20, 21, 22, 23, 29, 1, 26, 32,
700+ 33, 67, 68, 31, 70, 67, 68, 1, 70, 31,
701+ 0, 1, 177, 3, 4, 5, 6, 7, 8, 9,
702+ 10, 11, 31, 31, 14, 15, 16, 26, 18, 19,
703+ 20, 21, 22, 23, 31, 1, 26, 1, 31, 5,
704+ 6, 31, 8, 9, 10, 11, 12, 31, 14, 15,
705+ 16, 17, 18, 19, 20, 21, 31, 32, 33, 31,
706+ 26, 31, 31, 1, 31, 31, 4, 5, 6, 7,
707+ 8, 9, 10, 11, 31, 31, 14, 15, 16, 17,
708+ 31, 32, 33, 31, 32, 33, 13, 26, 26, 31,
709+ 32, 33, 33, 31, 14, 31, 31, 31, 31, 31,
710+ 31, 66, 31, 31, 34, 31, 29, 108, -1, 59,
711+ -1, -1, -1, -1, -1, 40
641712 };
642713
643714 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
644715 symbol of state STATE-NUM. */
645716 static const unsigned char yystos[] =
646717 {
647− 0, 36, 37, 0, 1, 3, 4, 5, 6, 7,
718+ 0, 37, 38, 0, 1, 3, 4, 5, 6, 7,
648719 8, 9, 10, 11, 14, 15, 16, 18, 19, 20,
649− 21, 22, 23, 25, 30, 38, 39, 41, 42, 43,
650− 44, 47, 48, 50, 54, 56, 58, 59, 61, 63,
651− 64, 65, 72, 30, 25, 26, 71, 71, 30, 71,
652− 30, 30, 71, 25, 25, 25, 26, 29, 34, 75,
653− 76, 30, 1, 1, 45, 45, 51, 53, 57, 68,
654− 62, 68, 30, 73, 30, 30, 30, 30, 30, 75,
655− 75, 31, 32, 73, 27, 33, 30, 30, 1, 12,
656− 16, 17, 19, 20, 21, 22, 23, 25, 30, 40,
657− 46, 66, 67, 69, 18, 19, 20, 21, 30, 40,
658− 52, 67, 69, 39, 49, 72, 39, 50, 55, 61,
659− 72, 30, 40, 69, 39, 50, 60, 61, 72, 30,
660− 28, 75, 75, 76, 76, 30, 30, 24, 75, 75,
661− 71, 70, 71, 75, 25, 76, 1, 13, 30, 71,
662− 70, 25, 75, 30, 30, 14, 74, 30, 74, 74,
663− 74, 76, 30, 74, 30, 74, 30, 75, 30, 30,
664− 30, 74, 30, 30, 30
720+ 21, 22, 23, 26, 31, 39, 40, 42, 43, 44,
721+ 45, 51, 52, 54, 58, 60, 62, 63, 65, 67,
722+ 68, 69, 76, 31, 26, 27, 75, 75, 31, 75,
723+ 31, 31, 75, 26, 26, 26, 27, 30, 35, 79,
724+ 80, 31, 1, 1, 46, 46, 55, 57, 61, 72,
725+ 66, 72, 31, 77, 31, 31, 31, 31, 31, 79,
726+ 79, 32, 33, 77, 28, 34, 31, 31, 1, 12,
727+ 16, 17, 19, 20, 21, 22, 23, 24, 26, 31,
728+ 41, 47, 48, 70, 71, 73, 18, 19, 20, 21,
729+ 31, 41, 56, 71, 73, 40, 53, 76, 40, 54,
730+ 59, 65, 76, 31, 41, 73, 40, 54, 64, 65,
731+ 76, 31, 29, 79, 79, 80, 80, 31, 31, 25,
732+ 79, 79, 75, 74, 75, 79, 26, 80, 49, 1,
733+ 13, 31, 75, 74, 26, 79, 31, 31, 14, 78,
734+ 31, 78, 78, 78, 80, 26, 31, 31, 78, 31,
735+ 78, 31, 79, 31, 31, 31, 78, 34, 50, 31,
736+ 31, 31, 75
665737 };
666738
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−
683739 #define yyerrok (yyerrstatus = 0)
684740 #define yyclearin (yychar = YYEMPTY)
685741 #define YYEMPTY (-2)
@@ -709,8 +765,8 @@ do \ · 23 unmodified lines
709765 goto yybackup; \
710766 } \
711767 else \
712− { \
713− yyerror ("syntax error: cannot back up");\
768+ { \
769+ yyerror (YY_("syntax error: cannot back up")); \
714770 YYERROR; \
715771 } \
716772 while (0)
@@ -789,7 +845,7 @@ do { \ · 72 unmodified lines
789845 if (yydebug) \
790846 { \
791847 YYFPRINTF (stderr, "%s ", Title); \
792− yysymprint (stderr, \
848+ yysymprint (stderr, \
793849 Type, Value); \
794850 YYFPRINTF (stderr, "\n"); \
795851 } \
@@ -837,13 +893,13 @@ yy_reduce_print (yyrule) · 41 unmodified lines
837893 #endif
838894 {
839895 int yyi;
840− unsigned int yylno = yyrline[yyrule];
841− YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
896+ unsigned long int yylno = yyrline[yyrule];
897+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
842898 yyrule - 1, yylno);
843899 /* Print the symbols being reduced, and their result. */
844900 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
845− YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
846− YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
901+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
902+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
847903 }
848904
849905 # define YY_REDUCE_PRINT(Rule) \
@@ -872,7 +928,7 @@ int yydebug; · 22 unmodified lines
872928 if the built-in stack extension method is used).
873929
874930 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)
876932 evaluated with infinite-precision integer arithmetic. */
877933
878934 #ifndef YYMAXDEPTH
@@ -896,7 +952,7 @@ yystrlen (yystr) · 17 unmodified lines
896952 const char *yystr;
897953 # endif
898954 {
899− register const char *yys = yystr;
955+ const char *yys = yystr;
900956
901957 while (*yys++ != '\0')
902958 continue;
@@ -921,8 +977,8 @@ yystpcpy (yydest, yysrc) · 18 unmodified lines
921977 const char *yysrc;
922978 # endif
923979 {
924− register char *yyd = yydest;
925− register const char *yys = yysrc;
980+ char *yyd = yydest;
981+ const char *yys = yysrc;
926982
927983 while ((*yyd++ = *yys++) != '\0')
928984 continue;
@@ -932,7 +988,55 @@ yystpcpy (yydest, yysrc) · 3 unmodified lines
932988 # endif
933989 # endif
934990
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. */
999+static YYSIZE_T
1000+yytnamerr (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 */
9361040
9371041
9381042
@@ -998,7 +1102,7 @@ yydestruct (yymsg, yytype, yyvaluep) · 59 unmodified lines
9981102
9991103 switch (yytype)
10001104 {
1001− case 48: /* choice_entry */
1105+ case 52: /* "choice_entry" */
10021106
10031107 {
10041108 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -1008,7 +1112,7 @@ yydestruct (yymsg, yytype, yyvaluep) · 3 unmodified lines
10081112 };
10091113
10101114 break;
1011− case 54: /* if_entry */
1115+ case 58: /* "if_entry" */
10121116
10131117 {
10141118 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -1018,7 +1122,7 @@ yydestruct (yymsg, yytype, yyvaluep) · 3 unmodified lines
10181122 };
10191123
10201124 break;
1021− case 59: /* menu_entry */
1125+ case 63: /* "menu_entry" */
10221126
10231127 {
10241128 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -1082,13 +1186,13 @@ yyparse (void) · 57 unmodified lines
10821186 #else
10831187 int
10841188 yyparse ()
1085−
1189+ ;
10861190 #endif
10871191 #endif
10881192 {
10891193
1090− register int yystate;
1091− register int yyn;
1194+ int yystate;
1195+ int yyn;
10921196 int yyresult;
10931197 /* Number of tokens to shift before error messages enabled. */
10941198 int yyerrstatus;
@@ -1106,12 +1210,12 @@ yyparse () · 11 unmodified lines
11061210 /* The state stack. */
11071211 short int yyssa[YYINITDEPTH];
11081212 short int *yyss = yyssa;
1109− register short int *yyssp;
1213+ short int *yyssp;
11101214
11111215 /* The semantic value stack. */
11121216 YYSTYPE yyvsa[YYINITDEPTH];
11131217 YYSTYPE *yyvs = yyvsa;
1114− register YYSTYPE *yyvsp;
1218+ YYSTYPE *yyvsp;
11151219
11161220
11171221
@@ -1143,9 +1247,6 @@ yyparse () · 25 unmodified lines
11431247 yyssp = yyss;
11441248 yyvsp = yyvs;
11451249
1146−
1147− yyvsp[0] = yylval;
1148−
11491250 goto yysetstate;
11501251
11511252 /*------------------------------------------------------------.
@@ -1178,7 +1279,7 @@ yyparse () · 26 unmodified lines
11781279 data in use in that stack, in bytes. This used to be a
11791280 conditional around just the two extra args, but that might
11801281 be undefined if yyoverflow is a macro. */
1181− yyoverflow ("parser stack overflow",
1282+ yyoverflow (YY_("memory exhausted"),
11821283 &yyss1, yysize * sizeof (*yyssp),
11831284 &yyvs1, yysize * sizeof (*yyvsp),
11841285
@@ -1189,11 +1290,11 @@ yyparse () · 4 unmodified lines
11891290 }
11901291 #else /* no yyoverflow */
11911292 # ifndef YYSTACK_RELOCATE
1192− goto yyoverflowlab;
1293+ goto yyexhaustedlab;
11931294 # else
11941295 /* Extend the stack our own way. */
11951296 if (YYMAXDEPTH <= yystacksize)
1196− goto yyoverflowlab;
1297+ goto yyexhaustedlab;
11971298 yystacksize *= 2;
11981299 if (YYMAXDEPTH < yystacksize)
11991300 yystacksize = YYMAXDEPTH;
@@ -1203,7 +1304,7 @@ yyparse () · 3 unmodified lines
12031304 union yyalloc *yyptr =
12041305 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
12051306 if (! yyptr)
1206− goto yyoverflowlab;
1307+ goto yyexhaustedlab;
12071308 YYSTACK_RELOCATE (yyss);
12081309 YYSTACK_RELOCATE (yyvs);
12091310
@@ -1403,7 +1504,7 @@ yyreduce: · 193 unmodified lines
14031504 ;}
14041505 break;
14051506
1406− case 37:
1507+ case 38:
14071508
14081509 {
14091510 menu_set_type((yyvsp[-2].id)->stype);
@@ -1413,7 +1514,7 @@ yyreduce: · 3 unmodified lines
14131514 ;}
14141515 break;
14151516
1416− case 38:
1517+ case 39:
14171518
14181519 {
14191520 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
@@ -1421,7 +1522,7 @@ yyreduce: · 1 unmodified line
14211522 ;}
14221523 break;
14231524
1424− case 39:
1525+ case 40:
14251526
14261527 {
14271528 menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr));
@@ -1433,7 +1534,7 @@ yyreduce: · 5 unmodified lines
14331534 ;}
14341535 break;
14351536
1436− case 40:
1537+ case 41:
14371538
14381539 {
14391540 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr));
@@ -1441,7 +1542,7 @@ yyreduce: · 1 unmodified line
14411542 ;}
14421543 break;
14431544
1444− case 41:
1545+ case 42:
14451546
14461547 {
14471548 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr));
@@ -1449,7 +1550,29 @@ yyreduce: · 1 unmodified line
14491550 ;}
14501551 break;
14511552
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:
14531576
14541577 {
14551578 struct symbol *sym = sym_lookup(NULL, 0);
@@ -1460,14 +1583,14 @@ yyreduce: · 4 unmodified lines
14601583 ;}
14611584 break;
14621585
1463− case 43:
1586+ case 49:
14641587
14651588 {
14661589 (yyval.menu) = menu_add_menu();
14671590 ;}
14681591 break;
14691592
1470− case 44:
1593+ case 50:
14711594
14721595 {
14731596 if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) {
@@ -1477,7 +1600,7 @@ yyreduce: · 3 unmodified lines
14771600 ;}
14781601 break;
14791602
1480− case 52:
1603+ case 58:
14811604
14821605 {
14831606 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
@@ -1485,7 +1608,7 @@ yyreduce: · 1 unmodified line
14851608 ;}
14861609 break;
14871610
1488− case 53:
1611+ case 59:
14891612
14901613 {
14911614 if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) {
@@ -1498,7 +1621,7 @@ yyreduce: · 6 unmodified lines
14981621 ;}
14991622 break;
15001623
1501− case 54:
1624+ case 60:
15021625
15031626 {
15041627 current_entry->sym->flags |= SYMBOL_OPTIONAL;
@@ -1506,7 +1629,7 @@ yyreduce: · 1 unmodified line
15061629 ;}
15071630 break;
15081631
1509− case 55:
1632+ case 61:
15101633
15111634 {
15121635 if ((yyvsp[-3].id)->stype == S_UNKNOWN) {
@@ -1518,7 +1641,7 @@ yyreduce: · 5 unmodified lines
15181641 ;}
15191642 break;
15201643
1521− case 58:
1644+ case 64:
15221645
15231646 {
15241647 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
@@ -1528,7 +1651,7 @@ yyreduce: · 3 unmodified lines
15281651 ;}
15291652 break;
15301653
1531− case 59:
1654+ case 65:
15321655
15331656 {
15341657 if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) {
@@ -1538,7 +1661,7 @@ yyreduce: · 3 unmodified lines
15381661 ;}
15391662 break;
15401663
1541− case 65:
1664+ case 71:
15421665
15431666 {
15441667 menu_add_entry(NULL);
@@ -1547,14 +1670,14 @@ yyreduce: · 2 unmodified lines
15471670 ;}
15481671 break;
15491672
1550− case 66:
1673+ case 72:
15511674
15521675 {
15531676 (yyval.menu) = menu_add_menu();
15541677 ;}
15551678 break;
15561679
1557− case 67:
1680+ case 73:
15581681
15591682 {
15601683 if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) {
@@ -1564,7 +1687,7 @@ yyreduce: · 3 unmodified lines
15641687 ;}
15651688 break;
15661689
1567− case 73:
1690+ case 79:
15681691
15691692 {
15701693 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
@@ -1572,7 +1695,7 @@ yyreduce: · 1 unmodified line
15721695 ;}
15731696 break;
15741697
1575− case 74:
1698+ case 80:
15761699
15771700 {
15781701 menu_add_entry(NULL);
@@ -1581,14 +1704,14 @@ yyreduce: · 2 unmodified lines
15811704 ;}
15821705 break;
15831706
1584− case 75:
1707+ case 81:
15851708
15861709 {
15871710 menu_end_entry();
15881711 ;}
15891712 break;
15901713
1591− case 76:
1714+ case 82:
15921715
15931716 {
15941717 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
@@ -1596,14 +1719,14 @@ yyreduce: · 1 unmodified line
15961719 ;}
15971720 break;
15981721
1599− case 77:
1722+ case 83:
16001723
16011724 {
16021725 current_entry->sym->help = (yyvsp[0].string);
16031726 ;}
16041727 break;
16051728
1606− case 82:
1729+ case 88:
16071730
16081731 {
16091732 menu_add_dep((yyvsp[-1].expr));
@@ -1611,7 +1734,7 @@ yyreduce: · 1 unmodified line
16111734 ;}
16121735 break;
16131736
1614− case 83:
1737+ case 89:
16151738
16161739 {
16171740 menu_add_dep((yyvsp[-1].expr));
@@ -1619,7 +1742,7 @@ yyreduce: · 1 unmodified line
16191742 ;}
16201743 break;
16211744
1622− case 84:
1745+ case 90:
16231746
16241747 {
16251748 menu_add_dep((yyvsp[-1].expr));
@@ -1627,87 +1750,88 @@ yyreduce: · 1 unmodified line
16271750 ;}
16281751 break;
16291752
1630− case 86:
1753+ case 92:
16311754
16321755 {
16331756 menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr));
16341757 ;}
16351758 break;
16361759
1637− case 89:
1760+ case 95:
16381761
16391762 { (yyval.id) = (yyvsp[-1].id); ;}
16401763 break;
16411764
1642− case 90:
1765+ case 96:
16431766
16441767 { (yyval.id) = (yyvsp[-1].id); ;}
16451768 break;
16461769
1647− case 91:
1770+ case 97:
16481771
16491772 { (yyval.id) = (yyvsp[-1].id); ;}
16501773 break;
16511774
1652− case 94:
1775+ case 100:
16531776
16541777 { (yyval.expr) = NULL; ;}
16551778 break;
16561779
1657− case 95:
1780+ case 101:
16581781
16591782 { (yyval.expr) = (yyvsp[0].expr); ;}
16601783 break;
16611784
1662− case 96:
1785+ case 102:
16631786
16641787 { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); ;}
16651788 break;
16661789
1667− case 97:
1790+ case 103:
16681791
16691792 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;}
16701793 break;
16711794
1672− case 98:
1795+ case 104:
16731796
16741797 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;}
16751798 break;
16761799
1677− case 99:
1800+ case 105:
16781801
16791802 { (yyval.expr) = (yyvsp[-1].expr); ;}
16801803 break;
16811804
1682− case 100:
1805+ case 106:
16831806
16841807 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); ;}
16851808 break;
16861809
1687− case 101:
1810+ case 107:
16881811
16891812 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;}
16901813 break;
16911814
1692− case 102:
1815+ case 108:
16931816
16941817 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;}
16951818 break;
16961819
1697− case 103:
1820+ case 109:
16981821
16991822 { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); ;}
17001823 break;
17011824
1702− case 104:
1825+ case 110:
17031826
17041827 { (yyval.symbol) = sym_lookup((yyvsp[0].string), 1); free((yyvsp[0].string)); ;}
17051828 break;
17061829
17071830
1831+ default: break;
17081832 }
17091833
1710−/* Line 1037 of yacc.c. */
1834+/* Line 1126 of yacc.c. */
17111835
17121836
17131837 yyvsp -= yylen;
@@ -1747,12 +1871,36 @@ yyerrlab: · 33 unmodified lines
17471871
17481872 if (YYPACT_NINF < yyn && yyn < YYLAST)
17491873 {
1750− YYSIZE_T yysize = 0;
17511874 int yytype = YYTRANSLATE (yychar);
1752− const char* yyprefix;
1753− char *yymsg;
1875+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
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];
17541882 int yyx;
17551883
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+
17561904 /* Start YYX at -YYN if negative to avoid negative indexes in
17571905 YYCHECK. */
17581906 int yyxbegin = yyn < 0 ? -yyn : 0;
@@ -1760,48 +1908,68 @@ yyerrlab: · 1 unmodified line
17601908 /* Stay within bounds of both yycheck and yytname. */
17611909 int yychecklim = YYLAST - yyn;
17621910 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);
17641915
1765− yyprefix = ", expecting ";
17661916 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
17671917 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
17681918 {
1769− yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
1770− yycount += 1;
1771− if (yycount == 5)
1919+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
17721920 {
1773− yysize = 0;
1921+ yycount = 1;
1922+ yysize = yysize0;
1923+ yyformat[sizeof yyunexpected - 1] = '\0';
17741924 break;
17751925 }
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;
17761932 }
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]);
17841933
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))
17861949 {
1787− yyprefix = ", expecting ";
1788− for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1789− if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1790− {
1791− yyp = yystpcpy (yyp, yyprefix);
1792− yyp = yystpcpy (yyp, yytname[yyx]);
1793− yyprefix = " or ";
1794− }
1950+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1951+ {
1952+ yyp += yytnamerr (yyp, yyarg[yyi++]);
1953+ yyf += 2;
1954+ }
1955+ else
1956+ {
1957+ yyp++;
1958+ yyf++;
1959+ }
17951960 }
17961961 yyerror (yymsg);
17971962 YYSTACK_FREE (yymsg);
17981963 }
17991964 else
1800− yyerror ("syntax error; also virtual memory exhausted");
1965+ {
1966+ yyerror (YY_("syntax error"));
1967+ goto yyexhaustedlab;
1968+ }
18011969 }
18021970 else
18031971 #endif /* YYERROR_VERBOSE */
1804− yyerror ("syntax error");
1972+ yyerror (YY_("syntax error"));
18051973 }
18061974
18071975
@@ -1813,18 +1981,9 @@ yyerrlab: · 5 unmodified lines
18131981
18141982 if (yychar <= YYEOF)
18151983 {
1816− /* If at end of input, pop the error token,
1817− then the rest of the stack, then return failure. */
1984+ /* Return failure if at end of input. */
18181985 if (yychar == YYEOF)
1819− for (;;)
1820− {
1821−
1822− YYPOPSTACK;
1823− if (yyssp == yyss)
1824− YYABORT;
1825− yydestruct ("Error: popping",
1826− yystos[*yyssp], yyvsp);
1827− }
1986+ YYABORT;
18281987 }
18291988 else
18301989 {
@@ -1843,12 +2002,11 @@ yyerrlab: · 12 unmodified lines
18432002 `---------------------------------------------------*/
18442003 yyerrorlab:
18452004
1846−#ifdef __GNUC__
1847− /* Pacify GCC when the user code never invokes YYERROR and the label
1848− yyerrorlab therefore never appears in user code. */
2005+ /* Pacify compilers like GCC when the user code never invokes
2006+ YYERROR and the label yyerrorlab therefore never appears in user
2007+ code. */
18492008 if (0)
18502009 goto yyerrorlab;
1851−#endif
18522010
18532011 yyvsp -= yylen;
18542012 yyssp -= yylen;
@@ -1911,23 +2069,29 @@ yyacceptlab: · 56 unmodified lines
19112069 | yyabortlab -- YYABORT comes here. |
19122070 `-----------------------------------*/
19132071 yyabortlab:
1914− yydestruct ("Error: discarding lookahead",
1915− yytoken, &yylval);
1916− yychar = YYEMPTY;
19172072 yyresult = 1;
19182073 goto yyreturn;
19192074
19202075 #ifndef yyoverflow
1921−/*----------------------------------------------.
1922−| yyoverflowlab -- parser overflow comes here. |
1923−`----------------------------------------------*/
1924−yyoverflowlab:
1925− yyerror ("parser stack overflow");
2076+/*-------------------------------------------------.
2077+| yyexhaustedlab -- memory exhaustion comes here. |
2078+`-------------------------------------------------*/
2079+yyexhaustedlab:
2080+ yyerror (YY_("memory exhausted"));
19262081 yyresult = 2;
19272082 /* Fall through. */
19282083 #endif
19292084
19302085 yyreturn:
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+ }
19312095 #ifndef yyoverflow
19322096 if (yyss != yyssa)
19332097 YYSTACK_FREE (yyss);
scripts/kconfig/zconf.y+23−0
@@ -71,6 +71,7 @@ static struct menu *current_menu, *current_entry; · 70 unmodified lines
7171 %token <id>T_DEFAULT
7272 %token <id>T_SELECT
7373 %token <id>T_RANGE
74+%token <id>T_OPTION
7475 %token <id>T_ON
7576 %token <string> T_WORD
7677 %token <string> T_WORD_QUOTE
@@ -91,6 +92,7 @@ static struct menu *current_menu, *current_entry; · 14 unmodified lines
9192 %type <id> end
9293 %type <id> option_name
9394 %type <menu> if_entry menu_entry choice_entry
95+%type <string> symbol_option_arg
9496
9597 %destructor {
9698 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
@@ -173,6 +175,7 @@ menuconfig_stmt: menuconfig_entry_start config_option_list · 76 unmodified lines
173175 config_option_list:
174176 /* empty */
175177 | config_option_list config_option
178+ | config_option_list symbol_option
176179 | config_option_list depends
177180 | config_option_list help
178181 | config_option_list option_error
@@ -215,6 +218,26 @@ config_option: T_RANGE symbol symbol if_expr T_EOL · 36 unmodified lines
215218 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
216219 };
217220
221+symbol_option: T_OPTION symbol_option_list T_EOL
222+;
223+
224+symbol_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+
236+symbol_option_arg:
237+ /* empty */ { $$ = NULL; }
238+ | T_EQUAL prompt { $$ = $2; }
239+;
240+
218241 /* choice entry */
219242
220243 choice: T_CHOICE T_EOL

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t