File: | cfgparse.c |
Location: | line 1121, column 5 |
Description: | Value stored to 'yymsg' is never read |
1 | /* A Bison parser, made by GNU Bison 2.4.3. */ |
2 | |
3 | /* Skeleton implementation for Bison's Yacc-like parsers in C |
4 | |
5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
6 | 2009, 2010 Free Software Foundation, Inc. |
7 | |
8 | This program is free software: you can redistribute it and/or modify |
9 | it under the terms of the GNU General Public License as published by |
10 | the Free Software Foundation, either version 3 of the License, or |
11 | (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
20 | |
21 | /* As a special exception, you may create a larger work that contains |
22 | part or all of the Bison parser skeleton and distribute that work |
23 | under terms of your choice, so long as that work isn't itself a |
24 | parser generator using the skeleton or a modified version thereof |
25 | as a parser skeleton. Alternatively, if you modify or redistribute |
26 | the parser skeleton itself, you may (at your option) remove this |
27 | special exception, which will cause the skeleton and the resulting |
28 | Bison output files to be licensed under the GNU General Public |
29 | License without this special exception. |
30 | |
31 | This special exception was added by the Free Software Foundation in |
32 | version 2.2 of Bison. */ |
33 | |
34 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
35 | simplifying the original so-called "semantic" parser. */ |
36 | |
37 | /* All symbols defined below should begin with yy or YY, to avoid |
38 | infringing on user name space. This should be done even for local |
39 | variables, as they might otherwise be expanded by user macros. |
40 | There are some unavoidable exceptions within include files to |
41 | define necessary library symbols; they are noted "INFRINGES ON |
42 | USER NAME SPACE" below. */ |
43 | |
44 | /* Identify Bison output. */ |
45 | #define YYBISON1 1 |
46 | |
47 | /* Bison version. */ |
48 | #define YYBISON_VERSION"2.4.3" "2.4.3" |
49 | |
50 | /* Skeleton name. */ |
51 | #define YYSKELETON_NAME"yacc.c" "yacc.c" |
52 | |
53 | /* Pure parsers. */ |
54 | #define YYPURE0 0 |
55 | |
56 | /* Push parsers. */ |
57 | #define YYPUSH0 0 |
58 | |
59 | /* Pull parsers. */ |
60 | #define YYPULL1 1 |
61 | |
62 | /* Using locations. */ |
63 | #define YYLSP_NEEDED0 0 |
64 | |
65 | |
66 | |
67 | /* Copy the first part of user declarations. */ |
68 | |
69 | /* Line 189 of yacc.c */ |
70 | #line 62 "cfgparse.y" |
71 | |
72 | #ifdef DEBUG |
73 | #define YYDEBUG0 1 |
74 | #endif |
75 | #define DEBUG_VARparseDebug parseDebug |
76 | #include "xkbevd.h" |
77 | #include <stdlib.h> |
78 | |
79 | |
80 | /* Line 189 of yacc.c */ |
81 | #line 82 "cfgparse.c" |
82 | |
83 | /* Enabling traces. */ |
84 | #ifndef YYDEBUG0 |
85 | # define YYDEBUG0 0 |
86 | #endif |
87 | |
88 | /* Enabling verbose error messages. */ |
89 | #ifdef YYERROR_VERBOSE0 |
90 | # undef YYERROR_VERBOSE0 |
91 | # define YYERROR_VERBOSE0 1 |
92 | #else |
93 | # define YYERROR_VERBOSE0 0 |
94 | #endif |
95 | |
96 | /* Enabling the token table. */ |
97 | #ifndef YYTOKEN_TABLE0 |
98 | # define YYTOKEN_TABLE0 0 |
99 | #endif |
100 | |
101 | |
102 | /* Tokens. */ |
103 | #ifndef YYTOKENTYPE |
104 | # define YYTOKENTYPE |
105 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
106 | know about them. */ |
107 | enum yytokentype { |
108 | END_OF_FILE0 = 0, |
109 | ERROR255 = 255, |
110 | BELL1 = 1, |
111 | ACCESSX2 = 2, |
112 | MESSAGE3 = 3, |
113 | NONE20 = 20, |
114 | IGNORE21 = 21, |
115 | ECHO22 = 22, |
116 | PRINT_EV23 = 23, |
117 | SHELL24 = 24, |
118 | SOUND25 = 25, |
119 | EQUALS40 = 40, |
120 | PLUS41 = 41, |
121 | MINUS42 = 42, |
122 | DIVIDE43 = 43, |
123 | TIMES44 = 44, |
124 | OBRACE45 = 45, |
125 | CBRACE46 = 46, |
126 | OPAREN47 = 47, |
127 | CPAREN48 = 48, |
128 | OBRACKET49 = 49, |
129 | CBRACKET50 = 50, |
130 | DOT51 = 51, |
131 | COMMA52 = 52, |
132 | SEMI53 = 53, |
133 | EXCLAM54 = 54, |
134 | INVERT55 = 55, |
135 | STRING60 = 60, |
136 | INTEGER61 = 61, |
137 | FLOAT62 = 62, |
138 | IDENT63 = 63, |
139 | KEYNAME64 = 64 |
140 | }; |
141 | #endif |
142 | /* Tokens. */ |
143 | #define END_OF_FILE0 0 |
144 | #define ERROR255 255 |
145 | #define BELL1 1 |
146 | #define ACCESSX2 2 |
147 | #define MESSAGE3 3 |
148 | #define NONE20 20 |
149 | #define IGNORE21 21 |
150 | #define ECHO22 22 |
151 | #define PRINT_EV23 23 |
152 | #define SHELL24 24 |
153 | #define SOUND25 25 |
154 | #define EQUALS40 40 |
155 | #define PLUS41 41 |
156 | #define MINUS42 42 |
157 | #define DIVIDE43 43 |
158 | #define TIMES44 44 |
159 | #define OBRACE45 45 |
160 | #define CBRACE46 46 |
161 | #define OPAREN47 47 |
162 | #define CPAREN48 48 |
163 | #define OBRACKET49 49 |
164 | #define CBRACKET50 50 |
165 | #define DOT51 51 |
166 | #define COMMA52 52 |
167 | #define SEMI53 53 |
168 | #define EXCLAM54 54 |
169 | #define INVERT55 55 |
170 | #define STRING60 60 |
171 | #define INTEGER61 61 |
172 | #define FLOAT62 62 |
173 | #define IDENT63 63 |
174 | #define KEYNAME64 64 |
175 | |
176 | |
177 | |
178 | |
179 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED1 |
180 | typedef union YYSTYPE |
181 | { |
182 | |
183 | /* Line 214 of yacc.c */ |
184 | #line 76 "cfgparse.y" |
185 | |
186 | char * str; |
187 | int ival; |
188 | CfgEntryPtr entry; |
189 | ActDefPtr act; |
190 | |
191 | |
192 | |
193 | /* Line 214 of yacc.c */ |
194 | #line 195 "cfgparse.c" |
195 | } YYSTYPE; |
196 | # define YYSTYPE_IS_TRIVIAL1 1 |
197 | # define yystypeYYSTYPE YYSTYPE /* obsolescent; will be withdrawn */ |
198 | # define YYSTYPE_IS_DECLARED1 1 |
199 | #endif |
200 | |
201 | |
202 | /* Copy the second part of user declarations. */ |
203 | |
204 | |
205 | /* Line 264 of yacc.c */ |
206 | #line 207 "cfgparse.c" |
207 | |
208 | #ifdef short |
209 | # undef short |
210 | #endif |
211 | |
212 | #ifdef YYTYPE_UINT8 |
213 | typedef YYTYPE_UINT8 yytype_uint8; |
214 | #else |
215 | typedef unsigned char yytype_uint8; |
216 | #endif |
217 | |
218 | #ifdef YYTYPE_INT8 |
219 | typedef YYTYPE_INT8 yytype_int8; |
220 | #elif (defined __STDC__1 || defined __C99__FUNC__ \ |
221 | || defined __cplusplus || defined _MSC_VER) |
222 | typedef signed char yytype_int8; |
223 | #else |
224 | typedef short int yytype_int8; |
225 | #endif |
226 | |
227 | #ifdef YYTYPE_UINT16 |
228 | typedef YYTYPE_UINT16 yytype_uint16; |
229 | #else |
230 | typedef unsigned short int yytype_uint16; |
231 | #endif |
232 | |
233 | #ifdef YYTYPE_INT16 |
234 | typedef YYTYPE_INT16 yytype_int16; |
235 | #else |
236 | typedef short int yytype_int16; |
237 | #endif |
238 | |
239 | #ifndef YYSIZE_Tlong unsigned int |
240 | # ifdef __SIZE_TYPE__long unsigned int |
241 | # define YYSIZE_Tlong unsigned int __SIZE_TYPE__long unsigned int |
242 | # elif defined size_t |
243 | # define YYSIZE_Tlong unsigned int size_t |
244 | # elif ! defined YYSIZE_Tlong unsigned int && (defined __STDC__1 || defined __C99__FUNC__ \ |
245 | || defined __cplusplus || defined _MSC_VER) |
246 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
247 | # define YYSIZE_Tlong unsigned int size_t |
248 | # else |
249 | # define YYSIZE_Tlong unsigned int unsigned int |
250 | # endif |
251 | #endif |
252 | |
253 | #define YYSIZE_MAXIMUM((long unsigned int) -1) ((YYSIZE_Tlong unsigned int) -1) |
254 | |
255 | #ifndef YY_ |
256 | # if defined YYENABLE_NLS && YYENABLE_NLS |
257 | # if ENABLE_NLS |
258 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
259 | # define YY_(msgid)msgid dgettext ("bison-runtime", msgid) |
260 | # endif |
261 | # endif |
262 | # ifndef YY_ |
263 | # define YY_(msgid)msgid msgid |
264 | # endif |
265 | #endif |
266 | |
267 | /* Suppress unused-variable warnings by "using" E. */ |
268 | #if ! defined lint || defined __GNUC__4 |
269 | # define YYUSE(e)((void) (e)) ((void) (e)) |
270 | #else |
271 | # define YYUSE(e)((void) (e)) /* empty */ |
272 | #endif |
273 | |
274 | /* Identity function, used to suppress warnings about constant conditions. */ |
275 | #ifndef lint |
276 | # define YYID(n)(n) (n) |
277 | #else |
278 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
279 | || defined __cplusplus || defined _MSC_VER) |
280 | static int |
281 | YYID (int yyi)(int yyi) |
282 | #else |
283 | static int |
284 | YYID (yyi)(yyi) |
285 | int yyi; |
286 | #endif |
287 | { |
288 | return yyi; |
289 | } |
290 | #endif |
291 | |
292 | #if ! defined yyoverflow || YYERROR_VERBOSE0 |
293 | |
294 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
295 | |
296 | # ifdef YYSTACK_USE_ALLOCA |
297 | # if YYSTACK_USE_ALLOCA |
298 | # ifdef __GNUC__4 |
299 | # define YYSTACK_ALLOCmalloc __builtin_alloca |
300 | # elif defined __BUILTIN_VA_ARG_INCR |
301 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
302 | # elif defined _AIX |
303 | # define YYSTACK_ALLOCmalloc __alloca |
304 | # elif defined _MSC_VER |
305 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
306 | # define alloca _alloca |
307 | # else |
308 | # define YYSTACK_ALLOCmalloc alloca |
309 | # if ! defined _ALLOCA_H1 && ! defined _STDLIB_H1 && (defined __STDC__1 || defined __C99__FUNC__ \ |
310 | || defined __cplusplus || defined _MSC_VER) |
311 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
312 | # ifndef _STDLIB_H1 |
313 | # define _STDLIB_H1 1 |
314 | # endif |
315 | # endif |
316 | # endif |
317 | # endif |
318 | # endif |
319 | |
320 | # ifdef YYSTACK_ALLOCmalloc |
321 | /* Pacify GCC's `empty if-body' warning. */ |
322 | # define YYSTACK_FREEfree(Ptr) do { /* empty */; } while (YYID (0)(0)) |
323 | # ifndef YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1) |
324 | /* The OS might guarantee only one guard page at the bottom of the stack, |
325 | and a page size can be as small as 4096 bytes. So we cannot safely |
326 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
327 | to allow for a few compiler-allocated temporary stack slots. */ |
328 | # define YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1) 4032 /* reasonable circa 2006 */ |
329 | # endif |
330 | # else |
331 | # define YYSTACK_ALLOCmalloc YYMALLOCmalloc |
332 | # define YYSTACK_FREEfree YYFREEfree |
333 | # ifndef YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1) |
334 | # define YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1) YYSIZE_MAXIMUM((long unsigned int) -1) |
335 | # endif |
336 | # if (defined __cplusplus && ! defined _STDLIB_H1 \ |
337 | && ! ((defined YYMALLOCmalloc || defined malloc) \ |
338 | && (defined YYFREEfree || defined free))) |
339 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
340 | # ifndef _STDLIB_H1 |
341 | # define _STDLIB_H1 1 |
342 | # endif |
343 | # endif |
344 | # ifndef YYMALLOCmalloc |
345 | # define YYMALLOCmalloc malloc |
346 | # if ! defined malloc && ! defined _STDLIB_H1 && (defined __STDC__1 || defined __C99__FUNC__ \ |
347 | || defined __cplusplus || defined _MSC_VER) |
348 | void *malloc (YYSIZE_Tlong unsigned int); /* INFRINGES ON USER NAME SPACE */ |
349 | # endif |
350 | # endif |
351 | # ifndef YYFREEfree |
352 | # define YYFREEfree free |
353 | # if ! defined free && ! defined _STDLIB_H1 && (defined __STDC__1 || defined __C99__FUNC__ \ |
354 | || defined __cplusplus || defined _MSC_VER) |
355 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
356 | # endif |
357 | # endif |
358 | # endif |
359 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
360 | |
361 | |
362 | #if (! defined yyoverflow \ |
363 | && (! defined __cplusplus \ |
364 | || (defined YYSTYPE_IS_TRIVIAL1 && YYSTYPE_IS_TRIVIAL1))) |
365 | |
366 | /* A type that is properly aligned for any stack member. */ |
367 | union yyalloc |
368 | { |
369 | yytype_int16 yyss_alloc; |
370 | YYSTYPE yyvs_alloc; |
371 | }; |
372 | |
373 | /* The size of the maximum gap between one aligned stack and the next. */ |
374 | # define YYSTACK_GAP_MAXIMUM(sizeof (union yyalloc) - 1) (sizeof (union yyalloc) - 1) |
375 | |
376 | /* The size of an array large to enough to hold all stacks, each with |
377 | N elements. */ |
378 | # define YYSTACK_BYTES(N)((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) + (sizeof ( union yyalloc) - 1)) \ |
379 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
380 | + YYSTACK_GAP_MAXIMUM(sizeof (union yyalloc) - 1)) |
381 | |
382 | /* Copy COUNT objects from FROM to TO. The source and destination do |
383 | not overlap. */ |
384 | # ifndef YYCOPY |
385 | # if defined __GNUC__4 && 1 < __GNUC__4 |
386 | # define YYCOPY(To, From, Count)__builtin_memcpy (To, From, (Count) * sizeof (*(From))) \ |
387 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
388 | # else |
389 | # define YYCOPY(To, From, Count)__builtin_memcpy (To, From, (Count) * sizeof (*(From))) \ |
390 | do \ |
391 | { \ |
392 | YYSIZE_Tlong unsigned int yyi; \ |
393 | for (yyi = 0; yyi < (Count); yyi++) \ |
394 | (To)[yyi] = (From)[yyi]; \ |
395 | } \ |
396 | while (YYID (0)(0)) |
397 | # endif |
398 | # endif |
399 | |
400 | /* Relocate STACK from its old location to the new one. The |
401 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
402 | elements in the stack, and YYPTR gives the new location of the |
403 | stack. Advance YYPTR to a properly aligned location for the next |
404 | stack. */ |
405 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
406 | do \ |
407 | { \ |
408 | YYSIZE_Tlong unsigned int yynewbytes; \ |
409 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize)__builtin_memcpy (&yyptr->Stack_alloc, Stack, (yysize) * sizeof (*(Stack))); \ |
410 | Stack = &yyptr->Stack_alloc; \ |
411 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM(sizeof (union yyalloc) - 1); \ |
412 | yyptr += yynewbytes / sizeof (*yyptr); \ |
413 | } \ |
414 | while (YYID (0)(0)) |
415 | |
416 | #endif |
417 | |
418 | /* YYFINAL -- State number of the termination state. */ |
419 | #define YYFINAL12 12 |
420 | /* YYLAST -- Last index in YYTABLE. */ |
421 | #define YYLAST28 28 |
422 | |
423 | /* YYNTOKENS -- Number of terminals. */ |
424 | #define YYNTOKENS34 34 |
425 | /* YYNNTS -- Number of nonterminals. */ |
426 | #define YYNNTS14 14 |
427 | /* YYNRULES -- Number of rules. */ |
428 | #define YYNRULES27 27 |
429 | /* YYNRULES -- Number of states. */ |
430 | #define YYNSTATES33 33 |
431 | |
432 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
433 | #define YYUNDEFTOK2 2 |
434 | #define YYMAXUTOK257 257 |
435 | |
436 | #define YYTRANSLATE(YYX)((unsigned int) (YYX) <= 257 ? yytranslate[YYX] : 2) \ |
437 | ((unsigned int) (YYX) <= YYMAXUTOK257 ? yytranslate[YYX] : YYUNDEFTOK2) |
438 | |
439 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
440 | static const yytype_uint8 yytranslate[] = |
441 | { |
442 | 0, 4, 5, 6, 2, 2, 2, 2, 2, 2, |
443 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
444 | 7, 8, 9, 10, 11, 12, 2, 2, 2, 2, |
445 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
446 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
447 | 23, 24, 25, 26, 27, 28, 2, 2, 2, 2, |
448 | 29, 30, 31, 32, 33, 2, 2, 2, 2, 2, |
449 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
450 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
451 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
452 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
453 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
454 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
455 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
456 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
457 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
458 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
459 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
460 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
461 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
462 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
463 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
464 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
465 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
466 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
467 | 2, 2, 2, 2, 2, 3, 1, 2 |
468 | }; |
469 | |
470 | #if YYDEBUG0 |
471 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
472 | YYRHS. */ |
473 | static const yytype_uint8 yyprhs[] = |
474 | { |
475 | 0, 0, 3, 5, 8, 10, 13, 15, 19, 24, |
476 | 26, 28, 30, 33, 35, 37, 39, 41, 43, 45, |
477 | 46, 48, 49, 51, 53, 55, 57, 58 |
478 | }; |
479 | |
480 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
481 | static const yytype_int8 yyrhs[] = |
482 | { |
483 | 35, 0, -1, 36, -1, 36, 37, -1, 37, -1, |
484 | 39, 41, -1, 38, -1, 45, 13, 44, -1, 40, |
485 | 20, 43, 21, -1, 4, -1, 5, -1, 6, -1, |
486 | 42, 46, -1, 7, -1, 8, -1, 9, -1, 10, |
487 | -1, 11, -1, 12, -1, -1, 44, -1, -1, 45, |
488 | -1, 47, -1, 32, -1, 47, -1, -1, 29, -1 |
489 | }; |
490 | |
491 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
492 | static const yytype_uint8 yyrline[] = |
493 | { |
494 | 0, 87, 87, 91, 103, 106, 114, 117, 134, 151, |
495 | 152, 153, 156, 168, 169, 170, 171, 172, 173, 174, |
496 | 177, 178, 181, 182, 185, 188, 189, 192 |
497 | }; |
498 | #endif |
499 | |
500 | #if YYDEBUG0 || YYERROR_VERBOSE0 || YYTOKEN_TABLE0 |
501 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
502 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
503 | static const char *const yytname[] = |
504 | { |
505 | "END_OF_FILE", "error", "$undefined", "ERROR", "BELL", "ACCESSX", |
506 | "MESSAGE", "NONE", "IGNORE", "ECHO", "PRINT_EV", "SHELL", "SOUND", |
507 | "EQUALS", "PLUS", "MINUS", "DIVIDE", "TIMES", "OBRACE", "CBRACE", |
508 | "OPAREN", "CPAREN", "OBRACKET", "CBRACKET", "DOT", "COMMA", "SEMI", |
509 | "EXCLAM", "INVERT", "STRING", "INTEGER", "FLOAT", "IDENT", "KEYNAME", |
510 | "$accept", "CfgFile", "CfgEntryList", "CfgEntry", "VarDef", "EventDef", |
511 | "EventType", "ActionDef", "ActionType", "OptNameSpec", "NameSpec", |
512 | "Ident", "OptString", "String", 0 |
513 | }; |
514 | #endif |
515 | |
516 | # ifdef YYPRINT |
517 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
518 | token YYLEX-NUM. */ |
519 | static const yytype_uint16 yytoknum[] = |
520 | { |
521 | 0, 256, 257, 255, 1, 2, 3, 20, 21, 22, |
522 | 23, 24, 25, 40, 41, 42, 43, 44, 45, 46, |
523 | 47, 48, 49, 50, 51, 52, 53, 54, 55, 60, |
524 | 61, 62, 63, 64 |
525 | }; |
526 | # endif |
527 | |
528 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
529 | static const yytype_uint8 yyr1[] = |
530 | { |
531 | 0, 34, 35, 36, 36, 37, 37, 38, 39, 40, |
532 | 40, 40, 41, 42, 42, 42, 42, 42, 42, 42, |
533 | 43, 43, 44, 44, 45, 46, 46, 47 |
534 | }; |
535 | |
536 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
537 | static const yytype_uint8 yyr2[] = |
538 | { |
539 | 0, 2, 1, 2, 1, 2, 1, 3, 4, 1, |
540 | 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, |
541 | 1, 0, 1, 1, 1, 1, 0, 1 |
542 | }; |
543 | |
544 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
545 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
546 | means the default is an error. */ |
547 | static const yytype_uint8 yydefact[] = |
548 | { |
549 | 0, 9, 10, 11, 24, 0, 2, 4, 6, 19, |
550 | 0, 0, 1, 3, 13, 14, 15, 16, 17, 18, |
551 | 5, 26, 21, 0, 27, 12, 25, 0, 20, 22, |
552 | 23, 7, 8 |
553 | }; |
554 | |
555 | /* YYDEFGOTO[NTERM-NUM]. */ |
556 | static const yytype_int8 yydefgoto[] = |
557 | { |
558 | -1, 5, 6, 7, 8, 9, 10, 20, 21, 27, |
559 | 28, 11, 25, 30 |
560 | }; |
561 | |
562 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
563 | STATE-NUM. */ |
564 | #define YYPACT_NINF-20 -20 |
565 | static const yytype_int8 yypact[] = |
566 | { |
567 | -4, -20, -20, -20, -20, 3, -4, -20, -20, -3, |
568 | -6, 2, -20, -20, -20, -20, -20, -20, -20, -20, |
569 | -20, -13, -19, -19, -20, -20, -20, -2, -20, -20, |
570 | -20, -20, -20 |
571 | }; |
572 | |
573 | /* YYPGOTO[NTERM-NUM]. */ |
574 | static const yytype_int8 yypgoto[] = |
575 | { |
576 | -20, -20, -20, 11, -20, -20, -20, -20, -20, -20, |
577 | -5, -11, -20, -1 |
578 | }; |
579 | |
580 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
581 | positive, shift that token. If negative, reduce the rule which |
582 | number is the opposite. If zero, do what YYDEFACT says. |
583 | If YYTABLE_NINF, syntax error. */ |
584 | #define YYTABLE_NINF-1 -1 |
585 | static const yytype_uint8 yytable[] = |
586 | { |
587 | 1, 2, 3, 12, 14, 15, 16, 17, 18, 19, |
588 | 24, 29, 29, 4, 22, 23, 24, 13, 31, 32, |
589 | 26, 0, 0, 0, 0, 0, 0, 0, 4 |
590 | }; |
591 | |
592 | static const yytype_int8 yycheck[] = |
593 | { |
594 | 4, 5, 6, 0, 7, 8, 9, 10, 11, 12, |
595 | 29, 22, 23, 32, 20, 13, 29, 6, 23, 21, |
596 | 21, -1, -1, -1, -1, -1, -1, -1, 32 |
597 | }; |
598 | |
599 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
600 | symbol of state STATE-NUM. */ |
601 | static const yytype_uint8 yystos[] = |
602 | { |
603 | 0, 4, 5, 6, 32, 35, 36, 37, 38, 39, |
604 | 40, 45, 0, 37, 7, 8, 9, 10, 11, 12, |
605 | 41, 42, 20, 13, 29, 46, 47, 43, 44, 45, |
606 | 47, 44, 21 |
607 | }; |
608 | |
609 | #define yyerrok(yyerrstatus = 0) (yyerrstatus = 0) |
610 | #define yyclearin(yychar = (-2)) (yychar = YYEMPTY(-2)) |
611 | #define YYEMPTY(-2) (-2) |
612 | #define YYEOF0 0 |
613 | |
614 | #define YYACCEPTgoto yyacceptlab goto yyacceptlab |
615 | #define YYABORTgoto yyabortlab goto yyabortlab |
616 | #define YYERRORgoto yyerrorlab goto yyerrorlab |
617 | |
618 | |
619 | /* Like YYERROR except do call yyerror. This remains here temporarily |
620 | to ease the transition to the new meaning of YYERROR, for GCC. |
621 | Once GCC version 2 has supplanted version 1, this can go. However, |
622 | YYFAIL appears to be in use. Nevertheless, it is formally deprecated |
623 | in Bison 2.4.2's NEWS entry, where a plan to phase it out is |
624 | discussed. */ |
625 | |
626 | #define YYFAILgoto yyerrlab goto yyerrlab |
627 | #if defined YYFAILgoto yyerrlab |
628 | /* This is here to suppress warnings from the GCC cpp's |
629 | -Wunused-macros. Normally we don't worry about that warning, but |
630 | some users do, and we want to make it easy for users to remove |
631 | YYFAIL uses, which will produce warnings from Bison 2.5. */ |
632 | #endif |
633 | |
634 | #define YYRECOVERING()(!!yyerrstatus) (!!yyerrstatus) |
635 | |
636 | #define YYBACKUP(Token, Value)do if (yychar == (-2) && yylen == 1) { yychar = (Token ); yylval = (Value); yytoken = ((unsigned int) (yychar) <= 257 ? yytranslate[yychar] : 2); (yyvsp -= (1), yyssp -= (1)) ; goto yybackup; } else { yyerror ("syntax error: cannot back up" ); goto yyerrorlab; } while ((0)) \ |
637 | do \ |
638 | if (yychar == YYEMPTY(-2) && yylen == 1) \ |
639 | { \ |
640 | yychar = (Token); \ |
641 | yylval = (Value); \ |
642 | yytoken = YYTRANSLATE (yychar)((unsigned int) (yychar) <= 257 ? yytranslate[yychar] : 2); \ |
643 | YYPOPSTACK (1)(yyvsp -= (1), yyssp -= (1)); \ |
644 | goto yybackup; \ |
645 | } \ |
646 | else \ |
647 | { \ |
648 | yyerror (YY_("syntax error: cannot back up")"syntax error: cannot back up"); \ |
649 | YYERRORgoto yyerrorlab; \ |
650 | } \ |
651 | while (YYID (0)(0)) |
652 | |
653 | |
654 | #define YYTERROR1 1 |
655 | #define YYERRCODE256 256 |
656 | |
657 | |
658 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
659 | If N is 0, then set CURRENT to the empty location which ends |
660 | the previous symbol: RHS[0] (always defined). */ |
661 | |
662 | #define YYRHSLOC(Rhs, K)((Rhs)[K]) ((Rhs)[K]) |
663 | #ifndef YYLLOC_DEFAULT |
664 | # define YYLLOC_DEFAULT(Current, Rhs, N)do if ((N)) { (Current).first_line = ((Rhs)[1]).first_line; ( Current).first_column = ((Rhs)[1]).first_column; (Current).last_line = ((Rhs)[N]).last_line; (Current).last_column = ((Rhs)[N]).last_column ; } else { (Current).first_line = (Current).last_line = ((Rhs )[0]).last_line; (Current).first_column = (Current).last_column = ((Rhs)[0]).last_column; } while ((0)) \ |
665 | do \ |
666 | if (YYID (N)(N)) \ |
667 | { \ |
668 | (Current).first_line = YYRHSLOC (Rhs, 1)((Rhs)[1]).first_line; \ |
669 | (Current).first_column = YYRHSLOC (Rhs, 1)((Rhs)[1]).first_column; \ |
670 | (Current).last_line = YYRHSLOC (Rhs, N)((Rhs)[N]).last_line; \ |
671 | (Current).last_column = YYRHSLOC (Rhs, N)((Rhs)[N]).last_column; \ |
672 | } \ |
673 | else \ |
674 | { \ |
675 | (Current).first_line = (Current).last_line = \ |
676 | YYRHSLOC (Rhs, 0)((Rhs)[0]).last_line; \ |
677 | (Current).first_column = (Current).last_column = \ |
678 | YYRHSLOC (Rhs, 0)((Rhs)[0]).last_column; \ |
679 | } \ |
680 | while (YYID (0)(0)) |
681 | #endif |
682 | |
683 | |
684 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
685 | This macro was not mandated originally: define only if we know |
686 | we won't break user code: when these are the locations we know. */ |
687 | |
688 | #ifndef YY_LOCATION_PRINT |
689 | # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
690 | # define YY_LOCATION_PRINT(File, Loc)((void) 0) \ |
691 | fprintf (File, "%d.%d-%d.%d", \ |
692 | (Loc).first_line, (Loc).first_column, \ |
693 | (Loc).last_line, (Loc).last_column) |
694 | # else |
695 | # define YY_LOCATION_PRINT(File, Loc)((void) 0) ((void) 0) |
696 | # endif |
697 | #endif |
698 | |
699 | |
700 | /* YYLEX -- calling `yylex' with the right arguments. */ |
701 | |
702 | #ifdef YYLEX_PARAM |
703 | # define YYLEXyylex () yylex (YYLEX_PARAM) |
704 | #else |
705 | # define YYLEXyylex () yylex () |
706 | #endif |
707 | |
708 | /* Enable debugging if requested. */ |
709 | #if YYDEBUG0 |
710 | |
711 | # ifndef YYFPRINTF |
712 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
713 | # define YYFPRINTF fprintf |
714 | # endif |
715 | |
716 | # define YYDPRINTF(Args) \ |
717 | do { \ |
718 | if (yydebug) \ |
719 | YYFPRINTF Args; \ |
720 | } while (YYID (0)(0)) |
721 | |
722 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
723 | do { \ |
724 | if (yydebug) \ |
725 | { \ |
726 | YYFPRINTF (stderrstderr, "%s ", Title); \ |
727 | yy_symbol_print (stderrstderr, \ |
728 | Type, Value); \ |
729 | YYFPRINTF (stderrstderr, "\n"); \ |
730 | } \ |
731 | } while (YYID (0)(0)) |
732 | |
733 | |
734 | /*--------------------------------. |
735 | | Print this symbol on YYOUTPUT. | |
736 | `--------------------------------*/ |
737 | |
738 | /*ARGSUSED*/ |
739 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
740 | || defined __cplusplus || defined _MSC_VER) |
741 | static void |
742 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
743 | #else |
744 | static void |
745 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
746 | FILE *yyoutput; |
747 | int yytype; |
748 | YYSTYPE const * const yyvaluep; |
749 | #endif |
750 | { |
751 | if (!yyvaluep) |
752 | return; |
753 | # ifdef YYPRINT |
754 | if (yytype < YYNTOKENS34) |
755 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
756 | # else |
757 | YYUSE (yyoutput)((void) (yyoutput)); |
758 | # endif |
759 | switch (yytype) |
760 | { |
761 | default: |
762 | break; |
763 | } |
764 | } |
765 | |
766 | |
767 | /*--------------------------------. |
768 | | Print this symbol on YYOUTPUT. | |
769 | `--------------------------------*/ |
770 | |
771 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
772 | || defined __cplusplus || defined _MSC_VER) |
773 | static void |
774 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
775 | #else |
776 | static void |
777 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
778 | FILE *yyoutput; |
779 | int yytype; |
780 | YYSTYPE const * const yyvaluep; |
781 | #endif |
782 | { |
783 | if (yytype < YYNTOKENS34) |
784 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
785 | else |
786 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
787 | |
788 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
789 | YYFPRINTF (yyoutput, ")"); |
790 | } |
791 | |
792 | /*------------------------------------------------------------------. |
793 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
794 | | TOP (included). | |
795 | `------------------------------------------------------------------*/ |
796 | |
797 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
798 | || defined __cplusplus || defined _MSC_VER) |
799 | static void |
800 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
801 | #else |
802 | static void |
803 | yy_stack_print (yybottom, yytop) |
804 | yytype_int16 *yybottom; |
805 | yytype_int16 *yytop; |
806 | #endif |
807 | { |
808 | YYFPRINTF (stderrstderr, "Stack now"); |
809 | for (; yybottom <= yytop; yybottom++) |
810 | { |
811 | int yybot = *yybottom; |
812 | YYFPRINTF (stderrstderr, " %d", yybot); |
813 | } |
814 | YYFPRINTF (stderrstderr, "\n"); |
815 | } |
816 | |
817 | # define YY_STACK_PRINT(Bottom, Top) \ |
818 | do { \ |
819 | if (yydebug) \ |
820 | yy_stack_print ((Bottom), (Top)); \ |
821 | } while (YYID (0)(0)) |
822 | |
823 | |
824 | /*------------------------------------------------. |
825 | | Report that the YYRULE is going to be reduced. | |
826 | `------------------------------------------------*/ |
827 | |
828 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
829 | || defined __cplusplus || defined _MSC_VER) |
830 | static void |
831 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
832 | #else |
833 | static void |
834 | yy_reduce_print (yyvsp, yyrule) |
835 | YYSTYPE *yyvsp; |
836 | int yyrule; |
837 | #endif |
838 | { |
839 | int yynrhs = yyr2[yyrule]; |
840 | int yyi; |
841 | unsigned long int yylno = yyrline[yyrule]; |
842 | YYFPRINTF (stderrstderr, "Reducing stack by rule %d (line %lu):\n", |
843 | yyrule - 1, yylno); |
844 | /* The symbols being reduced. */ |
845 | for (yyi = 0; yyi < yynrhs; yyi++) |
846 | { |
847 | YYFPRINTF (stderrstderr, " $%d = ", yyi + 1); |
848 | yy_symbol_print (stderrstderr, yyrhs[yyprhs[yyrule] + yyi], |
849 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
850 | ); |
851 | YYFPRINTF (stderrstderr, "\n"); |
852 | } |
853 | } |
854 | |
855 | # define YY_REDUCE_PRINT(Rule) \ |
856 | do { \ |
857 | if (yydebug) \ |
858 | yy_reduce_print (yyvsp, Rule); \ |
859 | } while (YYID (0)(0)) |
860 | |
861 | /* Nonzero means print parse trace. It is left uninitialized so that |
862 | multiple parsers can coexist. */ |
863 | int yydebug; |
864 | #else /* !YYDEBUG */ |
865 | # define YYDPRINTF(Args) |
866 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
867 | # define YY_STACK_PRINT(Bottom, Top) |
868 | # define YY_REDUCE_PRINT(Rule) |
869 | #endif /* !YYDEBUG */ |
870 | |
871 | |
872 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
873 | #ifndef YYINITDEPTH200 |
874 | # define YYINITDEPTH200 200 |
875 | #endif |
876 | |
877 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
878 | if the built-in stack extension method is used). |
879 | |
880 | Do not make this value too large; the results are undefined if |
881 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
882 | evaluated with infinite-precision integer arithmetic. */ |
883 | |
884 | #ifndef YYMAXDEPTH10000 |
885 | # define YYMAXDEPTH10000 10000 |
886 | #endif |
887 | |
888 | |
889 | |
890 | #if YYERROR_VERBOSE0 |
891 | |
892 | # ifndef yystrlen |
893 | # if defined __GLIBC__2 && defined _STRING_H1 |
894 | # define yystrlen strlen |
895 | # else |
896 | /* Return the length of YYSTR. */ |
897 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
898 | || defined __cplusplus || defined _MSC_VER) |
899 | static YYSIZE_Tlong unsigned int |
900 | yystrlen (const char *yystr) |
901 | #else |
902 | static YYSIZE_Tlong unsigned int |
903 | yystrlen (yystr) |
904 | const char *yystr; |
905 | #endif |
906 | { |
907 | YYSIZE_Tlong unsigned int yylen; |
908 | for (yylen = 0; yystr[yylen]; yylen++) |
909 | continue; |
910 | return yylen; |
911 | } |
912 | # endif |
913 | # endif |
914 | |
915 | # ifndef yystpcpy |
916 | # if defined __GLIBC__2 && defined _STRING_H1 && defined _GNU_SOURCE |
917 | # define yystpcpy stpcpy |
918 | # else |
919 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
920 | YYDEST. */ |
921 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
922 | || defined __cplusplus || defined _MSC_VER) |
923 | static char * |
924 | yystpcpy (char *yydest, const char *yysrc) |
925 | #else |
926 | static char * |
927 | yystpcpy (yydest, yysrc) |
928 | char *yydest; |
929 | const char *yysrc; |
930 | #endif |
931 | { |
932 | char *yyd = yydest; |
933 | const char *yys = yysrc; |
934 | |
935 | while ((*yyd++ = *yys++) != '\0') |
936 | continue; |
937 | |
938 | return yyd - 1; |
939 | } |
940 | # endif |
941 | # endif |
942 | |
943 | # ifndef yytnamerr |
944 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
945 | quotes and backslashes, so that it's suitable for yyerror. The |
946 | heuristic is that double-quoting is unnecessary unless the string |
947 | contains an apostrophe, a comma, or backslash (other than |
948 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
949 | null, do not copy; instead, return the length of what the result |
950 | would have been. */ |
951 | static YYSIZE_Tlong unsigned int |
952 | yytnamerr (char *yyres, const char *yystr) |
953 | { |
954 | if (*yystr == '"') |
955 | { |
956 | YYSIZE_Tlong unsigned int yyn = 0; |
957 | char const *yyp = yystr; |
958 | |
959 | for (;;) |
960 | switch (*++yyp) |
961 | { |
962 | case '\'': |
963 | case ',': |
964 | goto do_not_strip_quotes; |
965 | |
966 | case '\\': |
967 | if (*++yyp != '\\') |
968 | goto do_not_strip_quotes; |
969 | /* Fall through. */ |
970 | default: |
971 | if (yyres) |
972 | yyres[yyn] = *yyp; |
973 | yyn++; |
974 | break; |
975 | |
976 | case '"': |
977 | if (yyres) |
978 | yyres[yyn] = '\0'; |
979 | return yyn; |
980 | } |
981 | do_not_strip_quotes: ; |
982 | } |
983 | |
984 | if (! yyres) |
985 | return yystrlen (yystr); |
986 | |
987 | return yystpcpy (yyres, yystr) - yyres; |
988 | } |
989 | # endif |
990 | |
991 | /* Copy into YYRESULT an error message about the unexpected token |
992 | YYCHAR while in state YYSTATE. Return the number of bytes copied, |
993 | including the terminating null byte. If YYRESULT is null, do not |
994 | copy anything; just return the number of bytes that would be |
995 | copied. As a special case, return 0 if an ordinary "syntax error" |
996 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
997 | size calculation. */ |
998 | static YYSIZE_Tlong unsigned int |
999 | yysyntax_error (char *yyresult, int yystate, int yychar) |
1000 | { |
1001 | int yyn = yypact[yystate]; |
1002 | |
1003 | if (! (YYPACT_NINF-20 < yyn && yyn <= YYLAST28)) |
1004 | return 0; |
1005 | else |
1006 | { |
1007 | int yytype = YYTRANSLATE (yychar)((unsigned int) (yychar) <= 257 ? yytranslate[yychar] : 2); |
1008 | YYSIZE_Tlong unsigned int yysize0 = yytnamerr (0, yytname[yytype]); |
1009 | YYSIZE_Tlong unsigned int yysize = yysize0; |
1010 | YYSIZE_Tlong unsigned int yysize1; |
1011 | int yysize_overflow = 0; |
1012 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
1013 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
1014 | int yyx; |
1015 | |
1016 | # if 0 |
1017 | /* This is so xgettext sees the translatable formats that are |
1018 | constructed on the fly. */ |
1019 | YY_("syntax error, unexpected %s")"syntax error, unexpected %s"; |
1020 | YY_("syntax error, unexpected %s, expecting %s")"syntax error, unexpected %s, expecting %s"; |
1021 | YY_("syntax error, unexpected %s, expecting %s or %s")"syntax error, unexpected %s, expecting %s or %s"; |
1022 | YY_("syntax error, unexpected %s, expecting %s or %s or %s")"syntax error, unexpected %s, expecting %s or %s or %s"; |
1023 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")"syntax error, unexpected %s, expecting %s or %s or %s or %s"; |
1024 | # endif |
1025 | char *yyfmt; |
1026 | char const *yyf; |
1027 | static char const yyunexpected[] = "syntax error, unexpected %s"; |
1028 | static char const yyexpecting[] = ", expecting %s"; |
1029 | static char const yyor[] = " or %s"; |
1030 | char yyformat[sizeof yyunexpected |
1031 | + sizeof yyexpecting - 1 |
1032 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
1033 | * (sizeof yyor - 1))]; |
1034 | char const *yyprefix = yyexpecting; |
1035 | |
1036 | /* Start YYX at -YYN if negative to avoid negative indexes in |
1037 | YYCHECK. */ |
1038 | int yyxbegin = yyn < 0 ? -yyn : 0; |
1039 | |
1040 | /* Stay within bounds of both yycheck and yytname. */ |
1041 | int yychecklim = YYLAST28 - yyn + 1; |
1042 | int yyxend = yychecklim < YYNTOKENS34 ? yychecklim : YYNTOKENS34; |
1043 | int yycount = 1; |
1044 | |
1045 | yyarg[0] = yytname[yytype]; |
1046 | yyfmt = yystpcpy (yyformat, yyunexpected); |
1047 | |
1048 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
1049 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR1) |
1050 | { |
1051 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
1052 | { |
1053 | yycount = 1; |
1054 | yysize = yysize0; |
1055 | yyformat[sizeof yyunexpected - 1] = '\0'; |
1056 | break; |
1057 | } |
1058 | yyarg[yycount++] = yytname[yyx]; |
1059 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
1060 | yysize_overflow |= (yysize1 < yysize); |
1061 | yysize = yysize1; |
1062 | yyfmt = yystpcpy (yyfmt, yyprefix); |
1063 | yyprefix = yyor; |
1064 | } |
1065 | |
1066 | yyf = YY_(yyformat)yyformat; |
1067 | yysize1 = yysize + yystrlen (yyf); |
1068 | yysize_overflow |= (yysize1 < yysize); |
1069 | yysize = yysize1; |
1070 | |
1071 | if (yysize_overflow) |
1072 | return YYSIZE_MAXIMUM((long unsigned int) -1); |
1073 | |
1074 | if (yyresult) |
1075 | { |
1076 | /* Avoid sprintf, as that infringes on the user's name space. |
1077 | Don't have undefined behavior even if the translation |
1078 | produced a string with the wrong number of "%s"s. */ |
1079 | char *yyp = yyresult; |
1080 | int yyi = 0; |
1081 | while ((*yyp = *yyf) != '\0') |
1082 | { |
1083 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
1084 | { |
1085 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
1086 | yyf += 2; |
1087 | } |
1088 | else |
1089 | { |
1090 | yyp++; |
1091 | yyf++; |
1092 | } |
1093 | } |
1094 | } |
1095 | return yysize; |
1096 | } |
1097 | } |
1098 | #endif /* YYERROR_VERBOSE */ |
1099 | |
1100 | |
1101 | /*-----------------------------------------------. |
1102 | | Release the memory associated to this symbol. | |
1103 | `-----------------------------------------------*/ |
1104 | |
1105 | /*ARGSUSED*/ |
1106 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
1107 | || defined __cplusplus || defined _MSC_VER) |
1108 | static void |
1109 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
1110 | #else |
1111 | static void |
1112 | yydestruct (yymsg, yytype, yyvaluep) |
1113 | const char *yymsg; |
1114 | int yytype; |
1115 | YYSTYPE *yyvaluep; |
1116 | #endif |
1117 | { |
1118 | YYUSE (yyvaluep)((void) (yyvaluep)); |
1119 | |
1120 | if (!yymsg) |
1121 | yymsg = "Deleting"; |
Value stored to 'yymsg' is never read | |
1122 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
1123 | |
1124 | switch (yytype) |
1125 | { |
1126 | |
1127 | default: |
1128 | break; |
1129 | } |
1130 | } |
1131 | |
1132 | /* Prevent warnings from -Wmissing-prototypes. */ |
1133 | #ifdef YYPARSE_PARAM |
1134 | #if defined __STDC__1 || defined __cplusplus |
1135 | int yyparse (void *YYPARSE_PARAM); |
1136 | #else |
1137 | int yyparse (); |
1138 | #endif |
1139 | #else /* ! YYPARSE_PARAM */ |
1140 | #if defined __STDC__1 || defined __cplusplus |
1141 | int yyparse (void); |
1142 | #else |
1143 | int yyparse (); |
1144 | #endif |
1145 | #endif /* ! YYPARSE_PARAM */ |
1146 | |
1147 | |
1148 | /* The lookahead symbol. */ |
1149 | int yychar; |
1150 | |
1151 | /* The semantic value of the lookahead symbol. */ |
1152 | YYSTYPE yylval; |
1153 | |
1154 | /* Number of syntax errors so far. */ |
1155 | int yynerrs; |
1156 | |
1157 | |
1158 | |
1159 | /*-------------------------. |
1160 | | yyparse or yypush_parse. | |
1161 | `-------------------------*/ |
1162 | |
1163 | #ifdef YYPARSE_PARAM |
1164 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
1165 | || defined __cplusplus || defined _MSC_VER) |
1166 | int |
1167 | yyparse (void *YYPARSE_PARAM) |
1168 | #else |
1169 | int |
1170 | yyparse (YYPARSE_PARAM) |
1171 | void *YYPARSE_PARAM; |
1172 | #endif |
1173 | #else /* ! YYPARSE_PARAM */ |
1174 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
1175 | || defined __cplusplus || defined _MSC_VER) |
1176 | int |
1177 | yyparse (void) |
1178 | #else |
1179 | int |
1180 | yyparse () |
1181 | |
1182 | #endif |
1183 | #endif |
1184 | { |
1185 | |
1186 | |
1187 | int yystate; |
1188 | /* Number of tokens to shift before error messages enabled. */ |
1189 | int yyerrstatus; |
1190 | |
1191 | /* The stacks and their tools: |
1192 | `yyss': related to states. |
1193 | `yyvs': related to semantic values. |
1194 | |
1195 | Refer to the stacks thru separate pointers, to allow yyoverflow |
1196 | to reallocate them elsewhere. */ |
1197 | |
1198 | /* The state stack. */ |
1199 | yytype_int16 yyssa[YYINITDEPTH200]; |
1200 | yytype_int16 *yyss; |
1201 | yytype_int16 *yyssp; |
1202 | |
1203 | /* The semantic value stack. */ |
1204 | YYSTYPE yyvsa[YYINITDEPTH200]; |
1205 | YYSTYPE *yyvs; |
1206 | YYSTYPE *yyvsp; |
1207 | |
1208 | YYSIZE_Tlong unsigned int yystacksize; |
1209 | |
1210 | int yyn; |
1211 | int yyresult; |
1212 | /* Lookahead token as an internal (translated) token number. */ |
1213 | int yytoken; |
1214 | /* The variables used to return semantic value and location from the |
1215 | action routines. */ |
1216 | YYSTYPE yyval; |
1217 | |
1218 | #if YYERROR_VERBOSE0 |
1219 | /* Buffer for error messages, and its allocated size. */ |
1220 | char yymsgbuf[128]; |
1221 | char *yymsg = yymsgbuf; |
1222 | YYSIZE_Tlong unsigned int yymsg_alloc = sizeof yymsgbuf; |
1223 | #endif |
1224 | |
1225 | #define YYPOPSTACK(N)(yyvsp -= (N), yyssp -= (N)) (yyvsp -= (N), yyssp -= (N)) |
1226 | |
1227 | /* The number of symbols on the RHS of the reduced rule. |
1228 | Keep to zero when no symbol should be popped. */ |
1229 | int yylen = 0; |
1230 | |
1231 | yytoken = 0; |
1232 | yyss = yyssa; |
1233 | yyvs = yyvsa; |
1234 | yystacksize = YYINITDEPTH200; |
1235 | |
1236 | YYDPRINTF ((stderr, "Starting parse\n")); |
1237 | |
1238 | yystate = 0; |
1239 | yyerrstatus = 0; |
1240 | yynerrs = 0; |
1241 | yychar = YYEMPTY(-2); /* Cause a token to be read. */ |
1242 | |
1243 | /* Initialize stack pointers. |
1244 | Waste one element of value and location stack |
1245 | so that they stay on the same level as the state stack. |
1246 | The wasted elements are never initialized. */ |
1247 | yyssp = yyss; |
1248 | yyvsp = yyvs; |
1249 | |
1250 | goto yysetstate; |
1251 | |
1252 | /*------------------------------------------------------------. |
1253 | | yynewstate -- Push a new state, which is found in yystate. | |
1254 | `------------------------------------------------------------*/ |
1255 | yynewstate: |
1256 | /* In all cases, when you get here, the value and location stacks |
1257 | have just been pushed. So pushing a state here evens the stacks. */ |
1258 | yyssp++; |
1259 | |
1260 | yysetstate: |
1261 | *yyssp = yystate; |
1262 | |
1263 | if (yyss + yystacksize - 1 <= yyssp) |
1264 | { |
1265 | /* Get the current used size of the three stacks, in elements. */ |
1266 | YYSIZE_Tlong unsigned int yysize = yyssp - yyss + 1; |
1267 | |
1268 | #ifdef yyoverflow |
1269 | { |
1270 | /* Give user a chance to reallocate the stack. Use copies of |
1271 | these so that the &'s don't force the real ones into |
1272 | memory. */ |
1273 | YYSTYPE *yyvs1 = yyvs; |
1274 | yytype_int16 *yyss1 = yyss; |
1275 | |
1276 | /* Each stack pointer address is followed by the size of the |
1277 | data in use in that stack, in bytes. This used to be a |
1278 | conditional around just the two extra args, but that might |
1279 | be undefined if yyoverflow is a macro. */ |
1280 | yyoverflow (YY_("memory exhausted")"memory exhausted", |
1281 | &yyss1, yysize * sizeof (*yyssp), |
1282 | &yyvs1, yysize * sizeof (*yyvsp), |
1283 | &yystacksize); |
1284 | |
1285 | yyss = yyss1; |
1286 | yyvs = yyvs1; |
1287 | } |
1288 | #else /* no yyoverflow */ |
1289 | # ifndef YYSTACK_RELOCATE |
1290 | goto yyexhaustedlab; |
1291 | # else |
1292 | /* Extend the stack our own way. */ |
1293 | if (YYMAXDEPTH10000 <= yystacksize) |
1294 | goto yyexhaustedlab; |
1295 | yystacksize *= 2; |
1296 | if (YYMAXDEPTH10000 < yystacksize) |
1297 | yystacksize = YYMAXDEPTH10000; |
1298 | |
1299 | { |
1300 | yytype_int16 *yyss1 = yyss; |
1301 | union yyalloc *yyptr = |
1302 | (union yyalloc *) YYSTACK_ALLOCmalloc (YYSTACK_BYTES (yystacksize)((yystacksize) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) + (sizeof (union yyalloc) - 1))); |
1303 | if (! yyptr) |
1304 | goto yyexhaustedlab; |
1305 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
1306 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
1307 | # undef YYSTACK_RELOCATE |
1308 | if (yyss1 != yyssa) |
1309 | YYSTACK_FREEfree (yyss1); |
1310 | } |
1311 | # endif |
1312 | #endif /* no yyoverflow */ |
1313 | |
1314 | yyssp = yyss + yysize - 1; |
1315 | yyvsp = yyvs + yysize - 1; |
1316 | |
1317 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
1318 | (unsigned long int) yystacksize)); |
1319 | |
1320 | if (yyss + yystacksize - 1 <= yyssp) |
1321 | YYABORTgoto yyabortlab; |
1322 | } |
1323 | |
1324 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
1325 | |
1326 | if (yystate == YYFINAL12) |
1327 | YYACCEPTgoto yyacceptlab; |
1328 | |
1329 | goto yybackup; |
1330 | |
1331 | /*-----------. |
1332 | | yybackup. | |
1333 | `-----------*/ |
1334 | yybackup: |
1335 | |
1336 | /* Do appropriate processing given the current state. Read a |
1337 | lookahead token if we need one and don't already have one. */ |
1338 | |
1339 | /* First try to decide what to do without reference to lookahead token. */ |
1340 | yyn = yypact[yystate]; |
1341 | if (yyn == YYPACT_NINF-20) |
1342 | goto yydefault; |
1343 | |
1344 | /* Not known => get a lookahead token if don't already have one. */ |
1345 | |
1346 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
1347 | if (yychar == YYEMPTY(-2)) |
1348 | { |
1349 | YYDPRINTF ((stderr, "Reading a token: ")); |
1350 | yychar = YYLEXyylex (); |
1351 | } |
1352 | |
1353 | if (yychar <= YYEOF0) |
1354 | { |
1355 | yychar = yytoken = YYEOF0; |
1356 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
1357 | } |
1358 | else |
1359 | { |
1360 | yytoken = YYTRANSLATE (yychar)((unsigned int) (yychar) <= 257 ? yytranslate[yychar] : 2); |
1361 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
1362 | } |
1363 | |
1364 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
1365 | detect an error, take that action. */ |
1366 | yyn += yytoken; |
1367 | if (yyn < 0 || YYLAST28 < yyn || yycheck[yyn] != yytoken) |
1368 | goto yydefault; |
1369 | yyn = yytable[yyn]; |
1370 | if (yyn <= 0) |
1371 | { |
1372 | if (yyn == 0 || yyn == YYTABLE_NINF-1) |
1373 | goto yyerrlab; |
1374 | yyn = -yyn; |
1375 | goto yyreduce; |
1376 | } |
1377 | |
1378 | /* Count tokens shifted since error; after three, turn off error |
1379 | status. */ |
1380 | if (yyerrstatus) |
1381 | yyerrstatus--; |
1382 | |
1383 | /* Shift the lookahead token. */ |
1384 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
1385 | |
1386 | /* Discard the shifted token. */ |
1387 | yychar = YYEMPTY(-2); |
1388 | |
1389 | yystate = yyn; |
1390 | *++yyvsp = yylval; |
1391 | |
1392 | goto yynewstate; |
1393 | |
1394 | |
1395 | /*-----------------------------------------------------------. |
1396 | | yydefault -- do the default action for the current state. | |
1397 | `-----------------------------------------------------------*/ |
1398 | yydefault: |
1399 | yyn = yydefact[yystate]; |
1400 | if (yyn == 0) |
1401 | goto yyerrlab; |
1402 | goto yyreduce; |
1403 | |
1404 | |
1405 | /*-----------------------------. |
1406 | | yyreduce -- Do a reduction. | |
1407 | `-----------------------------*/ |
1408 | yyreduce: |
1409 | /* yyn is the number of a rule to reduce with. */ |
1410 | yylen = yyr2[yyn]; |
1411 | |
1412 | /* If YYLEN is nonzero, implement the default value of the action: |
1413 | `$$ = $1'. |
1414 | |
1415 | Otherwise, the following line sets YYVAL to garbage. |
1416 | This behavior is undocumented and Bison |
1417 | users should not rely upon it. Assigning to YYVAL |
1418 | unconditionally makes the parser a bit smaller, and it avoids a |
1419 | GCC warning that YYVAL may be used uninitialized. */ |
1420 | yyval = yyvsp[1-yylen]; |
1421 | |
1422 | |
1423 | YY_REDUCE_PRINT (yyn); |
1424 | switch (yyn) |
1425 | { |
1426 | case 2: |
1427 | |
1428 | /* Line 1464 of yacc.c */ |
1429 | #line 88 "cfgparse.y" |
1430 | { InterpretConfigs((yyvsp[(1) - (1)].entry)); } |
1431 | break; |
1432 | |
1433 | case 3: |
1434 | |
1435 | /* Line 1464 of yacc.c */ |
1436 | #line 92 "cfgparse.y" |
1437 | { |
1438 | CfgEntryPtr tmp; |
1439 | if ((yyvsp[(1) - (2)].entry)!=NULL((void*)0)) { |
1440 | for (tmp=(yyvsp[(1) - (2)].entry);tmp->next!=NULL((void*)0);tmp=tmp->next) { |
1441 | /* conditional does the work */ |
1442 | } |
1443 | tmp->next= (yyvsp[(2) - (2)].entry); |
1444 | (yyval.entry)= (yyvsp[(1) - (2)].entry); |
1445 | } |
1446 | else (yyval.entry)= (yyvsp[(2) - (2)].entry); |
1447 | } |
1448 | break; |
1449 | |
1450 | case 4: |
1451 | |
1452 | /* Line 1464 of yacc.c */ |
1453 | #line 103 "cfgparse.y" |
1454 | { (yyval.entry)= (yyvsp[(1) - (1)].entry); } |
1455 | break; |
1456 | |
1457 | case 5: |
1458 | |
1459 | /* Line 1464 of yacc.c */ |
1460 | #line 107 "cfgparse.y" |
1461 | { |
1462 | if (((yyvsp[(1) - (2)].entry))&&((yyvsp[(2) - (2)].act))) |
1463 | (yyvsp[(1) - (2)].entry)->action= *((yyvsp[(2) - (2)].act)); |
1464 | if ((yyvsp[(2) - (2)].act)) |
1465 | free((yyvsp[(2) - (2)].act)); |
1466 | (yyval.entry)= (yyvsp[(1) - (2)].entry); |
1467 | } |
1468 | break; |
1469 | |
1470 | case 6: |
1471 | |
1472 | /* Line 1464 of yacc.c */ |
1473 | #line 114 "cfgparse.y" |
1474 | { (yyval.entry)= (yyvsp[(1) - (1)].entry); } |
1475 | break; |
1476 | |
1477 | case 7: |
1478 | |
1479 | /* Line 1464 of yacc.c */ |
1480 | #line 118 "cfgparse.y" |
1481 | { |
1482 | CfgEntryPtr cfg; |
1483 | cfg= calloc(1,sizeof(CfgEntryRec)); |
1484 | if (cfg) { |
1485 | cfg->entry_type= VariableDef1; |
1486 | cfg->event_type= 0; |
1487 | cfg->name.str= (yyvsp[(1) - (3)].str); |
1488 | cfg->action.type= UnknownAction0; |
1489 | cfg->action.text= (yyvsp[(3) - (3)].str); |
1490 | cfg->action.priv= 0; |
1491 | cfg->next= NULL((void*)0); |
1492 | } |
1493 | (yyval.entry)= cfg; |
1494 | } |
1495 | break; |
1496 | |
1497 | case 8: |
1498 | |
1499 | /* Line 1464 of yacc.c */ |
1500 | #line 135 "cfgparse.y" |
1501 | { |
1502 | CfgEntryPtr cfg; |
1503 | cfg= calloc(1,sizeof(CfgEntryRec)); |
1504 | if (cfg) { |
1505 | cfg->entry_type= EventDef0; |
1506 | cfg->event_type= (yyvsp[(1) - (4)].ival); |
1507 | cfg->name.str= (yyvsp[(3) - (4)].str); |
1508 | cfg->action.type= UnknownAction0; |
1509 | cfg->action.text= NULL((void*)0); |
1510 | cfg->action.priv= 0; |
1511 | cfg->next= NULL((void*)0); |
1512 | } |
1513 | (yyval.entry)= cfg; |
1514 | } |
1515 | break; |
1516 | |
1517 | case 9: |
1518 | |
1519 | /* Line 1464 of yacc.c */ |
1520 | #line 151 "cfgparse.y" |
1521 | { (yyval.ival)= XkbBellNotify8; } |
1522 | break; |
1523 | |
1524 | case 10: |
1525 | |
1526 | /* Line 1464 of yacc.c */ |
1527 | #line 152 "cfgparse.y" |
1528 | { (yyval.ival)= XkbAccessXNotify10; } |
1529 | break; |
1530 | |
1531 | case 11: |
1532 | |
1533 | /* Line 1464 of yacc.c */ |
1534 | #line 153 "cfgparse.y" |
1535 | { (yyval.ival)= XkbActionMessage9; } |
1536 | break; |
1537 | |
1538 | case 12: |
1539 | |
1540 | /* Line 1464 of yacc.c */ |
1541 | #line 157 "cfgparse.y" |
1542 | { |
1543 | ActDefPtr act; |
1544 | act= calloc(1,sizeof(ActDefRec)); |
1545 | if (act) { |
1546 | act->type= (yyvsp[(1) - (2)].ival); |
1547 | act->text= (yyvsp[(2) - (2)].str); |
1548 | } |
1549 | (yyval.act)= act; |
1550 | } |
1551 | break; |
1552 | |
1553 | case 13: |
1554 | |
1555 | /* Line 1464 of yacc.c */ |
1556 | #line 168 "cfgparse.y" |
1557 | { (yyval.ival) = NoAction1; } |
1558 | break; |
1559 | |
1560 | case 14: |
1561 | |
1562 | /* Line 1464 of yacc.c */ |
1563 | #line 169 "cfgparse.y" |
1564 | { (yyval.ival) = NoAction1; } |
1565 | break; |
1566 | |
1567 | case 15: |
1568 | |
1569 | /* Line 1464 of yacc.c */ |
1570 | #line 170 "cfgparse.y" |
1571 | { (yyval.ival) = EchoAction2; } |
1572 | break; |
1573 | |
1574 | case 16: |
1575 | |
1576 | /* Line 1464 of yacc.c */ |
1577 | #line 171 "cfgparse.y" |
1578 | { (yyval.ival) = PrintEvAction3; } |
1579 | break; |
1580 | |
1581 | case 17: |
1582 | |
1583 | /* Line 1464 of yacc.c */ |
1584 | #line 172 "cfgparse.y" |
1585 | { (yyval.ival) = ShellAction4; } |
1586 | break; |
1587 | |
1588 | case 18: |
1589 | |
1590 | /* Line 1464 of yacc.c */ |
1591 | #line 173 "cfgparse.y" |
1592 | { (yyval.ival) = SoundAction5; } |
1593 | break; |
1594 | |
1595 | case 19: |
1596 | |
1597 | /* Line 1464 of yacc.c */ |
1598 | #line 174 "cfgparse.y" |
1599 | { (yyval.ival) = UnknownAction0; } |
1600 | break; |
1601 | |
1602 | case 20: |
1603 | |
1604 | /* Line 1464 of yacc.c */ |
1605 | #line 177 "cfgparse.y" |
1606 | { (yyval.str)= (yyvsp[(1) - (1)].str); } |
1607 | break; |
1608 | |
1609 | case 21: |
1610 | |
1611 | /* Line 1464 of yacc.c */ |
1612 | #line 178 "cfgparse.y" |
1613 | { (yyval.str)= NULL((void*)0); } |
1614 | break; |
1615 | |
1616 | case 22: |
1617 | |
1618 | /* Line 1464 of yacc.c */ |
1619 | #line 181 "cfgparse.y" |
1620 | { (yyval.str)= (yyvsp[(1) - (1)].str); } |
1621 | break; |
1622 | |
1623 | case 23: |
1624 | |
1625 | /* Line 1464 of yacc.c */ |
1626 | #line 182 "cfgparse.y" |
1627 | { (yyval.str)= (yyvsp[(1) - (1)].str); } |
1628 | break; |
1629 | |
1630 | case 24: |
1631 | |
1632 | /* Line 1464 of yacc.c */ |
1633 | #line 185 "cfgparse.y" |
1634 | { (yyval.str)= scanStr; scanStr= NULL((void*)0); } |
1635 | break; |
1636 | |
1637 | case 25: |
1638 | |
1639 | /* Line 1464 of yacc.c */ |
1640 | #line 188 "cfgparse.y" |
1641 | { (yyval.str)= (yyvsp[(1) - (1)].str); } |
1642 | break; |
1643 | |
1644 | case 26: |
1645 | |
1646 | /* Line 1464 of yacc.c */ |
1647 | #line 189 "cfgparse.y" |
1648 | { (yyval.str)= NULL((void*)0); } |
1649 | break; |
1650 | |
1651 | case 27: |
1652 | |
1653 | /* Line 1464 of yacc.c */ |
1654 | #line 192 "cfgparse.y" |
1655 | { (yyval.str)= scanStr; scanStr= NULL((void*)0); } |
1656 | break; |
1657 | |
1658 | |
1659 | |
1660 | /* Line 1464 of yacc.c */ |
1661 | #line 1662 "cfgparse.c" |
1662 | default: break; |
1663 | } |
1664 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
1665 | |
1666 | YYPOPSTACK (yylen)(yyvsp -= (yylen), yyssp -= (yylen)); |
1667 | yylen = 0; |
1668 | YY_STACK_PRINT (yyss, yyssp); |
1669 | |
1670 | *++yyvsp = yyval; |
1671 | |
1672 | /* Now `shift' the result of the reduction. Determine what state |
1673 | that goes to, based on the state we popped back to and the rule |
1674 | number reduced by. */ |
1675 | |
1676 | yyn = yyr1[yyn]; |
1677 | |
1678 | yystate = yypgoto[yyn - YYNTOKENS34] + *yyssp; |
1679 | if (0 <= yystate && yystate <= YYLAST28 && yycheck[yystate] == *yyssp) |
1680 | yystate = yytable[yystate]; |
1681 | else |
1682 | yystate = yydefgoto[yyn - YYNTOKENS34]; |
1683 | |
1684 | goto yynewstate; |
1685 | |
1686 | |
1687 | /*------------------------------------. |
1688 | | yyerrlab -- here on detecting error | |
1689 | `------------------------------------*/ |
1690 | yyerrlab: |
1691 | /* If not already recovering from an error, report this error. */ |
1692 | if (!yyerrstatus) |
1693 | { |
1694 | ++yynerrs; |
1695 | #if ! YYERROR_VERBOSE0 |
1696 | yyerror (YY_("syntax error")"syntax error"); |
1697 | #else |
1698 | { |
1699 | YYSIZE_Tlong unsigned int yysize = yysyntax_error (0, yystate, yychar); |
1700 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1)) |
1701 | { |
1702 | YYSIZE_Tlong unsigned int yyalloc = 2 * yysize; |
1703 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1))) |
1704 | yyalloc = YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1); |
1705 | if (yymsg != yymsgbuf) |
1706 | YYSTACK_FREEfree (yymsg); |
1707 | yymsg = (char *) YYSTACK_ALLOCmalloc (yyalloc); |
1708 | if (yymsg) |
1709 | yymsg_alloc = yyalloc; |
1710 | else |
1711 | { |
1712 | yymsg = yymsgbuf; |
1713 | yymsg_alloc = sizeof yymsgbuf; |
1714 | } |
1715 | } |
1716 | |
1717 | if (0 < yysize && yysize <= yymsg_alloc) |
1718 | { |
1719 | (void) yysyntax_error (yymsg, yystate, yychar); |
1720 | yyerror (yymsg); |
1721 | } |
1722 | else |
1723 | { |
1724 | yyerror (YY_("syntax error")"syntax error"); |
1725 | if (yysize != 0) |
1726 | goto yyexhaustedlab; |
1727 | } |
1728 | } |
1729 | #endif |
1730 | } |
1731 | |
1732 | |
1733 | |
1734 | if (yyerrstatus == 3) |
1735 | { |
1736 | /* If just tried and failed to reuse lookahead token after an |
1737 | error, discard it. */ |
1738 | |
1739 | if (yychar <= YYEOF0) |
1740 | { |
1741 | /* Return failure if at end of input. */ |
1742 | if (yychar == YYEOF0) |
1743 | YYABORTgoto yyabortlab; |
1744 | } |
1745 | else |
1746 | { |
1747 | yydestruct ("Error: discarding", |
1748 | yytoken, &yylval); |
1749 | yychar = YYEMPTY(-2); |
1750 | } |
1751 | } |
1752 | |
1753 | /* Else will try to reuse lookahead token after shifting the error |
1754 | token. */ |
1755 | goto yyerrlab1; |
1756 | |
1757 | |
1758 | /*---------------------------------------------------. |
1759 | | yyerrorlab -- error raised explicitly by YYERROR. | |
1760 | `---------------------------------------------------*/ |
1761 | yyerrorlab: |
1762 | |
1763 | /* Pacify compilers like GCC when the user code never invokes |
1764 | YYERROR and the label yyerrorlab therefore never appears in user |
1765 | code. */ |
1766 | if (/*CONSTCOND*/ 0) |
1767 | goto yyerrorlab; |
1768 | |
1769 | /* Do not reclaim the symbols of the rule which action triggered |
1770 | this YYERROR. */ |
1771 | YYPOPSTACK (yylen)(yyvsp -= (yylen), yyssp -= (yylen)); |
1772 | yylen = 0; |
1773 | YY_STACK_PRINT (yyss, yyssp); |
1774 | yystate = *yyssp; |
1775 | goto yyerrlab1; |
1776 | |
1777 | |
1778 | /*-------------------------------------------------------------. |
1779 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
1780 | `-------------------------------------------------------------*/ |
1781 | yyerrlab1: |
1782 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
1783 | |
1784 | for (;;) |
1785 | { |
1786 | yyn = yypact[yystate]; |
1787 | if (yyn != YYPACT_NINF-20) |
1788 | { |
1789 | yyn += YYTERROR1; |
1790 | if (0 <= yyn && yyn <= YYLAST28 && yycheck[yyn] == YYTERROR1) |
1791 | { |
1792 | yyn = yytable[yyn]; |
1793 | if (0 < yyn) |
1794 | break; |
1795 | } |
1796 | } |
1797 | |
1798 | /* Pop the current state because it cannot handle the error token. */ |
1799 | if (yyssp == yyss) |
1800 | YYABORTgoto yyabortlab; |
1801 | |
1802 | |
1803 | yydestruct ("Error: popping", |
1804 | yystos[yystate], yyvsp); |
1805 | YYPOPSTACK (1)(yyvsp -= (1), yyssp -= (1)); |
1806 | yystate = *yyssp; |
1807 | YY_STACK_PRINT (yyss, yyssp); |
1808 | } |
1809 | |
1810 | *++yyvsp = yylval; |
1811 | |
1812 | |
1813 | /* Shift the error token. */ |
1814 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
1815 | |
1816 | yystate = yyn; |
1817 | goto yynewstate; |
1818 | |
1819 | |
1820 | /*-------------------------------------. |
1821 | | yyacceptlab -- YYACCEPT comes here. | |
1822 | `-------------------------------------*/ |
1823 | yyacceptlab: |
1824 | yyresult = 0; |
1825 | goto yyreturn; |
1826 | |
1827 | /*-----------------------------------. |
1828 | | yyabortlab -- YYABORT comes here. | |
1829 | `-----------------------------------*/ |
1830 | yyabortlab: |
1831 | yyresult = 1; |
1832 | goto yyreturn; |
1833 | |
1834 | #if !defined(yyoverflow) || YYERROR_VERBOSE0 |
1835 | /*-------------------------------------------------. |
1836 | | yyexhaustedlab -- memory exhaustion comes here. | |
1837 | `-------------------------------------------------*/ |
1838 | yyexhaustedlab: |
1839 | yyerror (YY_("memory exhausted")"memory exhausted"); |
1840 | yyresult = 2; |
1841 | /* Fall through. */ |
1842 | #endif |
1843 | |
1844 | yyreturn: |
1845 | if (yychar != YYEMPTY(-2)) |
1846 | yydestruct ("Cleanup: discarding lookahead", |
1847 | yytoken, &yylval); |
1848 | /* Do not reclaim the symbols of the rule which action triggered |
1849 | this YYABORT or YYACCEPT. */ |
1850 | YYPOPSTACK (yylen)(yyvsp -= (yylen), yyssp -= (yylen)); |
1851 | YY_STACK_PRINT (yyss, yyssp); |
1852 | while (yyssp != yyss) |
1853 | { |
1854 | yydestruct ("Cleanup: popping", |
1855 | yystos[*yyssp], yyvsp); |
1856 | YYPOPSTACK (1)(yyvsp -= (1), yyssp -= (1)); |
1857 | } |
1858 | #ifndef yyoverflow |
1859 | if (yyss != yyssa) |
1860 | YYSTACK_FREEfree (yyss); |
1861 | #endif |
1862 | #if YYERROR_VERBOSE0 |
1863 | if (yymsg != yymsgbuf) |
1864 | YYSTACK_FREEfree (yymsg); |
1865 | #endif |
1866 | /* Make sure YYID is used. */ |
1867 | return YYID (yyresult)(yyresult); |
1868 | } |
1869 | |
1870 | |
1871 | |
1872 | /* Line 1684 of yacc.c */ |
1873 | #line 194 "cfgparse.y" |
1874 | |
1875 | int |
1876 | yyerror(char *s) |
1877 | { |
1878 | (void)fprintf(stderrstderr,"%s: line %d of %s\n",s,lineNum, |
1879 | (scanFile?scanFile:"(unknown)")); |
1880 | if (scanStr) |
1881 | (void)fprintf(stderrstderr,"last scanned symbol is: %s\n",scanStr); |
1882 | return 1; |
1883 | } |
1884 | |
1885 | |
1886 | int |
1887 | yywrap(void) |
1888 | { |
1889 | return 1; |
1890 | } |
1891 | |
1892 | int |
1893 | CFGParseFile(FILE *file) |
1894 | { |
1895 | if (file) { |
1896 | yyin= file; |
1897 | if (yyparse()==0) { |
1898 | return 1; |
1899 | } |
1900 | return 0; |
1901 | } |
1902 | return 1; |
1903 | } |
1904 |