diff options
Diffstat (limited to 'scripts/kconfig/zconf.tab.c_shipped')
-rw-r--r-- | scripts/kconfig/zconf.tab.c_shipped | 1177 |
1 files changed, 610 insertions, 567 deletions
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index ff4fcc09720e..ea7755da82f5 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped | |||
@@ -1,7 +1,7 @@ | |||
1 | /* A Bison parser, made by GNU Bison 1.875a. */ | 1 | /* A Bison parser, made by GNU Bison 2.0. */ |
2 | 2 | ||
3 | /* Skeleton parser for Yacc-like parsing with Bison, | 3 | /* Skeleton parser for Yacc-like parsing with Bison, |
4 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. | 4 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 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 |
@@ -45,8 +45,7 @@ | |||
45 | /* Using locations. */ | 45 | /* Using locations. */ |
46 | #define YYLSP_NEEDED 0 | 46 | #define YYLSP_NEEDED 0 |
47 | 47 | ||
48 | /* If NAME_PREFIX is specified substitute the variables and functions | 48 | /* Substitute the variable and function names. */ |
49 | names. */ | ||
50 | #define yyparse zconfparse | 49 | #define yyparse zconfparse |
51 | #define yylex zconflex | 50 | #define yylex zconflex |
52 | #define yyerror zconferror | 51 | #define yyerror zconferror |
@@ -79,28 +78,21 @@ | |||
79 | T_REQUIRES = 272, | 78 | T_REQUIRES = 272, |
80 | T_OPTIONAL = 273, | 79 | T_OPTIONAL = 273, |
81 | T_PROMPT = 274, | 80 | T_PROMPT = 274, |
82 | T_DEFAULT = 275, | 81 | T_TYPE = 275, |
83 | T_TRISTATE = 276, | 82 | T_DEFAULT = 276, |
84 | T_DEF_TRISTATE = 277, | 83 | T_SELECT = 277, |
85 | T_BOOLEAN = 278, | 84 | T_RANGE = 278, |
86 | T_DEF_BOOLEAN = 279, | 85 | T_ON = 279, |
87 | T_STRING = 280, | 86 | T_WORD = 280, |
88 | T_INT = 281, | 87 | T_WORD_QUOTE = 281, |
89 | T_HEX = 282, | 88 | T_UNEQUAL = 282, |
90 | T_WORD = 283, | 89 | T_CLOSE_PAREN = 283, |
91 | T_WORD_QUOTE = 284, | 90 | T_OPEN_PAREN = 284, |
92 | T_UNEQUAL = 285, | 91 | T_EOL = 285, |
93 | T_EOF = 286, | 92 | T_OR = 286, |
94 | T_EOL = 287, | 93 | T_AND = 287, |
95 | T_CLOSE_PAREN = 288, | 94 | T_EQUAL = 288, |
96 | T_OPEN_PAREN = 289, | 95 | T_NOT = 289 |
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 | ||
104 | }; | 96 | }; |
105 | #endif | 97 | #endif |
106 | #define T_MAINMENU 258 | 98 | #define T_MAINMENU 258 |
@@ -120,28 +112,21 @@ | |||
120 | #define T_REQUIRES 272 | 112 | #define T_REQUIRES 272 |
121 | #define T_OPTIONAL 273 | 113 | #define T_OPTIONAL 273 |
122 | #define T_PROMPT 274 | 114 | #define T_PROMPT 274 |
123 | #define T_DEFAULT 275 | 115 | #define T_TYPE 275 |
124 | #define T_TRISTATE 276 | 116 | #define T_DEFAULT 276 |
125 | #define T_DEF_TRISTATE 277 | 117 | #define T_SELECT 277 |
126 | #define T_BOOLEAN 278 | 118 | #define T_RANGE 278 |
127 | #define T_DEF_BOOLEAN 279 | 119 | #define T_ON 279 |
128 | #define T_STRING 280 | 120 | #define T_WORD 280 |
129 | #define T_INT 281 | 121 | #define T_WORD_QUOTE 281 |
130 | #define T_HEX 282 | 122 | #define T_UNEQUAL 282 |
131 | #define T_WORD 283 | 123 | #define T_CLOSE_PAREN 283 |
132 | #define T_WORD_QUOTE 284 | 124 | #define T_OPEN_PAREN 284 |
133 | #define T_UNEQUAL 285 | 125 | #define T_EOL 285 |
134 | #define T_EOF 286 | 126 | #define T_OR 286 |
135 | #define T_EOL 287 | 127 | #define T_AND 287 |
136 | #define T_CLOSE_PAREN 288 | 128 | #define T_EQUAL 288 |
137 | #define T_OPEN_PAREN 289 | 129 | #define T_NOT 289 |
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 | ||
145 | 130 | ||
146 | 131 | ||
147 | 132 | ||
@@ -161,6 +146,11 @@ | |||
161 | #include <string.h> | 146 | #include <string.h> |
162 | #include <stdbool.h> | 147 | #include <stdbool.h> |
163 | 148 | ||
149 | #define LKC_DIRECT_LINK | ||
150 | #include "lkc.h" | ||
151 | |||
152 | #include "zconf.hash.c" | ||
153 | |||
164 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) | 154 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) |
165 | 155 | ||
166 | #define PRINTD 0x0001 | 156 | #define PRINTD 0x0001 |
@@ -170,14 +160,18 @@ int cdebug = PRINTD; | |||
170 | 160 | ||
171 | extern int zconflex(void); | 161 | extern int zconflex(void); |
172 | static void zconfprint(const char *err, ...); | 162 | static void zconfprint(const char *err, ...); |
163 | static void zconf_error(const char *err, ...); | ||
173 | static void zconferror(const char *err); | 164 | static void zconferror(const char *err); |
174 | static bool zconf_endtoken(int token, int starttoken, int endtoken); | 165 | static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); |
175 | 166 | ||
176 | struct symbol *symbol_hash[257]; | 167 | struct symbol *symbol_hash[257]; |
177 | 168 | ||
178 | static struct menu *current_menu, *current_entry; | 169 | static struct menu *current_menu, *current_entry; |
179 | 170 | ||
171 | #define YYDEBUG 0 | ||
172 | #if YYDEBUG | ||
180 | #define YYERROR_VERBOSE | 173 | #define YYERROR_VERBOSE |
174 | #endif | ||
181 | 175 | ||
182 | 176 | ||
183 | /* Enabling traces. */ | 177 | /* Enabling traces. */ |
@@ -196,13 +190,14 @@ static struct menu *current_menu, *current_entry; | |||
196 | #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) | 190 | #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) |
197 | 191 | ||
198 | typedef union YYSTYPE { | 192 | typedef union YYSTYPE { |
199 | int token; | ||
200 | char *string; | 193 | char *string; |
194 | struct file *file; | ||
201 | struct symbol *symbol; | 195 | struct symbol *symbol; |
202 | struct expr *expr; | 196 | struct expr *expr; |
203 | struct menu *menu; | 197 | struct menu *menu; |
198 | struct kconf_id *id; | ||
204 | } YYSTYPE; | 199 | } YYSTYPE; |
205 | /* Line 191 of yacc.c. */ | 200 | /* Line 190 of yacc.c. */ |
206 | 201 | ||
207 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | 202 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
208 | # define YYSTYPE_IS_DECLARED 1 | 203 | # define YYSTYPE_IS_DECLARED 1 |
@@ -214,27 +209,26 @@ typedef union YYSTYPE { | |||
214 | /* Copy the second part of user declarations. */ | 209 | /* Copy the second part of user declarations. */ |
215 | 210 | ||
216 | 211 | ||
217 | #define LKC_DIRECT_LINK | 212 | /* Line 213 of yacc.c. */ |
218 | #include "lkc.h" | ||
219 | |||
220 | |||
221 | /* Line 214 of yacc.c. */ | ||
222 | 213 | ||
223 | 214 | ||
224 | #if ! defined (yyoverflow) || YYERROR_VERBOSE | 215 | #if ! defined (yyoverflow) || YYERROR_VERBOSE |
225 | 216 | ||
217 | # ifndef YYFREE | ||
218 | # define YYFREE free | ||
219 | # endif | ||
220 | # ifndef YYMALLOC | ||
221 | # define YYMALLOC malloc | ||
222 | # endif | ||
223 | |||
226 | /* The parser invokes alloca or malloc; define the necessary symbols. */ | 224 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
227 | 225 | ||
228 | # if YYSTACK_USE_ALLOCA | 226 | # ifdef YYSTACK_USE_ALLOCA |
229 | # define YYSTACK_ALLOC alloca | 227 | # if YYSTACK_USE_ALLOCA |
230 | # else | 228 | # ifdef __GNUC__ |
231 | # ifndef YYSTACK_USE_ALLOCA | 229 | # define YYSTACK_ALLOC __builtin_alloca |
232 | # if defined (alloca) || defined (_ALLOCA_H) | ||
233 | # define YYSTACK_ALLOC alloca | ||
234 | # else | 230 | # else |
235 | # ifdef __GNUC__ | 231 | # define YYSTACK_ALLOC alloca |
236 | # define YYSTACK_ALLOC __builtin_alloca | ||
237 | # endif | ||
238 | # endif | 232 | # endif |
239 | # endif | 233 | # endif |
240 | # endif | 234 | # endif |
@@ -247,20 +241,20 @@ typedef union YYSTYPE { | |||
247 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | 241 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
248 | # define YYSIZE_T size_t | 242 | # define YYSIZE_T size_t |
249 | # endif | 243 | # endif |
250 | # define YYSTACK_ALLOC malloc | 244 | # define YYSTACK_ALLOC YYMALLOC |
251 | # define YYSTACK_FREE free | 245 | # define YYSTACK_FREE YYFREE |
252 | # endif | 246 | # endif |
253 | #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ | 247 | #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ |
254 | 248 | ||
255 | 249 | ||
256 | #if (! defined (yyoverflow) \ | 250 | #if (! defined (yyoverflow) \ |
257 | && (! defined (__cplusplus) \ | 251 | && (! defined (__cplusplus) \ |
258 | || (YYSTYPE_IS_TRIVIAL))) | 252 | || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) |
259 | 253 | ||
260 | /* A type that is properly aligned for any stack member. */ | 254 | /* A type that is properly aligned for any stack member. */ |
261 | union yyalloc | 255 | union yyalloc |
262 | { | 256 | { |
263 | short yyss; | 257 | short int yyss; |
264 | YYSTYPE yyvs; | 258 | YYSTYPE yyvs; |
265 | }; | 259 | }; |
266 | 260 | ||
@@ -270,13 +264,13 @@ union yyalloc | |||
270 | /* The size of an array large to enough to hold all stacks, each with | 264 | /* The size of an array large to enough to hold all stacks, each with |
271 | N elements. */ | 265 | N elements. */ |
272 | # define YYSTACK_BYTES(N) \ | 266 | # define YYSTACK_BYTES(N) \ |
273 | ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ | 267 | ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ |
274 | + YYSTACK_GAP_MAXIMUM) | 268 | + YYSTACK_GAP_MAXIMUM) |
275 | 269 | ||
276 | /* Copy COUNT objects from FROM to TO. The source and destination do | 270 | /* Copy COUNT objects from FROM to TO. The source and destination do |
277 | not overlap. */ | 271 | not overlap. */ |
278 | # ifndef YYCOPY | 272 | # ifndef YYCOPY |
279 | # if 1 < __GNUC__ | 273 | # if defined (__GNUC__) && 1 < __GNUC__ |
280 | # define YYCOPY(To, From, Count) \ | 274 | # define YYCOPY(To, From, Count) \ |
281 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | 275 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
282 | # else | 276 | # else |
@@ -312,26 +306,26 @@ union yyalloc | |||
312 | #if defined (__STDC__) || defined (__cplusplus) | 306 | #if defined (__STDC__) || defined (__cplusplus) |
313 | typedef signed char yysigned_char; | 307 | typedef signed char yysigned_char; |
314 | #else | 308 | #else |
315 | typedef short yysigned_char; | 309 | typedef short int yysigned_char; |
316 | #endif | 310 | #endif |
317 | 311 | ||
318 | /* YYFINAL -- State number of the termination state. */ | 312 | /* YYFINAL -- State number of the termination state. */ |
319 | #define YYFINAL 2 | 313 | #define YYFINAL 3 |
320 | /* YYLAST -- Last index in YYTABLE. */ | 314 | /* YYLAST -- Last index in YYTABLE. */ |
321 | #define YYLAST 201 | 315 | #define YYLAST 264 |
322 | 316 | ||
323 | /* YYNTOKENS -- Number of terminals. */ | 317 | /* YYNTOKENS -- Number of terminals. */ |
324 | #define YYNTOKENS 42 | 318 | #define YYNTOKENS 35 |
325 | /* YYNNTS -- Number of nonterminals. */ | 319 | /* YYNNTS -- Number of nonterminals. */ |
326 | #define YYNNTS 41 | 320 | #define YYNNTS 42 |
327 | /* YYNRULES -- Number of rules. */ | 321 | /* YYNRULES -- Number of rules. */ |
328 | #define YYNRULES 104 | 322 | #define YYNRULES 104 |
329 | /* YYNRULES -- Number of states. */ | 323 | /* YYNRULES -- Number of states. */ |
330 | #define YYNSTATES 182 | 324 | #define YYNSTATES 175 |
331 | 325 | ||
332 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ | 326 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
333 | #define YYUNDEFTOK 2 | 327 | #define YYUNDEFTOK 2 |
334 | #define YYMAXUTOK 296 | 328 | #define YYMAXUTOK 289 |
335 | 329 | ||
336 | #define YYTRANSLATE(YYX) \ | 330 | #define YYTRANSLATE(YYX) \ |
337 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) | 331 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
@@ -367,79 +361,78 @@ static const unsigned char yytranslate[] = | |||
367 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, | 361 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
368 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | 362 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
369 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | 363 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
370 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | 364 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 |
371 | 35, 36, 37, 38, 39, 40, 41 | ||
372 | }; | 365 | }; |
373 | 366 | ||
374 | #if YYDEBUG | 367 | #if YYDEBUG |
375 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in | 368 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
376 | YYRHS. */ | 369 | YYRHS. */ |
377 | static const unsigned short yyprhs[] = | 370 | static const unsigned short int yyprhs[] = |
378 | { | 371 | { |
379 | 0, 0, 3, 4, 7, 9, 11, 13, 17, 19, | 372 | 0, 0, 3, 5, 6, 9, 12, 15, 20, 23, |
380 | 21, 23, 26, 28, 30, 32, 34, 36, 38, 42, | 373 | 28, 33, 37, 39, 41, 43, 45, 47, 49, 51, |
381 | 45, 49, 52, 53, 56, 59, 62, 65, 69, 74, | 374 | 53, 55, 57, 59, 61, 63, 67, 70, 74, 77, |
382 | 78, 83, 87, 91, 95, 100, 105, 110, 116, 119, | 375 | 81, 84, 85, 88, 91, 94, 97, 100, 104, 109, |
383 | 122, 124, 128, 131, 132, 135, 138, 141, 144, 149, | 376 | 114, 119, 125, 128, 131, 133, 137, 138, 141, 144, |
384 | 153, 157, 160, 165, 166, 169, 173, 175, 179, 182, | 377 | 147, 150, 153, 158, 162, 165, 170, 171, 174, 178, |
385 | 183, 186, 189, 192, 196, 199, 201, 205, 208, 209, | 378 | 180, 184, 185, 188, 191, 194, 198, 201, 203, 207, |
386 | 212, 215, 218, 222, 226, 228, 232, 235, 238, 241, | 379 | 208, 211, 214, 217, 221, 225, 228, 231, 234, 235, |
387 | 242, 245, 248, 253, 257, 261, 262, 265, 267, 269, | 380 | 238, 241, 244, 249, 253, 257, 258, 261, 263, 265, |
388 | 272, 275, 278, 280, 282, 283, 286, 288, 292, 296, | 381 | 268, 271, 274, 276, 279, 280, 283, 285, 289, 293, |
389 | 300, 303, 307, 311, 313 | 382 | 297, 300, 304, 308, 310 |
390 | }; | 383 | }; |
391 | 384 | ||
392 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ | 385 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
393 | static const yysigned_char yyrhs[] = | 386 | static const yysigned_char yyrhs[] = |
394 | { | 387 | { |
395 | 43, 0, -1, -1, 43, 44, -1, 45, -1, 55, | 388 | 36, 0, -1, 37, -1, -1, 37, 39, -1, 37, |
396 | -1, 66, -1, 3, 77, 79, -1, 5, -1, 15, | 389 | 50, -1, 37, 61, -1, 37, 3, 71, 73, -1, |
397 | -1, 8, -1, 1, 79, -1, 61, -1, 71, -1, | 390 | 37, 72, -1, 37, 25, 1, 30, -1, 37, 38, |
398 | 47, -1, 49, -1, 69, -1, 79, -1, 10, 28, | 391 | 1, 30, -1, 37, 1, 30, -1, 16, -1, 19, |
399 | 32, -1, 46, 50, -1, 11, 28, 32, -1, 48, | 392 | -1, 20, -1, 22, -1, 18, -1, 23, -1, 21, |
400 | 50, -1, -1, 50, 51, -1, 50, 75, -1, 50, | 393 | -1, 30, -1, 56, -1, 65, -1, 42, -1, 44, |
401 | 73, -1, 50, 32, -1, 21, 76, 32, -1, 22, | 394 | -1, 63, -1, 25, 1, 30, -1, 1, 30, -1, |
402 | 81, 80, 32, -1, 23, 76, 32, -1, 24, 81, | 395 | 10, 25, 30, -1, 41, 45, -1, 11, 25, 30, |
403 | 80, 32, -1, 26, 76, 32, -1, 27, 76, 32, | 396 | -1, 43, 45, -1, -1, 45, 46, -1, 45, 69, |
404 | -1, 25, 76, 32, -1, 19, 77, 80, 32, -1, | 397 | -1, 45, 67, -1, 45, 40, -1, 45, 30, -1, |
405 | 20, 81, 80, 32, -1, 36, 28, 80, 32, -1, | 398 | 20, 70, 30, -1, 19, 71, 74, 30, -1, 21, |
406 | 37, 82, 82, 80, 32, -1, 7, 32, -1, 52, | 399 | 75, 74, 30, -1, 22, 25, 74, 30, -1, 23, |
407 | 56, -1, 78, -1, 53, 58, 54, -1, 53, 58, | 400 | 76, 76, 74, 30, -1, 7, 30, -1, 47, 51, |
408 | -1, -1, 56, 57, -1, 56, 75, -1, 56, 73, | 401 | -1, 72, -1, 48, 53, 49, -1, -1, 51, 52, |
409 | -1, 56, 32, -1, 19, 77, 80, 32, -1, 21, | 402 | -1, 51, 69, -1, 51, 67, -1, 51, 30, -1, |
410 | 76, 32, -1, 23, 76, 32, -1, 18, 32, -1, | 403 | 51, 40, -1, 19, 71, 74, 30, -1, 20, 70, |
411 | 20, 28, 80, 32, -1, -1, 58, 45, -1, 14, | 404 | 30, -1, 18, 30, -1, 21, 25, 74, 30, -1, |
412 | 81, 32, -1, 78, -1, 59, 62, 60, -1, 59, | 405 | -1, 53, 39, -1, 14, 75, 73, -1, 72, -1, |
413 | 62, -1, -1, 62, 45, -1, 62, 66, -1, 62, | 406 | 54, 57, 55, -1, -1, 57, 39, -1, 57, 61, |
414 | 55, -1, 4, 77, 32, -1, 63, 74, -1, 78, | 407 | -1, 57, 50, -1, 4, 71, 30, -1, 58, 68, |
415 | -1, 64, 67, 65, -1, 64, 67, -1, -1, 67, | 408 | -1, 72, -1, 59, 62, 60, -1, -1, 62, 39, |
416 | 45, -1, 67, 66, -1, 67, 55, -1, 67, 1, | 409 | -1, 62, 61, -1, 62, 50, -1, 6, 71, 30, |
417 | 32, -1, 6, 77, 32, -1, 68, -1, 9, 77, | 410 | -1, 9, 71, 30, -1, 64, 68, -1, 12, 30, |
418 | 32, -1, 70, 74, -1, 12, 32, -1, 72, 13, | 411 | -1, 66, 13, -1, -1, 68, 69, -1, 68, 30, |
419 | -1, -1, 74, 75, -1, 74, 32, -1, 16, 35, | 412 | -1, 68, 40, -1, 16, 24, 75, 30, -1, 16, |
420 | 81, 32, -1, 16, 81, 32, -1, 17, 81, 32, | 413 | 75, 30, -1, 17, 75, 30, -1, -1, 71, 74, |
421 | -1, -1, 77, 80, -1, 28, -1, 29, -1, 5, | 414 | -1, 25, -1, 26, -1, 5, 30, -1, 8, 30, |
422 | 79, -1, 8, 79, -1, 15, 79, -1, 32, -1, | 415 | -1, 15, 30, -1, 30, -1, 73, 30, -1, -1, |
423 | 31, -1, -1, 14, 81, -1, 82, -1, 82, 40, | 416 | 14, 75, -1, 76, -1, 76, 33, 76, -1, 76, |
424 | 82, -1, 82, 30, 82, -1, 34, 81, 33, -1, | 417 | 27, 76, -1, 29, 75, 28, -1, 34, 75, -1, |
425 | 41, 81, -1, 81, 38, 81, -1, 81, 39, 81, | 418 | 75, 31, 75, -1, 75, 32, 75, -1, 25, -1, |
426 | -1, 28, -1, 29, -1 | 419 | 26, -1 |
427 | }; | 420 | }; |
428 | 421 | ||
429 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | 422 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
430 | static const unsigned short yyrline[] = | 423 | static const unsigned short int yyrline[] = |
431 | { | 424 | { |
432 | 0, 94, 94, 95, 98, 99, 100, 101, 102, 103, | 425 | 0, 103, 103, 105, 107, 108, 109, 110, 111, 112, |
433 | 104, 105, 109, 110, 111, 112, 113, 114, 120, 128, | 426 | 113, 117, 121, 121, 121, 121, 121, 121, 121, 125, |
434 | 134, 142, 152, 154, 155, 156, 157, 160, 166, 173, | 427 | 126, 127, 128, 129, 130, 134, 135, 141, 149, 155, |
435 | 179, 186, 192, 198, 204, 210, 216, 222, 230, 239, | 428 | 163, 173, 175, 176, 177, 178, 179, 182, 190, 196, |
436 | 245, 254, 255, 261, 263, 264, 265, 266, 269, 275, | 429 | 206, 212, 220, 229, 234, 242, 245, 247, 248, 249, |
437 | 281, 287, 293, 299, 301, 306, 315, 324, 325, 331, | 430 | 250, 251, 254, 260, 271, 277, 287, 289, 294, 302, |
438 | 333, 334, 335, 340, 347, 353, 362, 363, 369, 371, | 431 | 310, 313, 315, 316, 317, 322, 329, 334, 342, 345, |
439 | 372, 373, 374, 377, 383, 390, 397, 404, 410, 417, | 432 | 347, 348, 349, 352, 360, 367, 374, 380, 387, 389, |
440 | 418, 419, 422, 427, 432, 440, 442, 447, 448, 451, | 433 | 390, 391, 394, 399, 404, 412, 414, 419, 420, 423, |
441 | 452, 453, 457, 457, 459, 460, 463, 464, 465, 466, | 434 | 424, 425, 429, 430, 433, 434, 437, 438, 439, 440, |
442 | 467, 468, 469, 472, 473 | 435 | 441, 442, 443, 446, 447 |
443 | }; | 436 | }; |
444 | #endif | 437 | #endif |
445 | 438 | ||
@@ -448,67 +441,65 @@ static const unsigned short yyrline[] = | |||
448 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ | 441 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
449 | static const char *const yytname[] = | 442 | static const char *const yytname[] = |
450 | { | 443 | { |
451 | "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", | 444 | "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", |
452 | "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", | 445 | "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", |
453 | "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", | 446 | "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", |
454 | "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE", | 447 | "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", |
455 | "T_DEF_TRISTATE", "T_BOOLEAN", "T_DEF_BOOLEAN", "T_STRING", "T_INT", | 448 | "T_SELECT", "T_RANGE", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", |
456 | "T_HEX", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", "T_EOF", "T_EOL", | 449 | "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", |
457 | "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_SELECT", "T_RANGE", "T_OR", | 450 | "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt", |
458 | "T_AND", "T_EQUAL", "T_NOT", "$accept", "input", "block", | 451 | "option_error", "config_entry_start", "config_stmt", |
459 | "common_block", "config_entry_start", "config_stmt", | 452 | "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", |
460 | "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", | 453 | "config_option", "choice", "choice_entry", "choice_end", "choice_stmt", |
461 | "config_option", "choice", "choice_entry", "choice_end", "choice_stmt", | 454 | "choice_option_list", "choice_option", "choice_block", "if_entry", |
462 | "choice_option_list", "choice_option", "choice_block", "if", "if_end", | 455 | "if_end", "if_stmt", "if_block", "menu", "menu_entry", "menu_end", |
463 | "if_stmt", "if_block", "menu", "menu_entry", "menu_end", "menu_stmt", | 456 | "menu_stmt", "menu_block", "source_stmt", "comment", "comment_stmt", |
464 | "menu_block", "source", "source_stmt", "comment", "comment_stmt", | 457 | "help_start", "help", "depends_list", "depends", "prompt_stmt_opt", |
465 | "help_start", "help", "depends_list", "depends", "prompt_stmt_opt", | 458 | "prompt", "end", "nl", "if_expr", "expr", "symbol", 0 |
466 | "prompt", "end", "nl_or_eof", "if_expr", "expr", "symbol", 0 | ||
467 | }; | 459 | }; |
468 | #endif | 460 | #endif |
469 | 461 | ||
470 | # ifdef YYPRINT | 462 | # ifdef YYPRINT |
471 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to | 463 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
472 | token YYLEX-NUM. */ | 464 | token YYLEX-NUM. */ |
473 | static const unsigned short yytoknum[] = | 465 | static const unsigned short int yytoknum[] = |
474 | { | 466 | { |
475 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, | 467 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
476 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, | 468 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
477 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, | 469 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
478 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, | 470 | 285, 286, 287, 288, 289 |
479 | 295, 296 | ||
480 | }; | 471 | }; |
481 | # endif | 472 | # endif |
482 | 473 | ||
483 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | 474 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
484 | static const unsigned char yyr1[] = | 475 | static const unsigned char yyr1[] = |
485 | { | 476 | { |
486 | 0, 42, 43, 43, 44, 44, 44, 44, 44, 44, | 477 | 0, 35, 36, 37, 37, 37, 37, 37, 37, 37, |
487 | 44, 44, 45, 45, 45, 45, 45, 45, 46, 47, | 478 | 37, 37, 38, 38, 38, 38, 38, 38, 38, 39, |
488 | 48, 49, 50, 50, 50, 50, 50, 51, 51, 51, | 479 | 39, 39, 39, 39, 39, 40, 40, 41, 42, 43, |
489 | 51, 51, 51, 51, 51, 51, 51, 51, 52, 53, | 480 | 44, 45, 45, 45, 45, 45, 45, 46, 46, 46, |
490 | 54, 55, 55, 56, 56, 56, 56, 56, 57, 57, | 481 | 46, 46, 47, 48, 49, 50, 51, 51, 51, 51, |
491 | 57, 57, 57, 58, 58, 59, 60, 61, 61, 62, | 482 | 51, 51, 52, 52, 52, 52, 53, 53, 54, 55, |
492 | 62, 62, 62, 63, 64, 65, 66, 66, 67, 67, | 483 | 56, 57, 57, 57, 57, 58, 59, 60, 61, 62, |
493 | 67, 67, 67, 68, 69, 70, 71, 72, 73, 74, | 484 | 62, 62, 62, 63, 64, 65, 66, 67, 68, 68, |
494 | 74, 74, 75, 75, 75, 76, 76, 77, 77, 78, | 485 | 68, 68, 69, 69, 69, 70, 70, 71, 71, 72, |
495 | 78, 78, 79, 79, 80, 80, 81, 81, 81, 81, | 486 | 72, 72, 73, 73, 74, 74, 75, 75, 75, 75, |
496 | 81, 81, 81, 82, 82 | 487 | 75, 75, 75, 76, 76 |
497 | }; | 488 | }; |
498 | 489 | ||
499 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | 490 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
500 | static const unsigned char yyr2[] = | 491 | static const unsigned char yyr2[] = |
501 | { | 492 | { |
502 | 0, 2, 0, 2, 1, 1, 1, 3, 1, 1, | 493 | 0, 2, 1, 0, 2, 2, 2, 4, 2, 4, |
503 | 1, 2, 1, 1, 1, 1, 1, 1, 3, 2, | 494 | 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, |
504 | 3, 2, 0, 2, 2, 2, 2, 3, 4, 3, | 495 | 1, 1, 1, 1, 1, 3, 2, 3, 2, 3, |
505 | 4, 3, 3, 3, 4, 4, 4, 5, 2, 2, | 496 | 2, 0, 2, 2, 2, 2, 2, 3, 4, 4, |
506 | 1, 3, 2, 0, 2, 2, 2, 2, 4, 3, | 497 | 4, 5, 2, 2, 1, 3, 0, 2, 2, 2, |
507 | 3, 2, 4, 0, 2, 3, 1, 3, 2, 0, | 498 | 2, 2, 4, 3, 2, 4, 0, 2, 3, 1, |
508 | 2, 2, 2, 3, 2, 1, 3, 2, 0, 2, | 499 | 3, 0, 2, 2, 2, 3, 2, 1, 3, 0, |
509 | 2, 2, 3, 3, 1, 3, 2, 2, 2, 0, | 500 | 2, 2, 2, 3, 3, 2, 2, 2, 0, 2, |
510 | 2, 2, 4, 3, 3, 0, 2, 1, 1, 2, | 501 | 2, 2, 4, 3, 3, 0, 2, 1, 1, 2, |
511 | 2, 2, 1, 1, 0, 2, 1, 3, 3, 3, | 502 | 2, 2, 1, 2, 0, 2, 1, 3, 3, 3, |
512 | 2, 3, 3, 1, 1 | 503 | 2, 3, 3, 1, 1 |
513 | }; | 504 | }; |
514 | 505 | ||
@@ -517,151 +508,160 @@ static const unsigned char yyr2[] = | |||
517 | means the default is an error. */ | 508 | means the default is an error. */ |
518 | static const unsigned char yydefact[] = | 509 | static const unsigned char yydefact[] = |
519 | { | 510 | { |
520 | 2, 0, 1, 0, 0, 0, 8, 0, 0, 10, | 511 | 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, |
521 | 0, 0, 0, 0, 9, 93, 92, 3, 4, 22, | 512 | 0, 0, 0, 0, 0, 0, 12, 16, 13, 14, |
522 | 14, 22, 15, 43, 53, 5, 59, 12, 79, 68, | 513 | 18, 15, 17, 0, 19, 0, 4, 31, 22, 31, |
523 | 6, 74, 16, 79, 13, 17, 11, 87, 88, 0, | 514 | 23, 46, 56, 5, 61, 20, 78, 69, 6, 24, |
524 | 0, 0, 38, 0, 0, 0, 103, 104, 0, 0, | 515 | 78, 21, 8, 11, 87, 88, 0, 0, 89, 0, |
525 | 0, 96, 19, 21, 39, 42, 58, 64, 0, 76, | 516 | 42, 90, 0, 0, 0, 103, 104, 0, 0, 0, |
526 | 7, 63, 73, 75, 18, 20, 0, 100, 55, 0, | 517 | 96, 91, 0, 0, 0, 0, 0, 0, 0, 0, |
527 | 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, | 518 | 0, 0, 92, 7, 65, 73, 74, 27, 29, 0, |
528 | 85, 0, 85, 85, 85, 26, 0, 0, 23, 0, | 519 | 100, 0, 0, 58, 0, 0, 9, 10, 0, 0, |
529 | 25, 24, 0, 0, 0, 85, 85, 47, 44, 46, | 520 | 0, 0, 0, 85, 0, 0, 0, 0, 36, 35, |
530 | 45, 0, 0, 0, 54, 41, 40, 60, 62, 57, | 521 | 32, 0, 34, 33, 0, 0, 85, 0, 50, 51, |
531 | 61, 56, 81, 80, 0, 69, 71, 66, 70, 65, | 522 | 47, 49, 48, 57, 45, 44, 62, 64, 60, 63, |
532 | 99, 101, 102, 98, 97, 77, 0, 0, 0, 94, | 523 | 59, 80, 81, 79, 70, 72, 68, 71, 67, 93, |
533 | 94, 0, 94, 94, 0, 94, 0, 0, 0, 94, | 524 | 99, 101, 102, 98, 97, 26, 76, 0, 0, 0, |
534 | 0, 78, 51, 94, 94, 0, 0, 89, 90, 91, | 525 | 94, 0, 94, 94, 94, 0, 0, 77, 54, 94, |
535 | 72, 0, 83, 84, 0, 0, 0, 27, 86, 0, | 526 | 0, 94, 0, 83, 84, 0, 0, 37, 86, 0, |
536 | 29, 0, 33, 31, 32, 0, 94, 0, 0, 49, | 527 | 0, 94, 25, 0, 53, 0, 82, 95, 38, 39, |
537 | 50, 82, 95, 34, 35, 28, 30, 36, 0, 48, | 528 | 40, 0, 52, 55, 41 |
538 | 52, 37 | ||
539 | }; | 529 | }; |
540 | 530 | ||
541 | /* YYDEFGOTO[NTERM-NUM]. */ | 531 | /* YYDEFGOTO[NTERM-NUM]. */ |
542 | static const short yydefgoto[] = | 532 | static const short int yydefgoto[] = |
543 | { | 533 | { |
544 | -1, 1, 17, 18, 19, 20, 21, 22, 52, 88, | 534 | -1, 1, 2, 25, 26, 99, 27, 28, 29, 30, |
545 | 23, 24, 105, 25, 54, 98, 55, 26, 109, 27, | 535 | 64, 100, 31, 32, 114, 33, 66, 110, 67, 34, |
546 | 56, 28, 29, 117, 30, 58, 31, 32, 33, 34, | 536 | 118, 35, 68, 36, 37, 126, 38, 70, 39, 40, |
547 | 89, 90, 57, 91, 131, 132, 106, 35, 155, 50, | 537 | 41, 101, 102, 69, 103, 141, 142, 42, 73, 156, |
548 | 51 | 538 | 59, 60 |
549 | }; | 539 | }; |
550 | 540 | ||
551 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | 541 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
552 | STATE-NUM. */ | 542 | STATE-NUM. */ |
553 | #define YYPACT_NINF -99 | 543 | #define YYPACT_NINF -78 |
554 | static const short yypact[] = | 544 | static const short int yypact[] = |
555 | { | 545 | { |
556 | -99, 48, -99, 38, 46, 46, -99, 46, -29, -99, | 546 | -78, 2, 159, -78, -21, 0, 0, -12, 0, 1, |
557 | 46, -17, -3, -11, -99, -99, -99, -99, -99, -99, | 547 | 4, 0, 27, 38, 60, 58, -78, -78, -78, -78, |
558 | -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, | 548 | -78, -78, -78, 100, -78, 104, -78, -78, -78, -78, |
559 | -99, -99, -99, -99, -99, -99, -99, -99, -99, 38, | 549 | -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, |
560 | 12, 15, -99, 18, 51, 62, -99, -99, -11, -11, | 550 | -78, -78, -78, -78, -78, -78, 86, 113, -78, 114, |
561 | 4, -24, 138, 138, 160, 121, 110, -4, 81, -4, | 551 | -78, -78, 125, 127, 128, -78, -78, 60, 60, 210, |
562 | -99, -99, -99, -99, -99, -99, -19, -99, -99, -11, | 552 | 65, -78, 141, 142, 39, 103, 182, 200, 6, 66, |
563 | -11, 70, 70, 73, 32, -11, 46, -11, 46, -11, | 553 | 6, 131, -78, 146, -78, -78, -78, -78, -78, 196, |
564 | 46, -11, 46, 46, 46, -99, 36, 70, -99, 95, | 554 | -78, 60, 60, 146, 40, 40, -78, -78, 155, 156, |
565 | -99, -99, 96, 46, 106, 46, 46, -99, -99, -99, | 555 | -2, 60, 0, 0, 60, 105, 40, 194, -78, -78, |
566 | -99, 38, 38, 38, -99, -99, -99, -99, -99, -99, | 556 | -78, 206, -78, -78, 183, 0, 0, 195, -78, -78, |
567 | -99, -99, -99, -99, 112, -99, -99, -99, -99, -99, | 557 | -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, |
568 | -99, 117, -99, -99, -99, -99, -11, 33, 65, 131, | 558 | -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, |
569 | 1, 119, 131, 1, 136, 1, 153, 154, 155, 131, | 559 | -78, 197, -78, -78, -78, -78, -78, 60, 213, 216, |
570 | 70, -99, -99, 131, 131, 156, 157, -99, -99, -99, | 560 | 212, 203, 212, 190, 212, 40, 208, -78, -78, 212, |
571 | -99, 101, -99, -99, -11, 158, 159, -99, -99, 161, | 561 | 222, 212, 219, -78, -78, 60, 223, -78, -78, 224, |
572 | -99, 162, -99, -99, -99, 163, 131, 164, 165, -99, | 562 | 225, 212, -78, 226, -78, 227, -78, 47, -78, -78, |
573 | -99, -99, 99, -99, -99, -99, -99, -99, 166, -99, | 563 | -78, 228, -78, -78, -78 |
574 | -99, -99 | ||
575 | }; | 564 | }; |
576 | 565 | ||
577 | /* YYPGOTO[NTERM-NUM]. */ | 566 | /* YYPGOTO[NTERM-NUM]. */ |
578 | static const short yypgoto[] = | 567 | static const short int yypgoto[] = |
579 | { | 568 | { |
580 | -99, -99, -99, 111, -99, -99, -99, -99, 178, -99, | 569 | -78, -78, -78, -78, 164, -36, -78, -78, -78, -78, |
581 | -99, -99, -99, 91, -99, -99, -99, -99, -99, -99, | 570 | 230, -78, -78, -78, -78, 29, -78, -78, -78, -78, |
582 | -99, -99, -99, -99, 115, -99, -99, -99, -99, -99, | 571 | -78, -78, -78, -78, -78, -78, 59, -78, -78, -78, |
583 | -99, 146, 168, 89, 27, 0, 126, -1, -98, -48, | 572 | -78, -78, 198, 220, 24, 157, -5, 169, 202, 74, |
584 | -63 | 573 | -53, -77 |
585 | }; | 574 | }; |
586 | 575 | ||
587 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | 576 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
588 | positive, shift that token. If negative, reduce the rule which | 577 | positive, shift that token. If negative, reduce the rule which |
589 | number is the opposite. If zero, do what YYDEFACT says. | 578 | number is the opposite. If zero, do what YYDEFACT says. |
590 | If YYTABLE_NINF, syntax error. */ | 579 | If YYTABLE_NINF, syntax error. */ |
591 | #define YYTABLE_NINF -68 | 580 | #define YYTABLE_NINF -76 |
592 | static const short yytable[] = | 581 | static const short int yytable[] = |
593 | { | 582 | { |
594 | 66, 67, 36, 42, 39, 40, 71, 41, 123, 124, | 583 | 46, 47, 3, 49, 79, 80, 52, 133, 134, 43, |
595 | 43, 44, 74, 75, 120, 154, 72, 46, 47, 69, | 584 | 6, 7, 8, 9, 10, 11, 12, 13, 48, 145, |
596 | 70, 121, 122, 48, 140, 45, 127, 128, 112, 130, | 585 | 14, 15, 137, 55, 56, 44, 45, 57, 131, 132, |
597 | 49, 133, 156, 135, 158, 159, 68, 161, 60, 69, | 586 | 109, 50, 58, 122, 51, 122, 24, 138, 139, -28, |
598 | 70, 165, 69, 70, 61, 167, 168, 62, 2, 3, | 587 | 88, 143, -28, -28, -28, -28, -28, -28, -28, -28, |
599 | 63, 4, 5, 6, 7, 8, 9, 10, 11, 12, | 588 | -28, 89, 53, -28, -28, 90, 91, -28, 92, 93, |
600 | 46, 47, 13, 14, 139, 152, 48, 126, 178, 15, | 589 | 94, 95, 96, 54, 97, 55, 56, 88, 161, 98, |
601 | 16, 69, 70, 49, 37, 38, 129, 166, 151, 15, | 590 | -66, -66, -66, -66, -66, -66, -66, -66, 81, 82, |
602 | 16, -67, 114, 64, -67, 5, 101, 7, 8, 102, | 591 | -66, -66, 90, 91, 152, 55, 56, 140, 61, 57, |
603 | 10, 11, 12, 143, 65, 13, 103, 153, 46, 47, | 592 | 112, 97, 84, 123, 58, 123, 121, 117, 85, 125, |
604 | 147, 148, 149, 69, 70, 125, 172, 134, 141, 136, | 593 | 149, 62, 167, -30, 88, 63, -30, -30, -30, -30, |
605 | 137, 138, 15, 16, 5, 101, 7, 8, 102, 10, | 594 | -30, -30, -30, -30, -30, 89, 72, -30, -30, 90, |
606 | 11, 12, 145, 146, 13, 103, 101, 7, 142, 102, | 595 | 91, -30, 92, 93, 94, 95, 96, 119, 97, 127, |
607 | 10, 11, 12, 171, 144, 13, 103, 69, 70, 69, | 596 | 144, -75, 88, 98, -75, -75, -75, -75, -75, -75, |
608 | 70, 15, 16, 100, 150, 154, 113, 108, 113, 116, | 597 | -75, -75, -75, 74, 75, -75, -75, 90, 91, -75, |
609 | 73, 157, 15, 16, 74, 75, 70, 76, 77, 78, | 598 | -75, -75, -75, -75, -75, 76, 97, 77, 78, -2, |
610 | 79, 80, 81, 82, 83, 84, 104, 107, 160, 115, | 599 | 4, 121, 5, 6, 7, 8, 9, 10, 11, 12, |
611 | 85, 110, 73, 118, 86, 87, 74, 75, 92, 93, | 600 | 13, 86, 87, 14, 15, 16, 129, 17, 18, 19, |
612 | 94, 95, 111, 96, 119, 162, 163, 164, 169, 170, | 601 | 20, 21, 22, 88, 23, 135, 136, -43, -43, 24, |
613 | 173, 174, 97, 175, 176, 177, 179, 180, 181, 53, | 602 | -43, -43, -43, -43, 89, 146, -43, -43, 90, 91, |
614 | 99, 59 | 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 | ||
615 | }; | 610 | }; |
616 | 611 | ||
617 | static const unsigned char yycheck[] = | 612 | static const short int yycheck[] = |
618 | { | 613 | { |
619 | 48, 49, 3, 32, 4, 5, 30, 7, 71, 72, | 614 | 5, 6, 0, 8, 57, 58, 11, 84, 85, 30, |
620 | 10, 28, 16, 17, 33, 14, 40, 28, 29, 38, | 615 | 4, 5, 6, 7, 8, 9, 10, 11, 30, 96, |
621 | 39, 69, 70, 34, 87, 28, 74, 75, 32, 77, | 616 | 14, 15, 24, 25, 26, 25, 26, 29, 81, 82, |
622 | 41, 79, 130, 81, 132, 133, 32, 135, 39, 38, | 617 | 66, 30, 34, 69, 30, 71, 30, 90, 91, 0, |
623 | 39, 139, 38, 39, 32, 143, 144, 32, 0, 1, | 618 | 1, 94, 3, 4, 5, 6, 7, 8, 9, 10, |
624 | 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, | 619 | 11, 12, 25, 14, 15, 16, 17, 18, 19, 20, |
625 | 28, 29, 14, 15, 28, 32, 34, 35, 166, 31, | 620 | 21, 22, 23, 25, 25, 25, 26, 1, 145, 30, |
626 | 32, 38, 39, 41, 28, 29, 76, 140, 126, 31, | 621 | 4, 5, 6, 7, 8, 9, 10, 11, 31, 32, |
627 | 32, 0, 1, 32, 3, 4, 5, 6, 7, 8, | 622 | 14, 15, 16, 17, 137, 25, 26, 92, 30, 29, |
628 | 9, 10, 11, 93, 32, 14, 15, 32, 28, 29, | 623 | 66, 25, 27, 69, 34, 71, 30, 68, 33, 70, |
629 | 101, 102, 103, 38, 39, 32, 154, 80, 13, 82, | 624 | 105, 1, 155, 0, 1, 1, 3, 4, 5, 6, |
630 | 83, 84, 31, 32, 4, 5, 6, 7, 8, 9, | 625 | 7, 8, 9, 10, 11, 12, 30, 14, 15, 16, |
631 | 10, 11, 95, 96, 14, 15, 5, 6, 32, 8, | 626 | 17, 18, 19, 20, 21, 22, 23, 68, 25, 70, |
632 | 9, 10, 11, 32, 28, 14, 15, 38, 39, 38, | 627 | 25, 0, 1, 30, 3, 4, 5, 6, 7, 8, |
633 | 39, 31, 32, 54, 32, 14, 57, 56, 59, 58, | 628 | 9, 10, 11, 30, 30, 14, 15, 16, 17, 18, |
634 | 12, 32, 31, 32, 16, 17, 39, 19, 20, 21, | 629 | 19, 20, 21, 22, 23, 30, 25, 30, 30, 0, |
635 | 22, 23, 24, 25, 26, 27, 55, 56, 32, 58, | 630 | 1, 30, 3, 4, 5, 6, 7, 8, 9, 10, |
636 | 32, 56, 12, 58, 36, 37, 16, 17, 18, 19, | 631 | 11, 30, 30, 14, 15, 16, 30, 18, 19, 20, |
637 | 20, 21, 56, 23, 58, 32, 32, 32, 32, 32, | 632 | 21, 22, 23, 1, 25, 30, 30, 5, 6, 30, |
638 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 21, | 633 | 8, 9, 10, 11, 12, 1, 14, 15, 16, 17, |
639 | 54, 33 | 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 | ||
640 | }; | 641 | }; |
641 | 642 | ||
642 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing | 643 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
643 | symbol of state STATE-NUM. */ | 644 | symbol of state STATE-NUM. */ |
644 | static const unsigned char yystos[] = | 645 | static const unsigned char yystos[] = |
645 | { | 646 | { |
646 | 0, 43, 0, 1, 3, 4, 5, 6, 7, 8, | 647 | 0, 36, 37, 0, 1, 3, 4, 5, 6, 7, |
647 | 9, 10, 11, 14, 15, 31, 32, 44, 45, 46, | 648 | 8, 9, 10, 11, 14, 15, 16, 18, 19, 20, |
648 | 47, 48, 49, 52, 53, 55, 59, 61, 63, 64, | 649 | 21, 22, 23, 25, 30, 38, 39, 41, 42, 43, |
649 | 66, 68, 69, 70, 71, 79, 79, 28, 29, 77, | 650 | 44, 47, 48, 50, 54, 56, 58, 59, 61, 63, |
650 | 77, 77, 32, 77, 28, 28, 28, 29, 34, 41, | 651 | 64, 65, 72, 30, 25, 26, 71, 71, 30, 71, |
651 | 81, 82, 50, 50, 56, 58, 62, 74, 67, 74, | 652 | 30, 30, 71, 25, 25, 25, 26, 29, 34, 75, |
652 | 79, 32, 32, 32, 32, 32, 81, 81, 32, 38, | 653 | 76, 30, 1, 1, 45, 45, 51, 53, 57, 68, |
653 | 39, 30, 40, 12, 16, 17, 19, 20, 21, 22, | 654 | 62, 68, 30, 73, 30, 30, 30, 30, 30, 75, |
654 | 23, 24, 25, 26, 27, 32, 36, 37, 51, 72, | 655 | 75, 31, 32, 73, 27, 33, 30, 30, 1, 12, |
655 | 73, 75, 18, 19, 20, 21, 23, 32, 57, 73, | 656 | 16, 17, 19, 20, 21, 22, 23, 25, 30, 40, |
656 | 75, 5, 8, 15, 45, 54, 78, 45, 55, 60, | 657 | 46, 66, 67, 69, 18, 19, 20, 21, 30, 40, |
657 | 66, 78, 32, 75, 1, 45, 55, 65, 66, 78, | 658 | 52, 67, 69, 39, 49, 72, 39, 50, 55, 61, |
658 | 33, 81, 81, 82, 82, 32, 35, 81, 81, 77, | 659 | 72, 30, 40, 69, 39, 50, 60, 61, 72, 30, |
659 | 81, 76, 77, 81, 76, 81, 76, 76, 76, 28, | 660 | 28, 75, 75, 76, 76, 30, 30, 24, 75, 75, |
660 | 82, 13, 32, 77, 28, 76, 76, 79, 79, 79, | 661 | 71, 70, 71, 75, 25, 76, 1, 13, 30, 71, |
661 | 32, 81, 32, 32, 14, 80, 80, 32, 80, 80, | 662 | 70, 25, 75, 30, 30, 14, 74, 30, 74, 74, |
662 | 32, 80, 32, 32, 32, 80, 82, 80, 80, 32, | 663 | 74, 76, 30, 74, 30, 74, 30, 75, 30, 30, |
663 | 32, 32, 81, 32, 32, 32, 32, 32, 80, 32, | 664 | 30, 74, 30, 30, 30 |
664 | 32, 32 | ||
665 | }; | 665 | }; |
666 | 666 | ||
667 | #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) | 667 | #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) |
@@ -687,7 +687,7 @@ static const unsigned char yystos[] = | |||
687 | 687 | ||
688 | #define YYACCEPT goto yyacceptlab | 688 | #define YYACCEPT goto yyacceptlab |
689 | #define YYABORT goto yyabortlab | 689 | #define YYABORT goto yyabortlab |
690 | #define YYERROR goto yyerrlab1 | 690 | #define YYERROR goto yyerrorlab |
691 | 691 | ||
692 | 692 | ||
693 | /* Like YYERROR except do call yyerror. This remains here temporarily | 693 | /* Like YYERROR except do call yyerror. This remains here temporarily |
@@ -715,20 +715,53 @@ do \ | |||
715 | } \ | 715 | } \ |
716 | while (0) | 716 | while (0) |
717 | 717 | ||
718 | |||
718 | #define YYTERROR 1 | 719 | #define YYTERROR 1 |
719 | #define YYERRCODE 256 | 720 | #define YYERRCODE 256 |
720 | 721 | ||
721 | /* YYLLOC_DEFAULT -- Compute the default location (before the actions | ||
722 | are run). */ | ||
723 | 722 | ||
723 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. | ||
724 | If N is 0, then set CURRENT to the empty location which ends | ||
725 | the previous symbol: RHS[0] (always defined). */ | ||
726 | |||
727 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) | ||
724 | #ifndef YYLLOC_DEFAULT | 728 | #ifndef YYLLOC_DEFAULT |
725 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ | 729 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
726 | Current.first_line = Rhs[1].first_line; \ | 730 | do \ |
727 | Current.first_column = Rhs[1].first_column; \ | 731 | if (N) \ |
728 | Current.last_line = Rhs[N].last_line; \ | 732 | { \ |
729 | Current.last_column = Rhs[N].last_column; | 733 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
734 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ | ||
735 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ | ||
736 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ | ||
737 | } \ | ||
738 | else \ | ||
739 | { \ | ||
740 | (Current).first_line = (Current).last_line = \ | ||
741 | YYRHSLOC (Rhs, 0).last_line; \ | ||
742 | (Current).first_column = (Current).last_column = \ | ||
743 | YYRHSLOC (Rhs, 0).last_column; \ | ||
744 | } \ | ||
745 | while (0) | ||
746 | #endif | ||
747 | |||
748 | |||
749 | /* YY_LOCATION_PRINT -- Print the location on the stream. | ||
750 | This macro was not mandated originally: define only if we know | ||
751 | we won't break user code: when these are the locations we know. */ | ||
752 | |||
753 | #ifndef YY_LOCATION_PRINT | ||
754 | # if YYLTYPE_IS_TRIVIAL | ||
755 | # define YY_LOCATION_PRINT(File, Loc) \ | ||
756 | fprintf (File, "%d.%d-%d.%d", \ | ||
757 | (Loc).first_line, (Loc).first_column, \ | ||
758 | (Loc).last_line, (Loc).last_column) | ||
759 | # else | ||
760 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) | ||
761 | # endif | ||
730 | #endif | 762 | #endif |
731 | 763 | ||
764 | |||
732 | /* YYLEX -- calling `yylex' with the right arguments. */ | 765 | /* YYLEX -- calling `yylex' with the right arguments. */ |
733 | 766 | ||
734 | #ifdef YYLEX_PARAM | 767 | #ifdef YYLEX_PARAM |
@@ -751,36 +784,30 @@ do { \ | |||
751 | YYFPRINTF Args; \ | 784 | YYFPRINTF Args; \ |
752 | } while (0) | 785 | } while (0) |
753 | 786 | ||
754 | # define YYDSYMPRINT(Args) \ | 787 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
755 | do { \ | ||
756 | if (yydebug) \ | ||
757 | yysymprint Args; \ | ||
758 | } while (0) | ||
759 | |||
760 | # define YYDSYMPRINTF(Title, Token, Value, Location) \ | ||
761 | do { \ | 788 | do { \ |
762 | if (yydebug) \ | 789 | if (yydebug) \ |
763 | { \ | 790 | { \ |
764 | YYFPRINTF (stderr, "%s ", Title); \ | 791 | YYFPRINTF (stderr, "%s ", Title); \ |
765 | yysymprint (stderr, \ | 792 | yysymprint (stderr, \ |
766 | Token, Value); \ | 793 | Type, Value); \ |
767 | YYFPRINTF (stderr, "\n"); \ | 794 | YYFPRINTF (stderr, "\n"); \ |
768 | } \ | 795 | } \ |
769 | } while (0) | 796 | } while (0) |
770 | 797 | ||
771 | /*------------------------------------------------------------------. | 798 | /*------------------------------------------------------------------. |
772 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | | 799 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
773 | | TOP (cinluded). | | 800 | | TOP (included). | |
774 | `------------------------------------------------------------------*/ | 801 | `------------------------------------------------------------------*/ |
775 | 802 | ||
776 | #if defined (__STDC__) || defined (__cplusplus) | 803 | #if defined (__STDC__) || defined (__cplusplus) |
777 | static void | 804 | static void |
778 | yy_stack_print (short *bottom, short *top) | 805 | yy_stack_print (short int *bottom, short int *top) |
779 | #else | 806 | #else |
780 | static void | 807 | static void |
781 | yy_stack_print (bottom, top) | 808 | yy_stack_print (bottom, top) |
782 | short *bottom; | 809 | short int *bottom; |
783 | short *top; | 810 | short int *top; |
784 | #endif | 811 | #endif |
785 | { | 812 | { |
786 | YYFPRINTF (stderr, "Stack now"); | 813 | YYFPRINTF (stderr, "Stack now"); |
@@ -810,9 +837,9 @@ yy_reduce_print (yyrule) | |||
810 | #endif | 837 | #endif |
811 | { | 838 | { |
812 | int yyi; | 839 | int yyi; |
813 | unsigned int yylineno = yyrline[yyrule]; | 840 | unsigned int yylno = yyrline[yyrule]; |
814 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", | 841 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", |
815 | yyrule - 1, yylineno); | 842 | yyrule - 1, yylno); |
816 | /* Print the symbols being reduced, and their result. */ | 843 | /* Print the symbols being reduced, and their result. */ |
817 | for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) | 844 | for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) |
818 | YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); | 845 | YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); |
@@ -830,8 +857,7 @@ do { \ | |||
830 | int yydebug; | 857 | int yydebug; |
831 | #else /* !YYDEBUG */ | 858 | #else /* !YYDEBUG */ |
832 | # define YYDPRINTF(Args) | 859 | # define YYDPRINTF(Args) |
833 | # define YYDSYMPRINT(Args) | 860 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
834 | # define YYDSYMPRINTF(Title, Token, Value, Location) | ||
835 | # define YY_STACK_PRINT(Bottom, Top) | 861 | # define YY_STACK_PRINT(Bottom, Top) |
836 | # define YY_REDUCE_PRINT(Rule) | 862 | # define YY_REDUCE_PRINT(Rule) |
837 | #endif /* !YYDEBUG */ | 863 | #endif /* !YYDEBUG */ |
@@ -849,10 +875,6 @@ int yydebug; | |||
849 | SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) | 875 | SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) |
850 | evaluated with infinite-precision integer arithmetic. */ | 876 | evaluated with infinite-precision integer arithmetic. */ |
851 | 877 | ||
852 | #if YYMAXDEPTH == 0 | ||
853 | # undef YYMAXDEPTH | ||
854 | #endif | ||
855 | |||
856 | #ifndef YYMAXDEPTH | 878 | #ifndef YYMAXDEPTH |
857 | # define YYMAXDEPTH 10000 | 879 | # define YYMAXDEPTH 10000 |
858 | #endif | 880 | #endif |
@@ -934,15 +956,15 @@ yysymprint (yyoutput, yytype, yyvaluep) | |||
934 | (void) yyvaluep; | 956 | (void) yyvaluep; |
935 | 957 | ||
936 | if (yytype < YYNTOKENS) | 958 | if (yytype < YYNTOKENS) |
937 | { | 959 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
938 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); | ||
939 | # ifdef YYPRINT | ||
940 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); | ||
941 | # endif | ||
942 | } | ||
943 | else | 960 | else |
944 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); | 961 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
945 | 962 | ||
963 | |||
964 | # ifdef YYPRINT | ||
965 | if (yytype < YYNTOKENS) | ||
966 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); | ||
967 | # endif | ||
946 | switch (yytype) | 968 | switch (yytype) |
947 | { | 969 | { |
948 | default: | 970 | default: |
@@ -958,10 +980,11 @@ yysymprint (yyoutput, yytype, yyvaluep) | |||
958 | 980 | ||
959 | #if defined (__STDC__) || defined (__cplusplus) | 981 | #if defined (__STDC__) || defined (__cplusplus) |
960 | static void | 982 | static void |
961 | yydestruct (int yytype, YYSTYPE *yyvaluep) | 983 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
962 | #else | 984 | #else |
963 | static void | 985 | static void |
964 | yydestruct (yytype, yyvaluep) | 986 | yydestruct (yymsg, yytype, yyvaluep) |
987 | const char *yymsg; | ||
965 | int yytype; | 988 | int yytype; |
966 | YYSTYPE *yyvaluep; | 989 | YYSTYPE *yyvaluep; |
967 | #endif | 990 | #endif |
@@ -969,8 +992,42 @@ yydestruct (yytype, yyvaluep) | |||
969 | /* Pacify ``unused variable'' warnings. */ | 992 | /* Pacify ``unused variable'' warnings. */ |
970 | (void) yyvaluep; | 993 | (void) yyvaluep; |
971 | 994 | ||
995 | if (!yymsg) | ||
996 | yymsg = "Deleting"; | ||
997 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); | ||
998 | |||
972 | switch (yytype) | 999 | switch (yytype) |
973 | { | 1000 | { |
1001 | case 48: /* choice_entry */ | ||
1002 | |||
1003 | { | ||
1004 | fprintf(stderr, "%s:%d: missing end statement for this entry\n", | ||
1005 | (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); | ||
1006 | if (current_menu == (yyvaluep->menu)) | ||
1007 | menu_end_menu(); | ||
1008 | }; | ||
1009 | |||
1010 | break; | ||
1011 | case 54: /* if_entry */ | ||
1012 | |||
1013 | { | ||
1014 | fprintf(stderr, "%s:%d: missing end statement for this entry\n", | ||
1015 | (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); | ||
1016 | if (current_menu == (yyvaluep->menu)) | ||
1017 | menu_end_menu(); | ||
1018 | }; | ||
1019 | |||
1020 | break; | ||
1021 | case 59: /* menu_entry */ | ||
1022 | |||
1023 | { | ||
1024 | fprintf(stderr, "%s:%d: missing end statement for this entry\n", | ||
1025 | (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); | ||
1026 | if (current_menu == (yyvaluep->menu)) | ||
1027 | menu_end_menu(); | ||
1028 | }; | ||
1029 | |||
1030 | break; | ||
974 | 1031 | ||
975 | default: | 1032 | default: |
976 | break; | 1033 | break; |
@@ -996,10 +1053,10 @@ int yyparse (); | |||
996 | 1053 | ||
997 | 1054 | ||
998 | 1055 | ||
999 | /* The lookahead symbol. */ | 1056 | /* The look-ahead symbol. */ |
1000 | int yychar; | 1057 | int yychar; |
1001 | 1058 | ||
1002 | /* The semantic value of the lookahead symbol. */ | 1059 | /* The semantic value of the look-ahead symbol. */ |
1003 | YYSTYPE yylval; | 1060 | YYSTYPE yylval; |
1004 | 1061 | ||
1005 | /* Number of syntax errors so far. */ | 1062 | /* Number of syntax errors so far. */ |
@@ -1035,7 +1092,7 @@ yyparse () | |||
1035 | int yyresult; | 1092 | int yyresult; |
1036 | /* Number of tokens to shift before error messages enabled. */ | 1093 | /* Number of tokens to shift before error messages enabled. */ |
1037 | int yyerrstatus; | 1094 | int yyerrstatus; |
1038 | /* Lookahead token as an internal (translated) token number. */ | 1095 | /* Look-ahead token as an internal (translated) token number. */ |
1039 | int yytoken = 0; | 1096 | int yytoken = 0; |
1040 | 1097 | ||
1041 | /* Three stacks and their tools: | 1098 | /* Three stacks and their tools: |
@@ -1047,9 +1104,9 @@ yyparse () | |||
1047 | to reallocate them elsewhere. */ | 1104 | to reallocate them elsewhere. */ |
1048 | 1105 | ||
1049 | /* The state stack. */ | 1106 | /* The state stack. */ |
1050 | short yyssa[YYINITDEPTH]; | 1107 | short int yyssa[YYINITDEPTH]; |
1051 | short *yyss = yyssa; | 1108 | short int *yyss = yyssa; |
1052 | register short *yyssp; | 1109 | register short int *yyssp; |
1053 | 1110 | ||
1054 | /* The semantic value stack. */ | 1111 | /* The semantic value stack. */ |
1055 | YYSTYPE yyvsa[YYINITDEPTH]; | 1112 | YYSTYPE yyvsa[YYINITDEPTH]; |
@@ -1086,6 +1143,9 @@ yyparse () | |||
1086 | yyssp = yyss; | 1143 | yyssp = yyss; |
1087 | yyvsp = yyvs; | 1144 | yyvsp = yyvs; |
1088 | 1145 | ||
1146 | |||
1147 | yyvsp[0] = yylval; | ||
1148 | |||
1089 | goto yysetstate; | 1149 | goto yysetstate; |
1090 | 1150 | ||
1091 | /*------------------------------------------------------------. | 1151 | /*------------------------------------------------------------. |
@@ -1111,7 +1171,7 @@ yyparse () | |||
1111 | these so that the &'s don't force the real ones into | 1171 | these so that the &'s don't force the real ones into |
1112 | memory. */ | 1172 | memory. */ |
1113 | YYSTYPE *yyvs1 = yyvs; | 1173 | YYSTYPE *yyvs1 = yyvs; |
1114 | short *yyss1 = yyss; | 1174 | short int *yyss1 = yyss; |
1115 | 1175 | ||
1116 | 1176 | ||
1117 | /* Each stack pointer address is followed by the size of the | 1177 | /* Each stack pointer address is followed by the size of the |
@@ -1139,7 +1199,7 @@ yyparse () | |||
1139 | yystacksize = YYMAXDEPTH; | 1199 | yystacksize = YYMAXDEPTH; |
1140 | 1200 | ||
1141 | { | 1201 | { |
1142 | short *yyss1 = yyss; | 1202 | short int *yyss1 = yyss; |
1143 | union yyalloc *yyptr = | 1203 | union yyalloc *yyptr = |
1144 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | 1204 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
1145 | if (! yyptr) | 1205 | if (! yyptr) |
@@ -1175,18 +1235,18 @@ yyparse () | |||
1175 | yybackup: | 1235 | yybackup: |
1176 | 1236 | ||
1177 | /* Do appropriate processing given the current state. */ | 1237 | /* Do appropriate processing given the current state. */ |
1178 | /* Read a lookahead token if we need one and don't already have one. */ | 1238 | /* Read a look-ahead token if we need one and don't already have one. */ |
1179 | /* yyresume: */ | 1239 | /* yyresume: */ |
1180 | 1240 | ||
1181 | /* First try to decide what to do without reference to lookahead token. */ | 1241 | /* First try to decide what to do without reference to look-ahead token. */ |
1182 | 1242 | ||
1183 | yyn = yypact[yystate]; | 1243 | yyn = yypact[yystate]; |
1184 | if (yyn == YYPACT_NINF) | 1244 | if (yyn == YYPACT_NINF) |
1185 | goto yydefault; | 1245 | goto yydefault; |
1186 | 1246 | ||
1187 | /* Not known => get a lookahead token if don't already have one. */ | 1247 | /* Not known => get a look-ahead token if don't already have one. */ |
1188 | 1248 | ||
1189 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ | 1249 | /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ |
1190 | if (yychar == YYEMPTY) | 1250 | if (yychar == YYEMPTY) |
1191 | { | 1251 | { |
1192 | YYDPRINTF ((stderr, "Reading a token: ")); | 1252 | YYDPRINTF ((stderr, "Reading a token: ")); |
@@ -1201,7 +1261,7 @@ yybackup: | |||
1201 | else | 1261 | else |
1202 | { | 1262 | { |
1203 | yytoken = YYTRANSLATE (yychar); | 1263 | yytoken = YYTRANSLATE (yychar); |
1204 | YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); | 1264 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
1205 | } | 1265 | } |
1206 | 1266 | ||
1207 | /* If the proper action on seeing token YYTOKEN is to reduce or to | 1267 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
@@ -1221,8 +1281,8 @@ yybackup: | |||
1221 | if (yyn == YYFINAL) | 1281 | if (yyn == YYFINAL) |
1222 | YYACCEPT; | 1282 | YYACCEPT; |
1223 | 1283 | ||
1224 | /* Shift the lookahead token. */ | 1284 | /* Shift the look-ahead token. */ |
1225 | YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); | 1285 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
1226 | 1286 | ||
1227 | /* Discard the token being shifted unless it is eof. */ | 1287 | /* Discard the token being shifted unless it is eof. */ |
1228 | if (yychar != YYEOF) | 1288 | if (yychar != YYEOF) |
@@ -1273,155 +1333,123 @@ yyreduce: | |||
1273 | { | 1333 | { |
1274 | case 8: | 1334 | case 8: |
1275 | 1335 | ||
1276 | { zconfprint("unexpected 'endmenu' statement"); ;} | 1336 | { zconf_error("unexpected end statement"); ;} |
1277 | break; | 1337 | break; |
1278 | 1338 | ||
1279 | case 9: | 1339 | case 9: |
1280 | 1340 | ||
1281 | { zconfprint("unexpected 'endif' statement"); ;} | 1341 | { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); ;} |
1282 | break; | 1342 | break; |
1283 | 1343 | ||
1284 | case 10: | 1344 | case 10: |
1285 | 1345 | ||
1286 | { zconfprint("unexpected 'endchoice' statement"); ;} | 1346 | { |
1347 | zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[-2].id)->name); | ||
1348 | ;} | ||
1287 | break; | 1349 | break; |
1288 | 1350 | ||
1289 | case 11: | 1351 | case 11: |
1290 | 1352 | ||
1291 | { zconfprint("syntax error"); yyerrok; ;} | 1353 | { zconf_error("invalid statement"); ;} |
1292 | break; | 1354 | break; |
1293 | 1355 | ||
1294 | case 18: | 1356 | case 25: |
1295 | 1357 | ||
1296 | { | 1358 | { zconf_error("unknown option \"%s\"", (yyvsp[-2].string)); ;} |
1297 | struct symbol *sym = sym_lookup(yyvsp[-1].string, 0); | ||
1298 | sym->flags |= SYMBOL_OPTIONAL; | ||
1299 | menu_add_entry(sym); | ||
1300 | printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string); | ||
1301 | ;} | ||
1302 | break; | 1359 | break; |
1303 | 1360 | ||
1304 | case 19: | 1361 | case 26: |
1305 | 1362 | ||
1306 | { | 1363 | { zconf_error("invalid option"); ;} |
1307 | menu_end_entry(); | ||
1308 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); | ||
1309 | ;} | ||
1310 | break; | 1364 | break; |
1311 | 1365 | ||
1312 | case 20: | 1366 | case 27: |
1313 | 1367 | ||
1314 | { | 1368 | { |
1315 | struct symbol *sym = sym_lookup(yyvsp[-1].string, 0); | 1369 | struct symbol *sym = sym_lookup((yyvsp[-1].string), 0); |
1316 | sym->flags |= SYMBOL_OPTIONAL; | 1370 | sym->flags |= SYMBOL_OPTIONAL; |
1317 | menu_add_entry(sym); | 1371 | menu_add_entry(sym); |
1318 | printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string); | 1372 | printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); |
1319 | ;} | 1373 | ;} |
1320 | break; | 1374 | break; |
1321 | 1375 | ||
1322 | case 21: | 1376 | case 28: |
1323 | 1377 | ||
1324 | { | 1378 | { |
1325 | if (current_entry->prompt) | ||
1326 | current_entry->prompt->type = P_MENU; | ||
1327 | else | ||
1328 | zconfprint("warning: menuconfig statement without prompt"); | ||
1329 | menu_end_entry(); | 1379 | menu_end_entry(); |
1330 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); | 1380 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); |
1331 | ;} | 1381 | ;} |
1332 | break; | 1382 | break; |
1333 | 1383 | ||
1334 | case 27: | ||
1335 | |||
1336 | { | ||
1337 | menu_set_type(S_TRISTATE); | ||
1338 | printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno()); | ||
1339 | ;} | ||
1340 | break; | ||
1341 | |||
1342 | case 28: | ||
1343 | |||
1344 | { | ||
1345 | menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr); | ||
1346 | menu_set_type(S_TRISTATE); | ||
1347 | printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno()); | ||
1348 | ;} | ||
1349 | break; | ||
1350 | |||
1351 | case 29: | 1384 | case 29: |
1352 | 1385 | ||
1353 | { | 1386 | { |
1354 | menu_set_type(S_BOOLEAN); | 1387 | struct symbol *sym = sym_lookup((yyvsp[-1].string), 0); |
1355 | printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno()); | 1388 | sym->flags |= SYMBOL_OPTIONAL; |
1389 | menu_add_entry(sym); | ||
1390 | printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); | ||
1356 | ;} | 1391 | ;} |
1357 | break; | 1392 | break; |
1358 | 1393 | ||
1359 | case 30: | 1394 | case 30: |
1360 | 1395 | ||
1361 | { | 1396 | { |
1362 | menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr); | 1397 | if (current_entry->prompt) |
1363 | menu_set_type(S_BOOLEAN); | 1398 | current_entry->prompt->type = P_MENU; |
1364 | printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno()); | 1399 | else |
1365 | ;} | 1400 | zconfprint("warning: menuconfig statement without prompt"); |
1366 | break; | 1401 | menu_end_entry(); |
1367 | 1402 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); | |
1368 | case 31: | ||
1369 | |||
1370 | { | ||
1371 | menu_set_type(S_INT); | ||
1372 | printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno()); | ||
1373 | ;} | ||
1374 | break; | ||
1375 | |||
1376 | case 32: | ||
1377 | |||
1378 | { | ||
1379 | menu_set_type(S_HEX); | ||
1380 | printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno()); | ||
1381 | ;} | 1403 | ;} |
1382 | break; | 1404 | break; |
1383 | 1405 | ||
1384 | case 33: | 1406 | case 37: |
1385 | 1407 | ||
1386 | { | 1408 | { |
1387 | menu_set_type(S_STRING); | 1409 | menu_set_type((yyvsp[-2].id)->stype); |
1388 | printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno()); | 1410 | printd(DEBUG_PARSE, "%s:%d:type(%u)\n", |
1411 | zconf_curname(), zconf_lineno(), | ||
1412 | (yyvsp[-2].id)->stype); | ||
1389 | ;} | 1413 | ;} |
1390 | break; | 1414 | break; |
1391 | 1415 | ||
1392 | case 34: | 1416 | case 38: |
1393 | 1417 | ||
1394 | { | 1418 | { |
1395 | menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr); | 1419 | menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); |
1396 | printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); | 1420 | printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); |
1397 | ;} | 1421 | ;} |
1398 | break; | 1422 | break; |
1399 | 1423 | ||
1400 | case 35: | 1424 | case 39: |
1401 | 1425 | ||
1402 | { | 1426 | { |
1403 | menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr); | 1427 | menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr)); |
1404 | printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); | 1428 | if ((yyvsp[-3].id)->stype != S_UNKNOWN) |
1429 | menu_set_type((yyvsp[-3].id)->stype); | ||
1430 | printd(DEBUG_PARSE, "%s:%d:default(%u)\n", | ||
1431 | zconf_curname(), zconf_lineno(), | ||
1432 | (yyvsp[-3].id)->stype); | ||
1405 | ;} | 1433 | ;} |
1406 | break; | 1434 | break; |
1407 | 1435 | ||
1408 | case 36: | 1436 | case 40: |
1409 | 1437 | ||
1410 | { | 1438 | { |
1411 | menu_add_symbol(P_SELECT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr); | 1439 | menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr)); |
1412 | printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); | 1440 | printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); |
1413 | ;} | 1441 | ;} |
1414 | break; | 1442 | break; |
1415 | 1443 | ||
1416 | case 37: | 1444 | case 41: |
1417 | 1445 | ||
1418 | { | 1446 | { |
1419 | menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,yyvsp[-3].symbol, yyvsp[-2].symbol), yyvsp[-1].expr); | 1447 | menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr)); |
1420 | printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); | 1448 | printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); |
1421 | ;} | 1449 | ;} |
1422 | break; | 1450 | break; |
1423 | 1451 | ||
1424 | case 38: | 1452 | case 42: |
1425 | 1453 | ||
1426 | { | 1454 | { |
1427 | struct symbol *sym = sym_lookup(NULL, 0); | 1455 | struct symbol *sym = sym_lookup(NULL, 0); |
@@ -1432,57 +1460,45 @@ yyreduce: | |||
1432 | ;} | 1460 | ;} |
1433 | break; | 1461 | break; |
1434 | 1462 | ||
1435 | case 39: | 1463 | case 43: |
1436 | 1464 | ||
1437 | { | 1465 | { |
1438 | menu_end_entry(); | 1466 | (yyval.menu) = menu_add_menu(); |
1439 | menu_add_menu(); | ||
1440 | ;} | 1467 | ;} |
1441 | break; | 1468 | break; |
1442 | 1469 | ||
1443 | case 40: | 1470 | case 44: |
1444 | 1471 | ||
1445 | { | 1472 | { |
1446 | if (zconf_endtoken(yyvsp[0].token, T_CHOICE, T_ENDCHOICE)) { | 1473 | if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) { |
1447 | menu_end_menu(); | 1474 | menu_end_menu(); |
1448 | printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); | 1475 | printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); |
1449 | } | 1476 | } |
1450 | ;} | 1477 | ;} |
1451 | break; | 1478 | break; |
1452 | 1479 | ||
1453 | case 42: | 1480 | case 52: |
1454 | |||
1455 | { | ||
1456 | printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno); | ||
1457 | zconfnerrs++; | ||
1458 | ;} | ||
1459 | break; | ||
1460 | |||
1461 | case 48: | ||
1462 | 1481 | ||
1463 | { | 1482 | { |
1464 | menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr); | 1483 | menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); |
1465 | printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); | 1484 | printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); |
1466 | ;} | 1485 | ;} |
1467 | break; | 1486 | break; |
1468 | 1487 | ||
1469 | case 49: | 1488 | case 53: |
1470 | 1489 | ||
1471 | { | 1490 | { |
1472 | menu_set_type(S_TRISTATE); | 1491 | if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) { |
1473 | printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno()); | 1492 | menu_set_type((yyvsp[-2].id)->stype); |
1493 | printd(DEBUG_PARSE, "%s:%d:type(%u)\n", | ||
1494 | zconf_curname(), zconf_lineno(), | ||
1495 | (yyvsp[-2].id)->stype); | ||
1496 | } else | ||
1497 | YYERROR; | ||
1474 | ;} | 1498 | ;} |
1475 | break; | 1499 | break; |
1476 | 1500 | ||
1477 | case 50: | 1501 | case 54: |
1478 | |||
1479 | { | ||
1480 | menu_set_type(S_BOOLEAN); | ||
1481 | printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno()); | ||
1482 | ;} | ||
1483 | break; | ||
1484 | |||
1485 | case 51: | ||
1486 | 1502 | ||
1487 | { | 1503 | { |
1488 | current_entry->sym->flags |= SYMBOL_OPTIONAL; | 1504 | current_entry->sym->flags |= SYMBOL_OPTIONAL; |
@@ -1490,115 +1506,89 @@ yyreduce: | |||
1490 | ;} | 1506 | ;} |
1491 | break; | 1507 | break; |
1492 | 1508 | ||
1493 | case 52: | 1509 | case 55: |
1494 | 1510 | ||
1495 | { | 1511 | { |
1496 | menu_add_symbol(P_DEFAULT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr); | 1512 | if ((yyvsp[-3].id)->stype == S_UNKNOWN) { |
1497 | printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); | 1513 | menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr)); |
1514 | printd(DEBUG_PARSE, "%s:%d:default\n", | ||
1515 | zconf_curname(), zconf_lineno()); | ||
1516 | } else | ||
1517 | YYERROR; | ||
1498 | ;} | 1518 | ;} |
1499 | break; | 1519 | break; |
1500 | 1520 | ||
1501 | case 55: | 1521 | case 58: |
1502 | 1522 | ||
1503 | { | 1523 | { |
1504 | printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); | 1524 | printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); |
1505 | menu_add_entry(NULL); | 1525 | menu_add_entry(NULL); |
1506 | menu_add_dep(yyvsp[-1].expr); | 1526 | menu_add_dep((yyvsp[-1].expr)); |
1507 | menu_end_entry(); | 1527 | (yyval.menu) = menu_add_menu(); |
1508 | menu_add_menu(); | ||
1509 | ;} | 1528 | ;} |
1510 | break; | 1529 | break; |
1511 | 1530 | ||
1512 | case 56: | 1531 | case 59: |
1513 | 1532 | ||
1514 | { | 1533 | { |
1515 | if (zconf_endtoken(yyvsp[0].token, T_IF, T_ENDIF)) { | 1534 | if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) { |
1516 | menu_end_menu(); | 1535 | menu_end_menu(); |
1517 | printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); | 1536 | printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); |
1518 | } | 1537 | } |
1519 | ;} | 1538 | ;} |
1520 | break; | 1539 | break; |
1521 | 1540 | ||
1522 | case 58: | 1541 | case 65: |
1523 | |||
1524 | { | ||
1525 | printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno); | ||
1526 | zconfnerrs++; | ||
1527 | ;} | ||
1528 | break; | ||
1529 | |||
1530 | case 63: | ||
1531 | 1542 | ||
1532 | { | 1543 | { |
1533 | menu_add_entry(NULL); | 1544 | menu_add_entry(NULL); |
1534 | menu_add_prompt(P_MENU, yyvsp[-1].string, NULL); | 1545 | menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL); |
1535 | printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); | 1546 | printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); |
1536 | ;} | 1547 | ;} |
1537 | break; | 1548 | break; |
1538 | 1549 | ||
1539 | case 64: | 1550 | case 66: |
1540 | 1551 | ||
1541 | { | 1552 | { |
1542 | menu_end_entry(); | 1553 | (yyval.menu) = menu_add_menu(); |
1543 | menu_add_menu(); | ||
1544 | ;} | 1554 | ;} |
1545 | break; | 1555 | break; |
1546 | 1556 | ||
1547 | case 65: | 1557 | case 67: |
1548 | 1558 | ||
1549 | { | 1559 | { |
1550 | if (zconf_endtoken(yyvsp[0].token, T_MENU, T_ENDMENU)) { | 1560 | if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) { |
1551 | menu_end_menu(); | 1561 | menu_end_menu(); |
1552 | printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); | 1562 | printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); |
1553 | } | 1563 | } |
1554 | ;} | 1564 | ;} |
1555 | break; | 1565 | break; |
1556 | 1566 | ||
1557 | case 67: | ||
1558 | |||
1559 | { | ||
1560 | printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno); | ||
1561 | zconfnerrs++; | ||
1562 | ;} | ||
1563 | break; | ||
1564 | |||
1565 | case 72: | ||
1566 | |||
1567 | { zconfprint("invalid menu option"); yyerrok; ;} | ||
1568 | break; | ||
1569 | |||
1570 | case 73: | 1567 | case 73: |
1571 | 1568 | ||
1572 | { | 1569 | { |
1573 | yyval.string = yyvsp[-1].string; | 1570 | printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); |
1574 | printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string); | 1571 | zconf_nextfile((yyvsp[-1].string)); |
1575 | ;} | 1572 | ;} |
1576 | break; | 1573 | break; |
1577 | 1574 | ||
1578 | case 74: | 1575 | case 74: |
1579 | 1576 | ||
1580 | { | 1577 | { |
1581 | zconf_nextfile(yyvsp[0].string); | ||
1582 | ;} | ||
1583 | break; | ||
1584 | |||
1585 | case 75: | ||
1586 | |||
1587 | { | ||
1588 | menu_add_entry(NULL); | 1578 | menu_add_entry(NULL); |
1589 | menu_add_prompt(P_COMMENT, yyvsp[-1].string, NULL); | 1579 | menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL); |
1590 | printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); | 1580 | printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); |
1591 | ;} | 1581 | ;} |
1592 | break; | 1582 | break; |
1593 | 1583 | ||
1594 | case 76: | 1584 | case 75: |
1595 | 1585 | ||
1596 | { | 1586 | { |
1597 | menu_end_entry(); | 1587 | menu_end_entry(); |
1598 | ;} | 1588 | ;} |
1599 | break; | 1589 | break; |
1600 | 1590 | ||
1601 | case 77: | 1591 | case 76: |
1602 | 1592 | ||
1603 | { | 1593 | { |
1604 | printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); | 1594 | printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); |
@@ -1606,17 +1596,17 @@ yyreduce: | |||
1606 | ;} | 1596 | ;} |
1607 | break; | 1597 | break; |
1608 | 1598 | ||
1609 | case 78: | 1599 | case 77: |
1610 | 1600 | ||
1611 | { | 1601 | { |
1612 | current_entry->sym->help = yyvsp[0].string; | 1602 | current_entry->sym->help = (yyvsp[0].string); |
1613 | ;} | 1603 | ;} |
1614 | break; | 1604 | break; |
1615 | 1605 | ||
1616 | case 82: | 1606 | case 82: |
1617 | 1607 | ||
1618 | { | 1608 | { |
1619 | menu_add_dep(yyvsp[-1].expr); | 1609 | menu_add_dep((yyvsp[-1].expr)); |
1620 | printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); | 1610 | printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); |
1621 | ;} | 1611 | ;} |
1622 | break; | 1612 | break; |
@@ -1624,7 +1614,7 @@ yyreduce: | |||
1624 | case 83: | 1614 | case 83: |
1625 | 1615 | ||
1626 | { | 1616 | { |
1627 | menu_add_dep(yyvsp[-1].expr); | 1617 | menu_add_dep((yyvsp[-1].expr)); |
1628 | printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); | 1618 | printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); |
1629 | ;} | 1619 | ;} |
1630 | break; | 1620 | break; |
@@ -1632,7 +1622,7 @@ yyreduce: | |||
1632 | case 84: | 1622 | case 84: |
1633 | 1623 | ||
1634 | { | 1624 | { |
1635 | menu_add_dep(yyvsp[-1].expr); | 1625 | menu_add_dep((yyvsp[-1].expr)); |
1636 | printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); | 1626 | printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); |
1637 | ;} | 1627 | ;} |
1638 | break; | 1628 | break; |
@@ -1640,84 +1630,84 @@ yyreduce: | |||
1640 | case 86: | 1630 | case 86: |
1641 | 1631 | ||
1642 | { | 1632 | { |
1643 | menu_add_prompt(P_PROMPT, yyvsp[-1].string, yyvsp[0].expr); | 1633 | menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr)); |
1644 | ;} | 1634 | ;} |
1645 | break; | 1635 | break; |
1646 | 1636 | ||
1647 | case 89: | 1637 | case 89: |
1648 | 1638 | ||
1649 | { yyval.token = T_ENDMENU; ;} | 1639 | { (yyval.id) = (yyvsp[-1].id); ;} |
1650 | break; | 1640 | break; |
1651 | 1641 | ||
1652 | case 90: | 1642 | case 90: |
1653 | 1643 | ||
1654 | { yyval.token = T_ENDCHOICE; ;} | 1644 | { (yyval.id) = (yyvsp[-1].id); ;} |
1655 | break; | 1645 | break; |
1656 | 1646 | ||
1657 | case 91: | 1647 | case 91: |
1658 | 1648 | ||
1659 | { yyval.token = T_ENDIF; ;} | 1649 | { (yyval.id) = (yyvsp[-1].id); ;} |
1660 | break; | 1650 | break; |
1661 | 1651 | ||
1662 | case 94: | 1652 | case 94: |
1663 | 1653 | ||
1664 | { yyval.expr = NULL; ;} | 1654 | { (yyval.expr) = NULL; ;} |
1665 | break; | 1655 | break; |
1666 | 1656 | ||
1667 | case 95: | 1657 | case 95: |
1668 | 1658 | ||
1669 | { yyval.expr = yyvsp[0].expr; ;} | 1659 | { (yyval.expr) = (yyvsp[0].expr); ;} |
1670 | break; | 1660 | break; |
1671 | 1661 | ||
1672 | case 96: | 1662 | case 96: |
1673 | 1663 | ||
1674 | { yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); ;} | 1664 | { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); ;} |
1675 | break; | 1665 | break; |
1676 | 1666 | ||
1677 | case 97: | 1667 | case 97: |
1678 | 1668 | ||
1679 | { yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;} | 1669 | { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} |
1680 | break; | 1670 | break; |
1681 | 1671 | ||
1682 | case 98: | 1672 | case 98: |
1683 | 1673 | ||
1684 | { yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;} | 1674 | { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} |
1685 | break; | 1675 | break; |
1686 | 1676 | ||
1687 | case 99: | 1677 | case 99: |
1688 | 1678 | ||
1689 | { yyval.expr = yyvsp[-1].expr; ;} | 1679 | { (yyval.expr) = (yyvsp[-1].expr); ;} |
1690 | break; | 1680 | break; |
1691 | 1681 | ||
1692 | case 100: | 1682 | case 100: |
1693 | 1683 | ||
1694 | { yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); ;} | 1684 | { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); ;} |
1695 | break; | 1685 | break; |
1696 | 1686 | ||
1697 | case 101: | 1687 | case 101: |
1698 | 1688 | ||
1699 | { yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); ;} | 1689 | { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} |
1700 | break; | 1690 | break; |
1701 | 1691 | ||
1702 | case 102: | 1692 | case 102: |
1703 | 1693 | ||
1704 | { yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); ;} | 1694 | { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} |
1705 | break; | 1695 | break; |
1706 | 1696 | ||
1707 | case 103: | 1697 | case 103: |
1708 | 1698 | ||
1709 | { yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); ;} | 1699 | { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); ;} |
1710 | break; | 1700 | break; |
1711 | 1701 | ||
1712 | case 104: | 1702 | case 104: |
1713 | 1703 | ||
1714 | { yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); ;} | 1704 | { (yyval.symbol) = sym_lookup((yyvsp[0].string), 1); free((yyvsp[0].string)); ;} |
1715 | break; | 1705 | break; |
1716 | 1706 | ||
1717 | 1707 | ||
1718 | } | 1708 | } |
1719 | 1709 | ||
1720 | /* Line 999 of yacc.c. */ | 1710 | /* Line 1037 of yacc.c. */ |
1721 | 1711 | ||
1722 | 1712 | ||
1723 | yyvsp -= yylen; | 1713 | yyvsp -= yylen; |
@@ -1759,18 +1749,33 @@ yyerrlab: | |||
1759 | { | 1749 | { |
1760 | YYSIZE_T yysize = 0; | 1750 | YYSIZE_T yysize = 0; |
1761 | int yytype = YYTRANSLATE (yychar); | 1751 | int yytype = YYTRANSLATE (yychar); |
1752 | const char* yyprefix; | ||
1762 | char *yymsg; | 1753 | char *yymsg; |
1763 | int yyx, yycount; | 1754 | int yyx; |
1764 | 1755 | ||
1765 | yycount = 0; | ||
1766 | /* Start YYX at -YYN if negative to avoid negative indexes in | 1756 | /* Start YYX at -YYN if negative to avoid negative indexes in |
1767 | YYCHECK. */ | 1757 | YYCHECK. */ |
1768 | for (yyx = yyn < 0 ? -yyn : 0; | 1758 | int yyxbegin = yyn < 0 ? -yyn : 0; |
1769 | yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) | 1759 | |
1760 | /* Stay within bounds of both yycheck and yytname. */ | ||
1761 | int yychecklim = YYLAST - yyn; | ||
1762 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; | ||
1763 | int yycount = 0; | ||
1764 | |||
1765 | yyprefix = ", expecting "; | ||
1766 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) | ||
1770 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) | 1767 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
1771 | yysize += yystrlen (yytname[yyx]) + 15, yycount++; | 1768 | { |
1772 | yysize += yystrlen ("syntax error, unexpected ") + 1; | 1769 | yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); |
1773 | yysize += yystrlen (yytname[yytype]); | 1770 | yycount += 1; |
1771 | if (yycount == 5) | ||
1772 | { | ||
1773 | yysize = 0; | ||
1774 | break; | ||
1775 | } | ||
1776 | } | ||
1777 | yysize += (sizeof ("syntax error, unexpected ") | ||
1778 | + yystrlen (yytname[yytype])); | ||
1774 | yymsg = (char *) YYSTACK_ALLOC (yysize); | 1779 | yymsg = (char *) YYSTACK_ALLOC (yysize); |
1775 | if (yymsg != 0) | 1780 | if (yymsg != 0) |
1776 | { | 1781 | { |
@@ -1779,16 +1784,13 @@ yyerrlab: | |||
1779 | 1784 | ||
1780 | if (yycount < 5) | 1785 | if (yycount < 5) |
1781 | { | 1786 | { |
1782 | yycount = 0; | 1787 | yyprefix = ", expecting "; |
1783 | for (yyx = yyn < 0 ? -yyn : 0; | 1788 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
1784 | yyx < (int) (sizeof (yytname) / sizeof (char *)); | ||
1785 | yyx++) | ||
1786 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) | 1789 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
1787 | { | 1790 | { |
1788 | const char *yyq = ! yycount ? ", expecting " : " or "; | 1791 | yyp = yystpcpy (yyp, yyprefix); |
1789 | yyp = yystpcpy (yyp, yyq); | ||
1790 | yyp = yystpcpy (yyp, yytname[yyx]); | 1792 | yyp = yystpcpy (yyp, yytname[yyx]); |
1791 | yycount++; | 1793 | yyprefix = " or "; |
1792 | } | 1794 | } |
1793 | } | 1795 | } |
1794 | yyerror (yymsg); | 1796 | yyerror (yymsg); |
@@ -1806,38 +1808,57 @@ yyerrlab: | |||
1806 | 1808 | ||
1807 | if (yyerrstatus == 3) | 1809 | if (yyerrstatus == 3) |
1808 | { | 1810 | { |
1809 | /* If just tried and failed to reuse lookahead token after an | 1811 | /* If just tried and failed to reuse look-ahead token after an |
1810 | error, discard it. */ | 1812 | error, discard it. */ |
1811 | 1813 | ||
1812 | /* Return failure if at end of input. */ | 1814 | if (yychar <= YYEOF) |
1813 | if (yychar == YYEOF) | ||
1814 | { | 1815 | { |
1815 | /* Pop the error token. */ | 1816 | /* If at end of input, pop the error token, |
1816 | YYPOPSTACK; | 1817 | then the rest of the stack, then return failure. */ |
1817 | /* Pop the rest of the stack. */ | 1818 | if (yychar == YYEOF) |
1818 | while (yyss < yyssp) | 1819 | for (;;) |
1819 | { | 1820 | { |
1820 | YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); | 1821 | |
1821 | yydestruct (yystos[*yyssp], yyvsp); | 1822 | YYPOPSTACK; |
1822 | YYPOPSTACK; | 1823 | if (yyssp == yyss) |
1823 | } | 1824 | YYABORT; |
1824 | YYABORT; | 1825 | yydestruct ("Error: popping", |
1826 | yystos[*yyssp], yyvsp); | ||
1827 | } | ||
1825 | } | 1828 | } |
1826 | 1829 | else | |
1827 | YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); | 1830 | { |
1828 | yydestruct (yytoken, &yylval); | 1831 | yydestruct ("Error: discarding", yytoken, &yylval); |
1829 | yychar = YYEMPTY; | 1832 | yychar = YYEMPTY; |
1830 | 1833 | } | |
1831 | } | 1834 | } |
1832 | 1835 | ||
1833 | /* Else will try to reuse lookahead token after shifting the error | 1836 | /* Else will try to reuse look-ahead token after shifting the error |
1834 | token. */ | 1837 | token. */ |
1835 | goto yyerrlab1; | 1838 | goto yyerrlab1; |
1836 | 1839 | ||
1837 | 1840 | ||
1838 | /*----------------------------------------------------. | 1841 | /*---------------------------------------------------. |
1839 | | yyerrlab1 -- error raised explicitly by an action. | | 1842 | | yyerrorlab -- error raised explicitly by YYERROR. | |
1840 | `----------------------------------------------------*/ | 1843 | `---------------------------------------------------*/ |
1844 | yyerrorlab: | ||
1845 | |||
1846 | #ifdef __GNUC__ | ||
1847 | /* Pacify GCC when the user code never invokes YYERROR and the label | ||
1848 | yyerrorlab therefore never appears in user code. */ | ||
1849 | if (0) | ||
1850 | goto yyerrorlab; | ||
1851 | #endif | ||
1852 | |||
1853 | yyvsp -= yylen; | ||
1854 | yyssp -= yylen; | ||
1855 | yystate = *yyssp; | ||
1856 | goto yyerrlab1; | ||
1857 | |||
1858 | |||
1859 | /*-------------------------------------------------------------. | ||
1860 | | yyerrlab1 -- common code for both syntax error and YYERROR. | | ||
1861 | `-------------------------------------------------------------*/ | ||
1841 | yyerrlab1: | 1862 | yyerrlab1: |
1842 | yyerrstatus = 3; /* Each real token shifted decrements this. */ | 1863 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
1843 | 1864 | ||
@@ -1859,22 +1880,22 @@ yyerrlab1: | |||
1859 | if (yyssp == yyss) | 1880 | if (yyssp == yyss) |
1860 | YYABORT; | 1881 | YYABORT; |
1861 | 1882 | ||
1862 | YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); | ||
1863 | yydestruct (yystos[yystate], yyvsp); | ||
1864 | yyvsp--; | ||
1865 | yystate = *--yyssp; | ||
1866 | 1883 | ||
1884 | yydestruct ("Error: popping", yystos[yystate], yyvsp); | ||
1885 | YYPOPSTACK; | ||
1886 | yystate = *yyssp; | ||
1867 | YY_STACK_PRINT (yyss, yyssp); | 1887 | YY_STACK_PRINT (yyss, yyssp); |
1868 | } | 1888 | } |
1869 | 1889 | ||
1870 | if (yyn == YYFINAL) | 1890 | if (yyn == YYFINAL) |
1871 | YYACCEPT; | 1891 | YYACCEPT; |
1872 | 1892 | ||
1873 | YYDPRINTF ((stderr, "Shifting error token, ")); | ||
1874 | |||
1875 | *++yyvsp = yylval; | 1893 | *++yyvsp = yylval; |
1876 | 1894 | ||
1877 | 1895 | ||
1896 | /* Shift the error token. */ | ||
1897 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); | ||
1898 | |||
1878 | yystate = yyn; | 1899 | yystate = yyn; |
1879 | goto yynewstate; | 1900 | goto yynewstate; |
1880 | 1901 | ||
@@ -1890,6 +1911,9 @@ yyacceptlab: | |||
1890 | | yyabortlab -- YYABORT comes here. | | 1911 | | yyabortlab -- YYABORT comes here. | |
1891 | `-----------------------------------*/ | 1912 | `-----------------------------------*/ |
1892 | yyabortlab: | 1913 | yyabortlab: |
1914 | yydestruct ("Error: discarding lookahead", | ||
1915 | yytoken, &yylval); | ||
1916 | yychar = YYEMPTY; | ||
1893 | yyresult = 1; | 1917 | yyresult = 1; |
1894 | goto yyreturn; | 1918 | goto yyreturn; |
1895 | 1919 | ||
@@ -1927,16 +1951,16 @@ void conf_parse(const char *name) | |||
1927 | modules_sym = sym_lookup("MODULES", 0); | 1951 | modules_sym = sym_lookup("MODULES", 0); |
1928 | rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); | 1952 | rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); |
1929 | 1953 | ||
1930 | //zconfdebug = 1; | 1954 | #if YYDEBUG |
1955 | if (getenv("ZCONF_DEBUG")) | ||
1956 | zconfdebug = 1; | ||
1957 | #endif | ||
1931 | zconfparse(); | 1958 | zconfparse(); |
1932 | if (zconfnerrs) | 1959 | if (zconfnerrs) |
1933 | exit(1); | 1960 | exit(1); |
1934 | menu_finalize(&rootmenu); | 1961 | menu_finalize(&rootmenu); |
1935 | for_all_symbols(i, sym) { | 1962 | for_all_symbols(i, sym) { |
1936 | if (!(sym->flags & SYMBOL_CHECKED) && sym_check_deps(sym)) | 1963 | sym_check_deps(sym); |
1937 | printf("\n"); | ||
1938 | else | ||
1939 | sym->flags |= SYMBOL_CHECK_DONE; | ||
1940 | } | 1964 | } |
1941 | 1965 | ||
1942 | sym_change_count = 1; | 1966 | sym_change_count = 1; |
@@ -1951,20 +1975,25 @@ const char *zconf_tokenname(int token) | |||
1951 | case T_ENDCHOICE: return "endchoice"; | 1975 | case T_ENDCHOICE: return "endchoice"; |
1952 | case T_IF: return "if"; | 1976 | case T_IF: return "if"; |
1953 | case T_ENDIF: return "endif"; | 1977 | case T_ENDIF: return "endif"; |
1978 | case T_DEPENDS: return "depends"; | ||
1954 | } | 1979 | } |
1955 | return "<token>"; | 1980 | return "<token>"; |
1956 | } | 1981 | } |
1957 | 1982 | ||
1958 | static bool zconf_endtoken(int token, int starttoken, int endtoken) | 1983 | static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken) |
1959 | { | 1984 | { |
1960 | if (token != endtoken) { | 1985 | if (id->token != endtoken) { |
1961 | zconfprint("unexpected '%s' within %s block", zconf_tokenname(token), zconf_tokenname(starttoken)); | 1986 | zconf_error("unexpected '%s' within %s block", |
1987 | kconf_id_strings + id->name, zconf_tokenname(starttoken)); | ||
1962 | zconfnerrs++; | 1988 | zconfnerrs++; |
1963 | return false; | 1989 | return false; |
1964 | } | 1990 | } |
1965 | if (current_menu->file != current_file) { | 1991 | if (current_menu->file != current_file) { |
1966 | zconfprint("'%s' in different file than '%s'", zconf_tokenname(token), zconf_tokenname(starttoken)); | 1992 | zconf_error("'%s' in different file than '%s'", |
1967 | zconfprint("location of the '%s'", zconf_tokenname(starttoken)); | 1993 | kconf_id_strings + id->name, zconf_tokenname(starttoken)); |
1994 | fprintf(stderr, "%s:%d: location of the '%s'\n", | ||
1995 | current_menu->file->name, current_menu->lineno, | ||
1996 | zconf_tokenname(starttoken)); | ||
1968 | zconfnerrs++; | 1997 | zconfnerrs++; |
1969 | return false; | 1998 | return false; |
1970 | } | 1999 | } |
@@ -1975,7 +2004,19 @@ static void zconfprint(const char *err, ...) | |||
1975 | { | 2004 | { |
1976 | va_list ap; | 2005 | va_list ap; |
1977 | 2006 | ||
1978 | fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno() + 1); | 2007 | fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); |
2008 | va_start(ap, err); | ||
2009 | vfprintf(stderr, err, ap); | ||
2010 | va_end(ap); | ||
2011 | fprintf(stderr, "\n"); | ||
2012 | } | ||
2013 | |||
2014 | static void zconf_error(const char *err, ...) | ||
2015 | { | ||
2016 | va_list ap; | ||
2017 | |||
2018 | zconfnerrs++; | ||
2019 | fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); | ||
1979 | va_start(ap, err); | 2020 | va_start(ap, err); |
1980 | vfprintf(stderr, err, ap); | 2021 | vfprintf(stderr, err, ap); |
1981 | va_end(ap); | 2022 | va_end(ap); |
@@ -1984,7 +2025,9 @@ static void zconfprint(const char *err, ...) | |||
1984 | 2025 | ||
1985 | static void zconferror(const char *err) | 2026 | static void zconferror(const char *err) |
1986 | { | 2027 | { |
2028 | #if YYDEBUG | ||
1987 | fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); | 2029 | fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); |
2030 | #endif | ||
1988 | } | 2031 | } |
1989 | 2032 | ||
1990 | void print_quoted_string(FILE *out, const char *str) | 2033 | void print_quoted_string(FILE *out, const char *str) |