aboutsummaryrefslogtreecommitdiff
path: root/scripts/config/zconf.tab.c_shipped
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/config/zconf.tab.c_shipped')
-rw-r--r--scripts/config/zconf.tab.c_shipped1346
1 files changed, 728 insertions, 618 deletions
diff --git a/scripts/config/zconf.tab.c_shipped b/scripts/config/zconf.tab.c_shipped
index 33b2b6f84..c9bfdb451 100644
--- a/scripts/config/zconf.tab.c_shipped
+++ b/scripts/config/zconf.tab.c_shipped
@@ -1,7 +1,7 @@
1/* A Bison parser, made from zconf.y, by GNU bison 1.75. */ 1/* A Bison parser, made by GNU Bison 1.875a. */
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 Free Software Foundation, Inc. 4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 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
@@ -34,10 +34,13 @@
34 USER NAME SPACE" below. */ 34 USER NAME SPACE" below. */
35 35
36/* Identify Bison output. */ 36/* Identify Bison output. */
37#define YYBISON 1 37#define YYBISON 1
38
39/* Skeleton name. */
40#define YYSKELETON_NAME "yacc.c"
38 41
39/* Pure parsers. */ 42/* Pure parsers. */
40#define YYPURE 0 43#define YYPURE 0
41 44
42/* Using locations. */ 45/* Using locations. */
43#define YYLSP_NEEDED 0 46#define YYLSP_NEEDED 0
@@ -67,31 +70,37 @@
67 T_ENDCHOICE = 263, 70 T_ENDCHOICE = 263,
68 T_COMMENT = 264, 71 T_COMMENT = 264,
69 T_CONFIG = 265, 72 T_CONFIG = 265,
70 T_HELP = 266, 73 T_MENUCONFIG = 266,
71 T_HELPTEXT = 267, 74 T_HELP = 267,
72 T_IF = 268, 75 T_HELPTEXT = 268,
73 T_ENDIF = 269, 76 T_IF = 269,
74 T_DEPENDS = 270, 77 T_ENDIF = 270,
75 T_REQUIRES = 271, 78 T_DEPENDS = 271,
76 T_OPTIONAL = 272, 79 T_REQUIRES = 272,
77 T_PROMPT = 273, 80 T_OPTIONAL = 273,
78 T_DEFAULT = 274, 81 T_PROMPT = 274,
79 T_TRISTATE = 275, 82 T_DEFAULT = 275,
80 T_BOOLEAN = 276, 83 T_TRISTATE = 276,
81 T_INT = 277, 84 T_DEF_TRISTATE = 277,
82 T_HEX = 278, 85 T_BOOLEAN = 278,
83 T_WORD = 279, 86 T_DEF_BOOLEAN = 279,
84 T_STRING = 280, 87 T_STRING = 280,
85 T_UNEQUAL = 281, 88 T_INT = 281,
86 T_EOF = 282, 89 T_HEX = 282,
87 T_EOL = 283, 90 T_WORD = 283,
88 T_CLOSE_PAREN = 284, 91 T_WORD_QUOTE = 284,
89 T_OPEN_PAREN = 285, 92 T_UNEQUAL = 285,
90 T_ON = 286, 93 T_EOF = 286,
91 T_OR = 287, 94 T_EOL = 287,
92 T_AND = 288, 95 T_CLOSE_PAREN = 288,
93 T_EQUAL = 289, 96 T_OPEN_PAREN = 289,
94 T_NOT = 290 97 T_ON = 290,
98 T_SELECT = 291,
99 T_RANGE = 292,
100 T_OR = 293,
101 T_AND = 294,
102 T_EQUAL = 295,
103 T_NOT = 296
95 }; 104 };
96#endif 105#endif
97#define T_MAINMENU 258 106#define T_MAINMENU 258
@@ -102,37 +111,43 @@
102#define T_ENDCHOICE 263 111#define T_ENDCHOICE 263
103#define T_COMMENT 264 112#define T_COMMENT 264
104#define T_CONFIG 265 113#define T_CONFIG 265
105#define T_HELP 266 114#define T_MENUCONFIG 266
106#define T_HELPTEXT 267 115#define T_HELP 267
107#define T_IF 268 116#define T_HELPTEXT 268
108#define T_ENDIF 269 117#define T_IF 269
109#define T_DEPENDS 270 118#define T_ENDIF 270
110#define T_REQUIRES 271 119#define T_DEPENDS 271
111#define T_OPTIONAL 272 120#define T_REQUIRES 272
112#define T_PROMPT 273 121#define T_OPTIONAL 273
113#define T_DEFAULT 274 122#define T_PROMPT 274
114#define T_TRISTATE 275 123#define T_DEFAULT 275
115#define T_BOOLEAN 276 124#define T_TRISTATE 276
116#define T_INT 277 125#define T_DEF_TRISTATE 277
117#define T_HEX 278 126#define T_BOOLEAN 278
118#define T_WORD 279 127#define T_DEF_BOOLEAN 279
119#define T_STRING 280 128#define T_STRING 280
120#define T_UNEQUAL 281 129#define T_INT 281
121#define T_EOF 282 130#define T_HEX 282
122#define T_EOL 283 131#define T_WORD 283
123#define T_CLOSE_PAREN 284 132#define T_WORD_QUOTE 284
124#define T_OPEN_PAREN 285 133#define T_UNEQUAL 285
125#define T_ON 286 134#define T_EOF 286
126#define T_OR 287 135#define T_EOL 287
127#define T_AND 288 136#define T_CLOSE_PAREN 288
128#define T_EQUAL 289 137#define T_OPEN_PAREN 289
129#define T_NOT 290 138#define T_ON 290
139#define T_SELECT 291
140#define T_RANGE 292
141#define T_OR 293
142#define T_AND 294
143#define T_EQUAL 295
144#define T_NOT 296
130 145
131 146
132 147
133 148
134/* Copy the first part of user declarations. */ 149/* Copy the first part of user declarations. */
135#line 1 "zconf.y" 150
136 151
137/* 152/*
138 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 153 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
@@ -165,7 +180,7 @@ struct symbol *symbol_hash[257];
165 180
166/* Enabling traces. */ 181/* Enabling traces. */
167#ifndef YYDEBUG 182#ifndef YYDEBUG
168# define YYDEBUG 1 183# define YYDEBUG 0
169#endif 184#endif
170 185
171/* Enabling verbose error messages. */ 186/* Enabling verbose error messages. */
@@ -176,42 +191,33 @@ struct symbol *symbol_hash[257];
176# define YYERROR_VERBOSE 0 191# define YYERROR_VERBOSE 0
177#endif 192#endif
178 193
179#ifndef YYSTYPE 194#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
180#line 33 "zconf.y" 195
181typedef union { 196typedef union YYSTYPE {
182 int token; 197 int token;
183 char *string; 198 char *string;
184 struct symbol *symbol; 199 struct symbol *symbol;
185 struct expr *expr; 200 struct expr *expr;
186 struct menu *menu; 201 struct menu *menu;
187} yystype; 202} YYSTYPE;
188/* Line 193 of /usr/share/bison/yacc.c. */ 203/* Line 191 of yacc.c. */
189#line 190 "zconf.tab.c" 204
190# define YYSTYPE yystype 205# define yystype YYSTYPE /* obsolescent; will be withdrawn */
206# define YYSTYPE_IS_DECLARED 1
191# define YYSTYPE_IS_TRIVIAL 1 207# define YYSTYPE_IS_TRIVIAL 1
192#endif 208#endif
193 209
194#ifndef YYLTYPE 210
195typedef struct yyltype
196{
197 int first_line;
198 int first_column;
199 int last_line;
200 int last_column;
201} yyltype;
202# define YYLTYPE yyltype
203# define YYLTYPE_IS_TRIVIAL 1
204#endif
205 211
206/* Copy the second part of user declarations. */ 212/* Copy the second part of user declarations. */
207#line 83 "zconf.y" 213
208 214
209#define LKC_DIRECT_LINK 215#define LKC_DIRECT_LINK
210#include "lkc.h" 216#include "lkc.h"
211 217
212 218
213/* Line 213 of /usr/share/bison/yacc.c. */ 219/* Line 214 of yacc.c. */
214#line 215 "zconf.tab.c" 220
215 221
216#if ! defined (yyoverflow) || YYERROR_VERBOSE 222#if ! defined (yyoverflow) || YYERROR_VERBOSE
217 223
@@ -247,7 +253,7 @@ typedef struct yyltype
247 253
248#if (! defined (yyoverflow) \ 254#if (! defined (yyoverflow) \
249 && (! defined (__cplusplus) \ 255 && (! defined (__cplusplus) \
250 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 256 || (YYSTYPE_IS_TRIVIAL)))
251 257
252/* A type that is properly aligned for any stack member. */ 258/* A type that is properly aligned for any stack member. */
253union yyalloc 259union yyalloc
@@ -257,13 +263,13 @@ union yyalloc
257 }; 263 };
258 264
259/* The size of the maximum gap between one aligned stack and the next. */ 265/* The size of the maximum gap between one aligned stack and the next. */
260# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) 266# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
261 267
262/* The size of an array large to enough to hold all stacks, each with 268/* The size of an array large to enough to hold all stacks, each with
263 N elements. */ 269 N elements. */
264# define YYSTACK_BYTES(N) \ 270# define YYSTACK_BYTES(N) \
265 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ 271 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
266 + YYSTACK_GAP_MAX) 272 + YYSTACK_GAP_MAXIMUM)
267 273
268/* Copy COUNT objects from FROM to TO. The source and destination do 274/* Copy COUNT objects from FROM to TO. The source and destination do
269 not overlap. */ 275 not overlap. */
@@ -277,7 +283,7 @@ union yyalloc
277 { \ 283 { \
278 register YYSIZE_T yyi; \ 284 register YYSIZE_T yyi; \
279 for (yyi = 0; yyi < (Count); yyi++) \ 285 for (yyi = 0; yyi < (Count); yyi++) \
280 (To)[yyi] = (From)[yyi]; \ 286 (To)[yyi] = (From)[yyi]; \
281 } \ 287 } \
282 while (0) 288 while (0)
283# endif 289# endif
@@ -294,7 +300,7 @@ union yyalloc
294 YYSIZE_T yynewbytes; \ 300 YYSIZE_T yynewbytes; \
295 YYCOPY (&yyptr->Stack, Stack, yysize); \ 301 YYCOPY (&yyptr->Stack, Stack, yysize); \
296 Stack = &yyptr->Stack; \ 302 Stack = &yyptr->Stack; \
297 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ 303 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
298 yyptr += yynewbytes / sizeof (*yyptr); \ 304 yyptr += yynewbytes / sizeof (*yyptr); \
299 } \ 305 } \
300 while (0) 306 while (0)
@@ -309,23 +315,24 @@ union yyalloc
309 315
310/* YYFINAL -- State number of the termination state. */ 316/* YYFINAL -- State number of the termination state. */
311#define YYFINAL 2 317#define YYFINAL 2
312#define YYLAST 151 318/* YYLAST -- Last index in YYTABLE. */
319#define YYLAST 201
313 320
314/* YYNTOKENS -- Number of terminals. */ 321/* YYNTOKENS -- Number of terminals. */
315#define YYNTOKENS 36 322#define YYNTOKENS 42
316/* YYNNTS -- Number of nonterminals. */ 323/* YYNNTS -- Number of nonterminals. */
317#define YYNNTS 39 324#define YYNNTS 41
318/* YYNRULES -- Number of rules. */ 325/* YYNRULES -- Number of rules. */
319#define YYNRULES 96 326#define YYNRULES 104
320/* YYNRULES -- Number of states. */ 327/* YYNRULES -- Number of states. */
321#define YYNSTATES 145 328#define YYNSTATES 182
322 329
323/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 330/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
324#define YYUNDEFTOK 2 331#define YYUNDEFTOK 2
325#define YYMAXUTOK 290 332#define YYMAXUTOK 296
326 333
327#define YYTRANSLATE(X) \ 334#define YYTRANSLATE(YYX) \
328 ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK) 335 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
329 336
330/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 337/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
331static const unsigned char yytranslate[] = 338static const unsigned char yytranslate[] =
@@ -359,7 +366,7 @@ static const unsigned char yytranslate[] =
359 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 366 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
360 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 367 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
361 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 368 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
362 35 369 35, 36, 37, 38, 39, 40, 41
363}; 370};
364 371
365#if YYDEBUG 372#if YYDEBUG
@@ -368,63 +375,69 @@ static const unsigned char yytranslate[] =
368static const unsigned short yyprhs[] = 375static const unsigned short yyprhs[] =
369{ 376{
370 0, 0, 3, 4, 7, 9, 11, 13, 17, 19, 377 0, 0, 3, 4, 7, 9, 11, 13, 17, 19,
371 21, 23, 26, 28, 30, 32, 34, 36, 39, 43, 378 21, 23, 26, 28, 30, 32, 34, 36, 38, 42,
372 44, 48, 52, 55, 58, 61, 64, 67, 70, 73, 379 45, 49, 52, 53, 56, 59, 62, 65, 69, 74,
373 77, 81, 83, 87, 89, 94, 97, 98, 102, 106, 380 78, 83, 87, 91, 95, 100, 105, 110, 116, 119,
374 109, 112, 116, 118, 121, 122, 125, 128, 130, 136, 381 122, 124, 128, 131, 132, 135, 138, 141, 144, 149,
375 140, 141, 144, 147, 150, 153, 157, 159, 164, 167, 382 153, 157, 160, 165, 166, 169, 173, 175, 179, 182,
376 168, 171, 174, 177, 181, 184, 187, 190, 194, 197, 383 183, 186, 189, 192, 196, 199, 201, 205, 208, 209,
377 200, 201, 205, 208, 212, 215, 218, 219, 221, 225, 384 212, 215, 218, 222, 226, 228, 232, 235, 238, 241,
378 227, 229, 231, 233, 235, 237, 239, 240, 243, 245, 385 242, 245, 248, 253, 257, 261, 262, 265, 267, 269,
379 249, 253, 257, 260, 264, 268, 270 386 272, 275, 278, 280, 282, 283, 286, 288, 292, 296,
387 300, 303, 307, 311, 313
380}; 388};
381 389
382/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 390/* YYRHS -- A `-1'-separated list of the rules' RHS. */
383static const yysigned_char yyrhs[] = 391static const yysigned_char yyrhs[] =
384{ 392{
385 37, 0, -1, -1, 37, 38, -1, 39, -1, 47, 393 43, 0, -1, -1, 43, 44, -1, 45, -1, 55,
386 -1, 58, -1, 3, 69, 71, -1, 5, -1, 14, 394 -1, 66, -1, 3, 77, 79, -1, 5, -1, 15,
387 -1, 8, -1, 1, 71, -1, 53, -1, 63, -1, 395 -1, 8, -1, 1, 79, -1, 61, -1, 71, -1,
388 41, -1, 61, -1, 71, -1, 10, 24, -1, 40, 396 47, -1, 49, -1, 69, -1, 79, -1, 10, 28,
389 28, 42, -1, -1, 42, 43, 28, -1, 42, 67, 397 32, -1, 46, 50, -1, 11, 28, 32, -1, 48,
390 28, -1, 42, 65, -1, 42, 28, -1, 20, 68, 398 50, -1, -1, 50, 51, -1, 50, 75, -1, 50,
391 -1, 21, 68, -1, 22, 68, -1, 23, 68, -1, 399 73, -1, 50, 32, -1, 21, 76, 32, -1, 22,
392 25, 68, -1, 18, 69, 72, -1, 19, 74, 72, 400 81, 80, 32, -1, 23, 76, 32, -1, 24, 81,
393 -1, 7, -1, 44, 28, 48, -1, 70, -1, 45, 401 80, 32, -1, 26, 76, 32, -1, 27, 76, 32,
394 50, 46, 28, -1, 45, 50, -1, -1, 48, 49, 402 -1, 25, 76, 32, -1, 19, 77, 80, 32, -1,
395 28, -1, 48, 67, 28, -1, 48, 65, -1, 48, 403 20, 81, 80, 32, -1, 36, 28, 80, 32, -1,
396 28, -1, 18, 69, 72, -1, 17, -1, 19, 74, 404 37, 82, 82, 80, 32, -1, 7, 32, -1, 52,
397 -1, -1, 50, 39, -1, 13, 73, -1, 70, -1, 405 56, -1, 78, -1, 53, 58, 54, -1, 53, 58,
398 51, 28, 54, 52, 28, -1, 51, 28, 54, -1, 406 -1, -1, 56, 57, -1, 56, 75, -1, 56, 73,
399 -1, 54, 39, -1, 54, 58, -1, 54, 47, -1, 407 -1, 56, 32, -1, 19, 77, 80, 32, -1, 21,
400 4, 69, -1, 55, 28, 66, -1, 70, -1, 56, 408 76, 32, -1, 23, 76, 32, -1, 18, 32, -1,
401 59, 57, 28, -1, 56, 59, -1, -1, 59, 39, 409 20, 28, 80, 32, -1, -1, 58, 45, -1, 14,
402 -1, 59, 58, -1, 59, 47, -1, 59, 1, 28, 410 81, 32, -1, 78, -1, 59, 62, 60, -1, 59,
403 -1, 6, 69, -1, 60, 28, -1, 9, 69, -1, 411 62, -1, -1, 62, 45, -1, 62, 66, -1, 62,
404 62, 28, 66, -1, 11, 28, -1, 64, 12, -1, 412 55, -1, 4, 77, 32, -1, 63, 74, -1, 78,
405 -1, 66, 67, 28, -1, 66, 28, -1, 15, 31, 413 -1, 64, 67, 65, -1, 64, 67, -1, -1, 67,
406 73, -1, 15, 73, -1, 16, 73, -1, -1, 69, 414 45, -1, 67, 66, -1, 67, 55, -1, 67, 1,
407 -1, 69, 13, 73, -1, 24, -1, 25, -1, 5, 415 32, -1, 6, 77, 32, -1, 68, -1, 9, 77,
408 -1, 8, -1, 14, -1, 28, -1, 27, -1, -1, 416 32, -1, 70, 74, -1, 12, 32, -1, 72, 13,
409 13, 73, -1, 74, -1, 74, 34, 74, -1, 74, 417 -1, -1, 74, 75, -1, 74, 32, -1, 16, 35,
410 26, 74, -1, 30, 73, 29, -1, 35, 73, -1, 418 81, 32, -1, 16, 81, 32, -1, 17, 81, 32,
411 73, 32, 73, -1, 73, 33, 73, -1, 24, -1, 419 -1, -1, 77, 80, -1, 28, -1, 29, -1, 5,
412 25, -1 420 79, -1, 8, 79, -1, 15, 79, -1, 32, -1,
421 31, -1, -1, 14, 81, -1, 82, -1, 82, 40,
422 82, -1, 82, 30, 82, -1, 34, 81, 33, -1,
423 41, 81, -1, 81, 38, 81, -1, 81, 39, 81,
424 -1, 28, -1, 29, -1
413}; 425};
414 426
415/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 427/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
416static const unsigned short yyrline[] = 428static const unsigned short yyrline[] =
417{ 429{
418 0, 88, 88, 89, 92, 93, 94, 95, 96, 97, 430 0, 94, 94, 95, 98, 99, 100, 101, 102, 103,
419 98, 99, 102, 104, 105, 106, 107, 113, 121, 127, 431 104, 105, 109, 110, 111, 112, 113, 114, 120, 128,
420 129, 130, 131, 132, 135, 141, 147, 153, 159, 165, 432 134, 142, 152, 154, 155, 156, 157, 160, 166, 173,
421 171, 179, 188, 194, 202, 204, 210, 212, 213, 214, 433 179, 186, 192, 198, 204, 210, 216, 222, 230, 239,
422 215, 218, 224, 230, 237, 239, 244, 254, 262, 264, 434 245, 254, 255, 261, 263, 264, 265, 266, 269, 275,
423 270, 272, 273, 274, 279, 286, 292, 300, 302, 308, 435 281, 287, 293, 299, 301, 306, 315, 324, 325, 331,
424 310, 311, 312, 313, 316, 322, 329, 336, 343, 349, 436 333, 334, 335, 340, 347, 353, 362, 363, 369, 371,
425 356, 357, 358, 361, 366, 371, 379, 381, 385, 390, 437 372, 373, 374, 377, 383, 390, 397, 404, 410, 417,
426 391, 394, 395, 396, 399, 400, 402, 403, 406, 407, 438 418, 419, 422, 427, 432, 440, 442, 447, 448, 451,
427 408, 409, 410, 411, 412, 415, 416 439 452, 453, 457, 457, 459, 460, 463, 464, 465, 466,
440 467, 468, 469, 472, 473
428}; 441};
429#endif 442#endif
430 443
@@ -435,12 +448,14 @@ static const char *const yytname[] =
435{ 448{
436 "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", 449 "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU",
437 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", 450 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
438 "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", "T_REQUIRES", 451 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
439 "T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE", "T_BOOLEAN", 452 "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE",
440 "T_INT", "T_HEX", "T_WORD", "T_STRING", "T_UNEQUAL", "T_EOF", "T_EOL", 453 "T_DEF_TRISTATE", "T_BOOLEAN", "T_DEF_BOOLEAN", "T_STRING", "T_INT",
441 "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_OR", "T_AND", "T_EQUAL", 454 "T_HEX", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", "T_EOF", "T_EOL",
442 "T_NOT", "$accept", "input", "block", "common_block", 455 "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_SELECT", "T_RANGE", "T_OR",
443 "config_entry_start", "config_stmt", "config_option_list", 456 "T_AND", "T_EQUAL", "T_NOT", "$accept", "input", "block",
457 "common_block", "config_entry_start", "config_stmt",
458 "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
444 "config_option", "choice", "choice_entry", "choice_end", "choice_stmt", 459 "config_option", "choice", "choice_entry", "choice_end", "choice_stmt",
445 "choice_option_list", "choice_option", "choice_block", "if", "if_end", 460 "choice_option_list", "choice_option", "choice_block", "if", "if_end",
446 "if_stmt", "if_block", "menu", "menu_entry", "menu_end", "menu_stmt", 461 "if_stmt", "if_block", "menu", "menu_entry", "menu_end", "menu_stmt",
@@ -458,38 +473,41 @@ static const unsigned short yytoknum[] =
458 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 473 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
459 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 474 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
460 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 475 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
461 285, 286, 287, 288, 289, 290 476 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
477 295, 296
462}; 478};
463# endif 479# endif
464 480
465/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 481/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
466static const unsigned char yyr1[] = 482static const unsigned char yyr1[] =
467{ 483{
468 0, 36, 37, 37, 38, 38, 38, 38, 38, 38, 484 0, 42, 43, 43, 44, 44, 44, 44, 44, 44,
469 38, 38, 39, 39, 39, 39, 39, 40, 41, 42, 485 44, 44, 45, 45, 45, 45, 45, 45, 46, 47,
470 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 486 48, 49, 50, 50, 50, 50, 50, 51, 51, 51,
471 43, 44, 45, 46, 47, 47, 48, 48, 48, 48, 487 51, 51, 51, 51, 51, 51, 51, 51, 52, 53,
472 48, 49, 49, 49, 50, 50, 51, 52, 53, 53, 488 54, 55, 55, 56, 56, 56, 56, 56, 57, 57,
473 54, 54, 54, 54, 55, 56, 57, 58, 58, 59, 489 57, 57, 57, 58, 58, 59, 60, 61, 61, 62,
474 59, 59, 59, 59, 60, 61, 62, 63, 64, 65, 490 62, 62, 62, 63, 64, 65, 66, 66, 67, 67,
475 66, 66, 66, 67, 67, 67, 68, 68, 68, 69, 491 67, 67, 67, 68, 69, 70, 71, 72, 73, 74,
476 69, 70, 70, 70, 71, 71, 72, 72, 73, 73, 492 74, 74, 75, 75, 75, 76, 76, 77, 77, 78,
477 73, 73, 73, 73, 73, 74, 74 493 78, 78, 79, 79, 80, 80, 81, 81, 81, 81,
494 81, 81, 81, 82, 82
478}; 495};
479 496
480/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 497/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
481static const unsigned char yyr2[] = 498static const unsigned char yyr2[] =
482{ 499{
483 0, 2, 0, 2, 1, 1, 1, 3, 1, 1, 500 0, 2, 0, 2, 1, 1, 1, 3, 1, 1,
484 1, 2, 1, 1, 1, 1, 1, 2, 3, 0, 501 1, 2, 1, 1, 1, 1, 1, 1, 3, 2,
485 3, 3, 2, 2, 2, 2, 2, 2, 2, 3, 502 3, 2, 0, 2, 2, 2, 2, 3, 4, 3,
486 3, 1, 3, 1, 4, 2, 0, 3, 3, 2, 503 4, 3, 3, 3, 4, 4, 4, 5, 2, 2,
487 2, 3, 1, 2, 0, 2, 2, 1, 5, 3, 504 1, 3, 2, 0, 2, 2, 2, 2, 4, 3,
488 0, 2, 2, 2, 2, 3, 1, 4, 2, 0, 505 3, 2, 4, 0, 2, 3, 1, 3, 2, 0,
489 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 506 2, 2, 2, 3, 2, 1, 3, 2, 0, 2,
490 0, 3, 2, 3, 2, 2, 0, 1, 3, 1, 507 2, 2, 3, 3, 1, 3, 2, 2, 2, 0,
491 1, 1, 1, 1, 1, 1, 0, 2, 1, 3, 508 2, 2, 4, 3, 3, 0, 2, 1, 1, 2,
492 3, 3, 2, 3, 3, 1, 1 509 2, 2, 1, 1, 0, 2, 1, 3, 3, 3,
510 2, 3, 3, 1, 1
493}; 511};
494 512
495/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 513/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -497,127 +515,151 @@ static const unsigned char yyr2[] =
497 means the default is an error. */ 515 means the default is an error. */
498static const unsigned char yydefact[] = 516static const unsigned char yydefact[] =
499{ 517{
500 2, 0, 1, 0, 0, 0, 8, 0, 31, 10, 518 2, 0, 1, 0, 0, 0, 8, 0, 0, 10,
501 0, 0, 0, 9, 85, 84, 3, 4, 0, 14, 519 0, 0, 0, 0, 9, 93, 92, 3, 4, 22,
502 0, 44, 5, 0, 12, 0, 59, 6, 0, 15, 520 14, 22, 15, 43, 53, 5, 59, 12, 79, 68,
503 0, 13, 16, 11, 79, 80, 0, 54, 64, 66, 521 6, 74, 16, 79, 13, 17, 11, 87, 88, 0,
504 17, 95, 96, 0, 0, 46, 88, 19, 36, 35, 522 0, 0, 38, 0, 0, 0, 103, 104, 0, 0,
505 50, 70, 0, 65, 70, 7, 0, 92, 0, 0, 523 0, 96, 19, 21, 39, 42, 58, 64, 0, 76,
506 0, 0, 18, 32, 81, 82, 83, 45, 0, 33, 524 7, 63, 73, 75, 18, 20, 0, 100, 55, 0,
507 49, 55, 0, 60, 62, 0, 61, 56, 67, 91, 525 0, 0, 0, 0, 0, 0, 0, 0, 85, 0,
508 93, 94, 90, 89, 0, 0, 0, 0, 0, 76, 526 85, 0, 85, 85, 85, 26, 0, 0, 23, 0,
509 76, 76, 76, 76, 23, 0, 0, 22, 0, 42, 527 25, 24, 0, 0, 0, 85, 85, 47, 44, 46,
510 0, 0, 40, 0, 39, 0, 34, 51, 53, 0, 528 45, 0, 0, 0, 54, 41, 40, 60, 62, 57,
511 52, 47, 72, 0, 63, 57, 68, 0, 74, 75, 529 61, 56, 81, 80, 0, 69, 71, 66, 70, 65,
512 86, 86, 24, 77, 25, 26, 27, 28, 20, 69, 530 99, 101, 102, 98, 97, 77, 0, 0, 0, 94,
513 21, 86, 43, 37, 38, 48, 71, 73, 0, 29, 531 94, 0, 94, 94, 0, 94, 0, 0, 0, 94,
514 30, 0, 41, 87, 78 532 0, 78, 51, 94, 94, 0, 0, 89, 90, 91,
533 72, 0, 83, 84, 0, 0, 0, 27, 86, 0,
534 29, 0, 33, 31, 32, 0, 94, 0, 0, 49,
535 50, 82, 95, 34, 35, 28, 30, 36, 0, 48,
536 52, 37
515}; 537};
516 538
517/* YYDEFGOTO[NTERM-NUM]. */ 539/* YYDEFGOTO[NTERM-NUM]. */
518static const short yydefgoto[] = 540static const short yydefgoto[] =
519{ 541{
520 -1, 1, 16, 17, 18, 19, 62, 95, 20, 21, 542 -1, 1, 17, 18, 19, 20, 21, 22, 52, 88,
521 68, 22, 63, 103, 49, 23, 109, 24, 70, 25, 543 23, 24, 105, 25, 54, 98, 55, 26, 109, 27,
522 26, 75, 27, 52, 28, 29, 30, 31, 96, 97, 544 56, 28, 29, 117, 30, 58, 31, 32, 33, 34,
523 71, 113, 122, 123, 69, 32, 139, 45, 46 545 89, 90, 57, 91, 131, 132, 106, 35, 155, 50,
546 51
524}; 547};
525 548
526/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 549/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
527 STATE-NUM. */ 550 STATE-NUM. */
528#define YYPACT_NINF -120 551#define YYPACT_NINF -99
529static const short yypact[] = 552static const short yypact[] =
530{ 553{
531 -120, 17, -120, 41, 48, 48, -120, 48, -120, -120, 554 -99, 48, -99, 38, 46, 46, -99, 46, -29, -99,
532 48, -11, 40, -120, -120, -120, -120, -120, 13, -120, 555 46, -17, -3, -11, -99, -99, -99, -99, -99, -99,
533 23, -120, -120, 66, -120, 72, -120, -120, 77, -120, 556 -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
534 81, -120, -120, -120, -120, -120, 41, -120, -120, -120, 557 -99, -99, -99, -99, -99, -99, -99, -99, -99, 38,
535 -120, -120, -120, 40, 40, 57, 59, -120, -120, 98, 558 12, 15, -99, 18, 51, 62, -99, -99, -11, -11,
536 -120, -120, 49, -120, -120, -120, 7, -120, 40, 40, 559 4, -24, 138, 138, 160, 121, 110, -4, 81, -4,
537 67, 67, 99, 117, -120, -120, -120, -120, 85, -120, 560 -99, -99, -99, -99, -99, -99, -19, -99, -99, -11,
538 74, 18, 88, -120, -120, 95, -120, -120, 18, -120, 561 -11, 70, 70, 73, 32, -11, 46, -11, 46, -11,
539 96, -120, -120, -120, 102, 36, 40, 48, 67, 48, 562 46, -11, 46, 46, 46, -99, 36, 70, -99, 95,
540 48, 48, 48, 48, -120, 103, 129, -120, 114, -120, 563 -99, -99, 96, 46, 106, 46, 46, -99, -99, -99,
541 48, 67, -120, 115, -120, 116, -120, -120, -120, 118, 564 -99, 38, 38, 38, -99, -99, -99, -99, -99, -99,
542 -120, -120, -120, 119, -120, -120, -120, 40, 57, 57, 565 -99, -99, -99, -99, 112, -99, -99, -99, -99, -99,
543 135, 135, -120, 136, -120, -120, -120, -120, -120, -120, 566 -99, 117, -99, -99, -99, -99, -11, 33, 65, 131,
544 -120, 135, -120, -120, -120, -120, -120, 57, 40, -120, 567 1, 119, 131, 1, 136, 1, 153, 154, 155, 131,
545 -120, 40, -120, 57, 57 568 70, -99, -99, 131, 131, 156, 157, -99, -99, -99,
569 -99, 101, -99, -99, -11, 158, 159, -99, -99, 161,
570 -99, 162, -99, -99, -99, 163, 131, 164, 165, -99,
571 -99, -99, 99, -99, -99, -99, -99, -99, 166, -99,
572 -99, -99
546}; 573};
547 574
548/* YYPGOTO[NTERM-NUM]. */ 575/* YYPGOTO[NTERM-NUM]. */
549static const yysigned_char yypgoto[] = 576static const short yypgoto[] =
550{ 577{
551 -120, -120, -120, -38, -120, -120, -120, -120, -120, -120, 578 -99, -99, -99, 111, -99, -99, -99, -99, 178, -99,
552 -120, -42, -120, -120, -120, -120, -120, -120, -120, -120, 579 -99, -99, -99, 91, -99, -99, -99, -99, -99, -99,
553 -120, -120, -33, -120, -120, -120, -120, -120, -120, 87, 580 -99, -99, -99, -99, 115, -99, -99, -99, -99, -99,
554 97, 34, 47, -1, -23, 2, -119, -43, -53 581 -99, 146, 168, 89, 27, 0, 126, -1, -98, -48,
582 -63
555}; 583};
556 584
557/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 585/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
558 positive, shift that token. If negative, reduce the rule which 586 positive, shift that token. If negative, reduce the rule which
559 number is the opposite. If zero, do what YYDEFACT says. 587 number is the opposite. If zero, do what YYDEFACT says.
560 If YYTABLE_NINF, parse error. */ 588 If YYTABLE_NINF, syntax error. */
561#define YYTABLE_NINF -59 589#define YYTABLE_NINF -68
562static const short yytable[] = 590static const short yytable[] =
563{ 591{
564 56, 57, 140, 36, 37, 33, 38, 82, 83, 39, 592 66, 67, 36, 42, 39, 40, 71, 41, 123, 124,
565 74, 67, 142, 40, 73, 80, 81, 2, 3, 76, 593 43, 44, 74, 75, 120, 154, 72, 46, 47, 69,
566 4, 5, 6, 7, 8, 9, 10, 11, 108, 77, 594 70, 121, 122, 48, 140, 45, 127, 128, 112, 130,
567 12, 13, 107, 85, 86, 121, 79, 110, 55, 58, 595 49, 133, 156, 135, 158, 159, 68, 161, 60, 69,
568 59, 47, 118, 119, 14, 15, 112, 111, 132, -58, 596 70, 165, 69, 70, 61, 167, 168, 62, 2, 3,
569 72, 48, -58, 5, 64, 7, 8, 65, 10, 11, 597 63, 4, 5, 6, 7, 8, 9, 10, 11, 12,
570 41, 42, 12, 66, 41, 42, 43, 117, 14, 15, 598 46, 47, 13, 14, 139, 152, 48, 126, 178, 15,
571 43, 44, 34, 35, 137, 44, 14, 15, 5, 64, 599 16, 69, 70, 49, 37, 38, 129, 166, 151, 15,
572 7, 8, 65, 10, 11, 60, 120, 12, 66, 58, 600 16, -67, 114, 64, -67, 5, 101, 7, 8, 102,
573 59, 41, 42, 61, 50, 143, 98, 105, 144, 131, 601 10, 11, 12, 143, 65, 13, 103, 153, 46, 47,
574 51, 14, 15, 64, 7, 53, 65, 10, 11, 54, 602 147, 148, 149, 69, 70, 125, 172, 134, 141, 136,
575 84, 12, 66, 106, 85, 86, 114, 87, 88, 89, 603 137, 138, 15, 16, 5, 101, 7, 8, 102, 10,
576 90, 91, 92, 115, 93, 14, 15, 94, 84, 59, 604 11, 12, 145, 146, 13, 103, 101, 7, 142, 102,
577 116, 128, 85, 86, 99, 100, 101, 124, 125, 126, 605 10, 11, 12, 171, 144, 13, 103, 69, 70, 69,
578 127, 129, 130, 133, 134, 102, 135, 136, 138, 141, 606 70, 15, 16, 100, 150, 154, 113, 108, 113, 116,
579 104, 78 607 73, 157, 15, 16, 74, 75, 70, 76, 77, 78,
608 79, 80, 81, 82, 83, 84, 104, 107, 160, 115,
609 85, 110, 73, 118, 86, 87, 74, 75, 92, 93,
610 94, 95, 111, 96, 119, 162, 163, 164, 169, 170,
611 173, 174, 97, 175, 176, 177, 179, 180, 181, 53,
612 99, 59
580}; 613};
581 614
582static const unsigned char yycheck[] = 615static const unsigned char yycheck[] =
583{ 616{
584 43, 44, 121, 4, 5, 3, 7, 60, 61, 10, 617 48, 49, 3, 32, 4, 5, 30, 7, 71, 72,
585 52, 49, 131, 24, 52, 58, 59, 0, 1, 52, 618 10, 28, 16, 17, 33, 14, 40, 28, 29, 38,
586 3, 4, 5, 6, 7, 8, 9, 10, 70, 52, 619 39, 69, 70, 34, 87, 28, 74, 75, 32, 77,
587 13, 14, 70, 15, 16, 88, 29, 70, 36, 32, 620 41, 79, 130, 81, 132, 133, 32, 135, 39, 38,
588 33, 28, 85, 86, 27, 28, 28, 70, 101, 0, 621 39, 139, 38, 39, 32, 143, 144, 32, 0, 1,
589 1, 28, 3, 4, 5, 6, 7, 8, 9, 10, 622 32, 3, 4, 5, 6, 7, 8, 9, 10, 11,
590 24, 25, 13, 14, 24, 25, 30, 31, 27, 28, 623 28, 29, 14, 15, 28, 32, 34, 35, 166, 31,
591 30, 35, 24, 25, 117, 35, 27, 28, 4, 5, 624 32, 38, 39, 41, 28, 29, 76, 140, 126, 31,
592 6, 7, 8, 9, 10, 26, 87, 13, 14, 32, 625 32, 0, 1, 32, 3, 4, 5, 6, 7, 8,
593 33, 24, 25, 34, 28, 138, 62, 63, 141, 100, 626 9, 10, 11, 93, 32, 14, 15, 32, 28, 29,
594 28, 27, 28, 5, 6, 28, 8, 9, 10, 28, 627 101, 102, 103, 38, 39, 32, 154, 80, 13, 82,
595 11, 13, 14, 28, 15, 16, 28, 18, 19, 20, 628 83, 84, 31, 32, 4, 5, 6, 7, 8, 9,
596 21, 22, 23, 28, 25, 27, 28, 28, 11, 33, 629 10, 11, 95, 96, 14, 15, 5, 6, 32, 8,
597 28, 28, 15, 16, 17, 18, 19, 90, 91, 92, 630 9, 10, 11, 32, 28, 14, 15, 38, 39, 38,
598 93, 12, 28, 28, 28, 28, 28, 28, 13, 13, 631 39, 31, 32, 54, 32, 14, 57, 56, 59, 58,
599 63, 54 632 12, 32, 31, 32, 16, 17, 39, 19, 20, 21,
633 22, 23, 24, 25, 26, 27, 55, 56, 32, 58,
634 32, 56, 12, 58, 36, 37, 16, 17, 18, 19,
635 20, 21, 56, 23, 58, 32, 32, 32, 32, 32,
636 32, 32, 32, 32, 32, 32, 32, 32, 32, 21,
637 54, 33
600}; 638};
601 639
602/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 640/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
603 symbol of state STATE-NUM. */ 641 symbol of state STATE-NUM. */
604static const unsigned char yystos[] = 642static const unsigned char yystos[] =
605{ 643{
606 0, 37, 0, 1, 3, 4, 5, 6, 7, 8, 644 0, 43, 0, 1, 3, 4, 5, 6, 7, 8,
607 9, 10, 13, 14, 27, 28, 38, 39, 40, 41, 645 9, 10, 11, 14, 15, 31, 32, 44, 45, 46,
608 44, 45, 47, 51, 53, 55, 56, 58, 60, 61, 646 47, 48, 49, 52, 53, 55, 59, 61, 63, 64,
609 62, 63, 71, 71, 24, 25, 69, 69, 69, 69, 647 66, 68, 69, 70, 71, 79, 79, 28, 29, 77,
610 24, 24, 25, 30, 35, 73, 74, 28, 28, 50, 648 77, 77, 32, 77, 28, 28, 28, 29, 34, 41,
611 28, 28, 59, 28, 28, 71, 73, 73, 32, 33, 649 81, 82, 50, 50, 56, 58, 62, 74, 67, 74,
612 26, 34, 42, 48, 5, 8, 14, 39, 46, 70, 650 79, 32, 32, 32, 32, 32, 81, 81, 32, 38,
613 54, 66, 1, 39, 47, 57, 58, 70, 66, 29, 651 39, 30, 40, 12, 16, 17, 19, 20, 21, 22,
614 73, 73, 74, 74, 11, 15, 16, 18, 19, 20, 652 23, 24, 25, 26, 27, 32, 36, 37, 51, 72,
615 21, 22, 23, 25, 28, 43, 64, 65, 67, 17, 653 73, 75, 18, 19, 20, 21, 23, 32, 57, 73,
616 18, 19, 28, 49, 65, 67, 28, 39, 47, 52, 654 75, 5, 8, 15, 45, 54, 78, 45, 55, 60,
617 58, 70, 28, 67, 28, 28, 28, 31, 73, 73, 655 66, 78, 32, 75, 1, 45, 55, 65, 66, 78,
618 69, 74, 68, 69, 68, 68, 68, 68, 28, 12, 656 33, 81, 81, 82, 82, 32, 35, 81, 81, 77,
619 28, 69, 74, 28, 28, 28, 28, 73, 13, 72, 657 81, 76, 77, 81, 76, 81, 76, 76, 76, 28,
620 72, 13, 72, 73, 73 658 82, 13, 32, 77, 28, 76, 76, 79, 79, 79,
659 32, 81, 32, 32, 14, 80, 80, 32, 80, 80,
660 32, 80, 32, 32, 32, 80, 82, 80, 80, 32,
661 32, 32, 81, 32, 32, 32, 32, 32, 80, 32,
662 32, 32
621}; 663};
622 664
623#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) 665#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
@@ -638,13 +680,14 @@ static const unsigned char yystos[] =
638 680
639#define yyerrok (yyerrstatus = 0) 681#define yyerrok (yyerrstatus = 0)
640#define yyclearin (yychar = YYEMPTY) 682#define yyclearin (yychar = YYEMPTY)
641#define YYEMPTY -2 683#define YYEMPTY (-2)
642#define YYEOF 0 684#define YYEOF 0
643 685
644#define YYACCEPT goto yyacceptlab 686#define YYACCEPT goto yyacceptlab
645#define YYABORT goto yyabortlab 687#define YYABORT goto yyabortlab
646#define YYERROR goto yyerrlab1 688#define YYERROR goto yyerrlab1
647 689
690
648/* Like YYERROR except do call yyerror. This remains here temporarily 691/* Like YYERROR except do call yyerror. This remains here temporarily
649 to ease the transition to the new meaning of YYERROR, for GCC. 692 to ease the transition to the new meaning of YYERROR, for GCC.
650 Once GCC version 2 has supplanted version 1, this can go. */ 693 Once GCC version 2 has supplanted version 1, this can go. */
@@ -659,13 +702,13 @@ do \
659 { \ 702 { \
660 yychar = (Token); \ 703 yychar = (Token); \
661 yylval = (Value); \ 704 yylval = (Value); \
662 yychar1 = YYTRANSLATE (yychar); \ 705 yytoken = YYTRANSLATE (yychar); \
663 YYPOPSTACK; \ 706 YYPOPSTACK; \
664 goto yybackup; \ 707 goto yybackup; \
665 } \ 708 } \
666 else \ 709 else \
667 { \ 710 { \
668 yyerror ("syntax error: cannot back up"); \ 711 yyerror ("syntax error: cannot back up");\
669 YYERROR; \ 712 YYERROR; \
670 } \ 713 } \
671while (0) 714while (0)
@@ -677,7 +720,7 @@ while (0)
677 are run). */ 720 are run). */
678 721
679#ifndef YYLLOC_DEFAULT 722#ifndef YYLLOC_DEFAULT
680# define YYLLOC_DEFAULT(Current, Rhs, N) \ 723# define YYLLOC_DEFAULT(Current, Rhs, N) \
681 Current.first_line = Rhs[1].first_line; \ 724 Current.first_line = Rhs[1].first_line; \
682 Current.first_column = Rhs[1].first_column; \ 725 Current.first_column = Rhs[1].first_column; \
683 Current.last_line = Rhs[N].last_line; \ 726 Current.last_line = Rhs[N].last_line; \
@@ -686,7 +729,11 @@ while (0)
686 729
687/* YYLEX -- calling `yylex' with the right arguments. */ 730/* YYLEX -- calling `yylex' with the right arguments. */
688 731
689#define YYLEX yylex () 732#ifdef YYLEX_PARAM
733# define YYLEX yylex (YYLEX_PARAM)
734#else
735# define YYLEX yylex ()
736#endif
690 737
691/* Enable debugging if requested. */ 738/* Enable debugging if requested. */
692#if YYDEBUG 739#if YYDEBUG
@@ -701,19 +748,93 @@ do { \
701 if (yydebug) \ 748 if (yydebug) \
702 YYFPRINTF Args; \ 749 YYFPRINTF Args; \
703} while (0) 750} while (0)
751
704# define YYDSYMPRINT(Args) \ 752# define YYDSYMPRINT(Args) \
705do { \ 753do { \
706 if (yydebug) \ 754 if (yydebug) \
707 yysymprint Args; \ 755 yysymprint Args; \
708} while (0) 756} while (0)
757
758# define YYDSYMPRINTF(Title, Token, Value, Location) \
759do { \
760 if (yydebug) \
761 { \
762 YYFPRINTF (stderr, "%s ", Title); \
763 yysymprint (stderr, \
764 Token, Value); \
765 YYFPRINTF (stderr, "\n"); \
766 } \
767} while (0)
768
769/*------------------------------------------------------------------.
770| yy_stack_print -- Print the state stack from its BOTTOM up to its |
771| TOP (cinluded). |
772`------------------------------------------------------------------*/
773
774#if defined (__STDC__) || defined (__cplusplus)
775static void
776yy_stack_print (short *bottom, short *top)
777#else
778static void
779yy_stack_print (bottom, top)
780 short *bottom;
781 short *top;
782#endif
783{
784 YYFPRINTF (stderr, "Stack now");
785 for (/* Nothing. */; bottom <= top; ++bottom)
786 YYFPRINTF (stderr, " %d", *bottom);
787 YYFPRINTF (stderr, "\n");
788}
789
790# define YY_STACK_PRINT(Bottom, Top) \
791do { \
792 if (yydebug) \
793 yy_stack_print ((Bottom), (Top)); \
794} while (0)
795
796
797/*------------------------------------------------.
798| Report that the YYRULE is going to be reduced. |
799`------------------------------------------------*/
800
801#if defined (__STDC__) || defined (__cplusplus)
802static void
803yy_reduce_print (int yyrule)
804#else
805static void
806yy_reduce_print (yyrule)
807 int yyrule;
808#endif
809{
810 int yyi;
811 unsigned int yylineno = yyrline[yyrule];
812 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
813 yyrule - 1, yylineno);
814 /* Print the symbols being reduced, and their result. */
815 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
816 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
817 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
818}
819
820# define YY_REDUCE_PRINT(Rule) \
821do { \
822 if (yydebug) \
823 yy_reduce_print (Rule); \
824} while (0)
825
709/* Nonzero means print parse trace. It is left uninitialized so that 826/* Nonzero means print parse trace. It is left uninitialized so that
710 multiple parsers can coexist. */ 827 multiple parsers can coexist. */
711int yydebug; 828int yydebug;
712#else /* !YYDEBUG */ 829#else /* !YYDEBUG */
713# define YYDPRINTF(Args) 830# define YYDPRINTF(Args)
714# define YYDSYMPRINT(Args) 831# define YYDSYMPRINT(Args)
832# define YYDSYMPRINTF(Title, Token, Value, Location)
833# define YY_STACK_PRINT(Bottom, Top)
834# define YY_REDUCE_PRINT(Rule)
715#endif /* !YYDEBUG */ 835#endif /* !YYDEBUG */
716 836
837
717/* YYINITDEPTH -- initial size of the parser's stacks. */ 838/* YYINITDEPTH -- initial size of the parser's stacks. */
718#ifndef YYINITDEPTH 839#ifndef YYINITDEPTH
719# define YYINITDEPTH 200 840# define YYINITDEPTH 200
@@ -792,95 +913,85 @@ yystpcpy (yydest, yysrc)
792 913
793 914
794#if YYDEBUG 915#if YYDEBUG
795/*-----------------------------. 916/*--------------------------------.
796| Print this symbol on YYOUT. | 917| Print this symbol on YYOUTPUT. |
797`-----------------------------*/ 918`--------------------------------*/
798 919
799static void
800#if defined (__STDC__) || defined (__cplusplus) 920#if defined (__STDC__) || defined (__cplusplus)
801yysymprint (FILE* yyout, int yytype, YYSTYPE yyvalue) 921static void
922yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
802#else 923#else
803yysymprint (yyout, yytype, yyvalue) 924static void
804 FILE* yyout; 925yysymprint (yyoutput, yytype, yyvaluep)
926 FILE *yyoutput;
805 int yytype; 927 int yytype;
806 YYSTYPE yyvalue; 928 YYSTYPE *yyvaluep;
807#endif 929#endif
808{ 930{
809 /* Pacify ``unused variable'' warnings. */ 931 /* Pacify ``unused variable'' warnings. */
810 (void) yyvalue; 932 (void) yyvaluep;
811 933
812 if (yytype < YYNTOKENS) 934 if (yytype < YYNTOKENS)
813 { 935 {
814 YYFPRINTF (yyout, "token %s (", yytname[yytype]); 936 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
815# ifdef YYPRINT 937# ifdef YYPRINT
816 YYPRINT (yyout, yytoknum[yytype], yyvalue); 938 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
817# endif 939# endif
818 } 940 }
819 else 941 else
820 YYFPRINTF (yyout, "nterm %s (", yytname[yytype]); 942 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
821 943
822 switch (yytype) 944 switch (yytype)
823 { 945 {
824 default: 946 default:
825 break; 947 break;
826 } 948 }
827 YYFPRINTF (yyout, ")"); 949 YYFPRINTF (yyoutput, ")");
828} 950}
829#endif /* YYDEBUG. */
830
831 951
952#endif /* ! YYDEBUG */
832/*-----------------------------------------------. 953/*-----------------------------------------------.
833| Release the memory associated to this symbol. | 954| Release the memory associated to this symbol. |
834`-----------------------------------------------*/ 955`-----------------------------------------------*/
835 956
836static void
837#if defined (__STDC__) || defined (__cplusplus) 957#if defined (__STDC__) || defined (__cplusplus)
838yydestruct (int yytype, YYSTYPE yyvalue) 958static void
959yydestruct (int yytype, YYSTYPE *yyvaluep)
839#else 960#else
840yydestruct (yytype, yyvalue) 961static void
962yydestruct (yytype, yyvaluep)
841 int yytype; 963 int yytype;
842 YYSTYPE yyvalue; 964 YYSTYPE *yyvaluep;
843#endif 965#endif
844{ 966{
845 /* Pacify ``unused variable'' warnings. */ 967 /* Pacify ``unused variable'' warnings. */
846 (void) yyvalue; 968 (void) yyvaluep;
847 969
848 switch (yytype) 970 switch (yytype)
849 { 971 {
972
850 default: 973 default:
851 break; 974 break;
852 } 975 }
853} 976}
854
855 977
856 978
857/* The user can define YYPARSE_PARAM as the name of an argument to be passed 979/* Prevent warnings from -Wmissing-prototypes. */
858 into yyparse. The argument should have type void *.
859 It should actually point to an object.
860 Grammar actions can access the variable by casting it
861 to the proper pointer type. */
862 980
863#ifdef YYPARSE_PARAM 981#ifdef YYPARSE_PARAM
864# if defined (__STDC__) || defined (__cplusplus) 982# if defined (__STDC__) || defined (__cplusplus)
865# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM 983int yyparse (void *YYPARSE_PARAM);
866# define YYPARSE_PARAM_DECL
867# else 984# else
868# define YYPARSE_PARAM_ARG YYPARSE_PARAM 985int yyparse ();
869# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
870# endif 986# endif
871#else /* !YYPARSE_PARAM */ 987#else /* ! YYPARSE_PARAM */
872# define YYPARSE_PARAM_ARG 988#if defined (__STDC__) || defined (__cplusplus)
873# define YYPARSE_PARAM_DECL
874#endif /* !YYPARSE_PARAM */
875
876/* Prevent warning if -Wstrict-prototypes. */
877#ifdef __GNUC__
878# ifdef YYPARSE_PARAM
879int yyparse (void *);
880# else
881int yyparse (void); 989int yyparse (void);
882# endif 990#else
991int yyparse ();
883#endif 992#endif
993#endif /* ! YYPARSE_PARAM */
994
884 995
885 996
886/* The lookahead symbol. */ 997/* The lookahead symbol. */
@@ -889,13 +1000,32 @@ int yychar;
889/* The semantic value of the lookahead symbol. */ 1000/* The semantic value of the lookahead symbol. */
890YYSTYPE yylval; 1001YYSTYPE yylval;
891 1002
892/* Number of parse errors so far. */ 1003/* Number of syntax errors so far. */
893int yynerrs; 1004int yynerrs;
894 1005
895 1006
1007
1008/*----------.
1009| yyparse. |
1010`----------*/
1011
1012#ifdef YYPARSE_PARAM
1013# if defined (__STDC__) || defined (__cplusplus)
1014int yyparse (void *YYPARSE_PARAM)
1015# else
1016int yyparse (YYPARSE_PARAM)
1017 void *YYPARSE_PARAM;
1018# endif
1019#else /* ! YYPARSE_PARAM */
1020#if defined (__STDC__) || defined (__cplusplus)
896int 1021int
897yyparse (YYPARSE_PARAM_ARG) 1022yyparse (void)
898 YYPARSE_PARAM_DECL 1023#else
1024int
1025yyparse ()
1026
1027#endif
1028#endif
899{ 1029{
900 1030
901 register int yystate; 1031 register int yystate;
@@ -904,7 +1034,7 @@ yyparse (YYPARSE_PARAM_ARG)
904 /* Number of tokens to shift before error messages enabled. */ 1034 /* Number of tokens to shift before error messages enabled. */
905 int yyerrstatus; 1035 int yyerrstatus;
906 /* Lookahead token as an internal (translated) token number. */ 1036 /* Lookahead token as an internal (translated) token number. */
907 int yychar1 = 0; 1037 int yytoken = 0;
908 1038
909 /* Three stacks and their tools: 1039 /* Three stacks and their tools:
910 `yyss': related to states, 1040 `yyss': related to states,
@@ -968,7 +1098,7 @@ yyparse (YYPARSE_PARAM_ARG)
968 yysetstate: 1098 yysetstate:
969 *yyssp = yystate; 1099 *yyssp = yystate;
970 1100
971 if (yyssp >= yyss + yystacksize - 1) 1101 if (yyss + yystacksize - 1 <= yyssp)
972 { 1102 {
973 /* Get the current used size of the three stacks, in elements. */ 1103 /* Get the current used size of the three stacks, in elements. */
974 YYSIZE_T yysize = yyssp - yyss + 1; 1104 YYSIZE_T yysize = yyssp - yyss + 1;
@@ -1000,10 +1130,10 @@ yyparse (YYPARSE_PARAM_ARG)
1000 goto yyoverflowlab; 1130 goto yyoverflowlab;
1001# else 1131# else
1002 /* Extend the stack our own way. */ 1132 /* Extend the stack our own way. */
1003 if (yystacksize >= YYMAXDEPTH) 1133 if (YYMAXDEPTH <= yystacksize)
1004 goto yyoverflowlab; 1134 goto yyoverflowlab;
1005 yystacksize *= 2; 1135 yystacksize *= 2;
1006 if (yystacksize > YYMAXDEPTH) 1136 if (YYMAXDEPTH < yystacksize)
1007 yystacksize = YYMAXDEPTH; 1137 yystacksize = YYMAXDEPTH;
1008 1138
1009 { 1139 {
@@ -1029,7 +1159,7 @@ yyparse (YYPARSE_PARAM_ARG)
1029 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1159 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1030 (unsigned long int) yystacksize)); 1160 (unsigned long int) yystacksize));
1031 1161
1032 if (yyssp >= yyss + yystacksize - 1) 1162 if (yyss + yystacksize - 1 <= yyssp)
1033 YYABORT; 1163 YYABORT;
1034 } 1164 }
1035 1165
@@ -1054,39 +1184,28 @@ yybackup:
1054 1184
1055 /* Not known => get a lookahead token if don't already have one. */ 1185 /* Not known => get a lookahead token if don't already have one. */
1056 1186
1057 /* yychar is either YYEMPTY or YYEOF 1187 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1058 or a valid token in external form. */
1059
1060 if (yychar == YYEMPTY) 1188 if (yychar == YYEMPTY)
1061 { 1189 {
1062 YYDPRINTF ((stderr, "Reading a token: ")); 1190 YYDPRINTF ((stderr, "Reading a token: "));
1063 yychar = YYLEX; 1191 yychar = YYLEX;
1064 } 1192 }
1065 1193
1066 /* Convert token to internal form (in yychar1) for indexing tables with. */ 1194 if (yychar <= YYEOF)
1067
1068 if (yychar <= 0) /* This means end of input. */
1069 { 1195 {
1070 yychar1 = 0; 1196 yychar = yytoken = YYEOF;
1071 yychar = YYEOF; /* Don't call YYLEX any more. */
1072
1073 YYDPRINTF ((stderr, "Now at end of input.\n")); 1197 YYDPRINTF ((stderr, "Now at end of input.\n"));
1074 } 1198 }
1075 else 1199 else
1076 { 1200 {
1077 yychar1 = YYTRANSLATE (yychar); 1201 yytoken = YYTRANSLATE (yychar);
1078 1202 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1079 /* We have to keep this `#if YYDEBUG', since we use variables
1080 which are defined only if `YYDEBUG' is set. */
1081 YYDPRINTF ((stderr, "Next token is "));
1082 YYDSYMPRINT ((stderr, yychar1, yylval));
1083 YYDPRINTF ((stderr, "\n"));
1084 } 1203 }
1085 1204
1086 /* If the proper action on seeing token YYCHAR1 is to reduce or to 1205 /* If the proper action on seeing token YYTOKEN is to reduce or to
1087 detect an error, take that action. */ 1206 detect an error, take that action. */
1088 yyn += yychar1; 1207 yyn += yytoken;
1089 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1) 1208 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1090 goto yydefault; 1209 goto yydefault;
1091 yyn = yytable[yyn]; 1210 yyn = yytable[yyn];
1092 if (yyn <= 0) 1211 if (yyn <= 0)
@@ -1101,8 +1220,7 @@ yybackup:
1101 YYACCEPT; 1220 YYACCEPT;
1102 1221
1103 /* Shift the lookahead token. */ 1222 /* Shift the lookahead token. */
1104 YYDPRINTF ((stderr, "Shifting token %d (%s), ", 1223 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1105 yychar, yytname[yychar1]));
1106 1224
1107 /* Discard the token being shifted unless it is eof. */ 1225 /* Discard the token being shifted unless it is eof. */
1108 if (yychar != YYEOF) 1226 if (yychar != YYEOF)
@@ -1148,435 +1266,463 @@ yyreduce:
1148 yyval = yyvsp[1-yylen]; 1266 yyval = yyvsp[1-yylen];
1149 1267
1150 1268
1151 1269 YY_REDUCE_PRINT (yyn);
1152#if YYDEBUG
1153 /* We have to keep this `#if YYDEBUG', since we use variables which
1154 are defined only if `YYDEBUG' is set. */
1155 if (yydebug)
1156 {
1157 int yyi;
1158
1159 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
1160 yyn - 1, yyrline[yyn]);
1161
1162 /* Print the symbols being reduced, and their result. */
1163 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
1164 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1165 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1166 }
1167#endif
1168 switch (yyn) 1270 switch (yyn)
1169 { 1271 {
1170 case 8: 1272 case 8:
1171#line 96 "zconf.y" 1273
1172 { zconfprint("unexpected 'endmenu' statement"); } 1274 { zconfprint("unexpected 'endmenu' statement"); ;}
1173 break; 1275 break;
1174 1276
1175 case 9: 1277 case 9:
1176#line 97 "zconf.y" 1278
1177 { zconfprint("unexpected 'endif' statement"); } 1279 { zconfprint("unexpected 'endif' statement"); ;}
1178 break; 1280 break;
1179 1281
1180 case 10: 1282 case 10:
1181#line 98 "zconf.y" 1283
1182 { zconfprint("unexpected 'endchoice' statement"); } 1284 { zconfprint("unexpected 'endchoice' statement"); ;}
1183 break; 1285 break;
1184 1286
1185 case 11: 1287 case 11:
1186#line 99 "zconf.y" 1288
1187 { zconfprint("syntax error"); yyerrok; } 1289 { zconfprint("syntax error"); yyerrok; ;}
1188 break; 1290 break;
1189 1291
1190 case 17: 1292 case 18:
1191#line 114 "zconf.y" 1293
1192 { 1294 {
1193 struct symbol *sym = sym_lookup(yyvsp[0].string, 0); 1295 struct symbol *sym = sym_lookup(yyvsp[-1].string, 0);
1194 sym->flags |= SYMBOL_OPTIONAL; 1296 sym->flags |= SYMBOL_OPTIONAL;
1195 menu_add_entry(sym); 1297 menu_add_entry(sym);
1196 printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), yyvsp[0].string); 1298 printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string);
1197} 1299;}
1198 break; 1300 break;
1199 1301
1200 case 18: 1302 case 19:
1201#line 122 "zconf.y" 1303
1202 { 1304 {
1203 menu_end_entry(); 1305 menu_end_entry();
1204 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); 1306 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
1205} 1307;}
1308 break;
1309
1310 case 20:
1311
1312 {
1313 struct symbol *sym = sym_lookup(yyvsp[-1].string, 0);
1314 sym->flags |= SYMBOL_OPTIONAL;
1315 menu_add_entry(sym);
1316 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string);
1317;}
1206 break; 1318 break;
1207 1319
1208 case 23: 1320 case 21:
1209#line 133 "zconf.y" 1321
1210 { } 1322 {
1323 if (current_entry->prompt)
1324 current_entry->prompt->type = P_MENU;
1325 else
1326 zconfprint("warning: menuconfig statement without prompt");
1327 menu_end_entry();
1328 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
1329;}
1211 break; 1330 break;
1212 1331
1213 case 24: 1332 case 27:
1214#line 136 "zconf.y" 1333
1215 { 1334 {
1216 menu_set_type(S_TRISTATE); 1335 menu_set_type(S_TRISTATE);
1217 printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno()); 1336 printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno());
1218} 1337;}
1338 break;
1339
1340 case 28:
1341
1342 {
1343 menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr);
1344 menu_set_type(S_TRISTATE);
1345 printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno());
1346;}
1219 break; 1347 break;
1220 1348
1221 case 25: 1349 case 29:
1222#line 142 "zconf.y" 1350
1223 { 1351 {
1224 menu_set_type(S_BOOLEAN); 1352 menu_set_type(S_BOOLEAN);
1225 printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno()); 1353 printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno());
1226} 1354;}
1227 break; 1355 break;
1228 1356
1229 case 26: 1357 case 30:
1230#line 148 "zconf.y" 1358
1359 {
1360 menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr);
1361 menu_set_type(S_BOOLEAN);
1362 printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno());
1363;}
1364 break;
1365
1366 case 31:
1367
1231 { 1368 {
1232 menu_set_type(S_INT); 1369 menu_set_type(S_INT);
1233 printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno()); 1370 printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno());
1234} 1371;}
1235 break; 1372 break;
1236 1373
1237 case 27: 1374 case 32:
1238#line 154 "zconf.y" 1375
1239 { 1376 {
1240 menu_set_type(S_HEX); 1377 menu_set_type(S_HEX);
1241 printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno()); 1378 printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno());
1242} 1379;}
1243 break; 1380 break;
1244 1381
1245 case 28: 1382 case 33:
1246#line 160 "zconf.y" 1383
1247 { 1384 {
1248 menu_set_type(S_STRING); 1385 menu_set_type(S_STRING);
1249 printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno()); 1386 printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno());
1250} 1387;}
1251 break; 1388 break;
1252 1389
1253 case 29: 1390 case 34:
1254#line 166 "zconf.y" 1391
1255 { 1392 {
1256 menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr); 1393 menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr);
1257 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 1394 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
1258} 1395;}
1259 break; 1396 break;
1260 1397
1261 case 30: 1398 case 35:
1262#line 172 "zconf.y" 1399
1263 { 1400 {
1264 menu_add_prop(P_DEFAULT, NULL, yyvsp[-1].symbol, yyvsp[0].expr); 1401 menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr);
1265 printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); 1402 printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
1266} 1403;}
1267 break; 1404 break;
1268 1405
1269 case 31: 1406 case 36:
1270#line 180 "zconf.y" 1407
1408 {
1409 menu_add_symbol(P_SELECT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr);
1410 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
1411;}
1412 break;
1413
1414 case 37:
1415
1416 {
1417 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,yyvsp[-3].symbol, yyvsp[-2].symbol), yyvsp[-1].expr);
1418 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
1419;}
1420 break;
1421
1422 case 38:
1423
1271 { 1424 {
1272 struct symbol *sym = sym_lookup(NULL, 0); 1425 struct symbol *sym = sym_lookup(NULL, 0);
1273 sym->flags |= SYMBOL_CHOICE; 1426 sym->flags |= SYMBOL_CHOICE;
1274 menu_add_entry(sym); 1427 menu_add_entry(sym);
1275 menu_add_prop(P_CHOICE, NULL, NULL, NULL); 1428 menu_add_expr(P_CHOICE, NULL, NULL);
1276 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); 1429 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
1277} 1430;}
1278 break; 1431 break;
1279 1432
1280 case 32: 1433 case 39:
1281#line 189 "zconf.y" 1434
1282 { 1435 {
1283 menu_end_entry(); 1436 menu_end_entry();
1284 menu_add_menu(); 1437 menu_add_menu();
1285} 1438;}
1286 break; 1439 break;
1287 1440
1288 case 33: 1441 case 40:
1289#line 195 "zconf.y" 1442
1290 { 1443 {
1291 if (zconf_endtoken(yyvsp[0].token, T_CHOICE, T_ENDCHOICE)) { 1444 if (zconf_endtoken(yyvsp[0].token, T_CHOICE, T_ENDCHOICE)) {
1292 menu_end_menu(); 1445 menu_end_menu();
1293 printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); 1446 printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
1294 } 1447 }
1295} 1448;}
1296 break; 1449 break;
1297 1450
1298 case 35: 1451 case 42:
1299#line 205 "zconf.y" 1452
1300 { 1453 {
1301 printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno); 1454 printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno);
1302 zconfnerrs++; 1455 zconfnerrs++;
1303} 1456;}
1304 break; 1457 break;
1305 1458
1306 case 41: 1459 case 48:
1307#line 219 "zconf.y" 1460
1308 { 1461 {
1309 menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr); 1462 menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr);
1310 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 1463 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
1311} 1464;}
1312 break; 1465 break;
1313 1466
1314 case 42: 1467 case 49:
1315#line 225 "zconf.y" 1468
1469 {
1470 menu_set_type(S_TRISTATE);
1471 printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno());
1472;}
1473 break;
1474
1475 case 50:
1476
1477 {
1478 menu_set_type(S_BOOLEAN);
1479 printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno());
1480;}
1481 break;
1482
1483 case 51:
1484
1316 { 1485 {
1317 current_entry->sym->flags |= SYMBOL_OPTIONAL; 1486 current_entry->sym->flags |= SYMBOL_OPTIONAL;
1318 printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); 1487 printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
1319} 1488;}
1320 break; 1489 break;
1321 1490
1322 case 43: 1491 case 52:
1323#line 231 "zconf.y" 1492
1324 { 1493 {
1325 menu_add_prop(P_DEFAULT, NULL, yyvsp[0].symbol, NULL); 1494 menu_add_symbol(P_DEFAULT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr);
1326 //current_choice->prop->def = ;
1327 printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); 1495 printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
1328} 1496;}
1329 break; 1497 break;
1330 1498
1331 case 46: 1499 case 55:
1332#line 245 "zconf.y" 1500
1333 { 1501 {
1334 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); 1502 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
1335 menu_add_entry(NULL); 1503 menu_add_entry(NULL);
1336 //current_entry->prompt = menu_add_prop(T_IF, NULL, NULL, ); 1504 menu_add_dep(yyvsp[-1].expr);
1337 menu_add_dep(yyvsp[0].expr);
1338 menu_end_entry(); 1505 menu_end_entry();
1339 menu_add_menu(); 1506 menu_add_menu();
1340} 1507;}
1341 break; 1508 break;
1342 1509
1343 case 47: 1510 case 56:
1344#line 255 "zconf.y" 1511
1345 { 1512 {
1346 if (zconf_endtoken(yyvsp[0].token, T_IF, T_ENDIF)) { 1513 if (zconf_endtoken(yyvsp[0].token, T_IF, T_ENDIF)) {
1347 menu_end_menu(); 1514 menu_end_menu();
1348 printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); 1515 printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
1349 } 1516 }
1350} 1517;}
1351 break; 1518 break;
1352 1519
1353 case 49: 1520 case 58:
1354#line 265 "zconf.y" 1521
1355 { 1522 {
1356 printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno); 1523 printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno);
1357 zconfnerrs++; 1524 zconfnerrs++;
1358} 1525;}
1359 break; 1526 break;
1360 1527
1361 case 54: 1528 case 63:
1362#line 280 "zconf.y" 1529
1363 { 1530 {
1364 menu_add_entry(NULL); 1531 menu_add_entry(NULL);
1365 menu_add_prop(P_MENU, yyvsp[0].string, NULL, NULL); 1532 menu_add_prop(P_MENU, yyvsp[-1].string, NULL, NULL);
1366 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 1533 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
1367} 1534;}
1368 break; 1535 break;
1369 1536
1370 case 55: 1537 case 64:
1371#line 287 "zconf.y" 1538
1372 { 1539 {
1373 menu_end_entry(); 1540 menu_end_entry();
1374 menu_add_menu(); 1541 menu_add_menu();
1375} 1542;}
1376 break; 1543 break;
1377 1544
1378 case 56: 1545 case 65:
1379#line 293 "zconf.y" 1546
1380 { 1547 {
1381 if (zconf_endtoken(yyvsp[0].token, T_MENU, T_ENDMENU)) { 1548 if (zconf_endtoken(yyvsp[0].token, T_MENU, T_ENDMENU)) {
1382 menu_end_menu(); 1549 menu_end_menu();
1383 printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); 1550 printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
1384 } 1551 }
1385} 1552;}
1386 break; 1553 break;
1387 1554
1388 case 58: 1555 case 67:
1389#line 303 "zconf.y" 1556
1390 { 1557 {
1391 printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno); 1558 printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno);
1392 zconfnerrs++; 1559 zconfnerrs++;
1393} 1560;}
1394 break; 1561 break;
1395 1562
1396 case 63: 1563 case 72:
1397#line 313 "zconf.y" 1564
1398 { zconfprint("invalid menu option"); yyerrok; } 1565 { zconfprint("invalid menu option"); yyerrok; ;}
1399 break; 1566 break;
1400 1567
1401 case 64: 1568 case 73:
1402#line 317 "zconf.y" 1569
1403 { 1570 {
1404 yyval.string = yyvsp[0].string; 1571 yyval.string = yyvsp[-1].string;
1405 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[0].string); 1572 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string);
1406} 1573;}
1407 break; 1574 break;
1408 1575
1409 case 65: 1576 case 74:
1410#line 323 "zconf.y" 1577
1411 { 1578 {
1412 zconf_nextfile(yyvsp[-1].string); 1579 zconf_nextfile(yyvsp[0].string);
1413} 1580;}
1414 break; 1581 break;
1415 1582
1416 case 66: 1583 case 75:
1417#line 330 "zconf.y" 1584
1418 { 1585 {
1419 menu_add_entry(NULL); 1586 menu_add_entry(NULL);
1420 menu_add_prop(P_COMMENT, yyvsp[0].string, NULL, NULL); 1587 menu_add_prop(P_COMMENT, yyvsp[-1].string, NULL, NULL);
1421 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); 1588 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
1422} 1589;}
1423 break; 1590 break;
1424 1591
1425 case 67: 1592 case 76:
1426#line 337 "zconf.y" 1593
1427 { 1594 {
1428 menu_end_entry(); 1595 menu_end_entry();
1429} 1596;}
1430 break; 1597 break;
1431 1598
1432 case 68: 1599 case 77:
1433#line 344 "zconf.y" 1600
1434 { 1601 {
1435 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); 1602 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
1436 zconf_starthelp(); 1603 zconf_starthelp();
1437} 1604;}
1438 break; 1605 break;
1439 1606
1440 case 69: 1607 case 78:
1441#line 350 "zconf.y" 1608
1442 { 1609 {
1443 current_entry->sym->help = yyvsp[0].string; 1610 current_entry->sym->help = yyvsp[0].string;
1444} 1611;}
1445 break; 1612 break;
1446 1613
1447 case 72: 1614 case 82:
1448#line 359 "zconf.y"
1449 { }
1450 break;
1451 1615
1452 case 73:
1453#line 362 "zconf.y"
1454 { 1616 {
1455 menu_add_dep(yyvsp[0].expr); 1617 menu_add_dep(yyvsp[-1].expr);
1456 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); 1618 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
1457} 1619;}
1458 break; 1620 break;
1459 1621
1460 case 74: 1622 case 83:
1461#line 367 "zconf.y" 1623
1462 { 1624 {
1463 menu_add_dep(yyvsp[0].expr); 1625 menu_add_dep(yyvsp[-1].expr);
1464 printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); 1626 printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
1465} 1627;}
1466 break; 1628 break;
1467 1629
1468 case 75: 1630 case 84:
1469#line 372 "zconf.y" 1631
1470 { 1632 {
1471 menu_add_dep(yyvsp[0].expr); 1633 menu_add_dep(yyvsp[-1].expr);
1472 printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); 1634 printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
1473} 1635;}
1474 break; 1636 break;
1475 1637
1476 case 77: 1638 case 86:
1477#line 382 "zconf.y"
1478 {
1479 menu_add_prop(P_PROMPT, yyvsp[0].string, NULL, NULL);
1480}
1481 break;
1482 1639
1483 case 78:
1484#line 386 "zconf.y"
1485 { 1640 {
1486 menu_add_prop(P_PROMPT, yyvsp[-2].string, NULL, yyvsp[0].expr); 1641 menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr);
1487} 1642;}
1488 break; 1643 break;
1489 1644
1490 case 81: 1645 case 89:
1491#line 394 "zconf.y" 1646
1492 { yyval.token = T_ENDMENU; } 1647 { yyval.token = T_ENDMENU; ;}
1493 break; 1648 break;
1494 1649
1495 case 82: 1650 case 90:
1496#line 395 "zconf.y" 1651
1497 { yyval.token = T_ENDCHOICE; } 1652 { yyval.token = T_ENDCHOICE; ;}
1498 break; 1653 break;
1499 1654
1500 case 83: 1655 case 91:
1501#line 396 "zconf.y" 1656
1502 { yyval.token = T_ENDIF; } 1657 { yyval.token = T_ENDIF; ;}
1503 break; 1658 break;
1504 1659
1505 case 86: 1660 case 94:
1506#line 402 "zconf.y" 1661
1507 { yyval.expr = NULL; } 1662 { yyval.expr = NULL; ;}
1508 break; 1663 break;
1509 1664
1510 case 87: 1665 case 95:
1511#line 403 "zconf.y" 1666
1512 { yyval.expr = yyvsp[0].expr; } 1667 { yyval.expr = yyvsp[0].expr; ;}
1513 break; 1668 break;
1514 1669
1515 case 88: 1670 case 96:
1516#line 406 "zconf.y" 1671
1517 { yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); } 1672 { yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); ;}
1518 break; 1673 break;
1519 1674
1520 case 89: 1675 case 97:
1521#line 407 "zconf.y" 1676
1522 { yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); } 1677 { yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;}
1523 break; 1678 break;
1524 1679
1525 case 90: 1680 case 98:
1526#line 408 "zconf.y" 1681
1527 { yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); } 1682 { yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;}
1528 break; 1683 break;
1529 1684
1530 case 91: 1685 case 99:
1531#line 409 "zconf.y" 1686
1532 { yyval.expr = yyvsp[-1].expr; } 1687 { yyval.expr = yyvsp[-1].expr; ;}
1533 break; 1688 break;
1534 1689
1535 case 92: 1690 case 100:
1536#line 410 "zconf.y" 1691
1537 { yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); } 1692 { yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); ;}
1538 break; 1693 break;
1539 1694
1540 case 93: 1695 case 101:
1541#line 411 "zconf.y" 1696
1542 { yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); } 1697 { yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); ;}
1543 break; 1698 break;
1544 1699
1545 case 94: 1700 case 102:
1546#line 412 "zconf.y" 1701
1547 { yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); } 1702 { yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); ;}
1548 break; 1703 break;
1549 1704
1550 case 95: 1705 case 103:
1551#line 415 "zconf.y" 1706
1552 { yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); } 1707 { yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); ;}
1553 break; 1708 break;
1554 1709
1555 case 96: 1710 case 104:
1556#line 416 "zconf.y" 1711
1557 { yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); } 1712 { yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); ;}
1558 break; 1713 break;
1559 1714
1560 1715
1561 } 1716 }
1562 1717
1563/* Line 1016 of /usr/share/bison/yacc.c. */ 1718/* Line 999 of yacc.c. */
1564#line 1565 "zconf.tab.c" 1719
1565 1720
1566 yyvsp -= yylen; 1721 yyvsp -= yylen;
1567 yyssp -= yylen; 1722 yyssp -= yylen;
1568 1723
1569 1724
1570#if YYDEBUG 1725 YY_STACK_PRINT (yyss, yyssp);
1571 if (yydebug)
1572 {
1573 short *yyssp1 = yyss - 1;
1574 YYFPRINTF (stderr, "state stack now");
1575 while (yyssp1 != yyssp)
1576 YYFPRINTF (stderr, " %d", *++yyssp1);
1577 YYFPRINTF (stderr, "\n");
1578 }
1579#endif
1580 1726
1581 *++yyvsp = yyval; 1727 *++yyvsp = yyval;
1582 1728
@@ -1621,12 +1767,12 @@ yyerrlab:
1621 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) 1767 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1622 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1768 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1623 yysize += yystrlen (yytname[yyx]) + 15, yycount++; 1769 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1624 yysize += yystrlen ("parse error, unexpected ") + 1; 1770 yysize += yystrlen ("syntax error, unexpected ") + 1;
1625 yysize += yystrlen (yytname[yytype]); 1771 yysize += yystrlen (yytname[yytype]);
1626 yymsg = (char *) YYSTACK_ALLOC (yysize); 1772 yymsg = (char *) YYSTACK_ALLOC (yysize);
1627 if (yymsg != 0) 1773 if (yymsg != 0)
1628 { 1774 {
1629 char *yyp = yystpcpy (yymsg, "parse error, unexpected "); 1775 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1630 yyp = yystpcpy (yyp, yytname[yytype]); 1776 yyp = yystpcpy (yyp, yytname[yytype]);
1631 1777
1632 if (yycount < 5) 1778 if (yycount < 5)
@@ -1647,19 +1793,15 @@ yyerrlab:
1647 YYSTACK_FREE (yymsg); 1793 YYSTACK_FREE (yymsg);
1648 } 1794 }
1649 else 1795 else
1650 yyerror ("parse error; also virtual memory exhausted"); 1796 yyerror ("syntax error; also virtual memory exhausted");
1651 } 1797 }
1652 else 1798 else
1653#endif /* YYERROR_VERBOSE */ 1799#endif /* YYERROR_VERBOSE */
1654 yyerror ("parse error"); 1800 yyerror ("syntax error");
1655 } 1801 }
1656 goto yyerrlab1;
1657 1802
1658 1803
1659/*----------------------------------------------------. 1804
1660| yyerrlab1 -- error raised explicitly by an action. |
1661`----------------------------------------------------*/
1662yyerrlab1:
1663 if (yyerrstatus == 3) 1805 if (yyerrstatus == 3)
1664 { 1806 {
1665 /* If just tried and failed to reuse lookahead token after an 1807 /* If just tried and failed to reuse lookahead token after an
@@ -1671,28 +1813,30 @@ yyerrlab1:
1671 /* Pop the error token. */ 1813 /* Pop the error token. */
1672 YYPOPSTACK; 1814 YYPOPSTACK;
1673 /* Pop the rest of the stack. */ 1815 /* Pop the rest of the stack. */
1674 while (yyssp > yyss) 1816 while (yyss < yyssp)
1675 { 1817 {
1676 YYDPRINTF ((stderr, "Error: popping ")); 1818 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1677 YYDSYMPRINT ((stderr, 1819 yydestruct (yystos[*yyssp], yyvsp);
1678 yystos[*yyssp],
1679 *yyvsp));
1680 YYDPRINTF ((stderr, "\n"));
1681 yydestruct (yystos[*yyssp], *yyvsp);
1682 YYPOPSTACK; 1820 YYPOPSTACK;
1683 } 1821 }
1684 YYABORT; 1822 YYABORT;
1685 } 1823 }
1686 1824
1687 YYDPRINTF ((stderr, "Discarding token %d (%s).\n", 1825 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
1688 yychar, yytname[yychar1])); 1826 yydestruct (yytoken, &yylval);
1689 yydestruct (yychar1, yylval);
1690 yychar = YYEMPTY; 1827 yychar = YYEMPTY;
1828
1691 } 1829 }
1692 1830
1693 /* Else will try to reuse lookahead token after shifting the error 1831 /* Else will try to reuse lookahead token after shifting the error
1694 token. */ 1832 token. */
1833 goto yyerrlab1;
1695 1834
1835
1836/*----------------------------------------------------.
1837| yyerrlab1 -- error raised explicitly by an action. |
1838`----------------------------------------------------*/
1839yyerrlab1:
1696 yyerrstatus = 3; /* Each real token shifted decrements this. */ 1840 yyerrstatus = 3; /* Each real token shifted decrements this. */
1697 1841
1698 for (;;) 1842 for (;;)
@@ -1713,26 +1857,12 @@ yyerrlab1:
1713 if (yyssp == yyss) 1857 if (yyssp == yyss)
1714 YYABORT; 1858 YYABORT;
1715 1859
1716 YYDPRINTF ((stderr, "Error: popping ")); 1860 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1717 YYDSYMPRINT ((stderr, 1861 yydestruct (yystos[yystate], yyvsp);
1718 yystos[*yyssp], *yyvsp));
1719 YYDPRINTF ((stderr, "\n"));
1720
1721 yydestruct (yystos[yystate], *yyvsp);
1722 yyvsp--; 1862 yyvsp--;
1723 yystate = *--yyssp; 1863 yystate = *--yyssp;
1724 1864
1725 1865 YY_STACK_PRINT (yyss, yyssp);
1726#if YYDEBUG
1727 if (yydebug)
1728 {
1729 short *yyssp1 = yyss - 1;
1730 YYFPRINTF (stderr, "Error: state stack now");
1731 while (yyssp1 != yyssp)
1732 YYFPRINTF (stderr, " %d", *++yyssp1);
1733 YYFPRINTF (stderr, "\n");
1734 }
1735#endif
1736 } 1866 }
1737 1867
1738 if (yyn == YYFINAL) 1868 if (yyn == YYFINAL)
@@ -1780,24 +1910,32 @@ yyreturn:
1780} 1910}
1781 1911
1782 1912
1783#line 419 "zconf.y" 1913
1784 1914
1785 1915
1786void conf_parse(const char *name) 1916void conf_parse(const char *name)
1787{ 1917{
1918 struct symbol *sym;
1919 int i;
1920
1788 zconf_initscan(name); 1921 zconf_initscan(name);
1789 1922
1790 sym_init(); 1923 sym_init();
1791 menu_init(); 1924 menu_init();
1792 rootmenu.prompt = menu_add_prop(P_MENU, "BusyBox Configuration", NULL, NULL); 1925 modules_sym = sym_lookup("MODULES", 0);
1926 rootmenu.prompt = menu_add_prop(P_MENU, "Linux Kernel Configuration", NULL, NULL);
1793 1927
1794 //zconfdebug = 1; 1928 //zconfdebug = 1;
1795 zconfparse(); 1929 zconfparse();
1796 if (zconfnerrs) 1930 if (zconfnerrs)
1797 exit(1); 1931 exit(1);
1798 menu_finalize(&rootmenu); 1932 menu_finalize(&rootmenu);
1799 1933 for_all_symbols(i, sym) {
1800 modules_sym = sym_lookup("MODULES", 0); 1934 if (!(sym->flags & SYMBOL_CHECKED) && sym_check_deps(sym))
1935 printf("\n");
1936 else
1937 sym->flags |= SYMBOL_CHECK_DONE;
1938 }
1801 1939
1802 sym_change_count = 1; 1940 sym_change_count = 1;
1803} 1941}
@@ -1813,7 +1951,7 @@ const char *zconf_tokenname(int token)
1813 case T_ENDIF: return "endif"; 1951 case T_ENDIF: return "endif";
1814 } 1952 }
1815 return "<token>"; 1953 return "<token>";
1816} 1954}
1817 1955
1818static bool zconf_endtoken(int token, int starttoken, int endtoken) 1956static bool zconf_endtoken(int token, int starttoken, int endtoken)
1819{ 1957{
@@ -1835,7 +1973,7 @@ static void zconfprint(const char *err, ...)
1835{ 1973{
1836 va_list ap; 1974 va_list ap;
1837 1975
1838 fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); 1976 fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno() + 1);
1839 va_start(ap, err); 1977 va_start(ap, err);
1840 vfprintf(stderr, err, ap); 1978 vfprintf(stderr, err, ap);
1841 va_end(ap); 1979 va_end(ap);
@@ -1844,7 +1982,7 @@ static void zconfprint(const char *err, ...)
1844 1982
1845static void zconferror(const char *err) 1983static void zconferror(const char *err)
1846{ 1984{
1847 fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno(), err); 1985 fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
1848} 1986}
1849 1987
1850void print_quoted_string(FILE *out, const char *str) 1988void print_quoted_string(FILE *out, const char *str)
@@ -1869,8 +2007,6 @@ void print_symbol(FILE *out, struct menu *menu)
1869 struct symbol *sym = menu->sym; 2007 struct symbol *sym = menu->sym;
1870 struct property *prop; 2008 struct property *prop;
1871 2009
1872 //sym->flags |= SYMBOL_PRINTED;
1873
1874 if (sym_is_choice(sym)) 2010 if (sym_is_choice(sym))
1875 fprintf(out, "choice\n"); 2011 fprintf(out, "choice\n");
1876 else 2012 else
@@ -1895,13 +2031,6 @@ void print_symbol(FILE *out, struct menu *menu)
1895 fputs(" ???\n", out); 2031 fputs(" ???\n", out);
1896 break; 2032 break;
1897 } 2033 }
1898#if 0
1899 if (!expr_is_yes(sym->dep)) {
1900 fputs(" depends ", out);
1901 expr_fprint(sym->dep, out);
1902 fputc('\n', out);
1903 }
1904#endif
1905 for (prop = sym->prop; prop; prop = prop->next) { 2034 for (prop = sym->prop; prop; prop = prop->next) {
1906 if (prop->menu != menu) 2035 if (prop->menu != menu)
1907 continue; 2036 continue;
@@ -1909,25 +2038,18 @@ void print_symbol(FILE *out, struct menu *menu)
1909 case P_PROMPT: 2038 case P_PROMPT:
1910 fputs(" prompt ", out); 2039 fputs(" prompt ", out);
1911 print_quoted_string(out, prop->text); 2040 print_quoted_string(out, prop->text);
1912 if (prop->def) { 2041 if (!expr_is_yes(prop->visible.expr)) {
1913 fputc(' ', out);
1914 if (prop->def->flags & SYMBOL_CONST)
1915 print_quoted_string(out, prop->def->name);
1916 else
1917 fputs(prop->def->name, out);
1918 }
1919 if (!expr_is_yes(E_EXPR(prop->visible))) {
1920 fputs(" if ", out); 2042 fputs(" if ", out);
1921 expr_fprint(E_EXPR(prop->visible), out); 2043 expr_fprint(prop->visible.expr, out);
1922 } 2044 }
1923 fputc('\n', out); 2045 fputc('\n', out);
1924 break; 2046 break;
1925 case P_DEFAULT: 2047 case P_DEFAULT:
1926 fputs( " default ", out); 2048 fputs( " default ", out);
1927 print_quoted_string(out, prop->def->name); 2049 expr_fprint(prop->expr, out);
1928 if (!expr_is_yes(E_EXPR(prop->visible))) { 2050 if (!expr_is_yes(prop->visible.expr)) {
1929 fputs(" if ", out); 2051 fputs(" if ", out);
1930 expr_fprint(E_EXPR(prop->visible), out); 2052 expr_fprint(prop->visible.expr, out);
1931 } 2053 }
1932 fputc('\n', out); 2054 fputc('\n', out);
1933 break; 2055 break;
@@ -1950,7 +2072,6 @@ void print_symbol(FILE *out, struct menu *menu)
1950 2072
1951void zconfdump(FILE *out) 2073void zconfdump(FILE *out)
1952{ 2074{
1953 //struct file *file;
1954 struct property *prop; 2075 struct property *prop;
1955 struct symbol *sym; 2076 struct symbol *sym;
1956 struct menu *menu; 2077 struct menu *menu;
@@ -1961,11 +2082,6 @@ void zconfdump(FILE *out)
1961 print_symbol(out, menu); 2082 print_symbol(out, menu);
1962 else if ((prop = menu->prompt)) { 2083 else if ((prop = menu->prompt)) {
1963 switch (prop->type) { 2084 switch (prop->type) {
1964 //case T_MAINMENU:
1965 // fputs("\nmainmenu ", out);
1966 // print_quoted_string(out, prop->text);
1967 // fputs("\n", out);
1968 // break;
1969 case P_COMMENT: 2085 case P_COMMENT:
1970 fputs("\ncomment ", out); 2086 fputs("\ncomment ", out);
1971 print_quoted_string(out, prop->text); 2087 print_quoted_string(out, prop->text);
@@ -1976,19 +2092,12 @@ void zconfdump(FILE *out)
1976 print_quoted_string(out, prop->text); 2092 print_quoted_string(out, prop->text);
1977 fputs("\n", out); 2093 fputs("\n", out);
1978 break; 2094 break;
1979 //case T_SOURCE:
1980 // fputs("\nsource ", out);
1981 // print_quoted_string(out, prop->text);
1982 // fputs("\n", out);
1983 // break;
1984 //case T_IF:
1985 // fputs("\nif\n", out);
1986 default: 2095 default:
1987 ; 2096 ;
1988 } 2097 }
1989 if (!expr_is_yes(E_EXPR(prop->visible))) { 2098 if (!expr_is_yes(prop->visible.expr)) {
1990 fputs(" depends ", out); 2099 fputs(" depends ", out);
1991 expr_fprint(E_EXPR(prop->visible), out); 2100 expr_fprint(prop->visible.expr, out);
1992 fputc('\n', out); 2101 fputc('\n', out);
1993 } 2102 }
1994 fputs("\n", out); 2103 fputs("\n", out);
@@ -2015,3 +2124,4 @@ void zconfdump(FILE *out)
2015#include "symbol.c" 2124#include "symbol.c"
2016#include "menu.c" 2125#include "menu.c"
2017 2126
2127