📄 gram.c
字号:
static const short yyrhs[] = { -1,
123, 0, 1, 0, 124, 0, 123, 124, 0, 196,
0, 125, 0, 76, 0, 1, 75, 0, 126, 129,
0, 199, 241, 127, 0, 241, 127, 0, 0, 128,
0, 196, 0, 128, 196, 0, 0, 74, 130, 127,
131, 75, 0, 1, 75, 0, 0, 132, 0, 133,
0, 132, 133, 0, 134, 0, 135, 0, 129, 0,
136, 0, 137, 0, 138, 0, 139, 0, 140, 0,
141, 0, 142, 0, 143, 0, 1, 76, 0, 177,
76, 197, 0, 149, 91, 133, 0, 144, 0, 145,
0, 146, 0, 147, 0, 148, 0, 50, 120, 177,
72, 133, 0, 27, 76, 0, 31, 76, 0, 45,
176, 76, 0, 41, 251, 76, 0, 76, 0, 38,
120, 177, 72, 133, 0, 38, 120, 177, 72, 133,
35, 133, 0, 33, 133, 56, 120, 177, 72, 76,
0, 56, 120, 177, 72, 133, 0, 39, 120, 176,
76, 176, 76, 176, 72, 133, 0, 188, 0, 189,
0, 190, 0, 151, 0, 151, 90, 177, 91, 150,
0, 152, 0, 151, 93, 152, 0, 154, 0, 152,
94, 154, 0, 111, 158, 0, 155, 0, 154, 95,
155, 0, 156, 0, 155, 96, 156, 0, 159, 0,
156, 97, 159, 0, 112, 158, 0, 164, 0, 120,
239, 72, 158, 0, 120, 239, 72, 74, 205, 75,
0, 160, 0, 159, 193, 160, 0, 161, 0, 160,
194, 161, 0, 162, 0, 161, 195, 162, 0, 163,
0, 162, 191, 163, 0, 158, 0, 163, 192, 158,
0, 181, 0, 165, 0, 166, 0, 167, 0, 168,
0, 153, 0, 157, 0, 169, 0, 170, 0, 171,
0, 172, 0, 113, 120, 239, 72, 0, 113, 164,
0, 114, 120, 239, 72, 0, 114, 164, 0, 105,
158, 0, 104, 158, 0, 97, 158, 0, 106, 158,
0, 115, 164, 0, 116, 164, 0, 150, 0, 164,
262, 173, 0, 0, 175, 0, 177, 0, 0, 177,
0, 178, 0, 173, 0, 178, 77, 173, 0, 251,
0, 180, 0, 264, 0, 120, 177, 72, 0, 120,
1, 72, 0, 179, 0, 182, 0, 183, 0, 261,
0, 184, 0, 185, 0, 181, 121, 177, 73, 0,
257, 0, 259, 0, 181, 115, 0, 181, 116, 0,
0, 187, 0, 173, 0, 187, 77, 173, 0, 3,
0, 28, 175, 0, 32, 0, 104, 0, 105, 0,
106, 0, 107, 0, 108, 0, 98, 0, 99, 0,
102, 0, 103, 0, 199, 203, 76, 0, 11, 0,
0, 11, 0, 0, 199, 0, 211, 198, 0, 212,
198, 0, 238, 198, 0, 212, 201, 0, 238, 201,
0, 0, 200, 0, 241, 0, 241, 88, 207, 0,
0, 204, 0, 202, 0, 204, 77, 202, 0, 207,
0, 205, 77, 207, 0, 0, 88, 0, 173, 0,
74, 205, 208, 75, 0, 121, 173, 73, 206, 207,
0, 119, 252, 206, 207, 0, 0, 77, 0, 238,
0, 209, 238, 0, 0, 209, 0, 26, 0, 37,
0, 44, 0, 48, 0, 51, 0, 213, 0, 214,
0, 215, 0, 216, 0, 54, 0, 29, 0, 46,
0, 42, 0, 43, 0, 40, 0, 34, 0, 47,
0, 53, 0, 219, 0, 220, 0, 225, 0, 227,
0, 6, 0, 228, 0, 230, 0, 0, 218, 0,
3, 0, 253, 0, 36, 217, 74, 221, 224, 75,
0, 36, 218, 0, 222, 0, 221, 77, 222, 0,
223, 0, 223, 88, 173, 0, 3, 0, 0, 77,
0, 0, 49, 217, 74, 226, 231, 75, 0, 49,
218, 0, 0, 52, 217, 74, 229, 231, 75, 0,
52, 218, 0, 232, 0, 231, 232, 0, 200, 233,
76, 0, 234, 0, 233, 77, 234, 0, 76, 0,
235, 0, 236, 0, 241, 0, 240, 91, 237, 0,
173, 0, 30, 0, 55, 0, 199, 0, 199, 254,
0, 0, 241, 0, 245, 242, 0, 242, 0, 252,
0, 120, 241, 72, 0, 256, 0, 242, 120, 247,
72, 0, 242, 120, 250, 72, 0, 242, 120, 72,
0, 3, 0, 106, 210, 0, 244, 0, 244, 245,
0, 0, 247, 0, 248, 0, 248, 77, 78, 0,
249, 0, 248, 77, 249, 0, 199, 241, 0, 199,
254, 0, 199, 0, 251, 0, 250, 77, 251, 0,
3, 0, 243, 0, 253, 0, 215, 0, 245, 0,
255, 0, 245, 255, 0, 120, 254, 72, 0, 121,
174, 73, 0, 255, 121, 174, 73, 0, 120, 246,
72, 0, 255, 120, 246, 72, 0, 242, 121, 174,
73, 0, 0, 181, 119, 258, 252, 0, 0, 181,
118, 260, 252, 0, 181, 120, 186, 72, 0, 88,
0, 89, 0, 4, 0, 263, 4, 0, 9, 0,
10, 0, 8, 0, 263, 0
};
#endif
#if YYDEBUG != 0
static const short yyrline[] = { 0,
181, 187, 193, 200, 201, 212, 215, 218, 225, 230,
263, 273, 285, 289, 292, 293, 301, 305, 313, 319,
323, 326, 333, 341, 347, 353, 359, 365, 371, 377,
383, 389, 395, 401, 407, 413, 418, 427, 428, 431,
432, 433, 436, 445, 451, 457, 464, 489, 495, 505,
517, 528, 537, 551, 552, 553, 556, 557, 569, 570,
578, 579, 587, 593, 594, 602, 603, 611, 612, 620,
626, 627, 634, 644, 645, 653, 654, 662, 663, 671,
672, 680, 681, 689, 690, 691, 692, 693, 694, 695,
696, 697, 698, 699, 702, 709, 715, 722, 728, 734,
741, 747, 753, 759, 765, 766, 774, 778, 781, 784,
788, 791, 794, 795, 803, 807, 808, 813, 819, 826,
827, 828, 829, 830, 831, 834, 843, 844, 847, 854,
861, 865, 868, 869, 881, 899, 906, 909, 910, 913,
914, 915, 918, 921, 924, 925, 928, 952, 957, 961,
966, 970, 973, 980, 987, 996, 1003, 1012, 1016, 1019,
1020, 1028, 1032, 1035, 1036, 1044, 1045, 1053, 1054, 1057,
1058, 1066, 1069, 1073, 1077, 1080, 1081, 1090, 1094, 1097,
1098, 1099, 1100, 1101, 1104, 1105, 1106, 1107, 1108, 1109,
1110, 1111, 1112, 1113, 1114, 1115, 1116, 1119, 1120, 1123,
1124, 1127, 1132, 1133, 1136, 1140, 1143, 1147, 1150, 1175,
1181, 1182, 1190, 1191, 1199, 1212, 1216, 1219, 1223, 1250,
1256, 1260, 1291, 1297, 1298, 1306, 1314, 1315, 1322, 1328,
1329, 1333, 1336, 1345, 1348, 1349, 1352, 1358, 1366, 1370,
1373, 1380, 1383, 1390, 1396, 1397, 1405, 1413, 1422, 1430,
1437, 1438, 1444, 1448, 1451, 1452, 1460, 1461, 1469, 1476,
1483, 1490, 1494, 1503, 1506, 1507, 1510, 1519, 1520, 1526,
1534, 1540, 1546, 1554, 1560, 1569, 1578, 1582, 1590, 1594,
1602, 1611, 1612, 1615, 1616, 1629, 1630, 1631, 1632
};
static const char * const yytname[] = { "$","error","$undefined.","IDENT",
"STRING","FIELD_NAME","TYPEDEF_NAME","TAG","CHAR_CONST","INUM","RNUM","COMMENT",
"PP_LINE","PP_INCLUDE","PP_DEFINE","PP_UNDEF","PP_ERROR","PP_IF","PP_IFDEF",
"PP_IFNDEF","PP_ELSE","PP_ELIF","PP_ENDIF","PP_IDENT","PP_PRAGMA","INVALID",
"AUTO","BREAK","CASE","CHAR","CONST","CONT","DEFLT","DO","DOUBLE","ELSE","ENUM",
"EXTRN","IF","FOR","FLOAT","GOTO","INT","LONG","REGISTR","RETURN","SHORT","SGNED",
"STATIC","STRUCT","SWITCH","TYPEDEF","UNION","UNSGNED","VOID","VOLATILE","WHILE",
"PLUS_EQ","MINUS_EQ","STAR_EQ","DIV_EQ","MOD_EQ","B_NOT_EQ","B_AND_EQ","B_OR_EQ",
"B_XOR_EQ","L_SHIFT_EQ","R_SHIFT_EQ","EQUAL","LESS_EQ","GRTR_EQ","NOT_EQ","RPAREN",
"RBRCKT","LBRACE","RBRACE","SEMICOLON","COMMA","ELLIPSIS","LB_SIGN","DOUB_LB_SIGN",
"BACKQUOTE","AT","DOLLAR","CPP_INCLUDE","CPP_DEFINE","CPP_LINE","COMMA_OP","EQ",
"ASSIGN","QUESTMARK","COLON","COMMA_SEP","OR","AND","B_OR","B_XOR","B_AND","COMP_EQ",
"COMP_ARITH","LESS","GRTR","L_SHIFT","R_SHIFT","PLUS","MINUS","STAR","DIV","MOD",
"CAST","UNARY","NOT","B_NOT","SIZEOF","ALIGNOF","INCR","DECR","HYPERUNARY","ARROW",
"DOT","LPAREN","LBRCKT","program","trans_unit","top_level_decl","func_def","func_spec",
"opt_decl_list","decl_list","cmpnd_stemnt","@1","opt_stemnt_list","stemnt_list",
"stemnt","expr_stemnt","labeled_stemnt","cond_stemnt","iter_stemnt","switch_stemnt",
"break_stemnt","continue_stemnt","return_stemnt","goto_stemnt","null_stemnt",
"if_stemnt","if_else_stemnt","do_stemnt","while_stemnt","for_stemnt","label",
"cond_expr","log_or_expr","log_and_expr","log_neg_expr","bitwise_or_expr","bitwise_xor_expr",
"bitwise_and_expr","bitwise_neg_expr","cast_expr","equality_expr","relational_expr",
"shift_expr","additive_expr","mult_expr","unary_expr","sizeof_expr","alignof_expr",
"unary_minus_expr","unary_plus_expr","addr_expr","indirection_expr","preinc_expr",
"predec_expr","assign_expr","opt_const_expr","const_expr","opt_expr","expr",
"comma_expr","prim_expr","paren_expr","postfix_expr","subscript_expr","comp_select_expr",
"postinc_expr","postdec_expr","opt_expr_list","expr_list","named_label","case_label",
"deflt_label","add_op","mult_op","equality_op","relation_op","shift_op","declaration",
"opt_comment","opt_decl_specs","decl_specs","comp_decl_specs","opt_comp_decl_specs",
"init_decl","opt_init_decl_list","init_decl_list","initializer_list","opt_eq",
"initializer","opt_comma","type_qual_list","opt_type_qual_list","storage_class",
"type_spec","enum_type_spec","struct_type_spec","typedef_name","union_type_spec",
"opt_tag","tag","enum_type_define","enum_type_ref","enum_def_list","enum_const_def",
"enum_constant","opt_trailing_comma","struct_type_define","@2","struct_type_ref",
"union_type_define","@3","union_type_ref","field_list","comp_decl","comp_decl_list",
"comp_declarator","simple_comp","bit_field","width","type_qual","type_name",
"opt_declarator","declarator","direct_declarator","simple_decl","pointer_start",
"pointer","opt_param_type_list","param_type_list","param_list","param_decl",
"ident_list","ident","field_ident","typename_as_ident","abs_decl","direct_abs_decl",
"array_decl","direct_comp_select","@4","indirect_comp_select","@5","func_call",
"assign_op","strings","constant",""
};
#endif
static const short yyr1[] = { 0,
122, 122, 122, 123, 123, 124, 124, 124, 124, 125,
126, 126, 127, 127, 128, 128, 130, 129, 129, 131,
131, 132, 132, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 134, 135, 136, 136, 137,
137, 137, 138, 139, 140, 141, 142, 143, 144, 145,
146, 147, 148, 149, 149, 149, 150, 150, 151, 151,
152, 152, 153, 154, 154, 155, 155, 156, 156, 157,
158, 158, 158, 159, 159, 160, 160, 161, 161, 162,
162, 163, 163, 164, 164, 164, 164, 164, 164, 164,
164, 164, 164, 164, 165, 165, 166, 166, 167, 168,
169, 170, 171, 172, 173, 173, 174, 174, 175, 176,
176, 177, 178, 178, 179, 179, 179, 180, 180, 181,
181, 181, 181, 181, 181, 182, 183, 183, 184, 185,
186, 186, 187, 187, 188, 189, 190, 191, 191, 192,
192, 192, 193, 194, 195, 195, 196, 196, 197, 197,
198, 198, 199, 199, 199, 200, 200, 201, 201, 202,
202, 203, 203, 204, 204, 205, 205, 206, 206, 207,
207, 207, 207, 208, 208, 209, 209, 210, 210, 211,
211, 211, 211, 211, 212, 212, 212, 212, 212, 212,
212, 212, 212, 212, 212, 212, 212, 213, 213, 214,
214, 215, 216, 216, 217, 217, 218, 218, 219, 220,
221, 221, 222, 222, 223, 224, 224, 226, 225, 227,
229, 228, 230, 231, 231, 232, 233, 233, 233, 234,
234, 235, 236, 237, 238, 238, 239, 239, 240, 240,
241, 241, 242, 242, 242, 242, 242, 242, 243, 244,
245, 245, 246, 246, 247, 247, 248, 248, 249, 249,
249, 250, 250, 251, 252, 252, 253, 254, 254, 254,
255, 255, 255, 255, 255, 256, 258, 257, 260, 259,
261, 262, 262, 263, 263, 264, 264, 264, 264
};
static const short yyr2[] = { 0,
0, 1, 1, 1, 2, 1, 1, 1, 2, 2,
3, 2, 0, 1, 1, 2, 0, 5, 2, 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 3, 3, 1, 1, 1,
1, 1, 5, 2, 2, 3, 3, 1, 5, 7,
7, 5, 9, 1, 1, 1, 1, 5, 1, 3,
1, 3, 2, 1, 3, 1, 3, 1, 3, 2,
1, 4, 6, 1, 3, 1, 3, 1, 3, 1,
3, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 4, 2, 4, 2, 2, 2,
2, 2, 2, 2, 1, 3, 0, 1, 1, 0,
1, 1, 1, 3, 1, 1, 1, 3, 3, 1,
1, 1, 1, 1, 1, 4, 1, 1, 2, 2,
0, 1, 1, 3, 1, 2, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 3, 1, 0, 1,
0, 1, 2, 2, 2, 2, 2, 0, 1, 1,
3, 0, 1, 1, 3, 1, 3, 0, 1, 1,
4, 5, 4, 0, 1, 1, 2, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 0, 1, 1, 1, 6, 2,
1, 3, 1, 3, 1, 0, 1, 0, 6, 2,
0, 6, 2, 1, 2, 3, 1, 3, 1, 1,
1, 1, 3, 1, 1, 1, 1, 2, 0, 1,
2, 1, 1, 3, 1, 4, 4, 3, 1, 2,
1, 2, 0, 1, 1, 3, 1, 3, 2, 2,
1, 1, 3, 1, 1, 1, 1, 1, 1, 2,
3, 3, 4, 3, 4, 4, 0, 4, 0, 4,
4, 1, 1, 1, 2, 1, 1, 1, 1
};
static const short yydefact[] = { 0,
3, 249, 202, 148, 180, 190, 235, 195, 205, 181,
194, 192, 193, 182, 191, 196, 183, 205, 184, 205,
197, 189, 236, 8, 178, 0, 0, 4, 7, 0,
6, 162, 151, 151, 185, 186, 187, 188, 198, 199,
200, 201, 203, 204, 151, 13, 242, 265, 251, 0,
243, 266, 245, 9, 207, 267, 0, 210, 208, 0,
220, 0, 223, 179, 250, 176, 0, 0, 5, 0,
17, 10, 164, 0, 163, 13, 153, 152, 187, 154,
155, 12, 14, 15, 162, 0, 107, 252, 241, 0,
218, 221, 177, 244, 19, 13, 147, 0, 0, 11,
16, 160, 264, 248, 261, 0, 255, 257, 0, 262,
284, 288, 286, 287, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 105, 57, 59, 89, 61,
64, 66, 90, 82, 68, 74, 76, 78, 80, 71,
85, 86, 87, 88, 91, 92, 93, 94, 113, 0,
108, 109, 112, 120, 116, 84, 121, 122, 124, 125,
115, 127, 128, 123, 289, 117, 215, 216, 211, 213,
0, 0, 0, 165, 0, 0, 0, 170, 161, 253,
107, 259, 268, 260, 269, 246, 0, 247, 0, 101,
71, 100, 99, 102, 63, 70, 0, 96, 0, 98,
0, 103, 104, 0, 0, 237, 0, 0, 0, 0,
0, 0, 0, 143, 0, 144, 0, 145, 146, 0,
138, 139, 0, 140, 141, 142, 0, 282, 283, 0,
276, 0, 129, 130, 279, 277, 131, 0, 285, 217,
0, 0, 239, 158, 0, 224, 158, 0, 0, 264,
0, 0, 0, 137, 0, 0, 0, 0, 110, 0,
0, 48, 26, 0, 0, 22, 24, 25, 27, 28,
29, 30, 31, 32, 33, 34, 38, 39, 40, 41,
42, 0, 0, 54, 55, 56, 174, 166, 168, 0,
0, 254, 0, 0, 270, 253, 107, 256, 258, 263,
0, 0, 119, 118, 253, 268, 238, 0, 0, 60,
62, 65, 67, 69, 75, 77, 79, 81, 83, 106,
114, 0, 0, 133, 0, 132, 0, 212, 209, 214,
229, 0, 227, 230, 231, 0, 232, 159, 156, 219,
225, 157, 222, 35, 44, 136, 45, 0, 0, 110,
0, 0, 111, 0, 0, 18, 23, 0, 149, 175,
0, 169, 0, 168, 274, 271, 272, 0, 0, 95,
97, 0, 72, 0, 280, 278, 281, 0, 126, 226,
239, 0, 0, 0, 0, 47, 46, 0, 0, 37,
150, 36, 167, 171, 173, 0, 275, 273, 0, 58,
134, 228, 234, 233, 0, 0, 110, 0, 0, 172,
73, 0, 0, 49, 0, 43, 52, 0, 0, 110,
51, 50, 0, 0, 53, 0, 0, 0
};
static const short yydefgoto[] = { 426,
27, 28, 29, 30, 82, 83, 263, 96, 264, 265,
266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 281, 282, 126, 127, 128,
129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
149, 150, 151, 352, 283, 153, 154, 155, 156, 157,
158, 159, 160, 325, 326, 284, 285, 286, 223, 227,
215, 217, 220, 84, 392, 77, 105, 243, 339, 73,
74, 75, 287, 363, 288, 361, 64, 65, 33, 34,
35, 36, 79, 38, 57, 58, 39, 40, 168, 169,
170, 241, 41, 171, 42, 43, 172, 44, 245, 246,
332, 333, 334, 335, 404, 45, 207, 336, 46, 47,
48, 49, 50, 291, 292, 107, 108, 109, 161, 51,
52, 293, 185, 53, 162, 323, 163, 322, 164, 230,
165, 166
};
static const short yypact[] = { 306,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -