1 /* A Bison parser, made by GNU Bison 2.0. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
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
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYSKELETON_NAME "yacc.c"
45 /* Using locations. */
46 #define YYLSP_NEEDED 0
53 /* Put the tokens into the symbol table, so that GDB and other debuggers
81 EXPORT_SYMBOL_KEYW = 283,
83 ATTRIBUTE_PHRASE = 285,
86 EXPRESSION_PHRASE = 288,
99 #define ATTRIBUTE_KEYW 259
100 #define AUTO_KEYW 260
101 #define BOOL_KEYW 261
102 #define CHAR_KEYW 262
103 #define CONST_KEYW 263
104 #define DOUBLE_KEYW 264
105 #define ENUM_KEYW 265
106 #define EXTERN_KEYW 266
107 #define FLOAT_KEYW 267
108 #define INLINE_KEYW 268
110 #define LONG_KEYW 270
111 #define REGISTER_KEYW 271
112 #define RESTRICT_KEYW 272
113 #define SHORT_KEYW 273
114 #define SIGNED_KEYW 274
115 #define STATIC_KEYW 275
116 #define STRUCT_KEYW 276
117 #define TYPEDEF_KEYW 277
118 #define UNION_KEYW 278
119 #define UNSIGNED_KEYW 279
120 #define VOID_KEYW 280
121 #define VOLATILE_KEYW 281
122 #define TYPEOF_KEYW 282
123 #define EXPORT_SYMBOL_KEYW 283
124 #define ASM_PHRASE 284
125 #define ATTRIBUTE_PHRASE 285
126 #define BRACE_PHRASE 286
127 #define BRACKET_PHRASE 287
128 #define EXPRESSION_PHRASE 288
142 /* Copy the first part of user declarations. */
143 #line 24 "scripts/genksyms/parse.y"
148 #include "genksyms.h"
150 static int is_typedef;
151 static int is_extern;
152 static char *current_name;
153 static struct string_list *decl_spec;
155 static void yyerror(const char *);
158 remove_node(struct string_list **p)
160 struct string_list *node = *p;
166 remove_list(struct string_list **pb, struct string_list **pe)
168 struct string_list *b = *pb, *e = *pe;
175 /* Enabling traces. */
180 /* Enabling verbose error messages. */
181 #ifdef YYERROR_VERBOSE
182 # undef YYERROR_VERBOSE
183 # define YYERROR_VERBOSE 1
185 # define YYERROR_VERBOSE 0
188 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
190 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
191 # define YYSTYPE_IS_DECLARED 1
192 # define YYSTYPE_IS_TRIVIAL 1
197 /* Copy the second part of user declarations. */
200 /* Line 213 of yacc.c. */
201 #line 202 "scripts/genksyms/parse.c"
203 #if ! defined (yyoverflow) || YYERROR_VERBOSE
209 # define YYMALLOC malloc
212 /* The parser invokes alloca or malloc; define the necessary symbols. */
214 # ifdef YYSTACK_USE_ALLOCA
215 # if YYSTACK_USE_ALLOCA
217 # define YYSTACK_ALLOC __builtin_alloca
219 # define YYSTACK_ALLOC alloca
224 # ifdef YYSTACK_ALLOC
225 /* Pacify GCC's `empty if-body' warning. */
226 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
228 # if defined (__STDC__) || defined (__cplusplus)
229 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
230 # define YYSIZE_T size_t
232 # define YYSTACK_ALLOC YYMALLOC
233 # define YYSTACK_FREE YYFREE
235 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
238 #if (! defined (yyoverflow) \
239 && (! defined (__cplusplus) \
240 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
242 /* A type that is properly aligned for any stack member. */
249 /* The size of the maximum gap between one aligned stack and the next. */
250 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
252 /* The size of an array large to enough to hold all stacks, each with
254 # define YYSTACK_BYTES(N) \
255 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
256 + YYSTACK_GAP_MAXIMUM)
258 /* Copy COUNT objects from FROM to TO. The source and destination do
261 # if defined (__GNUC__) && 1 < __GNUC__
262 # define YYCOPY(To, From, Count) \
263 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
265 # define YYCOPY(To, From, Count) \
268 register YYSIZE_T yyi; \
269 for (yyi = 0; yyi < (Count); yyi++) \
270 (To)[yyi] = (From)[yyi]; \
276 /* Relocate STACK from its old location to the new one. The
277 local variables YYSIZE and YYSTACKSIZE give the old and new number of
278 elements in the stack, and YYPTR gives the new location of the
279 stack. Advance YYPTR to a properly aligned location for the next
281 # define YYSTACK_RELOCATE(Stack) \
284 YYSIZE_T yynewbytes; \
285 YYCOPY (&yyptr->Stack, Stack, yysize); \
286 Stack = &yyptr->Stack; \
287 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
288 yyptr += yynewbytes / sizeof (*yyptr); \
294 #if defined (__STDC__) || defined (__cplusplus)
295 typedef signed char yysigned_char;
297 typedef short int yysigned_char;
300 /* YYFINAL -- State number of the termination state. */
302 /* YYLAST -- Last index in YYTABLE. */
305 /* YYNTOKENS -- Number of terminals. */
307 /* YYNNTS -- Number of nonterminals. */
309 /* YYNRULES -- Number of rules. */
311 /* YYNRULES -- Number of states. */
312 #define YYNSTATES 174
314 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
316 #define YYMAXUTOK 297
318 #define YYTRANSLATE(YYX) \
319 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
321 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
322 static const unsigned char yytranslate[] =
324 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
325 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
326 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
327 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
328 46, 48, 47, 2, 45, 2, 2, 2, 2, 2,
329 2, 2, 2, 2, 2, 2, 2, 2, 51, 43,
330 2, 49, 2, 2, 2, 2, 2, 2, 2, 2,
331 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
332 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
333 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
334 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
335 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
336 2, 2, 2, 50, 2, 44, 2, 2, 2, 2,
337 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
338 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
339 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
340 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
341 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
342 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
343 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
344 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
345 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
346 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
347 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
348 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
349 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
350 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
351 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
352 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
353 35, 36, 37, 38, 39, 40, 41, 42
357 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
359 static const unsigned short int yyprhs[] =
361 0, 0, 3, 5, 8, 9, 12, 13, 17, 19,
362 21, 23, 25, 28, 31, 35, 36, 38, 40, 44,
363 49, 50, 52, 54, 57, 59, 61, 63, 65, 67,
364 69, 71, 73, 75, 81, 86, 89, 92, 95, 99,
365 103, 107, 110, 113, 116, 118, 120, 122, 124, 126,
366 128, 130, 132, 134, 136, 138, 141, 142, 144, 146,
367 149, 151, 153, 155, 157, 160, 162, 164, 169, 174,
368 177, 181, 185, 188, 190, 192, 194, 199, 204, 207,
369 211, 215, 218, 220, 224, 225, 227, 229, 233, 236,
370 239, 241, 242, 244, 246, 251, 256, 259, 263, 267,
371 271, 272, 274, 277, 281, 285, 286, 288, 290, 293,
372 297, 300, 301, 303, 305, 309, 312, 315, 317, 320,
373 321, 323, 326, 327, 329
376 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
377 static const yysigned_char yyrhs[] =
379 53, 0, -1, 54, -1, 53, 54, -1, -1, 55,
380 56, -1, -1, 22, 57, 58, -1, 58, -1, 82,
381 -1, 94, -1, 96, -1, 1, 43, -1, 1, 44,
382 -1, 62, 59, 43, -1, -1, 60, -1, 61, -1,
383 60, 45, 61, -1, 72, 95, 93, 83, -1, -1,
384 63, -1, 64, -1, 63, 64, -1, 65, -1, 66,
385 -1, 5, -1, 16, -1, 20, -1, 11, -1, 13,
386 -1, 67, -1, 71, -1, 27, 46, 63, 47, 48,
387 -1, 27, 46, 63, 48, -1, 21, 36, -1, 23,
388 36, -1, 10, 36, -1, 21, 36, 85, -1, 23,
389 36, 85, -1, 10, 36, 31, -1, 10, 31, -1,
390 21, 85, -1, 23, 85, -1, 7, -1, 18, -1,
391 14, -1, 15, -1, 19, -1, 24, -1, 12, -1,
392 9, -1, 25, -1, 6, -1, 40, -1, 47, 69,
393 -1, -1, 70, -1, 71, -1, 70, 71, -1, 8,
394 -1, 26, -1, 30, -1, 17, -1, 68, 72, -1,
395 73, -1, 36, -1, 73, 46, 76, 48, -1, 73,
396 46, 1, 48, -1, 73, 32, -1, 46, 72, 48,
397 -1, 46, 1, 48, -1, 68, 74, -1, 75, -1,
398 36, -1, 40, -1, 75, 46, 76, 48, -1, 75,
399 46, 1, 48, -1, 75, 32, -1, 46, 74, 48,
400 -1, 46, 1, 48, -1, 77, 35, -1, 77, -1,
401 78, 45, 35, -1, -1, 78, -1, 79, -1, 78,
402 45, 79, -1, 63, 80, -1, 68, 80, -1, 81,
403 -1, -1, 36, -1, 40, -1, 81, 46, 76, 48,
404 -1, 81, 46, 1, 48, -1, 81, 32, -1, 46,
405 80, 48, -1, 46, 1, 48, -1, 62, 72, 31,
406 -1, -1, 84, -1, 49, 33, -1, 50, 86, 44,
407 -1, 50, 1, 44, -1, -1, 87, -1, 88, -1,
408 87, 88, -1, 62, 89, 43, -1, 1, 43, -1,
409 -1, 90, -1, 91, -1, 90, 45, 91, -1, 74,
410 93, -1, 36, 92, -1, 92, -1, 51, 33, -1,
411 -1, 30, -1, 29, 43, -1, -1, 29, -1, 28,
415 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
416 static const unsigned short int yyrline[] =
418 0, 102, 102, 103, 107, 107, 113, 113, 115, 116,
419 117, 118, 119, 120, 124, 138, 139, 143, 151, 164,
420 170, 171, 175, 176, 180, 186, 190, 191, 192, 193,
421 194, 198, 199, 200, 201, 205, 207, 209, 213, 220,
422 227, 236, 237, 238, 242, 243, 244, 245, 246, 247,
423 248, 249, 250, 251, 252, 256, 261, 262, 266, 267,
424 271, 271, 271, 272, 280, 281, 285, 294, 296, 298,
425 300, 302, 309, 310, 314, 315, 316, 318, 320, 322,
426 324, 329, 330, 331, 335, 336, 340, 341, 346, 351,
427 353, 357, 358, 366, 370, 372, 374, 376, 378, 383,
428 392, 393, 398, 403, 404, 408, 409, 413, 414, 418,
429 420, 425, 426, 430, 431, 435, 436, 437, 441, 445,
430 446, 450, 454, 455, 459
434 #if YYDEBUG || YYERROR_VERBOSE
435 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
436 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
437 static const char *const yytname[] =
439 "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW",
440 "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW",
441 "ENUM_KEYW", "EXTERN_KEYW", "FLOAT_KEYW", "INLINE_KEYW", "INT_KEYW",
442 "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW", "SHORT_KEYW",
443 "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW", "TYPEDEF_KEYW",
444 "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW", "VOLATILE_KEYW",
445 "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE", "ATTRIBUTE_PHRASE",
446 "BRACE_PHRASE", "BRACKET_PHRASE", "EXPRESSION_PHRASE", "CHAR", "DOTS",
447 "IDENT", "INT", "REAL", "STRING", "TYPE", "OTHER", "FILENAME", "';'",
448 "'}'", "','", "'('", "'*'", "')'", "'='", "'{'", "':'", "$accept",
449 "declaration_seq", "declaration", "@1", "declaration1", "@2",
450 "simple_declaration", "init_declarator_list_opt", "init_declarator_list",
451 "init_declarator", "decl_specifier_seq_opt", "decl_specifier_seq",
452 "decl_specifier", "storage_class_specifier", "type_specifier",
453 "simple_type_specifier", "ptr_operator", "cvar_qualifier_seq_opt",
454 "cvar_qualifier_seq", "cvar_qualifier", "declarator",
455 "direct_declarator", "nested_declarator", "direct_nested_declarator",
456 "parameter_declaration_clause", "parameter_declaration_list_opt",
457 "parameter_declaration_list", "parameter_declaration",
458 "m_abstract_declarator", "direct_m_abstract_declarator",
459 "function_definition", "initializer_opt", "initializer", "class_body",
460 "member_specification_opt", "member_specification", "member_declaration",
461 "member_declarator_list_opt", "member_declarator_list",
462 "member_declarator", "member_bitfield_declarator", "attribute_opt",
463 "asm_definition", "asm_phrase_opt", "export_definition", 0
468 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
470 static const unsigned short int yytoknum[] =
472 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
473 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
474 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
475 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
476 295, 296, 297, 59, 125, 44, 40, 42, 41, 61,
481 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
482 static const unsigned char yyr1[] =
484 0, 52, 53, 53, 55, 54, 57, 56, 56, 56,
485 56, 56, 56, 56, 58, 59, 59, 60, 60, 61,
486 62, 62, 63, 63, 64, 64, 65, 65, 65, 65,
487 65, 66, 66, 66, 66, 66, 66, 66, 66, 66,
488 66, 66, 66, 66, 67, 67, 67, 67, 67, 67,
489 67, 67, 67, 67, 67, 68, 69, 69, 70, 70,
490 71, 71, 71, 71, 72, 72, 73, 73, 73, 73,
491 73, 73, 74, 74, 75, 75, 75, 75, 75, 75,
492 75, 76, 76, 76, 77, 77, 78, 78, 79, 80,
493 80, 81, 81, 81, 81, 81, 81, 81, 81, 82,
494 83, 83, 84, 85, 85, 86, 86, 87, 87, 88,
495 88, 89, 89, 90, 90, 91, 91, 91, 92, 93,
499 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
500 static const unsigned char yyr2[] =
502 0, 2, 1, 2, 0, 2, 0, 3, 1, 1,
503 1, 1, 2, 2, 3, 0, 1, 1, 3, 4,
504 0, 1, 1, 2, 1, 1, 1, 1, 1, 1,
505 1, 1, 1, 5, 4, 2, 2, 2, 3, 3,
506 3, 2, 2, 2, 1, 1, 1, 1, 1, 1,
507 1, 1, 1, 1, 1, 2, 0, 1, 1, 2,
508 1, 1, 1, 1, 2, 1, 1, 4, 4, 2,
509 3, 3, 2, 1, 1, 1, 4, 4, 2, 3,
510 3, 2, 1, 3, 0, 1, 1, 3, 2, 2,
511 1, 0, 1, 1, 4, 4, 2, 3, 3, 3,
512 0, 1, 2, 3, 3, 0, 1, 1, 2, 3,
513 2, 0, 1, 1, 3, 2, 2, 1, 2, 0,
517 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
518 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
519 means the default is an error. */
520 static const unsigned char yydefact[] =
522 4, 4, 2, 0, 1, 3, 0, 26, 53, 44,
523 60, 51, 0, 29, 50, 30, 46, 47, 27, 63,
524 45, 48, 28, 0, 6, 0, 49, 52, 61, 0,
525 0, 0, 62, 54, 5, 8, 15, 21, 22, 24,
526 25, 31, 32, 9, 10, 11, 12, 13, 41, 37,
527 35, 0, 42, 20, 36, 43, 0, 0, 121, 66,
528 0, 56, 0, 16, 17, 0, 122, 65, 23, 40,
529 38, 0, 111, 0, 0, 107, 7, 15, 39, 0,
530 0, 0, 0, 55, 57, 58, 14, 0, 64, 123,
531 99, 119, 69, 0, 110, 104, 74, 75, 0, 0,
532 0, 119, 73, 0, 112, 113, 117, 103, 0, 108,
533 122, 0, 34, 0, 71, 70, 59, 18, 120, 100,
534 0, 91, 0, 82, 85, 86, 116, 0, 74, 0,
535 118, 72, 115, 78, 0, 109, 0, 33, 124, 0,
536 19, 101, 68, 92, 54, 0, 91, 88, 90, 67,
537 81, 0, 80, 79, 0, 0, 114, 102, 0, 93,
538 0, 89, 96, 0, 83, 87, 77, 76, 98, 97,
542 /* YYDEFGOTO[NTERM-NUM]. */
543 static const short int yydefgoto[] =
545 -1, 1, 2, 3, 34, 53, 35, 62, 63, 64,
546 72, 37, 38, 39, 40, 41, 65, 83, 84, 42,
547 110, 67, 101, 102, 122, 123, 124, 125, 147, 148,
548 43, 140, 141, 52, 73, 74, 75, 103, 104, 105,
552 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
554 #define YYPACT_NINF -128
555 static const short int yypact[] =
557 -128, 13, -128, 329, -128, -128, 36, -128, -128, -128,
558 -128, -128, -16, -128, -128, -128, -128, -128, -128, -128,
559 -128, -128, -128, -25, -128, -24, -128, -128, -128, -29,
560 -4, -22, -128, -128, -128, -128, -28, 495, -128, -128,
561 -128, -128, -128, -128, -128, -128, -128, -128, -128, 16,
562 -23, 103, -128, 495, -23, -128, 495, 35, -128, -128,
563 3, 15, 9, 17, -128, -28, -15, -8, -128, -128,
564 -128, 47, 23, 44, 150, -128, -128, -28, -128, 372,
565 33, 48, 49, -128, 15, -128, -128, -28, -128, -128,
566 -128, 64, -128, 197, -128, -128, 50, -128, 21, 65,
567 37, 64, 14, 56, 55, -128, -128, -128, 59, -128,
568 74, 57, -128, 63, -128, -128, -128, -128, -128, 76,
569 83, 416, 84, 99, 90, -128, -128, 88, -128, 89,
570 -128, -128, -128, -128, 241, -128, 23, -128, -128, 105,
571 -128, -128, -128, -128, -128, 8, 46, -128, 26, -128,
572 -128, 459, -128, -128, 92, 93, -128, -128, 94, -128,
573 96, -128, -128, 285, -128, -128, -128, -128, -128, -128,
577 /* YYPGOTO[NTERM-NUM]. */
578 static const short int yypgoto[] =
580 -128, -128, 151, -128, -128, -128, 119, -128, -128, 66,
581 0, -56, -36, -128, -128, -128, -70, -128, -128, -51,
582 -31, -128, -11, -128, -127, -128, -128, 27, -81, -128,
583 -128, -128, -128, -19, -128, -128, 107, -128, -128, 43,
584 86, 82, -128, -128, -128
587 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
588 positive, shift that token. If negative, reduce the rule which
589 number is the opposite. If zero, do what YYDEFACT says.
590 If YYTABLE_NINF, syntax error. */
591 #define YYTABLE_NINF -107
592 static const short int yytable[] =
594 79, 68, 100, 36, 81, 66, 55, 155, 59, 158,
595 85, 50, 54, 4, 89, 48, 90, 56, 60, 61,
596 49, 58, 127, 10, 92, 51, 51, 51, 100, 82,
597 100, 70, 19, 116, 88, 78, 171, 121, 93, 59,
598 -91, 28, 57, 68, 143, 32, 133, 69, 159, 60,
599 61, 146, 86, 77, 145, 61, -91, 128, 162, 96,
600 134, 97, 87, 97, 160, 161, 100, 98, 61, 98,
601 61, 80, 163, 128, 99, 146, 146, 97, 121, 46,
602 47, 113, 143, 98, 61, 68, 159, 129, 107, 131,
603 94, 95, 145, 61, 118, 121, 114, 115, 130, 135,
604 136, 99, 94, 89, 71, 137, 138, 121, 7, 8,
605 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
606 19, 20, 21, 22, 23, 139, 25, 26, 27, 28,
607 29, 142, 149, 32, 150, 151, 152, 153, 157, -20,
608 166, 167, 168, 33, 169, 172, -20, -105, 173, -20,
609 -20, 108, 5, 117, -20, 7, 8, 9, 10, 11,
610 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
611 22, 23, 76, 25, 26, 27, 28, 29, 165, 156,
612 32, 109, 126, 132, 0, 0, -20, 0, 0, 0,
613 33, 0, 0, -20, -106, 0, -20, -20, 120, 0,
614 0, -20, 7, 8, 9, 10, 11, 12, 13, 14,
615 15, 16, 17, 18, 19, 20, 21, 22, 23, 0,
616 25, 26, 27, 28, 29, 0, 0, 32, 0, 0,
617 0, 0, -84, 0, 0, 0, 0, 33, 0, 0,
618 0, 0, 154, 0, 0, -84, 7, 8, 9, 10,
619 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
620 21, 22, 23, 0, 25, 26, 27, 28, 29, 0,
621 0, 32, 0, 0, 0, 0, -84, 0, 0, 0,
622 0, 33, 0, 0, 0, 0, 170, 0, 0, -84,
623 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
624 17, 18, 19, 20, 21, 22, 23, 0, 25, 26,
625 27, 28, 29, 0, 0, 32, 0, 0, 0, 0,
626 -84, 0, 0, 0, 0, 33, 0, 0, 0, 0,
627 6, 0, 0, -84, 7, 8, 9, 10, 11, 12,
628 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
629 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
630 0, 0, 0, 0, 0, -20, 0, 0, 0, 33,
631 0, 0, -20, 0, 0, -20, -20, 7, 8, 9,
632 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
633 20, 21, 22, 23, 0, 25, 26, 27, 28, 29,
634 0, 0, 32, 0, 0, 0, 0, 0, 0, 0,
635 0, 0, 33, 0, 0, 0, 0, 0, 0, 111,
636 112, 7, 8, 9, 10, 11, 12, 13, 14, 15,
637 16, 17, 18, 19, 20, 21, 22, 23, 0, 25,
638 26, 27, 28, 29, 0, 0, 32, 0, 0, 0,
639 0, 0, 143, 0, 0, 0, 144, 0, 0, 0,
640 0, 0, 145, 61, 7, 8, 9, 10, 11, 12,
641 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
642 23, 0, 25, 26, 27, 28, 29, 0, 0, 32,
643 0, 0, 0, 0, 164, 0, 0, 0, 0, 33,
644 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
645 17, 18, 19, 20, 21, 22, 23, 0, 25, 26,
646 27, 28, 29, 0, 0, 32, 0, 0, 0, 0,
650 static const short int yycheck[] =
652 56, 37, 72, 3, 1, 36, 25, 134, 36, 1,
653 61, 36, 36, 0, 29, 31, 31, 46, 46, 47,
654 36, 43, 1, 8, 32, 50, 50, 50, 98, 60,
655 100, 50, 17, 84, 65, 54, 163, 93, 46, 36,
656 32, 26, 46, 79, 36, 30, 32, 31, 40, 46,
657 47, 121, 43, 53, 46, 47, 48, 36, 32, 36,
658 46, 40, 45, 40, 145, 146, 136, 46, 47, 46,
659 47, 36, 46, 36, 51, 145, 146, 40, 134, 43,
660 44, 48, 36, 46, 47, 121, 40, 98, 44, 100,
661 43, 44, 46, 47, 30, 151, 48, 48, 33, 43,
662 45, 51, 43, 29, 1, 48, 43, 163, 5, 6,
663 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
664 17, 18, 19, 20, 21, 49, 23, 24, 25, 26,
665 27, 48, 48, 30, 35, 45, 48, 48, 33, 36,
666 48, 48, 48, 40, 48, 48, 43, 44, 48, 46,
667 47, 1, 1, 87, 51, 5, 6, 7, 8, 9,
668 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
669 20, 21, 53, 23, 24, 25, 26, 27, 151, 136,
670 30, 74, 96, 101, -1, -1, 36, -1, -1, -1,
671 40, -1, -1, 43, 44, -1, 46, 47, 1, -1,
672 -1, 51, 5, 6, 7, 8, 9, 10, 11, 12,
673 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
674 23, 24, 25, 26, 27, -1, -1, 30, -1, -1,
675 -1, -1, 35, -1, -1, -1, -1, 40, -1, -1,
676 -1, -1, 1, -1, -1, 48, 5, 6, 7, 8,
677 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
678 19, 20, 21, -1, 23, 24, 25, 26, 27, -1,
679 -1, 30, -1, -1, -1, -1, 35, -1, -1, -1,
680 -1, 40, -1, -1, -1, -1, 1, -1, -1, 48,
681 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
682 15, 16, 17, 18, 19, 20, 21, -1, 23, 24,
683 25, 26, 27, -1, -1, 30, -1, -1, -1, -1,
684 35, -1, -1, -1, -1, 40, -1, -1, -1, -1,
685 1, -1, -1, 48, 5, 6, 7, 8, 9, 10,
686 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
687 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
688 -1, -1, -1, -1, -1, 36, -1, -1, -1, 40,
689 -1, -1, 43, -1, -1, 46, 47, 5, 6, 7,
690 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
691 18, 19, 20, 21, -1, 23, 24, 25, 26, 27,
692 -1, -1, 30, -1, -1, -1, -1, -1, -1, -1,
693 -1, -1, 40, -1, -1, -1, -1, -1, -1, 47,
694 48, 5, 6, 7, 8, 9, 10, 11, 12, 13,
695 14, 15, 16, 17, 18, 19, 20, 21, -1, 23,
696 24, 25, 26, 27, -1, -1, 30, -1, -1, -1,
697 -1, -1, 36, -1, -1, -1, 40, -1, -1, -1,
698 -1, -1, 46, 47, 5, 6, 7, 8, 9, 10,
699 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
700 21, -1, 23, 24, 25, 26, 27, -1, -1, 30,
701 -1, -1, -1, -1, 35, -1, -1, -1, -1, 40,
702 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
703 15, 16, 17, 18, 19, 20, 21, -1, 23, 24,
704 25, 26, 27, -1, -1, 30, -1, -1, -1, -1,
705 -1, -1, -1, -1, -1, 40
708 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
709 symbol of state STATE-NUM. */
710 static const unsigned char yystos[] =
712 0, 53, 54, 55, 0, 54, 1, 5, 6, 7,
713 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
714 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
715 28, 29, 30, 40, 56, 58, 62, 63, 64, 65,
716 66, 67, 71, 82, 94, 96, 43, 44, 31, 36,
717 36, 50, 85, 57, 36, 85, 46, 46, 43, 36,
718 46, 47, 59, 60, 61, 68, 72, 73, 64, 31,
719 85, 1, 62, 86, 87, 88, 58, 62, 85, 63,
720 36, 1, 72, 69, 70, 71, 43, 45, 72, 29,
721 31, 95, 32, 46, 43, 44, 36, 40, 46, 51,
722 68, 74, 75, 89, 90, 91, 92, 44, 1, 88,
723 72, 47, 48, 48, 48, 48, 71, 61, 30, 93,
724 1, 63, 76, 77, 78, 79, 92, 1, 36, 74,
725 33, 74, 93, 32, 46, 43, 45, 48, 43, 49,
726 83, 84, 48, 36, 40, 46, 68, 80, 81, 48,
727 35, 45, 48, 48, 1, 76, 91, 33, 1, 40,
728 80, 80, 32, 46, 35, 79, 48, 48, 48, 48,
732 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
733 # define YYSIZE_T __SIZE_TYPE__
735 #if ! defined (YYSIZE_T) && defined (size_t)
736 # define YYSIZE_T size_t
738 #if ! defined (YYSIZE_T)
739 # if defined (__STDC__) || defined (__cplusplus)
740 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
741 # define YYSIZE_T size_t
744 #if ! defined (YYSIZE_T)
745 # define YYSIZE_T unsigned int
748 #define yyerrok (yyerrstatus = 0)
749 #define yyclearin (yychar = YYEMPTY)
753 #define YYACCEPT goto yyacceptlab
754 #define YYABORT goto yyabortlab
755 #define YYERROR goto yyerrorlab
758 /* Like YYERROR except do call yyerror. This remains here temporarily
759 to ease the transition to the new meaning of YYERROR, for GCC.
760 Once GCC version 2 has supplanted version 1, this can go. */
762 #define YYFAIL goto yyerrlab
764 #define YYRECOVERING() (!!yyerrstatus)
766 #define YYBACKUP(Token, Value) \
768 if (yychar == YYEMPTY && yylen == 1) \
772 yytoken = YYTRANSLATE (yychar); \
778 yyerror ("syntax error: cannot back up");\
785 #define YYERRCODE 256
788 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
789 If N is 0, then set CURRENT to the empty location which ends
790 the previous symbol: RHS[0] (always defined). */
792 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
793 #ifndef YYLLOC_DEFAULT
794 # define YYLLOC_DEFAULT(Current, Rhs, N) \
798 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
799 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
800 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
801 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
805 (Current).first_line = (Current).last_line = \
806 YYRHSLOC (Rhs, 0).last_line; \
807 (Current).first_column = (Current).last_column = \
808 YYRHSLOC (Rhs, 0).last_column; \
814 /* YY_LOCATION_PRINT -- Print the location on the stream.
815 This macro was not mandated originally: define only if we know
816 we won't break user code: when these are the locations we know. */
818 #ifndef YY_LOCATION_PRINT
819 # if YYLTYPE_IS_TRIVIAL
820 # define YY_LOCATION_PRINT(File, Loc) \
821 fprintf (File, "%d.%d-%d.%d", \
822 (Loc).first_line, (Loc).first_column, \
823 (Loc).last_line, (Loc).last_column)
825 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
830 /* YYLEX -- calling `yylex' with the right arguments. */
833 # define YYLEX yylex (YYLEX_PARAM)
835 # define YYLEX yylex ()
838 /* Enable debugging if requested. */
842 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
843 # define YYFPRINTF fprintf
846 # define YYDPRINTF(Args) \
852 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
856 YYFPRINTF (stderr, "%s ", Title); \
857 yysymprint (stderr, \
859 YYFPRINTF (stderr, "\n"); \
863 /*------------------------------------------------------------------.
864 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
866 `------------------------------------------------------------------*/
868 #if defined (__STDC__) || defined (__cplusplus)
870 yy_stack_print (short int *bottom, short int *top)
873 yy_stack_print (bottom, top)
878 YYFPRINTF (stderr, "Stack now");
879 for (/* Nothing. */; bottom <= top; ++bottom)
880 YYFPRINTF (stderr, " %d", *bottom);
881 YYFPRINTF (stderr, "\n");
884 # define YY_STACK_PRINT(Bottom, Top) \
887 yy_stack_print ((Bottom), (Top)); \
891 /*------------------------------------------------.
892 | Report that the YYRULE is going to be reduced. |
893 `------------------------------------------------*/
895 #if defined (__STDC__) || defined (__cplusplus)
897 yy_reduce_print (int yyrule)
900 yy_reduce_print (yyrule)
905 unsigned int yylno = yyrline[yyrule];
906 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
908 /* Print the symbols being reduced, and their result. */
909 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
910 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
911 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
914 # define YY_REDUCE_PRINT(Rule) \
917 yy_reduce_print (Rule); \
920 /* Nonzero means print parse trace. It is left uninitialized so that
921 multiple parsers can coexist. */
924 # define YYDPRINTF(Args)
925 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
926 # define YY_STACK_PRINT(Bottom, Top)
927 # define YY_REDUCE_PRINT(Rule)
928 #endif /* !YYDEBUG */
931 /* YYINITDEPTH -- initial size of the parser's stacks. */
933 # define YYINITDEPTH 200
936 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
937 if the built-in stack extension method is used).
939 Do not make this value too large; the results are undefined if
940 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
941 evaluated with infinite-precision integer arithmetic. */
944 # define YYMAXDEPTH 10000
952 # if defined (__GLIBC__) && defined (_STRING_H)
953 # define yystrlen strlen
955 /* Return the length of YYSTR. */
957 # if defined (__STDC__) || defined (__cplusplus)
958 yystrlen (const char *yystr)
964 register const char *yys = yystr;
966 while (*yys++ != '\0')
969 return yys - yystr - 1;
975 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
976 # define yystpcpy stpcpy
978 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
981 # if defined (__STDC__) || defined (__cplusplus)
982 yystpcpy (char *yydest, const char *yysrc)
984 yystpcpy (yydest, yysrc)
989 register char *yyd = yydest;
990 register const char *yys = yysrc;
992 while ((*yyd++ = *yys++) != '\0')
1000 #endif /* !YYERROR_VERBOSE */
1005 /*--------------------------------.
1006 | Print this symbol on YYOUTPUT. |
1007 `--------------------------------*/
1009 #if defined (__STDC__) || defined (__cplusplus)
1011 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1014 yysymprint (yyoutput, yytype, yyvaluep)
1020 /* Pacify ``unused variable'' warnings. */
1023 if (yytype < YYNTOKENS)
1024 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1026 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1030 if (yytype < YYNTOKENS)
1031 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1038 YYFPRINTF (yyoutput, ")");
1041 #endif /* ! YYDEBUG */
1042 /*-----------------------------------------------.
1043 | Release the memory associated to this symbol. |
1044 `-----------------------------------------------*/
1046 #if defined (__STDC__) || defined (__cplusplus)
1048 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1051 yydestruct (yymsg, yytype, yyvaluep)
1057 /* Pacify ``unused variable'' warnings. */
1062 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1073 /* Prevent warnings from -Wmissing-prototypes. */
1075 #ifdef YYPARSE_PARAM
1076 # if defined (__STDC__) || defined (__cplusplus)
1077 int yyparse (void *YYPARSE_PARAM);
1081 #else /* ! YYPARSE_PARAM */
1082 #if defined (__STDC__) || defined (__cplusplus)
1087 #endif /* ! YYPARSE_PARAM */
1091 /* The look-ahead symbol. */
1094 /* The semantic value of the look-ahead symbol. */
1097 /* Number of syntax errors so far. */
1106 #ifdef YYPARSE_PARAM
1107 # if defined (__STDC__) || defined (__cplusplus)
1108 int yyparse (void *YYPARSE_PARAM)
1110 int yyparse (YYPARSE_PARAM)
1111 void *YYPARSE_PARAM;
1113 #else /* ! YYPARSE_PARAM */
1114 #if defined (__STDC__) || defined (__cplusplus)
1125 register int yystate;
1128 /* Number of tokens to shift before error messages enabled. */
1130 /* Look-ahead token as an internal (translated) token number. */
1133 /* Three stacks and their tools:
1134 `yyss': related to states,
1135 `yyvs': related to semantic values,
1136 `yyls': related to locations.
1138 Refer to the stacks thru separate pointers, to allow yyoverflow
1139 to reallocate them elsewhere. */
1141 /* The state stack. */
1142 short int yyssa[YYINITDEPTH];
1143 short int *yyss = yyssa;
1144 register short int *yyssp;
1146 /* The semantic value stack. */
1147 YYSTYPE yyvsa[YYINITDEPTH];
1148 YYSTYPE *yyvs = yyvsa;
1149 register YYSTYPE *yyvsp;
1153 #define YYPOPSTACK (yyvsp--, yyssp--)
1155 YYSIZE_T yystacksize = YYINITDEPTH;
1157 /* The variables used to return semantic value and location from the
1162 /* When reducing, the number of symbols on the RHS of the reduced
1166 YYDPRINTF ((stderr, "Starting parse\n"));
1171 yychar = YYEMPTY; /* Cause a token to be read. */
1173 /* Initialize stack pointers.
1174 Waste one element of value and location stack
1175 so that they stay on the same level as the state stack.
1176 The wasted elements are never initialized. */
1186 /*------------------------------------------------------------.
1187 | yynewstate -- Push a new state, which is found in yystate. |
1188 `------------------------------------------------------------*/
1190 /* In all cases, when you get here, the value and location stacks
1191 have just been pushed. so pushing a state here evens the stacks.
1198 if (yyss + yystacksize - 1 <= yyssp)
1200 /* Get the current used size of the three stacks, in elements. */
1201 YYSIZE_T yysize = yyssp - yyss + 1;
1205 /* Give user a chance to reallocate the stack. Use copies of
1206 these so that the &'s don't force the real ones into
1208 YYSTYPE *yyvs1 = yyvs;
1209 short int *yyss1 = yyss;
1212 /* Each stack pointer address is followed by the size of the
1213 data in use in that stack, in bytes. This used to be a
1214 conditional around just the two extra args, but that might
1215 be undefined if yyoverflow is a macro. */
1216 yyoverflow ("parser stack overflow",
1217 &yyss1, yysize * sizeof (*yyssp),
1218 &yyvs1, yysize * sizeof (*yyvsp),
1225 #else /* no yyoverflow */
1226 # ifndef YYSTACK_RELOCATE
1229 /* Extend the stack our own way. */
1230 if (YYMAXDEPTH <= yystacksize)
1233 if (YYMAXDEPTH < yystacksize)
1234 yystacksize = YYMAXDEPTH;
1237 short int *yyss1 = yyss;
1238 union yyalloc *yyptr =
1239 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1242 YYSTACK_RELOCATE (yyss);
1243 YYSTACK_RELOCATE (yyvs);
1245 # undef YYSTACK_RELOCATE
1247 YYSTACK_FREE (yyss1);
1250 #endif /* no yyoverflow */
1252 yyssp = yyss + yysize - 1;
1253 yyvsp = yyvs + yysize - 1;
1256 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1257 (unsigned long int) yystacksize));
1259 if (yyss + yystacksize - 1 <= yyssp)
1263 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1272 /* Do appropriate processing given the current state. */
1273 /* Read a look-ahead token if we need one and don't already have one. */
1276 /* First try to decide what to do without reference to look-ahead token. */
1278 yyn = yypact[yystate];
1279 if (yyn == YYPACT_NINF)
1282 /* Not known => get a look-ahead token if don't already have one. */
1284 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1285 if (yychar == YYEMPTY)
1287 YYDPRINTF ((stderr, "Reading a token: "));
1291 if (yychar <= YYEOF)
1293 yychar = yytoken = YYEOF;
1294 YYDPRINTF ((stderr, "Now at end of input.\n"));
1298 yytoken = YYTRANSLATE (yychar);
1299 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1302 /* If the proper action on seeing token YYTOKEN is to reduce or to
1303 detect an error, take that action. */
1305 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1310 if (yyn == 0 || yyn == YYTABLE_NINF)
1319 /* Shift the look-ahead token. */
1320 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1322 /* Discard the token being shifted unless it is eof. */
1323 if (yychar != YYEOF)
1329 /* Count tokens shifted since error; after three, turn off error
1338 /*-----------------------------------------------------------.
1339 | yydefault -- do the default action for the current state. |
1340 `-----------------------------------------------------------*/
1342 yyn = yydefact[yystate];
1348 /*-----------------------------.
1349 | yyreduce -- Do a reduction. |
1350 `-----------------------------*/
1352 /* yyn is the number of a rule to reduce with. */
1355 /* If YYLEN is nonzero, implement the default value of the action:
1358 Otherwise, the following line sets YYVAL to garbage.
1359 This behavior is undocumented and Bison
1360 users should not rely upon it. Assigning to YYVAL
1361 unconditionally makes the parser a bit smaller, and it avoids a
1362 GCC warning that YYVAL may be used uninitialized. */
1363 yyval = yyvsp[1-yylen];
1366 YY_REDUCE_PRINT (yyn);
1370 #line 107 "scripts/genksyms/parse.y"
1371 { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;}
1375 #line 109 "scripts/genksyms/parse.y"
1376 { free_list(*(yyvsp[0]), NULL); *(yyvsp[0]) = NULL; ;}
1380 #line 113 "scripts/genksyms/parse.y"
1381 { is_typedef = 1; ;}
1385 #line 114 "scripts/genksyms/parse.y"
1386 { (yyval) = (yyvsp[0]); ;}
1390 #line 119 "scripts/genksyms/parse.y"
1391 { (yyval) = (yyvsp[0]); ;}
1395 #line 120 "scripts/genksyms/parse.y"
1396 { (yyval) = (yyvsp[0]); ;}
1400 #line 125 "scripts/genksyms/parse.y"
1401 { if (current_name) {
1402 struct string_list *decl = (*(yyvsp[0]))->next;
1403 (*(yyvsp[0]))->next = NULL;
1404 add_symbol(current_name,
1405 is_typedef ? SYM_TYPEDEF : SYM_NORMAL,
1407 current_name = NULL;
1409 (yyval) = (yyvsp[0]);
1414 #line 138 "scripts/genksyms/parse.y"
1415 { (yyval) = NULL; ;}
1419 #line 144 "scripts/genksyms/parse.y"
1420 { struct string_list *decl = *(yyvsp[0]);
1422 add_symbol(current_name,
1423 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1424 current_name = NULL;
1425 (yyval) = (yyvsp[0]);
1430 #line 152 "scripts/genksyms/parse.y"
1431 { struct string_list *decl = *(yyvsp[0]);
1433 free_list(*(yyvsp[-1]), NULL);
1434 *(yyvsp[-1]) = decl_spec;
1435 add_symbol(current_name,
1436 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1437 current_name = NULL;
1438 (yyval) = (yyvsp[0]);
1443 #line 165 "scripts/genksyms/parse.y"
1444 { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]) ? (yyvsp[-1]) : (yyvsp[-2]) ? (yyvsp[-2]) : (yyvsp[-3]); ;}
1448 #line 170 "scripts/genksyms/parse.y"
1449 { decl_spec = NULL; ;}
1453 #line 175 "scripts/genksyms/parse.y"
1454 { decl_spec = *(yyvsp[0]); ;}
1458 #line 176 "scripts/genksyms/parse.y"
1459 { decl_spec = *(yyvsp[0]); ;}
1463 #line 181 "scripts/genksyms/parse.y"
1464 { /* Version 2 checksumming ignores storage class, as that
1465 is really irrelevant to the linkage. */
1466 remove_node((yyvsp[0]));
1467 (yyval) = (yyvsp[0]);
1472 #line 193 "scripts/genksyms/parse.y"
1473 { is_extern = 1; (yyval) = (yyvsp[0]); ;}
1477 #line 194 "scripts/genksyms/parse.y"
1478 { is_extern = 0; (yyval) = (yyvsp[0]); ;}
1482 #line 206 "scripts/genksyms/parse.y"
1483 { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_STRUCT; (yyval) = (yyvsp[0]); ;}
1487 #line 208 "scripts/genksyms/parse.y"
1488 { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_UNION; (yyval) = (yyvsp[0]); ;}
1492 #line 210 "scripts/genksyms/parse.y"
1493 { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_ENUM; (yyval) = (yyvsp[0]); ;}
1497 #line 214 "scripts/genksyms/parse.y"
1498 { struct string_list *s = *(yyvsp[0]), *i = *(yyvsp[-1]), *r;
1499 r = copy_node(i); r->tag = SYM_STRUCT;
1500 r->next = (*(yyvsp[-2]))->next; *(yyvsp[0]) = r; (*(yyvsp[-2]))->next = NULL;
1501 add_symbol(i->string, SYM_STRUCT, s, is_extern);
1502 (yyval) = (yyvsp[0]);
1507 #line 221 "scripts/genksyms/parse.y"
1508 { struct string_list *s = *(yyvsp[0]), *i = *(yyvsp[-1]), *r;
1509 r = copy_node(i); r->tag = SYM_UNION;
1510 r->next = (*(yyvsp[-2]))->next; *(yyvsp[0]) = r; (*(yyvsp[-2]))->next = NULL;
1511 add_symbol(i->string, SYM_UNION, s, is_extern);
1512 (yyval) = (yyvsp[0]);
1517 #line 228 "scripts/genksyms/parse.y"
1518 { struct string_list *s = *(yyvsp[0]), *i = *(yyvsp[-1]), *r;
1519 r = copy_node(i); r->tag = SYM_ENUM;
1520 r->next = (*(yyvsp[-2]))->next; *(yyvsp[0]) = r; (*(yyvsp[-2]))->next = NULL;
1521 add_symbol(i->string, SYM_ENUM, s, is_extern);
1522 (yyval) = (yyvsp[0]);
1527 #line 236 "scripts/genksyms/parse.y"
1528 { (yyval) = (yyvsp[0]); ;}
1532 #line 237 "scripts/genksyms/parse.y"
1533 { (yyval) = (yyvsp[0]); ;}
1537 #line 238 "scripts/genksyms/parse.y"
1538 { (yyval) = (yyvsp[0]); ;}
1542 #line 252 "scripts/genksyms/parse.y"
1543 { (*(yyvsp[0]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[0]); ;}
1547 #line 257 "scripts/genksyms/parse.y"
1548 { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;}
1552 #line 261 "scripts/genksyms/parse.y"
1553 { (yyval) = NULL; ;}
1557 #line 267 "scripts/genksyms/parse.y"
1558 { (yyval) = (yyvsp[0]); ;}
1562 #line 273 "scripts/genksyms/parse.y"
1563 { /* restrict has no effect in prototypes so ignore it */
1564 remove_node((yyvsp[0]));
1565 (yyval) = (yyvsp[0]);
1570 #line 280 "scripts/genksyms/parse.y"
1571 { (yyval) = (yyvsp[0]); ;}
1575 #line 286 "scripts/genksyms/parse.y"
1576 { if (current_name != NULL) {
1577 error_with_pos("unexpected second declaration name");
1580 current_name = (*(yyvsp[0]))->string;
1581 (yyval) = (yyvsp[0]);
1587 #line 295 "scripts/genksyms/parse.y"
1588 { (yyval) = (yyvsp[0]); ;}
1592 #line 297 "scripts/genksyms/parse.y"
1593 { (yyval) = (yyvsp[0]); ;}
1597 #line 299 "scripts/genksyms/parse.y"
1598 { (yyval) = (yyvsp[0]); ;}
1602 #line 301 "scripts/genksyms/parse.y"
1603 { (yyval) = (yyvsp[0]); ;}
1607 #line 303 "scripts/genksyms/parse.y"
1608 { (yyval) = (yyvsp[0]); ;}
1612 #line 309 "scripts/genksyms/parse.y"
1613 { (yyval) = (yyvsp[0]); ;}
1617 #line 317 "scripts/genksyms/parse.y"
1618 { (yyval) = (yyvsp[0]); ;}
1622 #line 319 "scripts/genksyms/parse.y"
1623 { (yyval) = (yyvsp[0]); ;}
1627 #line 321 "scripts/genksyms/parse.y"
1628 { (yyval) = (yyvsp[0]); ;}
1632 #line 323 "scripts/genksyms/parse.y"
1633 { (yyval) = (yyvsp[0]); ;}
1637 #line 325 "scripts/genksyms/parse.y"
1638 { (yyval) = (yyvsp[0]); ;}
1642 #line 329 "scripts/genksyms/parse.y"
1643 { (yyval) = (yyvsp[0]); ;}
1647 #line 331 "scripts/genksyms/parse.y"
1648 { (yyval) = (yyvsp[0]); ;}
1652 #line 335 "scripts/genksyms/parse.y"
1653 { (yyval) = NULL; ;}
1657 #line 342 "scripts/genksyms/parse.y"
1658 { (yyval) = (yyvsp[0]); ;}
1662 #line 347 "scripts/genksyms/parse.y"
1663 { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;}
1667 #line 352 "scripts/genksyms/parse.y"
1668 { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;}
1672 #line 357 "scripts/genksyms/parse.y"
1673 { (yyval) = NULL; ;}
1677 #line 359 "scripts/genksyms/parse.y"
1678 { /* For version 2 checksums, we don't want to remember
1679 private parameter names. */
1680 remove_node((yyvsp[0]));
1681 (yyval) = (yyvsp[0]);
1686 #line 367 "scripts/genksyms/parse.y"
1687 { remove_node((yyvsp[0]));
1688 (yyval) = (yyvsp[0]);
1693 #line 371 "scripts/genksyms/parse.y"
1694 { (yyval) = (yyvsp[0]); ;}
1698 #line 373 "scripts/genksyms/parse.y"
1699 { (yyval) = (yyvsp[0]); ;}
1703 #line 375 "scripts/genksyms/parse.y"
1704 { (yyval) = (yyvsp[0]); ;}
1708 #line 377 "scripts/genksyms/parse.y"
1709 { (yyval) = (yyvsp[0]); ;}
1713 #line 379 "scripts/genksyms/parse.y"
1714 { (yyval) = (yyvsp[0]); ;}
1718 #line 384 "scripts/genksyms/parse.y"
1719 { struct string_list *decl = *(yyvsp[-1]);
1720 *(yyvsp[-1]) = NULL;
1721 add_symbol(current_name, SYM_NORMAL, decl, is_extern);
1722 (yyval) = (yyvsp[0]);
1727 #line 392 "scripts/genksyms/parse.y"
1728 { (yyval) = NULL; ;}
1732 #line 399 "scripts/genksyms/parse.y"
1733 { remove_list((yyvsp[0]), &(*(yyvsp[-1]))->next); (yyval) = (yyvsp[0]); ;}
1737 #line 403 "scripts/genksyms/parse.y"
1738 { (yyval) = (yyvsp[0]); ;}
1742 #line 404 "scripts/genksyms/parse.y"
1743 { (yyval) = (yyvsp[0]); ;}
1747 #line 408 "scripts/genksyms/parse.y"
1748 { (yyval) = NULL; ;}
1752 #line 414 "scripts/genksyms/parse.y"
1753 { (yyval) = (yyvsp[0]); ;}
1757 #line 419 "scripts/genksyms/parse.y"
1758 { (yyval) = (yyvsp[0]); ;}
1762 #line 421 "scripts/genksyms/parse.y"
1763 { (yyval) = (yyvsp[0]); ;}
1767 #line 425 "scripts/genksyms/parse.y"
1768 { (yyval) = NULL; ;}
1772 #line 431 "scripts/genksyms/parse.y"
1773 { (yyval) = (yyvsp[0]); ;}
1777 #line 435 "scripts/genksyms/parse.y"
1778 { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;}
1782 #line 436 "scripts/genksyms/parse.y"
1783 { (yyval) = (yyvsp[0]); ;}
1787 #line 441 "scripts/genksyms/parse.y"
1788 { (yyval) = (yyvsp[0]); ;}
1792 #line 445 "scripts/genksyms/parse.y"
1793 { (yyval) = NULL; ;}
1797 #line 450 "scripts/genksyms/parse.y"
1798 { (yyval) = (yyvsp[0]); ;}
1802 #line 454 "scripts/genksyms/parse.y"
1803 { (yyval) = NULL; ;}
1807 #line 460 "scripts/genksyms/parse.y"
1808 { export_symbol((*(yyvsp[-2]))->string); (yyval) = (yyvsp[0]); ;}
1814 /* Line 1037 of yacc.c. */
1815 #line 1816 "scripts/genksyms/parse.c"
1821 YY_STACK_PRINT (yyss, yyssp);
1826 /* Now `shift' the result of the reduction. Determine what state
1827 that goes to, based on the state we popped back to and the rule
1828 number reduced by. */
1832 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1833 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1834 yystate = yytable[yystate];
1836 yystate = yydefgoto[yyn - YYNTOKENS];
1841 /*------------------------------------.
1842 | yyerrlab -- here on detecting error |
1843 `------------------------------------*/
1845 /* If not already recovering from an error, report this error. */
1850 yyn = yypact[yystate];
1852 if (YYPACT_NINF < yyn && yyn < YYLAST)
1854 YYSIZE_T yysize = 0;
1855 int yytype = YYTRANSLATE (yychar);
1856 const char* yyprefix;
1860 /* Start YYX at -YYN if negative to avoid negative indexes in
1862 int yyxbegin = yyn < 0 ? -yyn : 0;
1864 /* Stay within bounds of both yycheck and yytname. */
1865 int yychecklim = YYLAST - yyn;
1866 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1869 yyprefix = ", expecting ";
1870 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1871 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1873 yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
1881 yysize += (sizeof ("syntax error, unexpected ")
1882 + yystrlen (yytname[yytype]));
1883 yymsg = (char *) YYSTACK_ALLOC (yysize);
1886 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1887 yyp = yystpcpy (yyp, yytname[yytype]);
1891 yyprefix = ", expecting ";
1892 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1893 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1895 yyp = yystpcpy (yyp, yyprefix);
1896 yyp = yystpcpy (yyp, yytname[yyx]);
1901 YYSTACK_FREE (yymsg);
1904 yyerror ("syntax error; also virtual memory exhausted");
1907 #endif /* YYERROR_VERBOSE */
1908 yyerror ("syntax error");
1913 if (yyerrstatus == 3)
1915 /* If just tried and failed to reuse look-ahead token after an
1916 error, discard it. */
1918 if (yychar <= YYEOF)
1920 /* If at end of input, pop the error token,
1921 then the rest of the stack, then return failure. */
1922 if (yychar == YYEOF)
1929 yydestruct ("Error: popping",
1930 yystos[*yyssp], yyvsp);
1935 yydestruct ("Error: discarding", yytoken, &yylval);
1940 /* Else will try to reuse look-ahead token after shifting the error
1945 /*---------------------------------------------------.
1946 | yyerrorlab -- error raised explicitly by YYERROR. |
1947 `---------------------------------------------------*/
1951 /* Pacify GCC when the user code never invokes YYERROR and the label
1952 yyerrorlab therefore never appears in user code. */
1963 /*-------------------------------------------------------------.
1964 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1965 `-------------------------------------------------------------*/
1967 yyerrstatus = 3; /* Each real token shifted decrements this. */
1971 yyn = yypact[yystate];
1972 if (yyn != YYPACT_NINF)
1975 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1983 /* Pop the current state because it cannot handle the error token. */
1988 yydestruct ("Error: popping", yystos[yystate], yyvsp);
1991 YY_STACK_PRINT (yyss, yyssp);
2000 /* Shift the error token. */
2001 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2007 /*-------------------------------------.
2008 | yyacceptlab -- YYACCEPT comes here. |
2009 `-------------------------------------*/
2014 /*-----------------------------------.
2015 | yyabortlab -- YYABORT comes here. |
2016 `-----------------------------------*/
2018 yydestruct ("Error: discarding lookahead",
2025 /*----------------------------------------------.
2026 | yyoverflowlab -- parser overflow comes here. |
2027 `----------------------------------------------*/
2029 yyerror ("parser stack overflow");
2037 YYSTACK_FREE (yyss);
2043 #line 464 "scripts/genksyms/parse.y"
2047 yyerror(const char *e)
2049 error_with_pos("%s", e);