📄 parse.c_shipped
字号:
/* A Bison parser, made from scripts/genksyms/parse.y by GNU Bison version 1.28 */#define YYBISON 1 /* Identify Bison output. */#define ASM_KEYW 257#define ATTRIBUTE_KEYW 258#define AUTO_KEYW 259#define BOOL_KEYW 260#define CHAR_KEYW 261#define CONST_KEYW 262#define DOUBLE_KEYW 263#define ENUM_KEYW 264#define EXTERN_KEYW 265#define FLOAT_KEYW 266#define INLINE_KEYW 267#define INT_KEYW 268#define LONG_KEYW 269#define REGISTER_KEYW 270#define RESTRICT_KEYW 271#define SHORT_KEYW 272#define SIGNED_KEYW 273#define STATIC_KEYW 274#define STRUCT_KEYW 275#define TYPEDEF_KEYW 276#define UNION_KEYW 277#define UNSIGNED_KEYW 278#define VOID_KEYW 279#define VOLATILE_KEYW 280#define TYPEOF_KEYW 281#define EXPORT_SYMBOL_KEYW 282#define ASM_PHRASE 283#define ATTRIBUTE_PHRASE 284#define BRACE_PHRASE 285#define BRACKET_PHRASE 286#define EXPRESSION_PHRASE 287#define CHAR 288#define DOTS 289#define IDENT 290#define INT 291#define REAL 292#define STRING 293#define TYPE 294#define OTHER 295#define FILENAME 296#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);}#ifndef YYSTYPE#define YYSTYPE int#endif#ifndef YYDEBUG#define YYDEBUG 1#endif#include <stdio.h>#ifndef __cplusplus#ifndef __STDC__#define const#endif#endif#define YYFINAL 172#define YYFLAG -32768#define YYNTBASE 52#define YYTRANSLATE(x) ((unsigned)(x) <= 296 ? yytranslate[x] : 96)static const 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, 47, 48, 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, 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 != 0static const short yyprhs[] = { 0, 0, 2, 5, 6, 9, 10, 14, 16, 18, 20, 22, 25, 28, 32, 33, 35, 37, 41, 46, 47, 49, 51, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 77, 80, 83, 86, 90, 94, 98, 101, 104, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 132, 133, 135, 137, 140, 142, 144, 146, 148, 151, 153, 155, 160, 165, 168, 172, 176, 179, 181, 183, 185, 190, 195, 198, 202, 206, 209, 211, 215, 216, 218, 220, 224, 227, 230, 232, 233, 235, 237, 242, 247, 250, 254, 258, 262, 263, 265, 268, 272, 276, 277, 279, 281, 284, 288, 291, 292, 294, 296, 300, 303, 306, 308, 311, 312, 314, 317, 318, 320};static const short yyrhs[] = { 53, 0, 52, 53, 0, 0, 54, 55, 0, 0, 22, 56, 57, 0, 57, 0, 81, 0, 93, 0, 95, 0, 1, 43, 0, 1, 44, 0, 61, 58, 43, 0, 0, 59, 0, 60, 0, 59, 45, 60, 0, 71, 94, 92, 82, 0, 0, 62, 0, 63, 0, 62, 63, 0, 64, 0, 65, 0, 5, 0, 16, 0, 20, 0, 11, 0, 13, 0, 66, 0, 70, 0, 27, 46, 62, 47, 0, 21, 36, 0, 23, 36, 0, 10, 36, 0, 21, 36, 84, 0, 23, 36, 84, 0, 10, 36, 31, 0, 10, 31, 0, 21, 84, 0, 23, 84, 0, 7, 0, 18, 0, 14, 0, 15, 0, 19, 0, 24, 0, 12, 0, 9, 0, 25, 0, 6, 0, 40, 0, 48, 68, 0, 0, 69, 0, 70, 0, 69, 70, 0, 8, 0, 26, 0, 30, 0, 17, 0, 67, 71, 0, 72, 0, 36, 0, 72, 46, 75, 47, 0, 72, 46, 1, 47, 0, 72, 32, 0, 46, 71, 47, 0, 46, 1, 47, 0, 67, 73, 0, 74, 0, 36, 0, 40, 0, 74, 46, 75, 47, 0, 74, 46, 1, 47, 0, 74, 32, 0, 46, 73, 47, 0, 46, 1, 47, 0, 76, 35, 0, 76, 0, 77, 45, 35, 0, 0, 77, 0, 78, 0, 77, 45, 78, 0, 62, 79, 0, 67, 79, 0, 80, 0, 0, 36, 0, 40, 0, 80, 46, 75, 47, 0, 80, 46, 1, 47, 0, 80, 32, 0, 46, 79, 47, 0, 46, 1, 47, 0, 61, 71, 31, 0, 0, 83, 0, 49, 33, 0, 50, 85, 44, 0, 50, 1, 44, 0, 0, 86, 0, 87, 0, 86, 87, 0, 61, 88, 43, 0, 1, 43, 0, 0, 89, 0, 90, 0, 89, 45, 90, 0, 73, 92, 0, 36, 91, 0, 91, 0, 51, 33, 0, 0, 30, 0, 29, 43, 0, 0, 29, 0, 28, 46, 36, 47, 43, 0};#endif#if YYDEBUG != 0static const short yyrline[] = { 0, 101, 103, 106, 109, 112, 114, 115, 116, 117, 118, 119, 120, 123, 137, 139, 142, 151, 163, 169, 171, 174, 176, 179, 186, 189, 191, 192, 193, 194, 197, 199, 200, 204, 206, 208, 212, 219, 226, 235, 236, 237, 240, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 254, 259, 261, 264, 266, 269, 270, 270, 271, 278, 280, 283, 293, 295, 297, 299, 301, 307, 309, 312, 314, 315, 317, 319, 321, 323, 327, 329, 330, 333, 335, 338, 340, 344, 349, 352, 355, 357, 365, 369, 371, 373, 375, 377, 381, 390, 392, 396, 401, 403, 406, 408, 411, 413, 416, 419, 423, 425, 428, 430, 433, 435, 436, 439, 443, 445, 448, 452, 454, 457};#endif#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)static const char * const yytname[] = { "$","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","';'","'}'","','","'('","')'","'*'","'='","'{'","':'","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", NULL};#endifstatic const short yyr1[] = { 0, 52, 52, 54, 53, 56, 55, 55, 55, 55, 55, 55, 55, 57, 58, 58, 59, 59, 60, 61, 61, 62, 62, 63, 63, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 68, 68, 69, 69, 70, 70, 70, 70, 71, 71, 72, 72, 72, 72, 72, 72, 73, 73, 74, 74, 74, 74, 74, 74, 74, 75, 75, 75, 76, 76, 77, 77, 78, 79, 79, 80, 80, 80, 80, 80, 80, 80, 80, 81, 82, 82, 83, 84, 84, 85, 85, 86, 86, 87, 87, 88, 88, 89, 89, 90, 90, 90, 91, 92, 92, 93, 94, 94, 95};static const short yyr2[] = { 0, 1, 2, 0, 2, 0, 3, 1, 1, 1, 1, 2, 2, 3, 0, 1, 1, 3, 4, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 2, 2, 2, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 4, 4, 2, 3, 3, 2, 1, 1, 1, 4, 4, 2, 3, 3, 2, 1, 3, 0, 1, 1, 3, 2, 2, 1, 0, 1, 1, 4, 4, 2, 3, 3, 3, 0, 1, 2, 3, 3, 0, 1, 1, 2, 3, 2, 0, 1, 1, 3, 2, 2, 1, 2, 0, 1, 2, 0, 1, 5};static const short yydefact[] = { 3, 3, 1, 0, 2, 0, 25, 51, 42, 58, 49, 0, 28, 48, 29, 44, 45, 26, 61, 43, 46, 27, 0, 5, 0, 47, 50, 59, 0, 0, 0, 60, 52, 4, 7, 14, 20, 21, 23, 24, 30, 31, 8, 9, 10, 11, 12, 39, 35, 33, 0, 40, 19, 34, 41, 0, 0, 119, 64, 0, 54, 0, 15, 16, 0, 120, 63, 22, 38, 36, 0, 109, 0, 0, 105, 6, 14, 37, 0, 0, 0, 0, 53, 55, 56, 13, 0, 62, 121, 97, 117, 67, 0, 108, 102, 72, 73, 0, 0, 0, 117, 71, 0, 110, 111, 115, 101, 0, 106, 120, 32, 0, 69, 68, 57, 17, 118, 98, 0, 89, 0, 80, 83, 84, 114, 0, 72, 0, 116, 70, 113, 76, 0, 107, 0, 122, 0, 18, 99, 66, 90, 52, 0, 89, 86, 88, 65, 79, 0, 78, 77, 0, 0, 112, 100, 0, 91, 0, 87, 94, 0, 81, 85, 75, 74, 96, 95, 0, 0, 93, 92, 0, 0};static const short yydefgoto[] = { 1, 2, 3, 33, 52, 34, 61, 62, 63, 71, 36, 37, 38, 39, 40, 64, 82, 83, 41, 109, 66, 100, 101, 120, 121, 122, 123, 144, 145, 42, 137, 138, 51, 72, 73, 74, 102, 103, 104, 105, 117, 43, 90, 44};static const short yypact[] = {-32768, 15,-32768, 197,-32768, 23,-32768,-32768,-32768,-32768,-32768, -18,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -28,-32768, -25,-32768,-32768,-32768, -26, -22, -12,-32768,-32768,-32768,-32768, 49, 493,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 27, -8, 101,-32768, 493, -8,-32768, 493, 10,-32768,-32768, 11, 9, 18, 26,-32768, 49, -15, -13,-32768,-32768,-32768, 25, 24, 48, 149,-32768,-32768, 49,-32768, 414, 39, 40, 47,-32768, 9,-32768,-32768, 49,-32768,-32768,-32768, 66,-32768, 241,-32768,-32768, 50,-32768, 5, 65, 42, 66, 17, 56, 55,-32768,-32768,-32768, 60,-32768, 75,-32768, 80,-32768,-32768,-32768,-32768,-32768, 81, 82, 370, 85, 98, 89,-32768,-32768, 88,-32768, 91,-32768,-32768,-32768,-32768, 284,-32768, 24,-32768, 103,-32768,-32768,-32768,-32768,-32768, 8, 43,-32768, 30,-32768,-32768, 457,-32768,-32768, 92, 93,-32768,-32768, 95,-32768, 96,-32768,-32768, 327,-32768,-32768,-32768,-32768,-32768,-32768, 99, 104,-32768,-32768, 148,-32768};static const short yypgoto[] = {-32768, 152,-32768,-32768,-32768, 119,-32768,-32768, 94, 0, -55, -35,-32768,-32768,-32768, -69,-32768,-32768, -56, -30,-32768, -76,-32768, -122,-32768,-32768, 29, -62,-32768,-32768,-32768,-32768, -17,-32768,-32768, 105,-32768,-32768, 52, 86, 83,-32768,-32768,-32768};#define YYLAST 533static const short yytable[] = { 78, 67, 99, 35, 84, 65, 125, 54, 49, 155, 152, 53, 80, 47, 88, 171, 89, 9, 48, 91, 55, 127, 50, 129, 56, 50, 18, 114, 99, 81, 99, 57, 69, 92, 87, 27, 77, 119, 168, 31, -89, 126, 50, 67, 140, 96, 79, 58, 156, 131, 143, 97, 76, 60, 142, -89, 60, 59, 68, 60, 95, 85, 159, 132, 96, 99, 45, 46, 93, 94, 97, 86, 60, 143, 143, 98, 160, 119, 126, 140, 157, 158, 96, 156, 67, 58, 111, 112, 97, 142, 60, 60, 106, 119, 113, 59, 116, 60, 128, 133, 134, 98, 70, 93, 88, 119, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 135, 24, 25, 26, 27, 28, 139, 136, 31, 146, 147, 148, 149, 154, -19, 150, 163, 164, 32, 165, 166, -19, -103, 169, -19, 172, -19, 107, 170, -19, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 75, 24, 25, 26, 27, 28, 162, 108, 31, 115, 124, 0, 130, 0, -19, 153, 0, 0, 32, 0, 0, -19, -104, 0, -19, 0, -19, 5, 0, -19, 0, 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, 0, 0, 0, 0, 0, -19, 0, 0, 0, 32, 0, 0, -19, 0, 118, -19, 0, -19, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 24, 25, 26, 27, 28, 0, 0, 31, 0, 0, 0, 0, -82, 0, 0, 0, 0, 32, 0, 0, 0, 151, 0, 0, -82, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 24, 25, 26, 27, 28, 0, 0, 31, 0, 0, 0, 0, -82, 0, 0, 0, 0, 32, 0, 0, 0, 167, 0, 0, -82, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 24, 25, 26, 27, 28, 0, 0, 31, 0, 0, 0, 0, -82, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, -82, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 24, 25, 26, 27, 28, 0, 0, 31, 0, 0, 0, 0, 0, 140, 0, 0, 0, 141, 0, 0, 0, 0, 0, 142, 0, 60, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 24, 25, 26, 27, 28, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 110, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 24, 25, 26, 27, 28, 0, 0, 31, 0, 0, 0, 0, 161, 0, 0, 0, 0, 32, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 24, 25, 26, 27, 28, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32};static const short yycheck[] = { 55, 36, 71, 3, 60, 35, 1, 24, 36, 1, 132, 36, 1, 31, 29, 0, 31, 8, 36, 32, 46, 97, 50, 99, 46, 50, 17, 83, 97, 59, 99, 43, 49, 46, 64, 26, 53, 92, 160, 30, 32, 36, 50, 78, 36, 40, 36, 36, 40, 32, 119, 46, 52, 48, 46, 47, 48, 46, 31, 48, 36, 43, 32, 46, 40, 134, 43, 44, 43, 44, 46, 45, 48, 142, 143, 51, 46, 132, 36, 36, 142, 143, 40, 40, 119, 36, 47, 47, 46, 46, 48, 48, 44, 148, 47, 46, 30, 48, 33, 43, 45, 51, 1, 43, 29, 160, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -