/* A Bison parser, made by GNU Bison 2.0. */ /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* Written by Richard Stallman by simplifying the original so called ``semantic'' parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */#define YYBISON 1 /* Skeleton name. */#define YYSKELETON_NAME "yacc.c" /* Pure parsers. */#define YYPURE 0 /* Using locations. */#define YYLSP_NEEDED 0 /* Tokens. */#ifndef YYTOKENTYPE# define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { ASM_KEYW = 258, ATTRIBUTE_KEYW = 259, AUTO_KEYW = 260, BOOL_KEYW = 261, CHAR_KEYW = 262, CONST_KEYW = 263, DOUBLE_KEYW = 264, ENUM_KEYW = 265, EXTERN_KEYW = 266, FLOAT_KEYW = 267, INLINE_KEYW = 268, INT_KEYW = 269, LONG_KEYW = 270, REGISTER_KEYW = 271, RESTRICT_KEYW = 272, SHORT_KEYW = 273, SIGNED_KEYW = 274, STATIC_KEYW = 275, STRUCT_KEYW = 276, TYPEDEF_KEYW = 277, UNION_KEYW = 278, UNSIGNED_KEYW = 279, VOID_KEYW = 280, VOLATILE_KEYW = 281, TYPEOF_KEYW = 282, EXPORT_SYMBOL_KEYW = 283, ASM_PHRASE = 284, ATTRIBUTE_PHRASE = 285, BRACE_PHRASE = 286, BRACKET_PHRASE = 287, EXPRESSION_PHRASE = 288, CHAR = 289, DOTS = 290, IDENT = 291, INT = 292, REAL = 293, STRING = 294, TYPE = 295, OTHER = 296, FILENAME = 297 };#endif#define ASM_KEYW 258#define ATTRIBUTE_KEYW 259#define AUTO_KEYW 260#define BOOL_KEYW 261#define CHAR_KEYW 262#define CONST_KEYW 263#define DOUBLE_KEYW 264#define ENUM_KEYW 265#define EXTERN_KEYW 266#define FLOAT_KEYW 267#define INLINE_KEYW 268#define INT_KEYW 269#define LONG_KEYW 270#define REGISTER_KEYW 271#define RESTRICT_KEYW 272#define SHORT_KEYW 273#define SIGNED_KEYW 274#define STATIC_KEYW 275#define STRUCT_KEYW 276#define TYPEDEF_KEYW 277#define UNION_KEYW 278#define UNSIGNED_KEYW 279#define VOID_KEYW 280#define VOLATILE_KEYW 281#define TYPEOF_KEYW 282#define EXPORT_SYMBOL_KEYW 283#define ASM_PHRASE 284#define ATTRIBUTE_PHRASE 285#define BRACE_PHRASE 286#define BRACKET_PHRASE 287#define EXPRESSION_PHRASE 288#define CHAR 289#define DOTS 290#define IDENT 291#define INT 292#define REAL 293#define STRING 294#define TYPE 295#define OTHER 296#define FILENAME 297 /* Copy the first part of user declarations. */#line 24 "scripts/genksyms/parse.y" #include <assert.h>#include <malloc.h>#include "genksyms.h" static int is_typedef;static int is_extern;static char *current_name;static struct string_list *decl_spec; static void yyerror(const char *); static inline voidremove_node(struct string_list **p){ struct string_list *node = *p; *p = node->next; free_node(node);} static inline voidremove_list(struct string_list **pb, struct string_list **pe){ struct string_list *b = *pb, *e = *pe; *pb = e; free_list(b, e);} /* Enabling traces. */#ifndef YYDEBUG# define YYDEBUG 1#endif /* Enabling verbose error messages. */#ifdef YYERROR_VERBOSE# undef YYERROR_VERBOSE# define YYERROR_VERBOSE 1#else# define YYERROR_VERBOSE 0#endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)typedef int YYSTYPE;# define yystype YYSTYPE /* obsolescent; will be withdrawn */# define YYSTYPE_IS_DECLARED 1# define YYSTYPE_IS_TRIVIAL 1#endif /* Copy the second part of user declarations. */ /* Line 213 of yacc.c. */#line 202 "scripts/genksyms/parse.c" #if ! defined (yyoverflow) || YYERROR_VERBOSE # ifndef YYFREE# define YYFREE free# endif# ifndef YYMALLOC# define YYMALLOC malloc# endif /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA# if YYSTACK_USE_ALLOCA# ifdef __GNUC__# define YYSTACK_ALLOC __builtin_alloca# else# define YYSTACK_ALLOC alloca# endif# endif# endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)# else# if defined (__STDC__) || defined (__cplusplus)# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */# define YYSIZE_T size_t# endif# define YYSTACK_ALLOC YYMALLOC# define YYSTACK_FREE YYFREE# endif#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */union yyalloc{ short int yyss; YYSTYPE yyvs; }; /* The size of the maximum gap between one aligned stack and the next. */# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */# define YYSTACK_BYTES(N) \ ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */# ifndef YYCOPY# if defined (__GNUC__) && 1 < __GNUC__# define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))# else# define YYCOPY(To, From, Count) \ do \ { \ register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (0)# endif# endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */# define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if defined (__STDC__) || defined (__cplusplus) typedef signed char yysigned_char;#else typedef short int yysigned_char;#endif /* YYFINAL -- State number of the termination state. */#define YYFINAL 4/* YYLAST -- Last index in YYTABLE. */#define YYLAST 535 /* YYNTOKENS -- Number of terminals. */#define YYNTOKENS 52/* YYNNTS -- Number of nonterminals. */#define YYNNTS 45/* YYNRULES -- Number of rules. */#define YYNRULES 124/* YYNRULES -- Number of states. */#define YYNSTATES 174 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */#define YYUNDEFTOK 2#define YYMAXUTOK 297 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */static const unsigned char yytranslate[] ={ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 46, 48, 47, 2, 45, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 51, 43, 2, 49, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 50, 2, 44, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42}; #if YYDEBUG/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */static const unsigned short int yyprhs[] ={ 0, 0, 3, 5, 8, 9, 12, 13, 17, 19, 21, 23, 25, 28, 31, 35, 36, 38, 40, 44, 49, 50, 52, 54, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 81, 86, 89, 92, 95, 99, 103, 107, 110, 113, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 141, 142, 144, 146, 149, 151, 153, 155, 157, 160, 162, 164, 169, 174, 177, 181, 185, 188, 190, 192, 194, 199, 204, 207, 211, 215, 218, 220, 224, 225, 227, 229, 233, 236, 239, 241, 242, 244, 246, 251, 256, 259, 263, 267, 271, 272, 274, 277, 281, 285, 286, 288, 290, 293, 297, 300, 301, 303, 305, 309, 312, 315, 317, 320, 321, 323, 326, 327, 329}; /* YYRHS -- A `-1'-separated list of the rules' RHS. */static const yysigned_char yyrhs[] ={ 53, 0, -1, 54, -1, 53, 54, -1, -1, 55, 56, -1, -1, 22, 57, 58, -1, 58, -1, 82, -1, 94, -1, 96, -1, 1, 43, -1, 1, 44, -1, 62, 59, 43, -1, -1, 60, -1, 61, -1, 60, 45, 61, -1, 72, 95, 93, 83, -1, -1, 63, -1, 64, -1, 63, 64, -1, 65, -1, 66, -1, 5, -1, 16, -1, 20, -1, 11, -1, 13, -1, 67, -1, 71, -1, 27, 46, 63, 47, 48, -1, 27, 46, 63, 48, -1, 21, 36, -1, 23, 36, -1, 10, 36, -1, 21, 36, 85, -1, 23, 36, 85, -1, 10, 36, 31, -1, 10, 31, -1, 21, 85, -1, 23, 85, -1, 7, -1, 18, -1, 14, -1, 15, -1, 19, -1, 24, -1, 12, -1, 9, -1, 25, -1, 6, -1, 40, -1, 47, 69, -1, -1, 70, -1, 71, -1, 70, 71, -1, 8, -1, 26, -1, 30, -1, 17, -1, 68, 72, -1, 73, -1, 36, -1, 73, 46, 76, 48, -1, 73, 46, 1, 48, -1, 73, 32, -1, 46, 72, 48, -1, 46, 1, 48, -1, 68, 74, -1, 75, -1, 36, -1, 40, -1, 75, 46, 76, 48, -1, 75, 46, 1, 48, -1, 75, 32, -1, 46, 74, 48, -1, 46, 1, 48, -1, 77, 35, -1, 77, -1, 78, 45, 35, -1, -1, 78, -1, 79, -1, 78, 45, 79, -1, 63, 80, -1, 68, 80, -1, 81, -1, -1, 36, -1, 40, -1, 81, 46, 76, 48, -1, 81, 46, 1, 48, -1, 81, 32, -1, 46, 80, 48, -1, 46, 1, 48, -1, 62, 72, 31, -1, -1, 84, -1, 49, 33, -1, 50, 86, 44, -1, 50, 1, 44, -1, -1, 87, -1, 88, -1, 87, 88, -1, 62, 89, 43, -1, 1, 43, -1, -1, 90, -1, 91, -1, 90, 45, 91, -1, 74, 93, -1, 36, 92, -1, 92, -1, 51, 33, -1, -1, 30, -1, 29, 43, -1, -1, 29, -1, 28, 46, 36, 48, 43, -1}; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */static const unsigned short int yyrline[] ={ 0, 102, 102, 103, 107, 107, 113, 113, 115, 116, 117, 118, 119, 120, 124, 138, 139, 143, 151, 164, 170, 171, 175, 176, 180, 186, 190, 191, 192, 193, 194, 198, 199, 200, 201, 205, 207, 209, 213, 220, 227, 236, 237, 238, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 256, 261, 262, 266, 267, 271, 271, 271, 272, 280, 281, 285, 294, 296, 298, 300, 302, 309, 310, 314, 315, 316, 318, 320, 322, 324, 329, 330, 331, 335, 336, 340, 341, 346, 351, 353, 357, 358, 366, 370, 372, 374, 376, 378, 383, 392, 393, 398, 403, 404, 408, 409, 413, 414, 418, 420, 425, 426, 430, 431, 435, 436, 437, 441, 445, 446, 450, 454, 455, 459};#endif #if YYDEBUG || YYERROR_VERBOSE/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */static const char *const yytname[] ={ "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW", "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW", "ENUM_KEYW", "EXTERN_KEYW", "FLOAT_KEYW", "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW", "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW", "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW", "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE", "ATTRIBUTE_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE", "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING", "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "'*'", "')'", "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "@1", "declaration1", "@2", "simple_declaration", "init_declarator_list_opt", "init_declarator_list", "init_declarator", "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier", "storage_class_specifier", "type_specifier", "simple_type_specifier", "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq", "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator", "direct_nested_declarator", "parameter_declaration_clause", "parameter_declaration_list_opt", "parameter_declaration_list", "parameter_declaration", "m_abstract_declarator", "direct_m_abstract_declarator", "function_definition", "initializer_opt", "initializer", "class_body", "member_specification_opt", "member_specification", "member_declaration", "member_declarator_list_opt", "member_declarator_list", "member_declarator", "member_bitfield_declarator", "attribute_opt", "asm_definition", "asm_phrase_opt", "export_definition", 0};#endif # ifdef YYPRINT/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */static const unsigned short int yytoknum[] ={ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 59, 125, 44, 40, 42, 41, 61, 123, 58};# endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */static const unsigned char yyr1[] ={ 0, 52, 53, 53, 55, 54, 57, 56, 56, 56, 56, 56, 56, 56, 58, 59, 59, 60, 60, 61, 62, 62, 63, 63, 64, 64, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68, 69, 69, 70, 70, 71, 71, 71, 71, 72, 72, 73, 73, 73, 73, 73, 73, 74, 74, 75, 75, 75, 75, 75, 75, 75, 76, 76, 76, 77, 77, 78, 78, 79, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 82, 83, 83, 84, 85, 85, 86, 86, 87, 87, 88, 88, 89, 89, 90, 90, 91, 91, 91, 92, 93, 93, 94, 95, 95, 96}; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */static const unsigned char yyr2[] =Lines 1–500 of 2051. Load more
/* A Bison parser, made by GNU Bison 2.0. */ /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* Written by Richard Stallman by simplifying the original so called ``semantic'' parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Using locations. */ #define YYLSP_NEEDED 0 /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { ASM_KEYW = 258, ATTRIBUTE_KEYW = 259, AUTO_KEYW = 260, BOOL_KEYW = 261, CHAR_KEYW = 262, CONST_KEYW = 263, DOUBLE_KEYW = 264, ENUM_KEYW = 265, EXTERN_KEYW = 266, FLOAT_KEYW = 267, INLINE_KEYW = 268, INT_KEYW = 269, LONG_KEYW = 270, REGISTER_KEYW = 271, RESTRICT_KEYW = 272, SHORT_KEYW = 273, SIGNED_KEYW = 274, STATIC_KEYW = 275, STRUCT_KEYW = 276, TYPEDEF_KEYW = 277, UNION_KEYW = 278, UNSIGNED_KEYW = 279, VOID_KEYW = 280, VOLATILE_KEYW = 281, TYPEOF_KEYW = 282, EXPORT_SYMBOL_KEYW = 283, ASM_PHRASE = 284, ATTRIBUTE_PHRASE = 285, BRACE_PHRASE = 286, BRACKET_PHRASE = 287, EXPRESSION_PHRASE = 288, CHAR = 289, DOTS = 290, IDENT = 291, INT = 292, REAL = 293, STRING = 294, TYPE = 295, OTHER = 296, FILENAME = 297 }; #endif #define ASM_KEYW 258 #define ATTRIBUTE_KEYW 259 #define AUTO_KEYW 260 #define BOOL_KEYW 261 #define CHAR_KEYW 262 #define CONST_KEYW 263 #define DOUBLE_KEYW 264 #define ENUM_KEYW 265 #define EXTERN_KEYW 266 #define FLOAT_KEYW 267 #define INLINE_KEYW 268 #define INT_KEYW 269 #define LONG_KEYW 270 #define REGISTER_KEYW 271 #define RESTRICT_KEYW 272 #define SHORT_KEYW 273 #define SIGNED_KEYW 274 #define STATIC_KEYW 275 #define STRUCT_KEYW 276 #define TYPEDEF_KEYW 277 #define UNION_KEYW 278 #define UNSIGNED_KEYW 279 #define VOID_KEYW 280 #define VOLATILE_KEYW 281 #define TYPEOF_KEYW 282 #define EXPORT_SYMBOL_KEYW 283 #define ASM_PHRASE 284 #define ATTRIBUTE_PHRASE 285 #define BRACE_PHRASE 286 #define BRACKET_PHRASE 287 #define EXPRESSION_PHRASE 288 #define CHAR 289 #define DOTS 290 #define IDENT 291 #define INT 292 #define REAL 293 #define STRING 294 #define TYPE 295 #define OTHER 296 #define FILENAME 297 /* Copy the first part of user declarations. */ #line 24 "scripts/genksyms/parse.y" #include <assert.h> #include <malloc.h> #include "genksyms.h" static int is_typedef; static int is_extern; static char *current_name; static struct string_list *decl_spec; static void yyerror(const char *); static inline void remove_node(struct string_list **p) { struct string_list *node = *p; *p = node->next; free_node(node); } static inline void remove_list(struct string_list **pb, struct string_list **pe) { struct string_list *b = *pb, *e = *pe; *pb = e; free_list(b, e); } /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 213 of yacc.c. */ #line 202 "scripts/genksyms/parse.c" #if ! defined (yyoverflow) || YYERROR_VERBOSE # ifndef YYFREE # define YYFREE free # endif # ifndef YYMALLOC # define YYMALLOC malloc # endif /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # else # define YYSTACK_ALLOC alloca # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else # if defined (__STDC__) || defined (__cplusplus) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # endif #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { short int yyss; YYSTYPE yyvs; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined (__GNUC__) && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (0) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if defined (__STDC__) || defined (__cplusplus) typedef signed char yysigned_char; #else typedef short int yysigned_char; #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 535 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 52 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 45 /* YYNRULES -- Number of rules. */ #define YYNRULES 124 /* YYNRULES -- Number of states. */ #define YYNSTATES 174 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 297 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const unsigned char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 46, 48, 47, 2, 45, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 51, 43, 2, 49, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 50, 2, 44, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const unsigned short int yyprhs[] = { 0, 0, 3, 5, 8, 9, 12, 13, 17, 19, 21, 23, 25, 28, 31, 35, 36, 38, 40, 44, 49, 50, 52, 54, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 81, 86, 89, 92, 95, 99, 103, 107, 110, 113, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 141, 142, 144, 146, 149, 151, 153, 155, 157, 160, 162, 164, 169, 174, 177, 181, 185, 188, 190, 192, 194, 199, 204, 207, 211, 215, 218, 220, 224, 225, 227, 229, 233, 236, 239, 241, 242, 244, 246, 251, 256, 259, 263, 267, 271, 272, 274, 277, 281, 285, 286, 288, 290, 293, 297, 300, 301, 303, 305, 309, 312, 315, 317, 320, 321, 323, 326, 327, 329 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yysigned_char yyrhs[] = { 53, 0, -1, 54, -1, 53, 54, -1, -1, 55, 56, -1, -1, 22, 57, 58, -1, 58, -1, 82, -1, 94, -1, 96, -1, 1, 43, -1, 1, 44, -1, 62, 59, 43, -1, -1, 60, -1, 61, -1, 60, 45, 61, -1, 72, 95, 93, 83, -1, -1, 63, -1, 64, -1, 63, 64, -1, 65, -1, 66, -1, 5, -1, 16, -1, 20, -1, 11, -1, 13, -1, 67, -1, 71, -1, 27, 46, 63, 47, 48, -1, 27, 46, 63, 48, -1, 21, 36, -1, 23, 36, -1, 10, 36, -1, 21, 36, 85, -1, 23, 36, 85, -1, 10, 36, 31, -1, 10, 31, -1, 21, 85, -1, 23, 85, -1, 7, -1, 18, -1, 14, -1, 15, -1, 19, -1, 24, -1, 12, -1, 9, -1, 25, -1, 6, -1, 40, -1, 47, 69, -1, -1, 70, -1, 71, -1, 70, 71, -1, 8, -1, 26, -1, 30, -1, 17, -1, 68, 72, -1, 73, -1, 36, -1, 73, 46, 76, 48, -1, 73, 46, 1, 48, -1, 73, 32, -1, 46, 72, 48, -1, 46, 1, 48, -1, 68, 74, -1, 75, -1, 36, -1, 40, -1, 75, 46, 76, 48, -1, 75, 46, 1, 48, -1, 75, 32, -1, 46, 74, 48, -1, 46, 1, 48, -1, 77, 35, -1, 77, -1, 78, 45, 35, -1, -1, 78, -1, 79, -1, 78, 45, 79, -1, 63, 80, -1, 68, 80, -1, 81, -1, -1, 36, -1, 40, -1, 81, 46, 76, 48, -1, 81, 46, 1, 48, -1, 81, 32, -1, 46, 80, 48, -1, 46, 1, 48, -1, 62, 72, 31, -1, -1, 84, -1, 49, 33, -1, 50, 86, 44, -1, 50, 1, 44, -1, -1, 87, -1, 88, -1, 87, 88, -1, 62, 89, 43, -1, 1, 43, -1, -1, 90, -1, 91, -1, 90, 45, 91, -1, 74, 93, -1, 36, 92, -1, 92, -1, 51, 33, -1, -1, 30, -1, 29, 43, -1, -1, 29, -1, 28, 46, 36, 48, 43, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { 0, 102, 102, 103, 107, 107, 113, 113, 115, 116, 117, 118, 119, 120, 124, 138, 139, 143, 151, 164, 170, 171, 175, 176, 180, 186, 190, 191, 192, 193, 194, 198, 199, 200, 201, 205, 207, 209, 213, 220, 227, 236, 237, 238, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 256, 261, 262, 266, 267, 271, 271, 271, 272, 280, 281, 285, 294, 296, 298, 300, 302, 309, 310, 314, 315, 316, 318, 320, 322, 324, 329, 330, 331, 335, 336, 340, 341, 346, 351, 353, 357, 358, 366, 370, 372, 374, 376, 378, 383, 392, 393, 398, 403, 404, 408, 409, 413, 414, 418, 420, 425, 426, 430, 431, 435, 436, 437, 441, 445, 446, 450, 454, 455, 459 }; #endif #if YYDEBUG || YYERROR_VERBOSE /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW", "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW", "ENUM_KEYW", "EXTERN_KEYW", "FLOAT_KEYW", "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW", "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW", "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW", "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE", "ATTRIBUTE_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE", "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING", "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "'*'", "')'", "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "@1", "declaration1", "@2", "simple_declaration", "init_declarator_list_opt", "init_declarator_list", "init_declarator", "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier", "storage_class_specifier", "type_specifier", "simple_type_specifier", "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq", "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator", "direct_nested_declarator", "parameter_declaration_clause", "parameter_declaration_list_opt", "parameter_declaration_list", "parameter_declaration", "m_abstract_declarator", "direct_m_abstract_declarator", "function_definition", "initializer_opt", "initializer", "class_body", "member_specification_opt", "member_specification", "member_declaration", "member_declarator_list_opt", "member_declarator_list", "member_declarator", "member_bitfield_declarator", "attribute_opt", "asm_definition", "asm_phrase_opt", "export_definition", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const unsigned short int yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 59, 125, 44, 40, 42, 41, 61, 123, 58 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { 0, 52, 53, 53, 55, 54, 57, 56, 56, 56, 56, 56, 56, 56, 58, 59, 59, 60, 60, 61, 62, 62, 63, 63, 64, 64, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68, 69, 69, 70, 70, 71, 71, 71, 71, 72, 72, 73, 73, 73, 73, 73, 73, 74, 74, 75, 75, 75, 75, 75, 75, 75, 76, 76, 76, 77, 77, 78, 78, 79, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 82, 83, 83, 84, 85, 85, 86, 86, 87, 87, 88, 88, 89, 89, 90, 90, 91, 91, 91, 92, 93, 93, 94, 95, 95, 96 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const unsigned char yyr2[] =