/* A Bison parser, made from parser.y by GNU bison 1.35. */ #define YYBISON 1 /* Identify Bison output. */ #define yyparse zzparse #define yylex zzlex #define yyerror zzerror #define yylval zzlval #define yychar zzchar #define yydebug zzdebug #define yynerrs zznerrs # define ARRAY 257 # define BEGIN 258 # define CASE 259 # define CONST 260 # define DO 261 # define DOTS 262 # define ELSE 263 # define END 264 # define FIL 265 # define FAR 266 # define FOR 267 # define FUNCTION 268 # define GOTO 269 # define IDENT 270 # define ICONST 271 # define IF 272 # define IMPLEMENTATION 273 # define INTERFACE 274 # define LABEL 275 # define LOOPHOLE 276 # define OBJECT 277 # define OF 278 # define ORIGIN 279 # define OTHERWISE 280 # define PACKED 281 # define PROCEDURE 282 # define PROGRAM 283 # define RCONST 284 # define READ 285 # define RECORD 286 # define REPEAT 287 # define RETURN 288 # define SET 289 # define SCONST 290 # define STRING 291 # define THEN 292 # define TO 293 # define TYPE 294 # define UNTIL 295 # define UNIT 296 # define UNIT_END 297 # define VAR 298 # define WHILE 299 # define WITH 300 # define WRITE 301 # define SCOPE 302 # define LET 303 # define LETADD 304 # define LETSUB 305 # define LETDIV 306 # define LETMUL 307 # define LETAND 308 # define LETOR 309 # define LETSHL 310 # define LETSHR 311 # define EQ 312 # define NE 313 # define LT 314 # define LE 315 # define GT 316 # define GE 317 # define IN 318 # define PLUS 319 # define MINUS 320 # define OR 321 # define XOR 322 # define MOD 323 # define DIV 324 # define DIVR 325 # define MUL 326 # define AND 327 # define SHR 328 # define SHL 329 # define UPLUS 330 # define UMINUS 331 # define NOT 332 # define ADDRESS 333 #line 1 "parser.y" #include #include #include #if defined(__DECCXX) || defined(__GNUC__) #include #else #include #endif #include "nmtbl.h" #include "token.h" #include "trnod.h" #include "util.h" static int zzcnv_table[] = { #define DEF_TOKEN(mnem, cat, cls, yacc) yacc, #include "token.dpp" }; #define YYINITDEPTH 2000 void zzerror(char* text) { error(curr_token, "syntax error: %s", text); } #line 32 "parser.y" #ifndef YYSTYPE typedef union { token *tok; token_list *toks; node *n_node; tpd_node *n_tpd; block_node *n_block; stmt_node *n_stmt; decl_node *n_decl; expr_node *n_expr; expr_group_node *n_grp; write_param_node *n_wrtp; write_list_node *n_wrls; case_node *n_case; set_item_node *n_item; const_def_node *n_cdef; type_def_node *n_tdef; var_decl_node *n_vdcl; field_init_node *n_field; param_list_node *n_plist; idx_node *n_idx; field_list_node *n_fldls; variant_part_node *n_varp; selector_node *n_sel; variant_node *n_vari; compound_node *n_comp; import_list_node *n_imp; } yystype; # define YYSTYPE yystype # define YYSTYPE_IS_TRIVIAL 1 #endif #ifndef YYDEBUG # define YYDEBUG 0 #endif #define YYFINAL 549 #define YYFLAG -32768 #define YYNTBASE 90 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ #define YYTRANSLATE(x) ((unsigned)(x) <= 333 ? yytranslate[x] : 184) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ 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, 52, 53, 2, 2, 49, 2, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 50, 51, 2, 2, 2, 2, 57, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 54, 2, 55, 56, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 44, 45, 46, 47, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89 }; #if YYDEBUG static const short yyprhs[] = { 0, 0, 1, 4, 6, 8, 10, 13, 20, 21, 23, 25, 32, 42, 52, 59, 66, 68, 69, 73, 77, 79, 82, 83, 86, 88, 90, 92, 94, 96, 98, 100, 107, 111, 112, 115, 117, 119, 121, 123, 125, 127, 129, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 169, 172, 178, 183, 190, 199, 204, 209, 212, 215, 217, 219, 224, 228, 232, 234, 238, 240, 244, 245, 247, 248, 252, 254, 258, 260, 262, 263, 265, 269, 273, 275, 279, 281, 285, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 375, 379, 383, 387, 391, 395, 397, 400, 403, 406, 409, 412, 414, 418, 423, 427, 430, 435, 442, 444, 446, 448, 450, 454, 456, 457, 459, 463, 465, 469, 471, 475, 477, 481, 483, 484, 488, 490, 494, 498, 502, 504, 508, 510, 514, 520, 524, 526, 530, 532, 536, 539, 540, 544, 548, 554, 557, 558, 562, 566, 569, 570, 572, 576, 582, 586, 590, 596, 600, 606, 613, 622, 627, 634, 641, 650, 659, 670, 676, 685, 696, 704, 707, 710, 712, 714, 715, 719, 721, 725, 728, 730, 732, 736, 738, 740, 742, 744, 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, 766, 768, 770, 772, 774, 779, 782, 787, 789, 791, 799, 807, 815, 823, 827, 831, 834, 839, 844, 849, 853, 860, 863, 865, 867, 869, 871, 874, 878, 880, 882, 885, 888, 893, 894, 896, 898, 902, 908, 910, 914, 916, 920, 923, 925, 927, 932, 936, 938, 940, 943, 947 }; static const short yyrhs[] = { -1, 91, 92, 0, 93, 0, 95, 0, 96, 0, 100, 48, 0, 29, 16, 98, 51, 100, 48, 0, 0, 48, 0, 101, 0, 29, 16, 98, 51, 101, 94, 0, 42, 16, 51, 20, 104, 19, 97, 10, 48, 0, 42, 16, 51, 20, 104, 19, 97, 107, 48, 0, 20, 104, 19, 97, 10, 48, 0, 20, 104, 19, 97, 107, 48, 0, 101, 0, 0, 52, 99, 53, 0, 16, 49, 99, 0, 16, 0, 101, 107, 0, 0, 102, 101, 0, 132, 0, 134, 0, 137, 0, 140, 0, 146, 0, 144, 0, 103, 0, 42, 16, 51, 20, 104, 43, 0, 20, 104, 43, 0, 0, 105, 104, 0, 132, 0, 134, 0, 137, 0, 140, 0, 145, 0, 144, 0, 103, 0, 0, 119, 59, 117, 0, 119, 60, 117, 0, 119, 61, 117, 0, 119, 62, 117, 0, 119, 63, 117, 0, 119, 64, 117, 0, 119, 65, 117, 0, 119, 66, 117, 0, 119, 67, 117, 0, 15, 17, 0, 15, 16, 0, 5, 117, 24, 111, 10, 0, 18, 117, 38, 106, 0, 18, 117, 38, 106, 9, 106, 0, 13, 16, 59, 117, 39, 117, 7, 106, 0, 45, 117, 7, 106, 0, 33, 108, 41, 117, 0, 47, 110, 0, 31, 109, 0, 119, 0, 34, 0, 46, 123, 7, 106, 0, 17, 50, 106, 0, 16, 50, 106, 0, 107, 0, 4, 108, 10, 0, 106, 0, 106, 51, 108, 0, 0, 129, 0, 0, 52, 130, 53, 0, 113, 0, 113, 112, 108, 0, 26, 0, 9, 0, 0, 114, 0, 114, 51, 113, 0, 115, 50, 106, 0, 116, 0, 116, 49, 115, 0, 117, 0, 117, 8, 117, 0, 118, 0, 117, 75, 117, 0, 117, 76, 117, 0, 117, 79, 117, 0, 117, 82, 117, 0, 117, 80, 117, 0, 117, 81, 117, 0, 119, 59, 117, 0, 119, 60, 117, 0, 119, 61, 117, 0, 119, 62, 117, 0, 119, 63, 117, 0, 119, 66, 117, 0, 119, 67, 117, 0, 119, 64, 117, 0, 119, 65, 117, 0, 117, 83, 117, 0, 117, 85, 117, 0, 117, 84, 117, 0, 117, 77, 117, 0, 117, 78, 117, 0, 117, 72, 117, 0, 117, 70, 117, 0, 117, 71, 117, 0, 117, 73, 117, 0, 117, 68, 117, 0, 117, 69, 117, 0, 117, 74, 117, 0, 119, 0, 75, 118, 0, 76, 118, 0, 88, 118, 0, 57, 119, 0, 83, 119, 0, 120, 0, 52, 123, 53, 0, 119, 52, 124, 53, 0, 119, 48, 16, 0, 119, 56, 0, 119, 54, 123, 55, 0, 22, 52, 153, 49, 117, 53, 0, 126, 0, 17, 0, 30, 0, 36, 0, 54, 121, 55, 0, 16, 0, 0, 122, 0, 122, 49, 121, 0, 117, 0, 117, 8, 117, 0, 117, 0, 117, 49, 123, 0, 125, 0, 125, 49, 124, 0, 117, 0, 0, 52, 127, 53, 0, 128, 0, 128, 51, 127, 0, 16, 50, 117, 0, 52, 123, 53, 0, 131, 0, 131, 49, 130, 0, 117, 0, 117, 50, 117, 0, 117, 50, 117, 50, 117, 0, 21, 133, 51, 0, 17, 0, 17, 49, 133, 0, 16, 0, 16, 49, 133, 0, 6, 135, 0, 0, 136, 51, 135, 0, 16, 68, 117, 0, 16, 50, 154, 68, 117, 0, 40, 138, 0, 0, 139, 51, 138, 0, 16, 68, 153, 0, 44, 141, 0, 0, 142, 0, 142, 51, 58, 0, 142, 51, 58, 51, 141, 0, 142, 51, 141, 0, 99, 50, 153, 0, 16, 25, 117, 50, 157, 0, 28, 16, 148, 0, 14, 16, 148, 50, 153, 0, 28, 16, 148, 51, 147, 51, 0, 14, 16, 148, 50, 153, 51, 147, 51, 0, 28, 16, 148, 51, 0, 14, 16, 148, 50, 153, 51, 0, 28, 16, 148, 51, 100, 51, 0, 14, 16, 148, 50, 153, 51, 100, 51, 0, 28, 16, 48, 16, 148, 51, 100, 51, 0, 14, 16, 48, 16, 148, 50, 153, 51, 100, 51, 0, 14, 16, 51, 100, 51, 0, 28, 16, 148, 51, 12, 51, 100, 51, 0, 14, 16, 148, 50, 153, 51, 12, 51, 100, 51, 0, 14, 16, 51, 12, 51, 100, 51, 0, 16, 147, 0, 58, 147, 0, 16, 0, 58, 0, 0, 52, 149, 53, 0, 150, 0, 150, 51, 149, 0, 44, 151, 0, 151, 0, 143, 0, 99, 50, 152, 0, 99, 0, 157, 0, 160, 0, 157, 0, 158, 0, 166, 0, 167, 0, 164, 0, 172, 0, 163, 0, 161, 0, 162, 0, 156, 0, 155, 0, 157, 0, 159, 0, 166, 0, 165, 0, 156, 0, 14, 148, 50, 153, 0, 28, 148, 0, 37, 54, 117, 55, 0, 16, 0, 37, 0, 173, 3, 54, 176, 55, 24, 153, 0, 173, 3, 54, 176, 55, 24, 154, 0, 173, 3, 54, 174, 55, 24, 157, 0, 173, 3, 54, 174, 55, 24, 160, 0, 52, 99, 53, 0, 117, 8, 117, 0, 56, 153, 0, 173, 35, 24, 153, 0, 173, 35, 24, 154, 0, 173, 32, 178, 10, 0, 23, 168, 10, 0, 23, 52, 16, 53, 168, 10, 0, 169, 171, 0, 171, 0, 169, 0, 170, 0, 142, 0, 142, 51, 0, 142, 51, 170, 0, 144, 0, 145, 0, 144, 171, 0, 145, 171, 0, 173, 11, 24, 153, 0, 0, 27, 0, 175, 0, 175, 51, 174, 0, 16, 8, 16, 50, 153, 0, 177, 0, 177, 49, 176, 0, 157, 0, 117, 8, 117, 0, 179, 180, 0, 179, 0, 141, 0, 5, 181, 24, 182, 0, 16, 50, 153, 0, 153, 0, 183, 0, 183, 51, 0, 183, 51, 182, 0, 123, 50, 52, 178, 53, 0 }; #endif #if YYDEBUG /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { 0, 265, 265, 290, 290, 290, 292, 293, 298, 298, 300, 301, 309, 311, 313, 315, 318, 321, 322, 324, 325, 327, 332, 333, 335, 335, 335, 335, 336, 336, 336, 338, 340, 344, 345, 347, 347, 347, 347, 348, 348, 348, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 393, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 406, 408, 408, 410, 410, 412, 413, 415, 416, 428, 428, 430, 431, 432, 434, 436, 437, 439, 440, 464, 465, 466, 467, 468, 469, 470, 472, 473, 474, 475, 476, 477, 478, 479, 480, 483, 484, 485, 486, 487, 489, 490, 491, 492, 493, 494, 495, 497, 498, 500, 502, 504, 505, 507, 508, 509, 510, 511, 512, 513, 515, 516, 517, 518, 519, 520, 522, 523, 524, 526, 527, 529, 529, 531, 532, 534, 534, 537, 541, 542, 544, 547, 550, 550, 552, 553, 554, 596, 599, 600, 601, 602, 604, 607, 608, 610, 611, 613, 616, 617, 619, 621, 624, 625, 626, 631, 637, 639, 640, 643, 646, 650, 653, 656, 659, 662, 665, 667, 669, 671, 673, 675, 677, 680, 681, 682, 683, 686, 687, 689, 690, 692, 693, 693, 695, 696, 698, 698, 704, 704, 704, 704, 704, 704, 705, 705, 705, 705, 705, 707, 707, 707, 707, 707, 709, 711, 713, 715, 716, 718, 721, 724, 726, 729, 731, 734, 736, 738, 740, 743, 745, 748, 750, 751, 753, 756, 757, 758, 760, 760, 761, 762, 766, 768, 768, 770, 771, 773, 776, 776, 779, 780, 783, 786, 789, 791, 796, 797, 800, 801, 802, 804 }; #endif #if (YYDEBUG) || defined YYERROR_VERBOSE /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { "$", "error", "$undefined.", "ARRAY", "BEGIN", "CASE", "CONST", "DO", "DOTS", "ELSE", "END", "FIL", "FAR", "FOR", "FUNCTION", "GOTO", "IDENT", "ICONST", "IF", "IMPLEMENTATION", "INTERFACE", "LABEL", "LOOPHOLE", "OBJECT", "OF", "ORIGIN", "OTHERWISE", "PACKED", "PROCEDURE", "PROGRAM", "RCONST", "READ", "RECORD", "REPEAT", "RETURN", "SET", "SCONST", "STRING", "THEN", "TO", "TYPE", "UNTIL", "UNIT", "UNIT_END", "VAR", "WHILE", "WITH", "WRITE", "'.'", "','", "':'", "';'", "'('", "')'", "'['", "']'", "'^'", "'@'", "SCOPE", "LET", "LETADD", "LETSUB", "LETDIV", "LETMUL", "LETAND", "LETOR", "LETSHL", "LETSHR", "EQ", "NE", "LT", "LE", "GT", "GE", "IN", "PLUS", "MINUS", "OR", "XOR", "MOD", "DIV", "DIVR", "MUL", "AND", "SHR", "SHL", "UPLUS", "UMINUS", "NOT", "ADDRESS", "translation", "@1", "input_file", "program", "progend", "module", "unit", "unit_def_list", "prog_param_list", "ident_list", "block", "decl_part_list", "decl_part", "unit_spec", "unit_decl_list", "unit_decl", "statement", "compoundst", "sequence", "actual_params", "write_params", "case_list", "otherwise", "case_items", "case_item", "case_elem_list", "case_elem", "expr", "simple_expr", "primary", "constant", "set_elem_list", "set_elem", "expr_list", "act_param_list", "act_param", "record_constant", "field_init_list", "field_init_item", "expr_group", "write_list", "write_param", "label_decl_part", "label_list", "const_def_part", "const_def_list", "const_def", "type_def_part", "type_def_list", "type_def", "var_decl_part", "var_decl_list", "var_decl", "proc_decl", "proc_fwd_decl", "proc_spec", "proc_def", "qualifiers", "formal_params", "formal_param_list", "formal_param", "param_decl", "param_type", "type", "const_type", "fptr_type", "string_type", "simple_type", "array_type", "const_array_type", "conformant_array_type", "enum_type", "range_type", "pointer_type", "set_type", "const_set_type", "record_type", "object_type", "object_components", "object_fields", "field_decl_list", "object_methods", "file_type", "packed", "conformant_indices", "conformant_index", "indices", "index_spec", "field_list", "fixed_part", "variant_part", "selector", "variant_list", "variant", 0 }; #endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { 0, 91, 90, 92, 92, 92, 93, 93, 94, 94, 95, 95, 96, 96, 96, 96, 97, 98, 98, 99, 99, 100, 101, 101, 102, 102, 102, 102, 102, 102, 102, 103, 103, 104, 104, 105, 105, 105, 105, 105, 105, 105, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 107, 108, 108, 109, 109, 110, 110, 111, 111, 112, 112, 113, 113, 113, 114, 115, 115, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, 118, 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 120, 120, 120, 120, 120, 120, 121, 121, 121, 122, 122, 123, 123, 124, 124, 125, 125, 126, 127, 127, 128, 129, 130, 130, 131, 131, 131, 132, 133, 133, 133, 133, 134, 135, 135, 136, 136, 137, 138, 138, 139, 140, 141, 141, 141, 141, 141, 142, 142, 143, 143, 144, 144, 145, 145, 146, 146, 146, 146, 146, 146, 146, 146, 147, 147, 147, 147, 148, 148, 149, 149, 150, 150, 150, 151, 151, 152, 152, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 154, 154, 154, 154, 154, 155, 155, 156, 157, 157, 158, 159, 160, 160, 161, 162, 163, 164, 165, 166, 167, 167, 168, 168, 168, 169, 170, 170, 170, 171, 171, 171, 171, 172, 173, 173, 174, 174, 175, 176, 176, 177, 177, 178, 178, 179, 180, 181, 181, 182, 182, 182, 183 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { 0, 0, 2, 1, 1, 1, 2, 6, 0, 1, 1, 6, 9, 9, 6, 6, 1, 0, 3, 3, 1, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 6, 3, 0, 2, 1, 1, 1, 1, 1, 1, 1, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 5, 4, 6, 8, 4, 4, 2, 2, 1, 1, 4, 3, 3, 1, 3, 1, 3, 0, 1, 0, 3, 1, 3, 1, 1, 0, 1, 3, 3, 1, 3, 1, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 2, 2, 2, 2, 1, 3, 4, 3, 2, 4, 6, 1, 1, 1, 1, 3, 1, 0, 1, 3, 1, 3, 1, 3, 1, 3, 1, 0, 3, 1, 3, 3, 3, 1, 3, 1, 3, 5, 3, 1, 3, 1, 3, 2, 0, 3, 3, 5, 2, 0, 3, 3, 2, 0, 1, 3, 5, 3, 3, 5, 3, 5, 6, 8, 4, 6, 6, 8, 8, 10, 5, 8, 10, 7, 2, 2, 1, 1, 0, 3, 1, 3, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 2, 4, 1, 1, 7, 7, 7, 7, 3, 3, 2, 4, 4, 4, 3, 6, 2, 1, 1, 1, 1, 2, 3, 1, 1, 2, 2, 4, 0, 1, 1, 3, 5, 1, 3, 1, 3, 2, 1, 1, 4, 3, 1, 1, 2, 3, 5 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const short yydefact[] = { 1, 22, 161, 0, 33, 0, 0, 0, 166, 0, 170, 2, 3, 4, 5, 0, 10, 22, 30, 24, 25, 26, 27, 29, 28, 0, 160, 0, 195, 0, 33, 0, 0, 41, 0, 33, 35, 36, 37, 38, 40, 39, 158, 156, 0, 195, 17, 0, 165, 0, 0, 20, 0, 169, 171, 6, 42, 21, 23, 251, 0, 161, 0, 22, 0, 0, 195, 0, 195, 0, 22, 32, 34, 0, 0, 155, 0, 0, 0, 0, 251, 166, 0, 0, 0, 251, 170, 0, 0, 0, 133, 129, 0, 0, 130, 71, 42, 63, 131, 0, 0, 73, 0, 134, 69, 67, 0, 62, 121, 128, 225, 252, 226, 0, 221, 217, 218, 220, 219, 0, 133, 129, 0, 0, 0, 0, 0, 163, 87, 115, 162, 195, 0, 0, 0, 0, 20, 0, 0, 203, 201, 0, 197, 200, 251, 0, 0, 0, 0, 16, 159, 157, 195, 22, 0, 22, 195, 133, 0, 195, 0, 251, 0, 168, 216, 215, 206, 207, 213, 214, 212, 210, 208, 209, 211, 0, 167, 33, 0, 19, 175, 172, 174, 0, 0, 53, 52, 42, 42, 0, 251, 0, 61, 72, 0, 0, 139, 0, 0, 60, 133, 0, 0, 146, 137, 0, 135, 42, 68, 0, 144, 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 0, 119, 116, 115, 117, 120, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 187, 195, 195, 199, 251, 196, 0, 0, 251, 181, 33, 0, 0, 0, 0, 193, 194, 0, 0, 18, 0, 8, 0, 0, 243, 246, 247, 0, 241, 242, 240, 223, 133, 0, 233, 0, 0, 0, 0, 0, 0, 170, 79, 0, 66, 65, 42, 0, 0, 0, 42, 0, 42, 152, 0, 150, 0, 122, 145, 0, 0, 132, 134, 70, 124, 143, 0, 141, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 164, 0, 262, 0, 261, 251, 112, 113, 109, 110, 108, 111, 114, 88, 89, 106, 107, 90, 92, 93, 91, 103, 105, 104, 94, 95, 96, 97, 98, 101, 102, 99, 100, 251, 0, 0, 177, 226, 202, 204, 205, 0, 198, 22, 0, 0, 14, 15, 22, 22, 191, 192, 183, 179, 7, 9, 11, 251, 0, 244, 248, 249, 237, 239, 231, 232, 0, 251, 251, 22, 31, 176, 173, 0, 75, 80, 0, 83, 85, 0, 55, 0, 149, 59, 58, 140, 64, 0, 74, 0, 148, 0, 147, 138, 136, 123, 144, 126, 224, 0, 258, 0, 256, 236, 251, 260, 235, 0, 190, 251, 0, 0, 0, 0, 182, 0, 0, 222, 0, 245, 0, 250, 234, 0, 54, 78, 77, 42, 79, 42, 0, 0, 0, 42, 0, 153, 151, 142, 0, 0, 0, 133, 265, 0, 22, 178, 0, 22, 184, 180, 185, 188, 0, 0, 0, 0, 76, 81, 82, 84, 86, 0, 56, 127, 0, 259, 251, 257, 251, 0, 0, 0, 0, 253, 0, 238, 251, 12, 13, 42, 154, 228, 264, 0, 263, 266, 186, 0, 0, 0, 189, 227, 57, 0, 267, 0, 251, 254, 170, 268, 251, 229, 230, 0, 255, 269, 0, 0, 0 }; static const short yydefgoto[] = { 547, 1, 11, 12, 397, 13, 14, 148, 79, 52, 15, 134, 17, 18, 34, 35, 104, 105, 106, 192, 199, 414, 468, 415, 416, 417, 418, 162, 128, 129, 108, 205, 206, 201, 328, 329, 109, 202, 203, 193, 316, 317, 19, 44, 20, 26, 27, 21, 48, 49, 22, 343, 54, 140, 23, 41, 24, 280, 65, 141, 142, 143, 379, 163, 113, 164, 165, 166, 167, 116, 381, 168, 169, 170, 171, 117, 172, 173, 289, 290, 291, 292, 174, 175, 513, 514, 442, 443, 344, 345, 446, 484, 525, 526 }; static const short yypact[] = { -32768, 360, 51, 65, 795, 117, 80, 83, 85, 93, 103,-32768,-32768,-32768,-32768, -33, 100, 924,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 24,-32768, 18, 88, 108, 795, 113, 131,-32768, 5, 795,-32768,-32768,-32768,-32768, -32768,-32768, 101, 105, 122, 28, 159, 110,-32768, 128, 161, -6, 106,-32768, 172,-32768, 943,-32768,-32768, 89, 731, 51, 213, 449, 86, 182, 181, 193, 181, 189, 924,-32768,-32768, 117, 117,-32768, 226, 195, 231, 199, 654, 85, 233, 731, 231, 654, -2, 731, 247, 126, 214, 216, 731, 221,-32768, 222, 943,-32768,-32768, 731, 731, 225, 742, 731, 217,-32768, 269, 1177,-32768,-32768, -32768,-32768, 228, 212,-32768,-32768,-32768,-32768,-32768, 29, -32768,-32768, 245, 731, 731, 245, 731, 949,-32768, 1197, -32768, 181, 234, 235, 100, 268, 241, 275, 231, 243, -32768, 248, 249,-32768, 654, 244, 252, 276, 118,-32768, -32768,-32768, 181, 351, 251, 924, 181, 882, 7, 181, 775, 654, 478,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 62,-32768, 795, 1003,-32768, -32768, 255,-32768, 796, 239,-32768,-32768, 943, 943, 527, 654, 731,-32768,-32768, 272, 426, 967, 303, 731,-32768, 264, 263, 265, 266, 504, 267, 274, 943,-32768, 305, 731, 731,-32768, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 270, 103, 302, 166,-32768, 166, -32768, 166,-32768, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 277, 924,-32768, 181, 181,-32768, 90,-32768, 86, 278, 654, 0, 795, 280, 282, 292, 296, 0, 0, 299, 300,-32768, 304, 9, 312, 337, 313, 97, 97, 358, 97,-32768,-32768,-32768, 178, 317,-32768, 731, 319, 354, 359, 12, 17, 103, 731, 731,-32768,-32768, 943, 333, 332, 731, 943, 731, 943, 1039, 334, 341, 731,-32768, -32768, 370, 731,-32768, 731,-32768,-32768, 949, 339, 345, 342, 949, 949, 949, 949, 949, 949, 949, 949, 949, 1139, 949, 687,-32768, 388, 394, 89, 438, 438, 438, 438, 438, 438, 438, 253, 253, 253, 253,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 949, 949, 949, 949, 949, 949, 949, 949, 949, 654, 352, 355,-32768,-32768,-32768, -32768,-32768, 403,-32768, 899, 356, 365,-32768,-32768, 924, 924,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 654, 357, 103,-32768,-32768,-32768,-32768,-32768, 949, 687, 654, 654, 924,-32768,-32768,-32768, 401, 53, 362, 364, 366, 556, 930, 408, 731,-32768, 949,-32768,-32768,-32768, 731,-32768, 731, 949, 264,-32768, 949,-32768,-32768, 731,-32768,-32768, 582,-32768, 368, 372,-32768, 698,-32768,-32768, 373,-32768, 654, 371, 376, 378, 379, 0, 384, 385,-32768, 104, -32768, 386,-32768,-32768, 127,-32768,-32768,-32768, 943, 731, 943, 731, 731, 731, 943, 1108, 1075,-32768,-32768, 731, 418, 687, 3,-32768, 420, 924,-32768, 429, 924,-32768, -32768,-32768,-32768, 436, 423, 402, 406,-32768,-32768,-32768, -32768, 949, 460,-32768,-32768, 731, 949, 89,-32768, 654, 731, 407, 451, 409, 411, 414,-32768, 654,-32768,-32768, 943, 949,-32768,-32768, 416,-32768, 421,-32768, 455, 450, 429,-32768,-32768,-32768, 424, 731, 425, 90,-32768, 103, -32768, 654,-32768,-32768, 427,-32768,-32768, 473, 481,-32768 }; static const short yypgoto[] = { -32768,-32768,-32768,-32768,-32768,-32768,-32768, 73,-32768, 171, -45, 21,-32768, 33, -18,-32768, -159, -13, -92,-32768, -32768,-32768,-32768, 16,-32768, 19,-32768, -53, 115, -36, -32768, 163,-32768, -98, 87,-32768,-32768, 167,-32768,-32768, 95,-32768, 36, -48, 40, 465,-32768, 47, 485,-32768, 48, -1, -152,-32768, 68, -113,-32768, -236, 78, 301, -32768, 430,-32768, -49, -335,-32768, -54, -59,-32768,-32768, 30,-32768,-32768,-32768,-32768,-32768, -51,-32768, 111,-32768, 191, -31,-32768, -58, 41,-32768, -397,-32768, 54,-32768, -32768,-32768, 57,-32768 }; #define YYLAST 1264 static const short yytable[] = { 115, 119, 197, 57, 194, 114, 286, 127, 118, 53, 461, 447, 67, 56, 51, 55, 277, 72, 133, 83, 107, 29, 16, 51, 70, 150, 151, -225, 306, 307, 178, 410, 224, 110, 183, 31, 180, 33, 58, 189, 36, 391, 392, 84, 37, 288, 195, 196, 71, 196, 204, 38, 39, 509, 378, 411, 181, 396, 278, 285, 107, 225, 466, 33, 226, 298, 36, 25, 33, 61, 37, 36, 40, 299, 59, 37, 76, 38, 39, 467, 64, 28, 38, 39, 508, 182, 227, 229, 229, 231, 229, 149, 60, 310, 225, 269, 45, 300, 40, 46, 135, 47, 136, 40, 56, 110, 110, 196, 279, 50, 282, 29, 296, 330, 137, 325, 111, 111, 29, 51, 51, 57, 56, 77, 66, 31, 112, 378, 273, 68, 138, 56, 31, 42, 43, 274, 62, 495, 196, 63, 64, 309, 185, 186, 145, 315, 146, 69, 454, 421, 73, 107, 107, 425, 74, 427, 85, 327, 196, 301, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 107, 522, 75, 288, 288, 283, 288, 80, 81, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 380, 382, 260, 33, 78, 82, 36, 209, 426, 375, 37, 210, 454, 211, 385, 212, 86, 38, 39, 287, 84, 318, 131, 275, -20, 144, 64, 284, 139, 71, 293, 228, 230, 147, 232, 152, 412, 406, 40, 153, 136, 286, 154, 155, 419, 420, 177, 386, 179, 401, 402, 424, 404, 196, 120, 121, 184, 187, 431, 188, 93, 207, 434, 57, 204, 107, 190, 191, 94, 107, 198, 107, 208, 223, 98, 222, 441, 263, 261, 262, 115, 119, 440, 84, 264, 114, 266, 270, 118, 272, 102, 305, 103, 268, 267, 413, 271, 281, 33, 303, 286, 36, 139, 314, 499, 37, 311, 318, 503, 319, 321, 320, 38, 39, 326, 323, 324, 342, 448, 346, 374, 387, 384, 388, 295, 244, 245, 246, 247, 248, 249, 250, 453, 40, 376, 377, 389, 456, 457, 288, 390, 441, 458, 393, 394, 395, 399, 440, 287, 287, 2, 287, 462, 463, 533, 398, 276, 400, 3, 2, 277, 403, 475, 405, 30, 5, 407, 3, 476, 497, 315, 408, 6, 4, 5, 422, 409, 327, 423, 432, 429, 6, 7, 430, 8, 436, 32, 437, 10, 483, 438, 444, 445, 8, 486, 9, 449, 10, 450, 451, 455, 411, 278, 459, 465, 524, 469, 470, 471, 419, 474, 419, 501, 502, 481, 441, 480, 485, 487, 506, 488, 440, 489, 490, 149, 107, 312, 107, 491, 492, 524, 107, 139, 511, 494, 507, 515, 510, 512, 516, 517, 115, 119, 518, 496, 521, 114, 519, 2, 118, 196, 527, 528, 523, 132, 530, 3, 529, 531, 534, 520, 532, 30, 5, 536, 535, 548, 537, 541, 539, 6, 542, 382, 546, 549, 196, 464, 107, 498, 297, 435, 433, 8, 500, 32, 545, 10, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 322, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 478, 477, 130, 287, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 472, 308, 176, 543, 265, 383, 493, 538, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 479, 460, 540, 544, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 0, 0, 0, 0, 0, 0, 0, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 156, 0, 157, 121, 0, 0, 0, 0, 93, 158, 0, 0, 0, 111, 159, 0, 94, 0, 0, 0, 0, 0, 98, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 121, 0, 160, 0, 103, 93, 161, 122, 156, 0, 482, 121, 0, 94, 0, 0, 93, 158, 0, 98, 378, 111, 159, 0, 94, 123, 124, 0, 0, 0, 98, 112, 0, 125, 0, 102, 0, 103, 126, 0, 122, 0, 0, 120, 121, 0, 160, 0, 103, 93, 161, 122, 0, 0, 200, 121, 0, 94, 123, 124, 93, 0, 0, 98, 0, 0, 125, 0, 94, 123, 124, 126, 0, 0, 98, 0, 0, 125, 0, 102, 0, 103, 126, 0, 122, 0, 0, 294, 121, 0, 102, 0, 103, 93, 0, 122, 0, 2, 0, 0, 0, 94, 123, 124, 0, 29, 0, 98, 0, 0, 125, 30, 5, 123, 124, 126, 304, 0, 0, 31, 0, 125, 0, 102, 0, 103, 126, 0, 122, 0, 0, 8, 0, 32, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 124, 0, 0, 0, 0, 0, 0, 125, 0, 0, 0, 0, 126, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, -225, 0, 0, 0, -225, -225, -225, 0, 0, 0, -225, 0, 0, 0, -225, 0, 0, 0, 0, -225, -225, -225, 0, 2, -225, 0, 0, 0, -225, 452, 0, 3, 0, 277, 0, 0, 0, 30, 5, 0, -225, 0, -225, -225, -225, 6, 0, 0, 2, -225, 0, -225, 0, -225, 0, -225, 3, 8, 0, 32, 0, 10, 30, 5, 0, 56, 87, 0, 0, 0, 6, 0, 0, 0, 88, 278, 89, 90, 91, 92, 0, 0, 8, 93, 32, 0, 10, 473, 0, 0, 0, 94, 95, 0, 96, 97, 0, 98, 0, 0, 0, 0, 0, 0, 0, 0, 99, 100, 101, 0, 0, 0, 0, 102, 0, 103, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 313, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 428, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 505, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 209, 0, 0, 0, 210, 0, 211, 0, 212, 0, 0, 213, 214, 215, 216, 217, 218, 219, 220, 221, 209, 0, 0, 0, 210, 0, 211, 0, 212, 0, 0, 251, 252, 253, 254, 255, 256, 257, 258, 259 }; static const short yycheck[] = { 59, 59, 100, 16, 96, 59, 158, 60, 59, 10, 407, 346, 30, 4, 16, 48, 16, 35, 63, 25, 56, 14, 1, 16, 19, 73, 74, 24, 187, 188, 83, 19, 3, 16, 87, 28, 85, 4, 17, 92, 4, 277, 278, 49, 4, 158, 99, 100, 43, 102, 103, 4, 4, 50, 37, 43, 58, 48, 58, 52, 96, 32, 9, 30, 35, 3, 30, 16, 35, 51, 30, 35, 4, 11, 50, 35, 48, 30, 30, 26, 52, 16, 35, 35, 481, 86, 122, 123, 124, 125, 126, 70, 68, 191, 32, 144, 16, 35, 30, 16, 14, 16, 16, 35, 4, 16, 16, 160, 153, 16, 155, 14, 161, 211, 28, 207, 27, 27, 14, 16, 16, 134, 4, 45, 16, 28, 37, 37, 10, 16, 44, 4, 28, 16, 17, 148, 48, 10, 191, 51, 52, 190, 16, 17, 66, 198, 68, 16, 384, 308, 49, 187, 188, 312, 49, 314, 50, 210, 211, 177, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 207, 507, 51, 287, 288, 155, 290, 68, 51, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 266, 266, 131, 177, 52, 51, 177, 48, 313, 261, 177, 52, 455, 54, 270, 56, 51, 177, 177, 158, 49, 50, 16, 152, 53, 50, 52, 156, 64, 43, 159, 123, 124, 51, 126, 16, 302, 297, 177, 51, 16, 400, 78, 51, 304, 305, 20, 272, 84, 287, 288, 311, 290, 313, 16, 17, 16, 50, 318, 50, 22, 51, 322, 283, 324, 308, 52, 52, 30, 312, 52, 314, 10, 68, 36, 54, 342, 16, 51, 51, 346, 346, 342, 49, 16, 346, 50, 50, 346, 20, 52, 59, 54, 51, 53, 303, 51, 53, 272, 51, 459, 272, 138, 7, 470, 272, 41, 50, 474, 53, 51, 53, 272, 272, 16, 55, 49, 54, 374, 24, 50, 48, 51, 48, 160, 79, 80, 81, 82, 83, 84, 85, 384, 272, 263, 264, 51, 389, 390, 459, 51, 407, 398, 51, 51, 48, 16, 407, 287, 288, 6, 290, 408, 409, 520, 50, 12, 51, 14, 6, 16, 10, 422, 53, 20, 21, 54, 14, 428, 468, 430, 24, 28, 20, 21, 49, 24, 437, 53, 16, 53, 28, 29, 49, 40, 53, 42, 49, 44, 445, 55, 10, 5, 40, 450, 42, 51, 44, 50, 3, 51, 43, 58, 53, 10, 510, 51, 50, 49, 469, 9, 471, 472, 473, 49, 481, 55, 51, 54, 479, 51, 481, 51, 51, 410, 468, 7, 470, 51, 51, 535, 474, 268, 485, 55, 24, 488, 24, 16, 10, 24, 507, 507, 48, 464, 505, 507, 48, 6, 507, 510, 51, 8, 509, 12, 51, 14, 55, 51, 50, 7, 517, 20, 21, 16, 51, 0, 24, 50, 52, 28, 537, 537, 53, 0, 535, 410, 520, 469, 8, 324, 321, 40, 471, 42, 541, 44, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 8, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 437, 430, 61, 459, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 8, 38, 81, 537, 138, 268, 459, 530, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 8, 400, 535, 539, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 14, -1, 16, 17, -1, -1, -1, -1, 22, 23, -1, -1, -1, 27, 28, -1, 30, -1, -1, -1, -1, -1, 36, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, 17, -1, 52, -1, 54, 22, 56, 57, 14, -1, 16, 17, -1, 30, -1, -1, 22, 23, -1, 36, 37, 27, 28, -1, 30, 75, 76, -1, -1, -1, 36, 37, -1, 83, -1, 52, -1, 54, 88, -1, 57, -1, -1, 16, 17, -1, 52, -1, 54, 22, 56, 57, -1, -1, 16, 17, -1, 30, 75, 76, 22, -1, -1, 36, -1, -1, 83, -1, 30, 75, 76, 88, -1, -1, 36, -1, -1, 83, -1, 52, -1, 54, 88, -1, 57, -1, -1, 16, 17, -1, 52, -1, 54, 22, -1, 57, -1, 6, -1, -1, -1, 30, 75, 76, -1, 14, -1, 36, -1, -1, 83, 20, 21, 75, 76, 88, 24, -1, -1, 28, -1, 83, -1, 52, -1, 54, 88, -1, 57, -1, -1, 40, -1, 42, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, -1, -1, -1, -1, -1, 83, -1, -1, -1, -1, 88, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 0, -1, -1, -1, 4, 5, 6, -1, -1, -1, 10, -1, -1, -1, 14, -1, -1, -1, -1, 19, 20, 21, -1, 6, 24, -1, -1, -1, 28, 12, -1, 14, -1, 16, -1, -1, -1, 20, 21, -1, 40, -1, 42, 43, 44, 28, -1, -1, 6, 49, -1, 51, -1, 53, -1, 55, 14, 40, -1, 42, -1, 44, 20, 21, -1, 4, 5, -1, -1, -1, 28, -1, -1, -1, 13, 58, 15, 16, 17, 18, -1, -1, 40, 22, 42, -1, 44, 39, -1, -1, -1, 30, 31, -1, 33, 34, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, 45, 46, 47, -1, -1, -1, -1, 52, -1, 54, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 49, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 48, -1, -1, -1, 52, -1, 54, -1, 56, -1, -1, 59, 60, 61, 62, 63, 64, 65, 66, 67, 48, -1, -1, -1, 52, -1, 54, -1, 56, -1, -1, 59, 60, 61, 62, 63, 64, 65, 66, 67 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* 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. */ #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) /* The parser invokes alloca or malloc; define the necessary symbols. */ # if YYSTACK_USE_ALLOCA # define YYSTACK_ALLOC alloca # else # ifndef YYSTACK_USE_ALLOCA # if defined (alloca) || defined (_ALLOCA_H) # define YYSTACK_ALLOC alloca # else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # endif # 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 /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif # define YYSTACK_ALLOC malloc # define YYSTACK_FREE free # endif #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { short yyss; YYSTYPE yyvs; # if YYLSP_NEEDED YYLTYPE yyls; # endif }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # if YYLSP_NEEDED # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAX) # else # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAX) # endif /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if 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_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif #if ! defined (YYSIZE_T) && defined (size_t) # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) # define YYSIZE_T unsigned int #endif #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ yyerror ("syntax error: cannot back up"); \ YYERROR; \ } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions are run). When YYLLOC_DEFAULT is run, CURRENT is set the location of the first token. By default, to implement support for ranges, extend its range to the last symbol. */ #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ Current.last_line = Rhs[N].last_line; \ Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ #if YYPURE # if YYLSP_NEEDED # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) # else # define YYLEX yylex (&yylval, &yylloc) # endif # else /* !YYLSP_NEEDED */ # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) # else # define YYLEX yylex (&yylval) # endif # endif /* !YYLSP_NEEDED */ #else /* !YYPURE */ # define YYLEX yylex () #endif /* !YYPURE */ /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #if YYMAXDEPTH == 0 # undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #ifdef YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T # if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) # else yystrlen (yystr) const char *yystr; # endif { register const char *yys = yystr; while (*yys++ != '\0') continue; return yys - yystr - 1; } # endif # endif # ifndef yystpcpy # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * # if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) # else yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; # endif { register char *yyd = yydest; register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif #endif #line 315 "/usr/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL # else # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; # endif #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL #endif /* !YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ # ifdef YYPARSE_PARAM int yyparse (void *); # else int yyparse (void); # endif #endif /* YY_DECL_VARIABLES -- depending whether we use a pure parser, variables are global, or local to YYPARSE. */ #define YY_DECL_NON_LSP_VARIABLES \ /* The lookahead symbol. */ \ int yychar; \ \ /* The semantic value of the lookahead symbol. */ \ YYSTYPE yylval; \ \ /* Number of parse errors so far. */ \ int yynerrs; #if YYLSP_NEEDED # define YY_DECL_VARIABLES \ YY_DECL_NON_LSP_VARIABLES \ \ /* Location data for the lookahead symbol. */ \ YYLTYPE yylloc; #else # define YY_DECL_VARIABLES \ YY_DECL_NON_LSP_VARIABLES #endif /* If nonreentrant, generate the variables here. */ #if !YYPURE YY_DECL_VARIABLES #endif /* !YYPURE */ int yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { /* If reentrant, generate the variables here. */ #if YYPURE YY_DECL_VARIABLES #endif /* !YYPURE */ register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ int yychar1 = 0; /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; #if YYLSP_NEEDED /* The location stack. */ YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #endif #if YYLSP_NEEDED # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else # define YYPOPSTACK (yyvsp--, yyssp--) #endif YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYLSP_NEEDED YYLTYPE yyloc; #endif /* When reducing, the number of symbols on the RHS of the reduced rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; #if YYLSP_NEEDED yylsp = yyls; #endif goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ # if YYLSP_NEEDED YYLTYPE *yyls1 = yyls; /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); yyls = yyls1; # else yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); # endif yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyoverflowlab; # else /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; { short *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # if YYLSP_NEEDED YYSTACK_RELOCATE (yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; #if YYLSP_NEEDED yylsp = yyls + yysize - 1; #endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyssp >= yyss + yystacksize - 1) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yychar1 = YYTRANSLATE (yychar); #if YYDEBUG /* We have to keep this `#if YYDEBUG', since we use variables which are defined only if `YYDEBUG' is set. */ if (yydebug) { YYFPRINTF (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ # ifdef YYPRINT YYPRINT (stderr, yychar, yylval); # endif YYFPRINTF (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ YYDPRINTF ((stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #if YYLSP_NEEDED *++yylsp = yylloc; #endif /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to the semantic value of the lookahead token. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; #if YYLSP_NEEDED /* Similarly for the default location. Let the user run additional commands if for instance locations are ranges. */ yyloc = yylsp[1-yylen]; YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); #endif #if YYDEBUG /* We have to keep this `#if YYDEBUG', since we use variables which are defined only if `YYDEBUG' is set. */ if (yydebug) { int yyi; YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 1: #line 266 "parser.y" { if (turbo_pascal) { zzcnv_table[TKN_STRING] = STRING; zzcnv_table[TKN_STR] = WRITE; zzcnv_table[TKN_SHL] = SHL; zzcnv_table[TKN_SHR] = SHR; zzcnv_table[TKN_XOR] = XOR; zzcnv_table[TKN_UNIT] = UNIT; zzcnv_table[TKN_FAR] = FAR; zzcnv_table[TKN_IMPLEMENTATION] = IMPLEMENTATION; zzcnv_table[TKN_INTERFACE] = INTERFACE; zzcnv_table[TKN_OBJECT] = OBJECT; zzcnv_table[TKN_CONSTRUCTOR] = PROCEDURE; zzcnv_table[TKN_DESTRUCTOR] = PROCEDURE; } else { zzcnv_table[TKN_ORIGIN] = ORIGIN; } ; break;} case 2: #line 285 "parser.y" { yyvsp[0].n_node->attrib(ctx_program); yyvsp[0].n_node->translate(ctx_program); ; break;} case 6: #line 292 "parser.y" { yyval.n_node = new program_node(NULL, NULL, NULL, NULL, yyvsp[-1].n_block, yyvsp[0].tok); ; break;} case 7: #line 294 "parser.y" { yyval.n_node = new program_node(yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].n_imp, yyvsp[-2].tok, yyvsp[-1].n_block, yyvsp[0].tok); ; break;} case 8: #line 298 "parser.y" { yyval.tok = NULL; ; break;} case 10: #line 300 "parser.y" { yyval.n_node = new module_node(NULL, NULL, NULL, NULL, yyvsp[0].n_decl, NULL); ; break;} case 11: #line 302 "parser.y" { yyval.n_node = new module_node(yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].n_imp, yyvsp[-2].tok, yyvsp[-1].n_decl, yyvsp[0].tok); ; break;} case 12: #line 310 "parser.y" { yyval.n_node = new unit_node(yyvsp[-8].tok, yyvsp[-7].tok, yyvsp[-6].tok, yyvsp[-5].tok, yyvsp[-4].n_decl, yyvsp[-3].tok, yyvsp[-2].n_decl, NULL, yyvsp[-1].tok, yyvsp[0].tok); ; break;} case 13: #line 312 "parser.y" { yyval.n_node = new unit_node(yyvsp[-8].tok, yyvsp[-7].tok, yyvsp[-6].tok, yyvsp[-5].tok, yyvsp[-4].n_decl, yyvsp[-3].tok, yyvsp[-2].n_decl, yyvsp[-1].n_comp, NULL, yyvsp[0].tok); ; break;} case 14: #line 314 "parser.y" { yyval.n_node = new unit_node(NULL, NULL, NULL, yyvsp[-5].tok, yyvsp[-4].n_decl, yyvsp[-3].tok, yyvsp[-2].n_decl, NULL, yyvsp[-1].tok, yyvsp[0].tok); ; break;} case 15: #line 316 "parser.y" { yyval.n_node = new unit_node(NULL, NULL, NULL, yyvsp[-5].tok, yyvsp[-4].n_decl, yyvsp[-3].tok, yyvsp[-2].n_decl, yyvsp[-1].n_comp, NULL, yyvsp[0].tok); ; break;} case 17: #line 321 "parser.y" { yyval.n_imp = NULL; ; break;} case 18: #line 322 "parser.y" { yyval.n_imp = new import_list_node(yyvsp[-2].tok, yyvsp[-1].toks, yyvsp[0].tok); ; break;} case 19: #line 324 "parser.y" { yyval.toks = new token_list(yyvsp[-2].tok, yyvsp[0].toks); ; break;} case 20: #line 325 "parser.y" { yyval.toks = new token_list(yyvsp[0].tok); ; break;} case 21: #line 328 "parser.y" { yyval.n_block = new block_node(yyvsp[-1].n_decl, yyvsp[0].n_comp); ; break;} case 22: #line 332 "parser.y" { yyval.n_decl = NULL; ; break;} case 23: #line 333 "parser.y" { yyvsp[-1].n_decl->next = yyvsp[0].n_decl; yyval.n_decl = yyvsp[-1].n_decl; ; break;} case 31: #line 339 "parser.y" { yyval.n_decl = new unit_spec_node(yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].n_decl); ; break;} case 32: #line 341 "parser.y" { yyval.n_decl = new unit_spec_node(NULL, NULL, NULL, yyvsp[-2].tok, yyvsp[-1].n_decl); ; break;} case 33: #line 344 "parser.y" { yyval.n_decl = NULL; ; break;} case 34: #line 345 "parser.y" { yyvsp[-1].n_decl->next = yyvsp[0].n_decl; yyval.n_decl = yyvsp[-1].n_decl; ; break;} case 42: #line 377 "parser.y" { yyval.n_stmt = new empty_node(curr_token->prev_relevant()); ; break;} case 43: #line 378 "parser.y" { yyval.n_stmt = new assign_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 44: #line 379 "parser.y" { yyval.n_stmt = new assign_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 45: #line 380 "parser.y" { yyval.n_stmt = new assign_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 46: #line 381 "parser.y" { yyval.n_stmt = new assign_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 47: #line 382 "parser.y" { yyval.n_stmt = new assign_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 48: #line 383 "parser.y" { yyval.n_stmt = new assign_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 49: #line 384 "parser.y" { yyval.n_stmt = new assign_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 50: #line 385 "parser.y" { yyval.n_stmt = new assign_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 51: #line 386 "parser.y" { yyval.n_stmt = new assign_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 52: #line 387 "parser.y" { yyval.n_stmt = new goto_node(yyvsp[-1].tok, yyvsp[0].tok); ; break;} case 53: #line 388 "parser.y" { yyval.n_stmt = new goto_node(yyvsp[-1].tok, yyvsp[0].tok); ; break;} case 54: #line 389 "parser.y" { yyval.n_stmt = new switch_node(yyvsp[-4].tok, yyvsp[-3].n_expr, yyvsp[-2].tok, yyvsp[-1].n_case, yyvsp[0].tok); ; break;} case 55: #line 390 "parser.y" { yyval.n_stmt = new if_node(yyvsp[-3].tok, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_stmt); ; break;} case 56: #line 392 "parser.y" { yyval.n_stmt = new if_node(yyvsp[-5].tok, yyvsp[-4].n_expr, yyvsp[-3].tok, yyvsp[-2].n_stmt, yyvsp[-1].tok, yyvsp[0].n_stmt); ; break;} case 57: #line 394 "parser.y" { yyval.n_stmt = new for_node(yyvsp[-7].tok, yyvsp[-6].tok, yyvsp[-5].tok, yyvsp[-4].n_expr, yyvsp[-3].tok, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_stmt); ; break;} case 58: #line 395 "parser.y" { yyval.n_stmt = new while_node(yyvsp[-3].tok, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_stmt); ; break;} case 59: #line 396 "parser.y" { yyval.n_stmt = new repeat_node(yyvsp[-3].tok, yyvsp[-2].n_stmt, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 60: #line 397 "parser.y" { yyval.n_stmt = new write_node(yyvsp[-1].tok, yyvsp[0].n_wrls); ; break;} case 61: #line 398 "parser.y" { yyval.n_stmt = new read_node(yyvsp[-1].tok, yyvsp[0].n_grp); ; break;} case 62: #line 399 "parser.y" { yyval.n_stmt = new pcall_node(yyvsp[0].n_expr); ; break;} case 63: #line 400 "parser.y" { yyval.n_stmt = new return_node(yyvsp[0].tok); ; break;} case 64: #line 401 "parser.y" { yyval.n_stmt = new with_node(yyvsp[-3].tok, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_stmt); ; break;} case 65: #line 402 "parser.y" { yyval.n_stmt = new label_node(yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_stmt); ; break;} case 66: #line 403 "parser.y" { yyval.n_stmt = new label_node(yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_stmt); ; break;} case 67: #line 404 "parser.y" { yyval.n_stmt = yyvsp[0].n_comp; ; break;} case 68: #line 406 "parser.y" { yyval.n_comp = new compound_node(yyvsp[-2].tok, yyvsp[-1].n_stmt, yyvsp[0].tok); ; break;} case 70: #line 408 "parser.y" { yyvsp[-2].n_stmt->next = yyvsp[0].n_stmt; yyval.n_stmt = yyvsp[-2].n_stmt; ; break;} case 71: #line 410 "parser.y" { yyval.n_grp = NULL; ; break;} case 72: #line 410 "parser.y" { yyval.n_grp = yyvsp[0].n_grp; ; break;} case 73: #line 412 "parser.y" { yyval.n_wrls = NULL; ; break;} case 74: #line 413 "parser.y" { yyval.n_wrls = new write_list_node(yyvsp[-2].tok, yyvsp[-1].n_wrtp, yyvsp[0].tok); ; break;} case 76: #line 417 "parser.y" { if (yyvsp[-2].n_case != NULL) { case_node** cpp; for(cpp = &yyvsp[-2].n_case->next; *cpp != NULL; cpp = &(*cpp)->next); *cpp = new case_node(NULL, yyvsp[-1].tok, yyvsp[0].n_stmt); yyval.n_case = yyvsp[-2].n_case; } else { yyval.n_case = new case_node(NULL, yyvsp[-1].tok, yyvsp[0].n_stmt); } ; break;} case 79: #line 430 "parser.y" { yyval.n_case = NULL; ; break;} case 81: #line 432 "parser.y" { yyvsp[-2].n_case->next = yyvsp[0].n_case; yyval.n_case = yyvsp[-2].n_case; ; break;} case 82: #line 434 "parser.y" { yyval.n_case = new case_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_stmt); ; break;} case 84: #line 437 "parser.y" { yyvsp[-2].n_expr->next = yyvsp[0].n_expr; yyval.n_expr = yyvsp[-2].n_expr; ; break;} case 85: #line 439 "parser.y" { yyval.n_expr = yyvsp[0].n_expr; ; break;} case 86: #line 440 "parser.y" { yyval.n_expr = new case_range_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 88: #line 465 "parser.y" { yyval.n_expr = new op_node(tn_add, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 89: #line 466 "parser.y" { yyval.n_expr = new op_node(tn_sub, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 90: #line 467 "parser.y" { yyval.n_expr = new op_node(tn_mod, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 91: #line 468 "parser.y" { yyval.n_expr = new op_node(tn_mul, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 92: #line 469 "parser.y" { yyval.n_expr = new op_node(tn_div, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 93: #line 470 "parser.y" { yyval.n_expr = new op_node(tn_divr, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 94: #line 472 "parser.y" { yyval.n_expr = new op_node(tn_let, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 95: #line 473 "parser.y" { yyval.n_expr = new op_node(tn_letadd, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 96: #line 474 "parser.y" { yyval.n_expr = new op_node(tn_letsub, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 97: #line 475 "parser.y" { yyval.n_expr = new op_node(tn_letdiv, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 98: #line 476 "parser.y" { yyval.n_expr = new op_node(tn_letmul, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 99: #line 477 "parser.y" { yyval.n_expr = new op_node(tn_letshl, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 100: #line 478 "parser.y" { yyval.n_expr = new op_node(tn_letshr, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 101: #line 479 "parser.y" { yyval.n_expr = new op_node(tn_letand, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 102: #line 480 "parser.y" { yyval.n_expr = new op_node(tn_letor, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 103: #line 483 "parser.y" { yyval.n_expr = new op_node(tn_and, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 104: #line 484 "parser.y" { yyval.n_expr = new op_node(tn_shl, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 105: #line 485 "parser.y" { yyval.n_expr = new op_node(tn_shr, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 106: #line 486 "parser.y" { yyval.n_expr = new op_node(tn_or, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 107: #line 487 "parser.y" { yyval.n_expr = new op_node(tn_xor, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 108: #line 489 "parser.y" { yyval.n_expr = new op_node(tn_gt, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 109: #line 490 "parser.y" { yyval.n_expr = new op_node(tn_lt, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 110: #line 491 "parser.y" { yyval.n_expr = new op_node(tn_le, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 111: #line 492 "parser.y" { yyval.n_expr = new op_node(tn_ge, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 112: #line 493 "parser.y" { yyval.n_expr = new op_node(tn_eq, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 113: #line 494 "parser.y" { yyval.n_expr = new op_node(tn_ne, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 114: #line 495 "parser.y" { yyval.n_expr = new op_node(tn_in, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 116: #line 498 "parser.y" { yyval.n_expr = new op_node(tn_plus, NULL, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 117: #line 501 "parser.y" { yyval.n_expr = new op_node(tn_minus, NULL, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 118: #line 503 "parser.y" { yyval.n_expr = new op_node(tn_not, NULL, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 119: #line 504 "parser.y" { yyval.n_expr = new address_node(yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 120: #line 505 "parser.y" { yyval.n_expr = new address_node(yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 122: #line 508 "parser.y" { yyval.n_expr = new expr_group_node(yyvsp[-2].tok, yyvsp[-1].n_expr, yyvsp[0].tok); ; break;} case 123: #line 509 "parser.y" { yyval.n_expr = new fcall_node(yyvsp[-3].n_expr, yyvsp[-2].tok, yyvsp[-1].n_expr, yyvsp[0].tok); ; break;} case 124: #line 510 "parser.y" { yyval.n_expr = new access_expr_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].tok); ; break;} case 125: #line 511 "parser.y" { yyval.n_expr = new deref_expr_node(yyvsp[-1].n_expr, yyvsp[0].tok); ; break;} case 126: #line 512 "parser.y" { yyval.n_expr = new idx_expr_node(yyvsp[-3].n_expr, yyvsp[-2].tok, yyvsp[-1].n_expr, yyvsp[0].tok); ; break;} case 127: #line 513 "parser.y" { yyval.n_expr = new loophole_node(yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].n_tpd, yyvsp[-2].tok, yyvsp[-1].n_expr, yyvsp[0].tok); ; break;} case 129: #line 516 "parser.y" { yyval.n_expr = new integer_node(yyvsp[0].tok); ; break;} case 130: #line 517 "parser.y" { yyval.n_expr = new real_node(yyvsp[0].tok); ; break;} case 131: #line 518 "parser.y" { yyval.n_expr = new string_node(yyvsp[0].tok); ; break;} case 132: #line 519 "parser.y" { yyval.n_expr = new set_node(yyvsp[-2].tok, yyvsp[-1].n_item, yyvsp[0].tok); ; break;} case 133: #line 520 "parser.y" { yyval.n_expr = new atom_expr_node(yyvsp[0].tok); ; break;} case 134: #line 522 "parser.y" { yyval.n_item = NULL; ; break;} case 136: #line 524 "parser.y" { yyvsp[-2].n_item->next = yyvsp[0].n_item; yyval.n_item = yyvsp[-2].n_item; ; break;} case 137: #line 526 "parser.y" { yyval.n_item = new set_elem_node(yyvsp[0].n_expr); ; break;} case 138: #line 527 "parser.y" { yyval.n_item = new set_range_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 140: #line 529 "parser.y" { yyvsp[-2].n_expr->next = yyvsp[0].n_expr; yyval.n_expr = yyvsp[-2].n_expr; ; break;} case 142: #line 532 "parser.y" { yyvsp[-2].n_expr->next = yyvsp[0].n_expr; yyval.n_expr = yyvsp[-2].n_expr; ; break;} case 144: #line 534 "parser.y" { yyval.n_expr = new skipped_node(curr_token->prev_relevant()); ; break;} case 145: #line 537 "parser.y" { yyval.n_expr = new record_constant_node(yyvsp[-2].tok, yyvsp[-1].n_field, yyvsp[0].tok); ; break;} case 146: #line 541 "parser.y" { yyval.n_field = yyvsp[0].n_field; ; break;} case 147: #line 542 "parser.y" { yyvsp[-2].n_field->next = yyvsp[0].n_field; yyval.n_field = yyvsp[-2].n_field; ; break;} case 148: #line 544 "parser.y" { yyval.n_field = new field_init_node(yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 149: #line 547 "parser.y" { yyval.n_grp = new expr_group_node(yyvsp[-2].tok, yyvsp[-1].n_expr, yyvsp[0].tok); ; break;} case 151: #line 550 "parser.y" { yyvsp[-2].n_wrtp->next = yyvsp[0].n_wrtp; yyval.n_wrtp = yyvsp[-2].n_wrtp; ; break;} case 152: #line 552 "parser.y" { yyval.n_wrtp = new write_param_node(yyvsp[0].n_expr); ; break;} case 153: #line 553 "parser.y" { yyval.n_wrtp = new write_param_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 154: #line 554 "parser.y" { yyval.n_wrtp = new write_param_node(yyvsp[-4].n_expr, yyvsp[-3].tok, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 155: #line 597 "parser.y" { yyval.n_decl = new label_decl_part_node(yyvsp[-2].tok, yyvsp[-1].toks, yyvsp[0].tok); ; break;} case 156: #line 599 "parser.y" { yyval.toks = new token_list(yyvsp[0].tok); ; break;} case 157: #line 600 "parser.y" { yyval.toks = new token_list(yyvsp[-2].tok, yyvsp[0].toks); ; break;} case 158: #line 601 "parser.y" { yyval.toks = new token_list(yyvsp[0].tok); ; break;} case 159: #line 602 "parser.y" { yyval.toks = new token_list(yyvsp[-2].tok, yyvsp[0].toks); ; break;} case 160: #line 605 "parser.y" { yyval.n_decl = new const_def_part_node(yyvsp[-1].tok, yyvsp[0].n_cdef); ; break;} case 161: #line 607 "parser.y" { yyval.n_cdef = NULL; ; break;} case 162: #line 608 "parser.y" { yyvsp[-2].n_cdef->next = yyvsp[0].n_cdef; yyval.n_cdef = yyvsp[-2].n_cdef; ; break;} case 163: #line 610 "parser.y" { yyval.n_cdef = new const_def_node(yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 164: #line 611 "parser.y" { yyval.n_cdef = new typed_const_def_node(yyvsp[-4].tok, yyvsp[-3].tok, yyvsp[-2].n_tpd, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 165: #line 614 "parser.y" { yyval.n_decl = new type_def_part_node(yyvsp[-1].tok, yyvsp[0].n_tdef); ; break;} case 166: #line 616 "parser.y" { yyval.n_tdef = NULL; ; break;} case 167: #line 617 "parser.y" { yyvsp[-2].n_tdef->next = yyvsp[0].n_tdef; yyval.n_tdef = yyvsp[-2].n_tdef; ; break;} case 168: #line 619 "parser.y" { yyval.n_tdef = new type_def_node(yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 169: #line 622 "parser.y" { yyval.n_decl = new var_decl_part_node(yyvsp[-1].tok, yyvsp[0].n_vdcl); ; break;} case 170: #line 624 "parser.y" { yyval.n_vdcl = NULL; ; break;} case 172: #line 627 "parser.y" { yyvsp[-2].n_vdcl->scope = yyvsp[0].tok; yyvsp[0].tok->disable(); ; break;} case 173: #line 632 "parser.y" { yyvsp[-4].n_vdcl->scope = yyvsp[-2].tok; token::remove(yyvsp[-2].tok, yyvsp[-1].tok); yyvsp[-4].n_vdcl->next = yyvsp[0].n_vdcl; yyval.n_vdcl = yyvsp[-4].n_vdcl; ; break;} case 174: #line 637 "parser.y" { yyvsp[-2].n_vdcl->next = yyvsp[0].n_vdcl; yyval.n_vdcl = yyvsp[-2].n_vdcl; ; break;} case 175: #line 639 "parser.y" { yyval.n_vdcl = new var_decl_node(yyvsp[-2].toks, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 176: #line 641 "parser.y" { yyval.n_vdcl = (var_decl_node*)new var_origin_decl_node(yyvsp[-4].tok, yyvsp[-3].tok, yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 177: #line 645 "parser.y" { yyval.n_decl = new proc_decl_node(yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_plist); ; break;} case 178: #line 647 "parser.y" { yyval.n_decl = new proc_decl_node(yyvsp[-4].tok, yyvsp[-3].tok, yyvsp[-2].n_plist, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 179: #line 652 "parser.y" { yyval.n_decl = new proc_fwd_decl_node(yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].n_plist, NULL, NULL, yyvsp[-2].tok, yyvsp[-1].toks, yyvsp[0].tok); ; break;} case 180: #line 654 "parser.y" { yyval.n_decl = new proc_fwd_decl_node(yyvsp[-7].tok, yyvsp[-6].tok, yyvsp[-5].n_plist, yyvsp[-4].tok, yyvsp[-3].n_tpd, yyvsp[-2].tok, yyvsp[-1].toks, yyvsp[0].tok); ; break;} case 181: #line 658 "parser.y" { yyval.n_decl = new proc_fwd_decl_node(yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].n_plist, NULL, NULL, yyvsp[0].tok); ; break;} case 182: #line 660 "parser.y" { yyval.n_decl = new proc_fwd_decl_node(yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].n_plist, yyvsp[-2].tok, yyvsp[-1].n_tpd, yyvsp[0].tok); ; break;} case 183: #line 664 "parser.y" { yyval.n_decl = new proc_def_node(yyvsp[-5].tok, NULL, NULL, yyvsp[-4].tok, yyvsp[-3].n_plist, NULL, NULL, yyvsp[-2].tok, NULL, NULL, yyvsp[-1].n_block, yyvsp[0].tok); ; break;} case 184: #line 666 "parser.y" { yyval.n_decl = new proc_def_node(yyvsp[-7].tok, NULL, NULL, yyvsp[-6].tok, yyvsp[-5].n_plist, yyvsp[-4].tok, yyvsp[-3].n_tpd, yyvsp[-2].tok, NULL, NULL, yyvsp[-1].n_block, yyvsp[0].tok); ; break;} case 185: #line 668 "parser.y" { yyval.n_decl = new proc_def_node(yyvsp[-7].tok, yyvsp[-6].tok, yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].n_plist, NULL, NULL, yyvsp[-2].tok, NULL, NULL, yyvsp[-1].n_block, yyvsp[0].tok); ; break;} case 186: #line 670 "parser.y" { yyval.n_decl = new proc_def_node(yyvsp[-9].tok, yyvsp[-8].tok, yyvsp[-7].tok, yyvsp[-6].tok, yyvsp[-5].n_plist, yyvsp[-4].tok, yyvsp[-3].n_tpd, yyvsp[-2].tok, NULL, NULL, yyvsp[-1].n_block, yyvsp[0].tok); ; break;} case 187: #line 672 "parser.y" { yyval.n_decl = new proc_def_node(yyvsp[-4].tok, NULL, NULL, yyvsp[-3].tok, NULL, NULL, NULL, yyvsp[-2].tok, NULL, NULL, yyvsp[-1].n_block, yyvsp[0].tok); ; break;} case 188: #line 674 "parser.y" { yyval.n_decl = new proc_def_node(yyvsp[-7].tok, NULL, NULL, yyvsp[-6].tok, yyvsp[-5].n_plist, NULL, NULL, yyvsp[-4].tok, yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].n_block, yyvsp[0].tok); ; break;} case 189: #line 676 "parser.y" { yyval.n_decl = new proc_def_node(yyvsp[-9].tok, NULL, NULL, yyvsp[-8].tok, yyvsp[-7].n_plist, yyvsp[-6].tok, yyvsp[-5].n_tpd, yyvsp[-4].tok, yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].n_block, yyvsp[0].tok); ; break;} case 190: #line 678 "parser.y" { yyval.n_decl = new proc_def_node(yyvsp[-6].tok, NULL, NULL, yyvsp[-5].tok, NULL, NULL, NULL, yyvsp[-4].tok, yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].n_block, yyvsp[0].tok); ; break;} case 191: #line 680 "parser.y" { yyval.toks = new token_list(yyvsp[-1].tok, yyvsp[0].toks); ; break;} case 192: #line 681 "parser.y" { yyval.toks = new token_list(yyvsp[-1].tok, yyvsp[0].toks); ; break;} case 193: #line 682 "parser.y" { yyval.toks = new token_list(yyvsp[0].tok); ; break;} case 194: #line 683 "parser.y" { yyval.toks = new token_list(yyvsp[0].tok); ; break;} case 195: #line 686 "parser.y" { yyval.n_plist = NULL; ; break;} case 196: #line 687 "parser.y" { yyval.n_plist = new param_list_node(yyvsp[-2].tok, yyvsp[-1].n_decl, yyvsp[0].tok); ; break;} case 198: #line 690 "parser.y" { yyvsp[-2].n_decl->next = yyvsp[0].n_decl; yyval.n_decl = yyvsp[-2].n_decl; ; break;} case 199: #line 692 "parser.y" { yyval.n_decl = new var_decl_part_node(yyvsp[-1].tok, yyvsp[0].n_vdcl); ; break;} case 200: #line 693 "parser.y" { yyval.n_decl = yyvsp[0].n_vdcl; ; break;} case 202: #line 695 "parser.y" { yyval.n_vdcl = new var_decl_node(yyvsp[-2].toks, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 203: #line 696 "parser.y" { yyval.n_vdcl = new var_decl_node(yyvsp[0].toks, NULL, NULL); ; break;} case 222: #line 710 "parser.y" { yyval.n_tpd = new fptr_tpd_node(yyvsp[-3].tok, yyvsp[-2].n_plist, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 223: #line 711 "parser.y" { yyval.n_tpd = new fptr_tpd_node(yyvsp[-1].tok, yyvsp[0].n_plist); ; break;} case 224: #line 713 "parser.y" { yyval.n_tpd = new varying_tpd_node(yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].n_expr, yyvsp[0].tok); ; break;} case 225: #line 715 "parser.y" { yyval.n_tpd = new simple_tpd_node(yyvsp[0].tok); ; break;} case 226: #line 716 "parser.y" { yyval.n_tpd = new string_tpd_node(yyvsp[0].tok); ; break;} case 227: #line 719 "parser.y" { yyval.n_tpd = new array_tpd_node(yyvsp[-6].tok, yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].n_idx, yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 228: #line 722 "parser.y" { yyval.n_tpd = new array_tpd_node(yyvsp[-6].tok, yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].n_idx, yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 229: #line 725 "parser.y" { yyval.n_tpd = new array_tpd_node(yyvsp[-6].tok, yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].n_idx, yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 230: #line 727 "parser.y" { yyval.n_tpd = new array_tpd_node(yyvsp[-6].tok, yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].n_idx, yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 231: #line 729 "parser.y" { yyval.n_tpd = new enum_tpd_node(yyvsp[-2].tok, yyvsp[-1].toks, yyvsp[0].tok); ; break;} case 232: #line 732 "parser.y" { yyval.n_tpd = new range_tpd_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 233: #line 734 "parser.y" { yyval.n_tpd = new ptr_tpd_node(yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 234: #line 736 "parser.y" { yyval.n_tpd = new set_tpd_node(yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 235: #line 738 "parser.y" { yyval.n_tpd = new set_tpd_node(yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 236: #line 741 "parser.y" { yyval.n_tpd = new record_tpd_node(yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].n_fldls, yyvsp[0].tok); ; break;} case 237: #line 744 "parser.y" { yyval.n_tpd = new object_tpd_node(yyvsp[-2].tok, NULL, NULL, NULL, yyvsp[-1].n_decl, yyvsp[0].tok); ; break;} case 238: #line 746 "parser.y" { yyval.n_tpd = new object_tpd_node(yyvsp[-5].tok, yyvsp[-4].tok, yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].n_decl, yyvsp[0].tok); ; break;} case 239: #line 749 "parser.y" { yyvsp[-1].n_decl->next = yyvsp[0].n_decl; yyval.n_decl = yyvsp[-1].n_decl; ; break;} case 242: #line 754 "parser.y" { yyval.n_decl = new var_decl_part_node(NULL, yyvsp[0].n_vdcl); ; break;} case 244: #line 757 "parser.y" { yyval.n_vdcl = yyvsp[-1].n_vdcl; ; break;} case 245: #line 758 "parser.y" { yyvsp[-2].n_vdcl->next = yyvsp[0].n_vdcl; yyval.n_vdcl = yyvsp[-2].n_vdcl; ; break;} case 248: #line 761 "parser.y" { yyvsp[-1].n_decl->next = yyvsp[0].n_decl; yyval.n_decl = yyvsp[-1].n_decl; ; break;} case 249: #line 762 "parser.y" { yyvsp[-1].n_decl->next = yyvsp[0].n_decl; yyval.n_decl = yyvsp[-1].n_decl; ; break;} case 250: #line 766 "parser.y" { yyval.n_tpd = new file_tpd_node(yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 251: #line 768 "parser.y" { yyval.tok = NULL; ; break;} case 254: #line 771 "parser.y" { yyvsp[-2].n_idx->next = yyvsp[0].n_idx; yyval.n_idx = yyvsp[-2].n_idx; ; break;} case 255: #line 774 "parser.y" { yyval.n_idx = new conformant_index_node(yyvsp[-4].tok, yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 257: #line 777 "parser.y" { yyvsp[-2].n_idx->next = yyvsp[0].n_idx; yyval.n_idx = yyvsp[-2].n_idx; ; break;} case 258: #line 779 "parser.y" { yyval.n_idx = new type_index_node(yyvsp[0].n_tpd); ; break;} case 259: #line 780 "parser.y" { yyval.n_idx = new range_index_node(yyvsp[-2].n_expr, yyvsp[-1].tok, yyvsp[0].n_expr); ; break;} case 260: #line 785 "parser.y" { yyval.n_fldls = new field_list_node(yyvsp[-1].n_vdcl, yyvsp[0].n_varp); ; break;} case 261: #line 787 "parser.y" { yyval.n_fldls = new field_list_node(yyvsp[0].n_vdcl); ; break;} case 263: #line 792 "parser.y" { yyval.n_varp = new variant_part_node(yyvsp[-3].tok, yyvsp[-2].n_sel, yyvsp[-1].tok, yyvsp[0].n_vari); ; break;} case 264: #line 796 "parser.y" { yyval.n_sel = new selector_node(yyvsp[-2].tok, yyvsp[-1].tok, yyvsp[0].n_tpd); ; break;} case 265: #line 797 "parser.y" { yyval.n_sel = new selector_node(NULL, NULL, yyvsp[0].n_tpd); ; break;} case 267: #line 801 "parser.y" { yyval.n_vari = yyvsp[-1].n_vari; ; break;} case 268: #line 802 "parser.y" { yyvsp[-2].n_vari->next = yyvsp[0].n_vari; yyval.n_vari = yyvsp[-2].n_vari; ; break;} case 269: #line 805 "parser.y" { yyval.n_vari = new variant_node(yyvsp[-4].n_expr, yyvsp[-3].tok, yyvsp[-2].tok, yyvsp[-1].n_fldls, yyvsp[0].tok); ; break;} } #line 705 "/usr/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; #if YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG if (yydebug) { short *yyssp1 = yyss - 1; YYFPRINTF (stderr, "state stack now"); while (yyssp1 != yyssp) YYFPRINTF (stderr, " %d", *++yyssp1); YYFPRINTF (stderr, "\n"); } #endif *++yyvsp = yyval; #if YYLSP_NEEDED *++yylsp = yyloc; #endif /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { YYSIZE_T yysize = 0; char *yymsg; int yyx, yycount; yycount = 0; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx) yysize += yystrlen (yytname[yyx]) + 15, yycount++; yysize += yystrlen ("parse error, unexpected ") + 1; yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { char *yyp = yystpcpy (yymsg, "parse error, unexpected "); yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); if (yycount < 5) { yycount = 0; for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); yyp = yystpcpy (yyp, yytname[yyx]); yycount++; } } yyerror (yymsg); YYSTACK_FREE (yymsg); } else yyerror ("parse error; also virtual memory exhausted"); } else #endif /* defined (YYERROR_VERBOSE) */ yyerror ("parse error"); } goto yyerrlab1; /*--------------------------------------------------. | yyerrlab1 -- error raised explicitly by an action | `--------------------------------------------------*/ yyerrlab1: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; YYDPRINTF ((stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1])); yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; /*-------------------------------------------------------------------. | yyerrdefault -- current state does not do anything special for the | | error token. | `-------------------------------------------------------------------*/ yyerrdefault: #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ /* If its default is to accept any token, ok. Otherwise pop it. */ yyn = yydefact[yystate]; if (yyn) goto yydefault; #endif /*---------------------------------------------------------------. | yyerrpop -- pop the current state because it cannot handle the | | error token | `---------------------------------------------------------------*/ yyerrpop: if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #if YYLSP_NEEDED yylsp--; #endif #if YYDEBUG if (yydebug) { short *yyssp1 = yyss - 1; YYFPRINTF (stderr, "Error: state stack now"); while (yyssp1 != yyssp) YYFPRINTF (stderr, " %d", *++yyssp1); YYFPRINTF (stderr, "\n"); } #endif /*--------------. | yyerrhandle. | `--------------*/ yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; #if YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; /*---------------------------------------------. | yyoverflowab -- parser overflow comes here. | `---------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ yyreturn: #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; } #line 809 "parser.y" int zzlex() { curr_token = curr_token ? curr_token->next_relevant() : token::first_relevant(); if (curr_token->tag == TKN_SCONST) { while (curr_token->next != NULL && curr_token->next->tag == TKN_SCONST) { curr_token->in_text = curr_token->out_text = dprintf("%s%s", curr_token->in_text, curr_token->next->in_text); curr_token->next->remove(); } } else if (turbo_pascal && curr_token->tag == TKN_FILE && curr_token->next_relevant()->tag != TKN_OF) { curr_token->tag = TKN_IDENT; curr_token->in_text = curr_token->out_text = "untyped_file"; curr_token->name = nm_entry::find("untyped_file"); } zzlval.tok = curr_token; return zzcnv_table[curr_token->tag]; }