📄 fincyacc.c
字号:
/* A Bison parser, made from fincyacc.y by GNU Bison version 1.28 */#define YYBISON 1 /* Identify Bison output. */#define yyparse c_parse#define yylex c_lex#define yyerror c_error#define yylval c_lval#define yychar c_char#define yydebug c_debug#define yynerrs c_nerrs#define IF 257#define ELSE 258#define RETURN 259#define WHILE 260#define FOR 261#define CONTINUE 262#define BREAK 263#define V_TRUE 264#define V_FALSE 265#define V_NULL 266#define IMPORT 267#define OPT_PARAM 268#define ADDR_OF 269#define CONTENT_OF 270#define VOID 271#define CHAR 272#define SHORT 273#define INT 274#define FLOAT 275#define DOUBLE 276#define POINTER 277#define STRING 278#define BOOL 279#define STRUCT 280#define NATIVE 281#define STATIC 282#define UNSIGNED 283#define PACKAGE 284#define PLUS 285#define INC 286#define SUB 287#define DEC 288#define ASSIGN 289#define EQ 290#define NE 291#define LE 292#define GE 293#define IDENTIFIER 294#define V_INT 295#define V_FLOAT 296#define V_STRING 297#line 1 "fincyacc.y"#include <stdio.h>#include <finctype.h>#include <fincnode.h>#include <finclang.h>#ifndef YYDEBUG#define YYDEBUG 1 /* Default to no yydebug support */#endif#line 13 "fincyacc.y"typedef union { FinCNode* expr; FinCTypeType type; double val_float; int val_int; char val_string[100]; char identifier[100];} YYSTYPE;#include <stdio.h>#ifndef __cplusplus#ifndef __STDC__#define const#endif#endif#define YYFINAL 267#define YYFLAG -32768#define YYNTBASE 61#define YYTRANSLATE(x) ((unsigned)(x) <= 297 ? yytranslate[x] : 118)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, 55, 2, 50, 51, 58, 2, 47, 2, 60, 59, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 53, 44, 56, 2, 57, 52, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 45, 2, 46, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 54, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 43};#if YYDEBUG != 0static const short yyprhs[] = { 0, 0, 1, 4, 6, 8, 10, 12, 14, 16, 18, 20, 24, 30, 35, 38, 42, 46, 48, 50, 54, 55, 63, 66, 68, 71, 75, 81, 86, 90, 92, 94, 95, 103, 105, 109, 110, 112, 116, 119, 124, 129, 135, 141, 145, 149, 150, 158, 160, 163, 164, 172, 174, 176, 178, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 225, 227, 231, 233, 239, 241, 246, 248, 253, 255, 259, 263, 265, 269, 273, 277, 281, 283, 287, 291, 293, 297, 301, 303, 308, 310, 313, 316, 321, 326, 329, 333, 338, 341, 345, 350, 352, 357, 360, 363, 367, 368, 374, 376, 380, 382, 383, 385, 389, 391, 393, 395, 397, 399, 401, 403, 405, 407, 409, 411, 413, 415, 417, 419, 421, 422, 427, 429, 432, 434, 437, 441, 445, 449, 457, 463, 466, 472, 476, 479, 486, 490, 493, 494, 497, 500, 503, 506};static const short yyrhs[] = { -1, 61, 62, 0, 68, 0, 63, 0, 74, 0, 79, 0, 80, 0, 1, 0, 65, 0, 65, 0, 85, 66, 44, 0, 85, 88, 45, 41, 46, 0, 85, 88, 45, 46, 0, 85, 1, 0, 85, 66, 1, 0, 66, 47, 67, 0, 67, 0, 88, 0, 88, 35, 91, 0, 0, 26, 88, 69, 48, 70, 49, 44, 0, 26, 1, 0, 71, 0, 70, 71, 0, 85, 72, 44, 0, 85, 88, 45, 41, 46, 0, 85, 88, 45, 46, 0, 72, 47, 73, 0, 73, 0, 88, 0, 0, 85, 88, 75, 50, 76, 51, 107, 0, 77, 0, 77, 47, 14, 0, 0, 78, 0, 77, 47, 78, 0, 85, 88, 0, 85, 88, 45, 46, 0, 85, 88, 45, 1, 0, 85, 88, 45, 41, 46, 0, 85, 88, 45, 41, 1, 0, 13, 43, 44, 0, 13, 43, 1, 0, 0, 30, 43, 81, 48, 82, 49, 44, 0, 83, 0, 82, 83, 0, 0, 85, 88, 84, 50, 76, 51, 44, 0, 86, 0, 88, 0, 87, 0, 86, 87, 0, 17, 0, 18, 0, 19, 0, 20, 0, 24, 0, 23, 0, 21, 0, 22, 0, 25, 0, 28, 0, 29, 0, 27, 0, 40, 0, 43, 0, 41, 0, 42, 0, 10, 0, 11, 0, 12, 0, 91, 0, 90, 47, 91, 0, 92, 0, 100, 35, 91, 0, 93, 0, 93, 52, 90, 53, 92, 0, 94, 0, 93, 54, 54, 94, 0, 95, 0, 94, 55, 55, 95, 0, 96, 0, 95, 36, 96, 0, 95, 37, 96, 0, 97, 0, 96, 56, 97, 0, 96, 57, 97, 0, 96, 38, 97, 0, 96, 39, 97, 0, 98, 0, 97, 33, 98, 0, 97, 31, 98, 0, 99, 0, 98, 58, 99, 0, 98, 59, 99, 0, 100, 0, 50, 85, 51, 99, 0, 101, 0, 31, 99, 0, 33, 99, 0, 15, 50, 100, 51, 0, 16, 50, 100, 51, 0, 15, 1, 0, 15, 50, 1, 0, 15, 50, 100, 1, 0, 16, 1, 0, 16, 50, 1, 0, 16, 50, 100, 1, 0, 103, 0, 101, 45, 90, 46, 0, 101, 32, 0, 101, 34, 0, 101, 60, 88, 0, 0, 101, 102, 50, 104, 51, 0, 89, 0, 50, 90, 51, 0, 88, 0, 0, 91, 0, 104, 47, 91, 0, 64, 0, 107, 0, 110, 0, 111, 0, 112, 0, 113, 0, 114, 0, 116, 0, 117, 0, 64, 0, 107, 0, 110, 0, 111, 0, 112, 0, 113, 0, 114, 0, 0, 48, 108, 109, 49, 0, 106, 0, 109, 106, 0, 44, 0, 90, 44, 0, 5, 90, 44, 0, 5, 1, 44, 0, 5, 90, 1, 0, 7, 50, 110, 110, 90, 51, 105, 0, 7, 50, 90, 44, 1, 0, 7, 1, 0, 6, 50, 90, 51, 105, 0, 6, 50, 1, 0, 6, 1, 0, 3, 50, 90, 51, 105, 115, 0, 3, 50, 1, 0, 3, 1, 0, 0, 4, 105, 0, 8, 44, 0, 8, 1, 0, 9, 44, 0, 9, 1, 0};#endif#if YYDEBUG != 0static const short yyrline[] = { 0, 54, 56, 59, 61, 62, 63, 64, 65, 72, 76, 80, 83, 89, 95, 99, 105, 107, 110, 112, 115, 118, 120, 126, 128, 131, 134, 140, 148, 150, 153, 157, 160, 164, 166, 169, 171, 172, 175, 178, 184, 186, 192, 196, 198, 204, 207, 212, 214, 217, 220, 228, 230, 233, 235, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 253, 257, 259, 260, 261, 262, 263, 270, 272, 275, 277, 280, 282, 285, 287, 290, 292, 295, 297, 298, 301, 303, 304, 305, 306, 309, 311, 312, 315, 317, 318, 321, 323, 326, 328, 329, 330, 331, 332, 337, 342, 347, 352, 357, 364, 366, 367, 368, 369, 370, 374, 378, 380, 381, 384, 386, 387, 394, 396, 397, 398, 399, 400, 401, 402, 403, 406, 408, 409, 410, 411, 412, 413, 416, 420, 424, 426, 429, 431, 433, 435, 440, 447, 450, 455, 462, 465, 470, 477, 490, 495, 502, 504, 507, 509, 516, 518};#endif#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)static const char * const yytname[] = { "$","error","$undefined.","IF","ELSE","RETURN","WHILE","FOR","CONTINUE","BREAK","V_TRUE","V_FALSE","V_NULL","IMPORT","OPT_PARAM","ADDR_OF","CONTENT_OF","VOID","CHAR","SHORT","INT","FLOAT","DOUBLE","POINTER","STRING","BOOL","STRUCT","NATIVE","STATIC","UNSIGNED","PACKAGE","PLUS","INC","SUB","DEC","ASSIGN","EQ","NE","LE","GE","IDENTIFIER","V_INT","V_FLOAT","V_STRING","';'","'['","']'","','","'{'","'}'","'('","')'","'?'","':'","'|'","'&'","'<'","'>'","'*'","'/'","'.'","input","decl","decl_global","decl_local","decl_variable","declarator_list","declarator","decl_struct","@1","decl_field_list","decl_field_declarator","struct_declarator_list","struct_declarator","decl_function","@2","decl_param_type_list","decl_param_list","decl_param","decl_import","decl_pkg","@3","decl_pkg_func_list","decl_pkg_func","@4","type","type_list","type_basic","identifier","literal","expr","expr_assign","expr_condition","expr_logic_or","expr_logic_and","expr_equality","expr_relational","expr_additive","expr_multiplicative","expr_cast","expr_unary","expr_postfix","@5","expr_primary","param_list","statement","statement_in_block","statement_block","@6","statement_list","statement_node","statement_return","statement_for","statement_while","statement_if","statement_if_else","statement_continue","statement_break", NULL};#endifstatic const short yyr1[] = { 0, 61, 61, 62, 62, 62, 62, 62, 62, 63, 64, 65, 65, 65, 65, 65, 66, 66, 67, 67, 69, 68, 68, 70, 70, 71, 71, 71, 72, 72, 73, 75, 74, 76, 76, 77, 77, 77, 78, 78, 78, 78, 78, 79, 79, 81, 80, 82, 82, 84, 83, 85, 85, 86, 86, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 88, 89, 89, 89, 89, 89, 89, 90, 90, 91, 91, 92, 92, 93, 93, 94, 94, 95, 95, 95, 96, 96, 96, 96, 96, 97, 97, 97, 98, 98, 98, 99, 99, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 102, 101, 103, 103, 103, 104, 104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 106, 106, 106, 106, 106, 106, 106, 108, 107, 109, 109, 110, 110, 111, 111, 111, 112, 112, 112, 113, 113, 113, 114, 114, 114, 115, 115, 116, 116, 117, 117};static const short yyr2[] = { 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 4, 2, 3, 3, 1, 1, 3, 0, 7, 2, 1, 2, 3, 5, 4, 3, 1, 1, 0, 7, 1, 3, 0, 1, 3, 2, 4, 4, 5, 5, 3, 3, 0, 7, 1, 2, 0, 7, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 5, 1, 4, 1, 4, 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, 4, 1, 2, 2, 4, 4, 2, 3, 4, 2, 3, 4, 1, 4, 2, 2, 3, 0, 5, 1, 3, 1, 0, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 4, 1, 2, 1, 2, 3, 3, 3, 7, 5, 2, 5, 3, 2, 6, 3, 2, 0, 2, 2, 2, 2, 2};static const short yydefact[] = { 1, 0, 8, 0, 55, 56, 57, 58, 61, 62, 60, 59, 63, 0, 66, 64, 65, 0, 67, 2, 4, 9, 3, 5, 6, 7, 0, 51, 53, 52, 0, 22, 20, 45, 14, 0, 17, 18, 54, 44, 43, 0, 0, 15, 11, 0, 0, 0, 0, 0, 0, 16, 18, 71, 72, 73, 0, 0, 0, 0, 69, 70, 68, 0, 120, 118, 19, 76, 78, 80, 82, 84, 87, 92, 95, 98, 100, 111, 0, 13, 35, 0, 23, 0, 0, 47, 0, 105, 0, 108, 0, 101, 98, 102, 0, 120, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 114, 0, 0, 0, 12, 0, 33, 36, 0, 0, 24, 0, 29, 30, 0, 48, 49, 106, 0, 0, 109, 0, 0, 0, 119, 0, 0, 0, 85, 86, 90, 91, 88, 89, 94, 93, 96, 97, 77, 0, 115, 121, 0, 0, 38, 21, 25, 0, 0, 46, 0, 107, 103, 110, 104, 99, 75, 0, 81, 83, 112, 122, 0, 140, 32, 34, 37, 0, 28, 30, 0, 27, 35, 79, 0, 117, 0, 40, 0, 39, 26, 0, 123, 0, 0, 0, 0, 144, 133, 10, 0, 0, 142, 134, 0, 135, 136, 137, 138, 139, 42, 41, 0, 157, 0, 0, 0, 154, 0, 151, 0, 18, 145, 141, 143, 50, 156, 0, 147, 148, 146, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 158, 125, 126, 127, 128, 129, 130, 131, 132, 152, 150, 0, 161, 160, 163, 162, 0, 155, 0, 159, 149, 0, 0};static const short yydefgoto[] = { 1, 19, 20, 244, 202, 35, 36, 22, 41, 81, 82, 124, 125, 23, 48, 118, 119, 120, 24, 25, 42, 84, 85, 163, 203, 27, 28, 64, 65, 204, 97, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 116, 77, 175, 245, 205, 246, 189, 207, 247, 248, 249, 250, 251, 262, 252, 253};static const short yypact[] = {-32768, 545,-32768, -19,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 41,-32768,-32768,-32768, -16,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 49, 331,-32768,-32768, 33,-32768,-32768,-32768,-32768, 28,-32768, 62,-32768,-32768,-32768, -5, 56,-32768,-32768, 71, 566, 64, 73, 661, 661,-32768, 132,-32768,-32768,-32768, 3, 10, 566, 566,-32768,-32768,-32768, 511,-32768,-32768,-32768,-32768, 102, 125, 93, -20, 146, 131,-32768, 152, 126,-32768, 155,-32768, 661, 600,-32768, 71, 614,-32768, 71,-32768, 230,-32768, 243,-32768,-32768,-32768, 156, 1, 85,-32768, 566, 149, 153, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,-32768,-32768, 566, 71, 159,-32768, 160, 163,-32768, 71, 168,-32768, 75,-32768, 169, 172,-32768,-32768,-32768, 566, 7,-32768, 8, 566, 566,-32768, -21, 566, 566, -20, -20, 146, 146, 146, 146, 131, 131,-32768,-32768,-32768, 151,-32768, 566, 170, 647, 174,-32768,-32768, 71, 72,-32768, 171,-32768,-32768,-32768,-32768,-32768,-32768, 566, 125, 93,-32768,-32768, 88,-32768,-32768,-32768,-32768, 5,-32768,-32768, 176,-32768, 661,-32768, 566,-32768, 470,-32768, 19,-32768,-32768, 178,-32768, 13, 280, 14, 20,-32768,-32768,-32768, 49, 94,-32768,-32768, 422,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 179,-32768, 293, 186, 29,-32768, 330,-32768, 84, -12,-32768,-32768,-32768,-32768,-32768, 117,-32768,-32768,-32768,-32768, 118, 96, 84, 376, 376, 184, 566, 34, 44,-32768, 216,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 119,-32768,-32768,-32768,-32768, 376,-32768, 376,-32768,-32768, 232,-32768};static const short yypgoto[] = {-32768,-32768,-32768, -179, 234,-32768, 188,-32768,-32768,-32768, 158,-32768, 76,-32768,-32768, 58,-32768, 92,-32768,-32768,-32768,-32768, 165,-32768, 6,-32768, 220, -1,-32768, -60, -45, 80,-32768, 112, 116, 91, 69, 97, -42, 43,-32768,-32768,-32768,-32768, -155, 45, -150,-32768,-32768, -176, -167, -115, -91, -86,-32768,-32768,-32768};#define YYLAST 701static const short yytable[] = { 29, 66, -52, 96, 87, 177, 190, 26, 164, 166, 201, 89, 32, 208, 216, 220, 91, 93, 103, 104, 213, 222, 209, 46, 30, 37, 136, 33, 201, 43, 232, 208, 170, 47, 39, 257, 105, 106, 138, 206, 209, -52, 31, 49, 52, 259, 191, 237, 29, 29, 34, 192, -52, 88, 152, 83, 86, 206, 165, 167, 90, 241, 95, 217, 221, 214, 151, 149, 150, 94, 223, 96, 44, 233, 210, 45, 136, 40, 258, 29, 29, 18, 126, 29, 254, 129, 121, 83, 260, 18, 86, 169, 210, 168, 53, 54, 55, 46, 211, 56, 57, 92, 92, 212, 50, 78, 264, 47, 265, 174, 79, 18, -31, 183, 153, 58, 211, 59, 184, 159, 157, 212, 160, 80, 18, 60, 61, 62, 200, 101, 102, 132, 136, 134, 63, 187, 137, 219, 225, 188, 240, 136, 195, 136, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 98, 29, 99, 230, 112, 182, 113, 235, 121, 236, 136, 136, 136, 46, 238, 239, 263, 114, 143, 144, 145, 146, -116, 107, 92, 108, 100, 256, 92, 92, 29, 255, 115, 111, 95, 109, 110, 121, 141, 142, -145, -145, -145, 173, 136, -145, -145, 117, 224, 139, 147, 148, 95, 135, 140, 154, 156, 155, 158, 92, 161, -145, 162, -145, 176, 180, 261, 185, 193, 228, -145, -145, -145, -145, -145, 215, 231,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -