diff --git a/include/absyn.h b/include/absyn.h index 1467f097..2442ccd4 100644 --- a/include/absyn.h +++ b/include/absyn.h @@ -70,6 +70,14 @@ typedef struct TmplArg { enum tmplarg_t type; } TmplArg; +ANN static inline uint32_t tmplarg_has_const(TmplArg_List tl) { + for(uint32_t i = 0; i < tl->len; i++) { + TmplArg *ta = mp_vector_at(tl, TmplArg, i); + if(ta->type == tmplarg_exp) return true; + } + return false; +} + ANN static inline uint32_t tmplarg_ntypes(TmplArg_List tl) { uint32_t ret = 0; for(uint32_t i = 0; i < tl->len; i++) { diff --git a/src/gwion.y b/src/gwion.y index cf21cd35..a825300f 100644 --- a/src/gwion.y +++ b/src/gwion.y @@ -695,9 +695,10 @@ decl_exp: con_exp func_args: "(" arg_list ")" { $$ = $2; } | "(" ")"{ $$ = (struct ParserArg){}; }; fptr_args: "(" fptr_list ")" { $$ = $2; } | "(" ")" { $$ = NULL; }; -decl_template: ":[" specialized_list "]" { $$ = $2; } - | ":[" specialized_list "," "..." "]" { - Specialized spec = { .tag = MK_TAG(insert_symbol("..."), @4) }; +decl_template +: ":[" specialized_list "]" { $$ = $2; } +| ":[" specialized_list "..." "]" { + Specialized spec = { .tag = MK_TAG(insert_symbol("..."), @3) }; YYLIST_END(Specialized, $$, $2, spec); } | ":[" "..." "]" { @@ -742,7 +743,7 @@ func_def_base Type_Decl *td = new_type_decl(mpool(arg), insert_symbol("float"), @3); Func_Base *base = new_func_base(mpool(arg), td, $3, $5.args, $2, @3); base->fbflag |= fbflag_locale | $5.flag; - $$ = new_func_def(mpool(arg), base, $7); + $$ = new_func_def(mpool(arg), base, $7); } | LOCALE ID LPAREN locale_list RPAREN code_list { Type_Decl *td = new_type_decl(mpool(arg), insert_symbol("float"), @2); diff --git a/src/parser.c b/src/parser.c index f6080923..30cb810d 100644 --- a/src/parser.c +++ b/src/parser.c @@ -729,7 +729,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 227 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2536 +#define YYLAST 2457 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 127 @@ -817,25 +817,25 @@ static const yytype_int16 yyrline[] = 652, 653, 654, 655, 657, 657, 659, 659, 659, 659, 659, 662, 663, 666, 670, 671, 672, 676, 677, 680, 681, 682, 686, 686, 687, 688, 689, 695, 695, 696, - 696, 698, 699, 703, 707, 709, 710, 710, 712, 712, - 714, 715, 718, 719, 720, 721, 724, 724, 726, 726, - 729, 734, 741, 747, 755, 764, 764, 764, 764, 764, - 766, 776, 785, 795, 801, 801, 803, 805, 807, 810, - 810, 810, 811, 817, 824, 833, 834, 848, 849, 853, - 854, 857, 857, 857, 858, 859, 859, 862, 863, 865, - 865, 867, 867, 870, 874, 876, 877, 880, 889, 891, - 892, 892, 894, 894, 895, 895, 895, 895, 896, 896, - 897, 897, 898, 898, 898, 900, 900, 901, 902, 904, - 907, 907, 908, 908, 909, 909, 910, 910, 911, 911, - 912, 912, 913, 913, 914, 914, 915, 915, 916, 916, - 917, 917, 919, 919, 922, 922, 922, 923, 923, 926, - 927, 928, 929, 930, 933, 934, 935, 936, 937, 938, - 941, 944, 949, 949, 951, 952, 955, 959, 960, 963, - 964, 966, 966, 968, 977, 978, 980, 982, 985, 987, - 991, 992, 993, 995, 996, 1007, 1007, 1009, 1010, 1011, - 1011, 1012, 1012, 1015, 1019, 1020, 1021, 1024, 1025, 1026, - 1027, 1035, 1036, 1037, 1038, 1039, 1045, 1046, 1047, 1048, - 1049 + 696, 699, 700, 704, 708, 710, 711, 711, 713, 713, + 715, 716, 719, 720, 721, 722, 725, 725, 727, 727, + 730, 735, 742, 748, 756, 765, 765, 765, 765, 765, + 767, 777, 786, 796, 802, 802, 804, 806, 808, 811, + 811, 811, 812, 818, 825, 834, 835, 849, 850, 854, + 855, 858, 858, 858, 859, 860, 860, 863, 864, 866, + 866, 868, 868, 871, 875, 877, 878, 881, 890, 892, + 893, 893, 895, 895, 896, 896, 896, 896, 897, 897, + 898, 898, 899, 899, 899, 901, 901, 902, 903, 905, + 908, 908, 909, 909, 910, 910, 911, 911, 912, 912, + 913, 913, 914, 914, 915, 915, 916, 916, 917, 917, + 918, 918, 920, 920, 923, 923, 923, 924, 924, 927, + 928, 929, 930, 931, 934, 935, 936, 937, 938, 939, + 942, 945, 950, 950, 952, 953, 956, 960, 961, 964, + 965, 967, 967, 969, 978, 979, 981, 983, 986, 988, + 992, 993, 994, 996, 997, 1008, 1008, 1010, 1011, 1012, + 1012, 1013, 1013, 1016, 1020, 1021, 1022, 1025, 1026, 1027, + 1028, 1036, 1037, 1038, 1039, 1040, 1046, 1047, 1048, 1049, + 1050 }; #endif @@ -901,7 +901,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-470) +#define YYPACT_NINF (-461) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -915,69 +915,69 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 840, -470, 1612, 1769, 948, 277, -470, 63, -470, 1377, - -470, 87, 108, 128, 2276, 277, 1475, -470, -470, 1377, - 64, 168, 277, 277, 145, 276, 145, 277, -470, -470, - 277, 277, -470, 105, 1377, 136, 2, 140, -470, -470, - -470, -470, -470, 1728, -470, -470, -470, -470, -470, -470, - -470, -470, -470, -470, -470, -470, -470, -470, -470, -470, - 276, 276, 316, 316, 2276, -470, -470, -470, 191, 840, - -470, -470, -470, -470, -470, -470, 1377, -470, 277, -470, - -470, -470, -470, -470, -470, -470, -470, -470, 236, -470, - -470, -470, 40, -470, -470, 198, 57, -470, -470, -470, - -470, 2401, -470, -470, -470, 277, -470, -470, -20, 157, - 161, 164, 169, -34, 246, 103, 162, 142, 187, 193, - 2380, -470, 205, -470, -470, 118, 224, -470, -470, -470, - 2276, -470, 289, 301, -470, -470, -470, -470, -470, -470, - -470, -470, -470, -470, -470, -470, -470, 303, -470, 306, - -470, -470, -470, -470, 2276, 225, 226, -470, 1056, 35, - 307, -470, -470, -470, -470, 317, -470, -470, 217, 252, - 2276, 242, 2317, 1516, 248, 327, 256, -470, 341, 313, - -470, -470, -470, 263, 300, 265, -470, 273, 277, -470, - 44, -470, 264, 245, 319, 195, -470, 350, 19, -470, - 281, 360, 276, 286, 279, -470, -470, 287, 367, 291, - 2276, 1728, -470, 309, -470, -470, -470, 373, 1164, -27, - -470, -470, 374, -470, -470, 374, 282, -470, -470, -470, - 276, 2276, -470, -470, 382, -470, 2276, 2276, 2276, 2276, - 338, 317, 2417, 97, 276, 276, 2276, 2380, 2380, 2380, - 2380, 2380, 2380, -470, -470, 2380, 2380, 2380, -470, 2380, - -470, 2380, 2380, 276, -470, 378, 1769, 308, 54, 373, - -470, -470, -470, 1728, 74, -470, -470, 385, 1865, -470, - -470, -470, -470, 2276, -470, 244, 171, -470, 276, -470, - 276, 388, 2276, 392, 17, 1516, 27, 377, 387, -470, - -470, -470, 313, 290, 364, -470, -470, 290, 314, 276, - 245, 326, -470, 19, -470, -470, -470, 1906, -470, 405, - -470, -470, 356, 251, 391, 335, 290, 326, -470, 276, - 414, -470, 368, -470, 1728, 2002, -470, -470, 1272, -470, - 345, -470, -21, 1164, -470, -470, -470, 346, 424, -470, - -470, -470, -470, -470, 317, 428, 206, 317, 290, 290, - -470, -470, 290, 49, 340, -470, 157, 161, 164, 169, - -34, 246, 103, 162, 142, 187, 193, -470, 1164, -470, - 28, -470, -470, -470, -470, 153, -470, -470, -470, -470, - -470, 430, 59, -470, 358, -470, 260, -470, -470, 363, - 365, 1377, 436, 2276, 1377, 2043, 369, 434, 2276, -470, - 159, 43, 64, -470, 5, 400, -470, 314, 326, 215, - 290, -470, -470, 298, -470, -470, 442, 2139, -470, 450, - -470, 358, -470, 270, 375, 379, 453, 290, 447, 56, - -470, 456, 455, 276, -470, -470, -470, 457, -470, -470, - -470, -470, 290, 1377, 462, -470, -470, -470, -470, 461, - 463, 464, -470, -470, 393, 2380, 41, 467, 54, -470, - -470, 2276, -470, 376, 276, -470, 290, 290, 460, -470, - 71, -470, 1377, 465, 384, -470, 2276, 458, 459, -470, - -470, 361, -470, 477, 1377, 276, 475, 314, -470, 196, - 276, 314, 215, 482, -470, 608, -470, 360, -470, 404, - -470, -470, -470, -470, 276, -470, -470, -470, -470, -470, - 278, -470, 276, 374, 483, -470, 466, -470, -470, 276, - 276, 276, -470, -470, -470, 2180, -470, -470, -470, 2276, - -470, 360, -470, 1377, 1377, -470, 1377, 434, 76, 2276, - 394, 1377, 409, 43, 484, -470, 410, -470, -470, 12, - -470, -470, 215, -470, -470, 724, 391, -470, -470, 493, - 415, -470, 209, 421, -470, -470, 374, 2276, 499, 500, - 497, 503, -470, -7, 502, -470, -470, -470, 2276, 1377, - -470, 1377, -470, -470, -470, -470, -470, 504, -470, -470, - -470, 505, -470, 507, -470, -470, -470, -470, -7, -470, - 276, -470, -470, -470, 92, -470, 1377, -470, -470, -470, - 508, 1377, -470, -470 + 836, -461, 1512, 1669, 944, 243, -461, 66, -461, 1373, + -461, 92, 122, 180, 2176, 243, 336, -461, -461, 1373, + 105, 198, 243, 243, 174, 253, 174, 243, -461, -461, + 243, 243, -461, 135, 1373, 148, 6, 154, -461, -461, + -461, -461, -461, 1628, -461, -461, -461, -461, -461, -461, + -461, -461, -461, -461, -461, -461, -461, -461, -461, -461, + 253, 253, 2280, 2280, 2176, -461, -461, -461, 247, 836, + -461, -461, -461, -461, -461, -461, 1373, -461, 243, -461, + -461, -461, -461, -461, -461, -461, -461, -461, 258, -461, + -461, -461, 63, -461, -461, 282, 55, -461, -461, -461, + -461, 296, -461, -461, -461, 243, -461, -461, -4, 194, + 191, 175, 179, 64, 188, 46, -1, 229, 204, 223, + 2320, -461, 233, -461, -461, 50, 257, -461, -461, -461, + 2176, -461, 325, 326, -461, -461, -461, -461, -461, -461, + -461, -461, -461, -461, -461, -461, -461, 328, -461, 329, + -461, -461, -461, -461, 2176, 234, 107, -461, 1052, 39, + 331, -461, -461, -461, -461, 339, -461, -461, 186, 209, + 2176, 182, 2217, 1471, 262, 337, 267, -461, 348, 320, + -461, -461, -461, 271, 212, 274, -461, 275, 243, -461, + 28, -461, 265, 245, 319, 216, -461, 358, 94, -461, + 285, 364, 253, 287, 277, -461, -461, 291, 371, 294, + 2176, 1628, -461, 311, -461, -461, -461, 375, 1160, -25, + -461, -461, 377, -461, -461, 377, 284, -461, -461, -461, + 253, 2176, -461, -461, 386, -461, 2176, 2176, 2176, 2176, + 444, 339, 2338, 143, 253, 253, 2176, 2320, 2320, 2320, + 2320, 2320, 2320, -461, -461, 2320, 2320, 2320, -461, 2320, + -461, 2320, 2320, 253, -461, 380, 1669, 315, 178, 375, + -461, -461, -461, 1628, -18, -461, -461, 395, 1765, -461, + -461, -461, -461, 2176, -461, 176, 158, -461, 253, -461, + 253, 388, 2176, 400, 33, 1471, 25, 382, 396, -461, + -461, -461, 320, 293, 368, -461, -461, 293, 321, 253, + 245, 333, -461, 94, -461, -461, -461, 1806, -461, 407, + -461, -461, 365, 250, 387, 342, 293, 333, -461, 253, + 423, -461, 370, -461, 1628, 1902, -461, -461, 1268, -461, + 347, -461, 1, 1160, -461, -461, -461, 349, 425, -461, + -461, -461, -461, -461, 339, 434, 201, 339, 293, 293, + -461, -461, 293, 30, 344, -461, 194, 191, 175, 179, + 64, 188, 46, -1, 229, 204, 223, -461, 1160, -461, + 23, -461, -461, -461, -461, 121, -461, -461, -461, -461, + -461, 431, 57, -461, 359, -461, 228, -461, -461, 367, + 372, 1373, 438, 2176, 1373, 1943, 376, 441, 2176, -461, + 68, 60, 105, -461, 21, 404, -461, 321, 333, 210, + 293, -461, -461, 322, -461, -461, 450, 2039, -461, 457, + -461, 359, -461, 240, 378, 379, 460, 293, 459, 192, + -461, 463, 464, 253, -461, -461, -461, 465, -461, -461, + -461, -461, 293, 1373, 471, -461, -461, -461, -461, 470, + 473, 475, -461, -461, 393, 2320, 52, 474, 178, -461, + -461, 2176, -461, 389, 253, -461, 293, 293, 467, -461, + 41, -461, 1373, 480, 394, -461, 2176, 466, 462, -461, + -461, 373, -461, 485, 1373, 253, 487, 321, -461, 56, + 253, 321, 210, 489, -461, 604, -461, 364, -461, 415, + -461, -461, -461, -461, 253, -461, -461, -461, -461, -461, + 357, -461, 253, 377, 495, -461, 478, -461, -461, 253, + 253, 253, -461, -461, -461, 2080, -461, -461, -461, 2176, + -461, 364, -461, 1373, 1373, -461, 1373, 441, 71, 2176, + 411, 1373, 427, 60, 500, -461, 429, -461, -461, 13, + -461, 505, -461, 210, -461, -461, 720, 387, -461, -461, + 511, 432, -461, 255, 437, -461, -461, 377, 2176, 514, + 515, 516, 517, -461, -13, 518, -461, -461, -461, 2176, + 1373, -461, 1373, -461, -461, -461, -461, -461, -461, -461, + -461, -461, 519, -461, 521, -461, -461, -461, -461, -13, + -461, 253, -461, -461, -461, 76, -461, 1373, -461, -461, + 520, 1373, -461, -461 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1041,33 +1041,33 @@ static const yytype_int16 yydefact[] = 0, 0, 166, 258, 347, 0, 152, 308, 158, 0, 58, 0, 44, 0, 0, 121, 0, 230, 0, 0, 0, 0, 0, 103, 0, 97, 0, 173, 33, 0, - 171, 26, 0, 18, 20, 0, 42, 32, 65, 215, - 0, 235, 0, 0, 60, 193, 0, 0, 0, 0, - 0, 0, 153, 55, 0, 129, 126, 122, 0, 0, - 110, 0, 115, 106, 108, 109, 34, 0, 36, 17, - 19, 0, 233, 0, 237, 236, 94, 192, 47, 50, - 0, 201, 202, 194, 0, 123, 112, 172, 216, 234, + 171, 0, 26, 0, 18, 20, 0, 42, 32, 65, + 215, 0, 235, 0, 0, 60, 193, 0, 0, 0, + 0, 0, 0, 153, 55, 0, 129, 126, 122, 0, + 0, 110, 0, 115, 106, 108, 109, 34, 36, 172, + 17, 19, 0, 233, 0, 237, 236, 94, 192, 47, + 50, 0, 201, 202, 194, 0, 123, 112, 216, 234, 0, 0, 200, 124 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -470, -470, 10, -64, 201, -470, -469, -470, -86, 194, - -470, -470, -346, -470, -298, -41, -470, -3, -470, -470, - -47, -470, -470, -470, -470, -470, -58, 20, 45, -278, - -470, -470, 78, 9, -470, -470, -59, -470, -9, -470, - -470, -470, 220, -470, -470, -470, 112, -470, -28, -470, - -470, -470, 116, -470, -470, 357, -470, -470, -470, -470, - -470, -152, 32, 8, -171, -470, -188, -470, 58, 402, - -470, 0, -209, -454, -279, 73, -470, 362, -470, 11, - -164, -470, -470, -470, 294, 292, -470, -470, -470, 343, - -470, 218, -470, 347, -470, -23, -8, -470, -31, -470, - -470, 79, 107, -470, -470, -101, -100, -102, -99, -155, - -236, -470, 296, 297, 302, 299, 304, 293, 295, 305, - 310, 311, 312, -84, -12, -470, -470, -470, 85, -470, - -239, -98, -470, -470, -192, -470, 212, -470, -19, -470, - -260, -470 + -461, -461, 31, -66, 187, -461, -460, -461, -87, 206, + -461, -461, -383, -461, -295, -39, -461, -3, -461, -461, + -34, -461, -461, -461, -461, -461, -52, 40, -11, -258, + -461, -461, 95, 29, -461, -461, -59, -461, -9, -461, + -461, -461, 237, -461, -461, -461, 132, -461, -8, -461, + -461, -461, 136, -461, -461, 381, -461, -461, -461, -461, + -461, -151, 38, 8, -170, -461, -191, -461, 77, 424, + -461, 83, -215, -454, -290, 173, -461, 383, -461, 15, + -168, -461, -461, -461, 312, 313, -461, -461, -461, 366, + -461, 244, -461, 360, -461, -23, 12, -461, -10, -461, + -461, 100, 134, -461, -461, -103, -102, -98, -96, -148, + -240, -461, 318, 323, 317, 324, 316, 314, 327, 334, + 335, 309, 330, -86, -12, -461, -461, -461, 103, -461, + -241, -101, -461, -461, -203, -461, 232, -461, -15, -461, + -249, -461 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1075,14 +1075,14 @@ static const yytype_int16 yydefgoto[] = { 0, 68, 69, 70, 183, 71, 506, 72, 73, 234, 74, 501, 419, 75, 423, 498, 499, 76, 201, 435, - 436, 165, 77, 578, 78, 79, 191, 217, 394, 440, + 436, 165, 77, 579, 78, 79, 191, 217, 394, 440, 396, 441, 442, 432, 433, 80, 220, 81, 82, 83, - 573, 84, 301, 412, 302, 85, 181, 554, 492, 493, + 574, 84, 301, 412, 302, 85, 181, 554, 492, 493, 86, 550, 409, 410, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 269, 148, 270, 319, 160, 97, 320, 98, 286, 324, 415, 166, 187, 167, 168, 184, 290, 306, 99, 100, 149, 243, 101, 102, 103, 193, - 194, 195, 316, 196, 197, 104, 486, 105, 571, 572, + 194, 195, 316, 196, 197, 104, 486, 105, 572, 573, 106, 463, 473, 513, 255, 150, 151, 152, 153, 156, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 207, 122, 383, 384, 385, @@ -1095,80 +1095,68 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 171, 158, 198, 216, 223, 228, 233, 395, 386, 318, - 179, 365, 159, 256, 259, 257, 169, 244, 261, 333, - 305, 295, 312, 404, 188, 205, 176, 272, 417, 439, - 387, 406, 356, 563, 147, 155, 467, 198, 198, 236, - 162, 202, 203, 232, 225, 236, 175, 438, 178, 188, - 221, 224, 534, 566, 335, 332, 339, 495, 496, 188, - 509, 236, 339, 471, 495, 597, 521, 229, 170, 253, - 192, 502, 246, 450, 254, 213, 247, 544, 198, 459, - 460, 388, 589, 461, 340, 208, 237, 584, 497, 230, - 340, 364, 172, 599, 248, 497, 226, 186, 621, 199, - 360, 39, 189, 265, 39, 215, 32, 343, 264, 209, - 237, 238, 239, 173, 38, 39, 245, 40, 41, 42, - 503, 407, 278, -145, 464, 266, 490, 189, 237, 283, - 190, 428, 462, 174, 237, 238, 239, 189, 274, 421, - 416, 507, 445, 405, 359, 454, 242, 180, 458, 229, - 237, 558, 237, 238, 239, 562, 244, 468, 519, 238, - 239, 469, 267, 344, 237, 190, 345, 237, 283, 237, - 488, 182, 347, 526, 397, 238, 239, 238, 239, 198, - 294, 343, 408, 162, 361, 237, 277, 363, 204, 238, - 239, 227, 238, 239, 238, 239, 540, 541, 542, 309, - 559, 235, 291, 56, 560, 58, 379, 198, 386, 456, - 238, 239, 143, 144, 188, 338, 343, 198, 504, 206, - 604, 198, 198, 210, 185, 505, 159, 398, 200, 533, - 260, 134, 135, 268, 279, 280, 233, 351, 352, 353, - 198, 231, 331, 213, 574, 198, 131, 325, 258, 188, - 393, 579, 580, 581, 161, 162, 188, 430, 8, 249, - 10, 32, 198, 348, 474, 198, 475, 198, 350, 38, - 256, 259, 257, 250, 514, 261, 515, 251, 331, 536, - 252, 188, 262, 188, 263, 242, 198, 314, 315, 362, - 273, 392, 569, 288, 289, -251, 32, 457, 380, 219, - 198, 508, 509, 32, 38, 213, 198, -252, 377, 275, - 391, 38, 276, 382, 161, 162, 163, 164, 284, 278, - 190, 2, 285, 3, 402, 491, 218, 189, 32, 229, - 32, 296, 620, 399, 189, 400, 38, 297, 38, 298, - 338, 304, 289, 188, 299, 300, 303, 20, 307, 426, - 138, 139, 140, 141, 420, 190, 308, 317, 311, 189, - 268, 569, 190, 313, 322, 323, 213, 447, 431, 326, - 328, 35, 329, 327, 330, 338, 334, 39, 335, 40, - 41, 42, 43, 346, 343, 349, 466, 190, 378, 190, - 32, 381, 478, 389, 401, 481, 403, 411, 38, 55, - 408, 56, 57, 58, 59, 414, 289, 60, 418, 422, - 219, 480, 427, 61, 62, 63, 64, 39, 437, 443, - 198, 189, 434, 56, 57, 58, 59, 444, 449, 452, - 453, 455, 65, 66, 465, 354, 67, 483, 470, 479, - 487, 472, 216, 500, 527, 198, 476, 485, 477, 190, - 467, 198, 484, 511, 65, 66, 518, 520, 516, 426, - 522, 523, 517, 525, 575, 528, 529, 491, 530, 531, - 539, 546, 198, 545, 535, 543, 462, 198, 547, 274, - 552, 553, 549, 557, 551, 555, 509, 567, 591, 576, - 577, 198, 593, 596, 548, 595, 602, 198, 603, 198, - 606, 228, 609, 611, 610, 613, 198, 198, 198, 612, - 619, 618, 617, 382, 622, 565, 429, 607, 598, 601, - 561, 524, 413, 568, 494, 594, 489, 271, 292, 538, - 287, 424, 355, 310, 585, 586, 358, 587, 512, 588, - 556, 605, 592, 532, 366, 321, 367, 583, 371, 198, - 369, 372, 368, 537, 451, 0, 370, 0, 0, 431, - 0, 0, 373, 0, 0, 570, 0, 426, 0, 374, - 0, 0, 375, 0, 376, 0, 0, 0, 0, 0, - 615, 590, 0, 0, 0, 608, 0, 198, 616, 0, - 0, 0, 0, 0, 0, 0, 614, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 229, 0, 0, - 0, 1, 623, 2, 0, 3, 0, 570, 4, 564, - 5, 6, 7, 0, 8, 9, 10, 11, 12, 13, - 14, 0, 0, 0, 15, 16, 17, 18, 19, 20, - 0, 21, 22, 23, 24, 0, 0, 0, 0, 0, - 0, 25, 0, 26, 27, 28, 29, 30, 0, 31, - 32, 33, 34, 35, 0, 36, 37, 0, 38, 39, - 0, 40, 41, 42, 43, 0, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 0, 0, 0, - 0, 55, 0, 56, 57, 58, 59, 0, 0, 60, - 0, 0, 0, 0, 0, 61, 62, 63, 64, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 65, 66, 0, 1, 67, 2, - 0, 3, 0, 0, 4, 600, 5, 6, 7, 0, + 171, 158, 198, 228, 223, 233, 318, 365, 333, 216, + 179, 256, 159, 257, 192, 244, 305, 417, 259, 386, + 169, 261, 295, 312, 272, 205, 356, 395, 387, 406, + 176, 467, 439, 188, 502, 335, 438, 198, 198, 404, + 147, 155, 564, 236, 162, 202, 203, 544, 225, 215, + 221, 224, 175, 567, 178, -145, 236, 266, 339, 236, + 559, 471, 332, 534, 560, 495, 232, 229, 459, 460, + 388, 170, 461, 495, 496, 237, 283, 590, 198, 488, + 237, 213, 621, 131, 339, 258, 340, 585, 246, 208, + 242, 408, 247, 230, 267, 450, 497, 172, 364, 188, + 238, 239, 226, 600, 497, 238, 239, 265, 264, 561, + 248, 189, 340, 462, 558, 279, 280, 278, 563, 407, + 245, 39, 464, 503, 39, 468, 237, 173, 428, 469, + 507, 445, 237, 283, 237, 56, 416, 58, 274, 454, + 421, 359, 458, 490, 405, 237, 360, 519, 237, 229, + 237, 238, 239, 343, 244, 143, 144, 238, 239, 238, + 239, 397, 526, 344, 237, 268, 345, 253, 343, 237, + 238, 239, 254, 238, 239, 238, 239, 189, 347, 198, + 294, 188, 393, 188, 361, 174, 541, 542, 180, 238, + 239, 325, 277, 363, 238, 239, 509, 186, 8, 199, + 10, 182, 521, 309, 456, 190, 379, 198, 291, 209, + 185, 343, 162, 504, 200, 338, 540, 198, 204, 386, + 505, 198, 198, 161, 162, 533, 159, 398, 32, 242, + 32, 206, 474, 362, 475, 233, 38, 210, 38, 39, + 198, 40, 41, 42, 514, 198, 515, 227, 331, 213, + 288, 289, 377, 304, 289, 188, 430, 382, 188, 189, + 188, 189, 198, 231, 575, 198, 605, 198, 256, 348, + 257, 580, 581, 582, 350, 259, 536, 399, 261, 400, + 161, 162, 163, 164, 331, 235, 198, 190, 251, 190, + 252, 392, 138, 139, 140, 141, 249, 457, 420, 262, + 198, 188, 32, 250, 380, 32, 198, 32, 314, 315, + 38, 213, 431, 38, 263, 38, 391, 260, 134, 135, + 351, 352, 353, 273, 491, 508, 509, 219, 278, 229, + 402, -251, -252, 189, 275, 276, 189, 240, 570, 177, + 338, 2, 284, 3, 285, 296, 130, 297, 32, 6, + 298, 299, 300, 620, 303, 426, 38, 307, 308, 311, + 268, 190, 188, 313, 190, 317, 190, 20, 322, 323, + 326, 327, 213, 447, 328, 338, 329, 330, 334, 189, + 335, 56, 57, 58, 59, 346, 466, 343, 32, 349, + 378, 35, 478, 241, 401, 481, 38, 39, 381, 40, + 41, 42, 43, 389, 403, 408, 411, 190, 414, 32, + 289, 480, 65, 66, 427, 418, 422, 38, 434, 55, + 198, 56, 57, 58, 59, 437, 39, 60, 443, 444, + 449, 453, 452, 61, 62, 63, 64, 455, 465, 470, + 570, 479, 472, 483, 527, 198, 487, 500, 216, 188, + 476, 198, 65, 66, 485, 477, 67, 382, 467, 484, + 511, 516, 517, 518, 576, 426, 491, 522, 190, 520, + 523, 525, 198, 545, 528, 529, 462, 198, 530, 274, + 531, 535, 543, 539, 556, 555, 546, 551, 547, 553, + 549, 198, 552, 509, 548, 557, 32, 198, 568, 198, + 228, 577, 578, 431, 38, 592, 198, 198, 198, 571, + 594, 596, 597, 599, 603, 604, 607, 610, 608, 611, + 598, 614, 612, 613, 619, 618, 622, 189, 429, 56, + 57, 58, 59, 602, 586, 587, 566, 588, 524, 413, + 562, 354, 593, 569, 494, 595, 489, 584, 538, 271, + 198, 287, 292, 355, 358, 190, 310, 424, 321, 589, + 65, 66, 571, 606, 532, 512, 366, 368, 370, 371, + 375, 537, 367, 426, 451, 369, 0, 0, 0, 0, + 0, 616, 0, 372, 0, 0, 609, 591, 198, 617, + 0, 373, 376, 0, 374, 0, 0, 615, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 229, 2, + 0, 3, 623, 0, 4, 565, 5, 6, 7, 0, 8, 9, 10, 11, 12, 13, 14, 0, 0, 0, 15, 16, 17, 18, 19, 20, 0, 21, 22, 23, 24, 0, 0, 0, 0, 0, 0, 25, 0, 26, @@ -1180,7 +1168,7 @@ static const yytype_int16 yytable[] = 0, 61, 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, 0, 1, 67, 2, 0, 3, 0, 0, - 4, 0, 5, 6, 7, 0, 8, 9, 10, 11, + 4, 601, 5, 6, 7, 0, 8, 9, 10, 11, 12, 13, 14, 0, 0, 0, 15, 16, 17, 18, 19, 20, 0, 21, 22, 23, 24, 0, 0, 0, 0, 0, 0, 25, 0, 26, 27, 28, 29, 30, @@ -1190,29 +1178,19 @@ static const yytype_int16 yytable[] = 0, 0, 0, 55, 0, 56, 57, 58, 59, 0, 0, 60, 0, 0, 0, 0, 0, 61, 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 2, 0, 3, 65, 66, 4, 157, - 67, 6, 7, 0, 8, 9, 10, 11, 12, 13, - 14, 0, 0, 0, 0, 16, 17, 18, 19, 20, - 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 32, 33, 34, 35, 0, 0, 37, 0, 38, 39, - 0, 40, 41, 42, 43, 0, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 0, 0, 0, - 0, 55, 0, 56, 57, 58, 59, 0, 0, 60, - 0, 0, 0, 0, 0, 61, 62, 63, 64, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 2, 0, 3, 65, 66, 4, 282, 67, 6, + 0, 0, 0, 0, 0, 0, 65, 66, 0, 1, + 67, 2, 0, 3, 0, 0, 4, 0, 5, 6, 7, 0, 8, 9, 10, 11, 12, 13, 14, 0, - 0, 0, 0, 16, 17, 18, 19, 20, 0, 21, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 32, 33, - 34, 35, 0, 0, 37, 0, 38, 39, 0, 40, + 0, 0, 15, 16, 17, 18, 19, 20, 0, 21, + 22, 23, 24, 0, 0, 0, 0, 0, 0, 25, + 0, 26, 27, 28, 29, 30, 0, 31, 32, 33, + 34, 35, 0, 36, 37, 0, 38, 39, 0, 40, 41, 42, 43, 0, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 0, 0, 0, 0, 55, 0, 56, 57, 58, 59, 0, 0, 60, 0, 0, 0, 0, 0, 61, 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, - 0, 3, 65, 66, 4, 337, 67, 6, 7, 0, + 0, 3, 65, 66, 4, 157, 67, 6, 7, 0, 8, 9, 10, 11, 12, 13, 14, 0, 0, 0, 0, 16, 17, 18, 19, 20, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1223,7 +1201,7 @@ static const yytype_int16 yytable[] = 57, 58, 59, 0, 0, 60, 0, 0, 0, 0, 0, 61, 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 3, - 65, 66, 4, 448, 67, 6, 7, 0, 8, 9, + 65, 66, 4, 282, 67, 6, 7, 0, 8, 9, 10, 11, 12, 13, 14, 0, 0, 0, 0, 16, 17, 18, 19, 20, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1233,38 +1211,50 @@ static const yytype_int16 yytable[] = 54, 0, 0, 0, 0, 55, 0, 56, 57, 58, 59, 0, 0, 60, 0, 0, 0, 0, 0, 61, 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 2, 0, 3, 0, 0, 4, 65, 66, - 6, 7, 67, 8, 9, 10, 11, 12, 13, 14, - 0, 0, 0, 0, 16, 17, 18, 19, 20, 0, - 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, - 33, 34, 35, 0, 0, 37, 0, 38, 39, 0, - 40, 41, 42, 43, 0, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 0, 0, 0, 0, - 55, 0, 56, 57, 58, 59, 0, 0, 60, 0, - 0, 0, 0, 0, 61, 62, 63, 64, 177, 0, - 2, 0, 3, 0, 0, 130, 0, 0, 6, 0, - 0, 0, 0, 65, 66, 0, 0, 67, 0, 0, - 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 2, 0, 3, 0, 0, 130, 32, 0, 6, - 35, 0, 0, 0, 0, 38, 39, 0, 40, 41, - 42, 43, 0, 0, 0, 0, 0, 20, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 56, 57, 58, 59, 0, 0, 60, 0, 32, 0, - 0, 35, 61, 62, 63, 64, 38, 39, 0, 40, - 41, 42, 43, 0, 0, 0, 0, 0, 0, 0, - 0, 65, 66, 0, 0, 67, 0, 0, 0, 55, - 0, 56, 57, 58, 59, 0, 0, 60, 0, 0, - 0, 0, 0, 61, 62, 63, 64, 2, 129, 3, - 0, 0, 130, 0, 0, 6, 0, 0, 0, 0, - 0, 0, 65, 66, 0, 0, 67, 0, 0, 0, - 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 2, 0, 3, 65, 66, + 4, 337, 67, 6, 7, 0, 8, 9, 10, 11, + 12, 13, 14, 0, 0, 0, 0, 16, 17, 18, + 19, 20, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 0, 0, 35, 0, 0, - 0, 0, 38, 39, 0, 40, 41, 42, 43, 0, + 0, 0, 32, 33, 34, 35, 0, 0, 37, 0, + 38, 39, 0, 40, 41, 42, 43, 0, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 0, + 0, 0, 0, 55, 0, 56, 57, 58, 59, 0, + 0, 60, 0, 0, 0, 0, 0, 61, 62, 63, + 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 2, 0, 3, 65, 66, 4, 448, + 67, 6, 7, 0, 8, 9, 10, 11, 12, 13, + 14, 0, 0, 0, 0, 16, 17, 18, 19, 20, + 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 55, 131, 56, 132, 58, + 32, 33, 34, 35, 0, 0, 37, 0, 38, 39, + 0, 40, 41, 42, 43, 0, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 0, 0, 0, + 0, 55, 0, 56, 57, 58, 59, 0, 0, 60, + 0, 0, 0, 0, 0, 61, 62, 63, 64, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, + 3, 0, 0, 4, 65, 66, 6, 7, 67, 8, + 9, 10, 11, 12, 13, 14, 0, 0, 0, 0, + 16, 17, 18, 19, 20, 0, 21, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 32, 33, 34, 35, 0, + 0, 37, 0, 38, 39, 0, 40, 41, 42, 43, + 0, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 0, 0, 0, 0, 55, 0, 56, 57, + 58, 59, 0, 0, 60, 0, 0, 0, 0, 0, + 61, 62, 63, 64, 1, 0, 2, 0, 3, 0, + 0, 130, 0, 0, 6, 0, 0, 0, 0, 65, + 66, 0, 0, 67, 0, 0, 0, 0, 0, 0, + 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 129, 3, + 0, 0, 130, 32, 0, 6, 35, 0, 0, 0, + 0, 38, 39, 0, 40, 41, 42, 43, 0, 0, + 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 55, 0, 56, 57, 58, 59, + 0, 0, 60, 0, 32, 0, 0, 35, 61, 62, + 63, 64, 38, 39, 0, 40, 41, 42, 43, 0, + 0, 0, 0, 0, 0, 0, 0, 65, 66, 0, + 0, 67, 0, 0, 0, 55, 131, 56, 132, 58, 133, 134, 135, 60, 0, 136, 0, 0, 0, 61, 62, 63, 64, 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, 0, 0, 0, 0, 0, 65, 66, @@ -1313,7 +1303,7 @@ static const yytype_int16 yytable[] = 0, 0, 6, 0, 0, 0, 0, 0, 0, 65, 66, 0, 0, 67, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 0, 3, 582, 0, + 0, 0, 0, 0, 0, 2, 0, 3, 583, 0, 130, 32, 0, 6, 35, 0, 0, 0, 0, 38, 39, 0, 40, 41, 42, 43, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1334,99 +1324,89 @@ static const yytype_int16 yytable[] = 0, 56, 57, 58, 59, 0, 0, 60, 0, 32, 0, 0, 35, 61, 62, 63, 64, 38, 39, 0, 40, 41, 42, 43, 0, 2, 0, 3, 0, 0, - 130, 0, 65, 66, 0, 0, 67, 0, 0, 0, - 293, 0, 56, 57, 58, 59, 188, 0, 60, 0, + 218, 0, 65, 66, 0, 0, 67, 0, 0, 0, + 293, 0, 56, 57, 58, 59, 0, 0, 60, 0, 0, 20, 0, 0, 61, 62, 63, 64, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 65, 66, 35, 0, 67, 0, 0, - 0, 39, 240, 40, 41, 42, 43, 0, 0, 0, - 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, - 0, 38, 0, 55, 0, 56, 57, 58, 59, 0, - 0, 60, 0, 357, 0, 0, 0, 61, 62, 63, - 64, 0, 0, 0, 189, 0, 56, 57, 58, 59, - 0, 0, 0, 0, 0, 0, 65, 66, 241, 0, - 67, 131, 56, 258, 58, 260, 134, 135, 0, 0, - 136, 0, 190, 0, 0, 0, 0, 65, 66, 0, - 137, 138, 139, 140, 141, 142, 143, 144, 0, 0, - 0, 0, 0, 0, 0, 145, 146 + 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, + 130, 0, 0, 65, 66, 35, 0, 67, 0, 0, + 0, 39, 0, 40, 41, 42, 43, 0, 0, 0, + 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 55, 0, 56, 57, 58, 59, 0, + 0, 60, 0, 0, 219, 35, 0, 61, 62, 63, + 64, 39, 0, 40, 41, 42, 43, 0, 0, 0, + 0, 0, 0, 0, 357, 0, 65, 66, 0, 0, + 67, 0, 0, 55, 0, 56, 57, 58, 59, 0, + 0, 60, 0, 0, 0, 0, 0, 61, 62, 63, + 64, 0, 131, 56, 258, 58, 260, 134, 135, 0, + 0, 136, 0, 0, 0, 0, 65, 66, 0, 0, + 67, 137, 138, 139, 140, 141, 142, 143, 144, 0, + 0, 0, 0, 0, 0, 0, 145, 146 }; static const yytype_int16 yycheck[] = { - 9, 4, 25, 61, 63, 69, 92, 285, 268, 197, - 19, 247, 4, 114, 116, 115, 5, 101, 117, 211, - 184, 173, 193, 6, 5, 34, 15, 125, 307, 327, - 269, 4, 241, 502, 2, 3, 8, 60, 61, 4, - 38, 30, 31, 3, 63, 4, 14, 326, 16, 5, - 62, 63, 11, 507, 5, 210, 83, 52, 53, 5, - 4, 4, 83, 4, 52, 53, 10, 76, 5, 103, - 25, 417, 92, 94, 108, 43, 96, 6, 101, 358, - 359, 273, 6, 362, 111, 83, 93, 541, 83, 78, - 111, 246, 5, 562, 114, 83, 64, 24, 6, 26, - 3, 61, 83, 122, 61, 60, 52, 10, 120, 36, - 93, 118, 119, 5, 60, 61, 105, 63, 64, 65, - 418, 94, 94, 5, 363, 7, 83, 83, 93, 94, - 111, 319, 83, 5, 93, 118, 119, 83, 130, 310, - 304, 420, 334, 295, 242, 354, 101, 83, 357, 158, - 93, 497, 93, 118, 119, 501, 240, 4, 437, 118, - 119, 8, 44, 222, 93, 111, 225, 93, 94, 93, - 11, 3, 230, 452, 3, 118, 119, 118, 119, 202, - 172, 10, 23, 38, 243, 93, 154, 245, 83, 118, - 119, 0, 118, 119, 118, 119, 474, 476, 477, 188, - 4, 3, 170, 85, 8, 87, 265, 230, 468, 3, - 118, 119, 109, 110, 5, 218, 10, 240, 3, 83, - 11, 244, 245, 83, 23, 10, 218, 286, 27, 465, - 88, 89, 90, 115, 8, 9, 322, 237, 238, 239, - 263, 5, 210, 211, 522, 268, 84, 202, 86, 5, - 6, 529, 530, 531, 37, 38, 5, 6, 16, 102, - 18, 52, 285, 231, 4, 288, 6, 290, 236, 60, - 371, 373, 372, 112, 4, 374, 6, 113, 246, 467, - 111, 5, 95, 5, 91, 240, 309, 92, 93, 244, - 66, 283, 83, 41, 42, 6, 52, 356, 266, 94, - 323, 3, 4, 52, 60, 273, 329, 6, 263, 6, - 278, 60, 6, 268, 37, 38, 39, 40, 11, 94, - 111, 5, 5, 7, 292, 411, 10, 83, 52, 338, - 52, 83, 610, 288, 83, 290, 60, 10, 60, 83, - 343, 41, 42, 5, 3, 32, 83, 31, 83, 317, - 104, 105, 106, 107, 309, 111, 83, 7, 94, 83, - 115, 83, 111, 44, 83, 5, 334, 335, 323, 83, - 83, 55, 5, 94, 83, 378, 67, 61, 5, 63, - 64, 65, 66, 101, 10, 3, 378, 111, 10, 111, - 52, 83, 401, 8, 6, 404, 4, 10, 60, 83, - 23, 85, 86, 87, 88, 115, 42, 91, 94, 83, - 94, 403, 7, 97, 98, 99, 100, 61, 83, 5, - 443, 83, 31, 85, 86, 87, 88, 59, 83, 83, - 6, 3, 116, 117, 94, 97, 120, 405, 8, 3, - 408, 83, 500, 43, 453, 468, 83, 13, 83, 111, - 8, 474, 83, 3, 116, 117, 3, 10, 83, 427, - 4, 6, 83, 6, 523, 3, 5, 553, 5, 5, - 94, 6, 495, 482, 7, 15, 83, 500, 94, 471, - 119, 4, 24, 8, 25, 494, 4, 83, 94, 6, - 24, 514, 83, 83, 486, 11, 3, 520, 83, 522, - 79, 565, 3, 6, 4, 3, 529, 530, 531, 6, - 3, 6, 8, 468, 6, 505, 322, 576, 559, 566, - 500, 443, 302, 514, 412, 553, 410, 125, 171, 471, - 168, 313, 240, 190, 543, 544, 242, 546, 431, 547, - 495, 572, 551, 464, 248, 198, 249, 539, 255, 572, - 251, 256, 250, 468, 342, -1, 252, -1, -1, 514, - -1, -1, 257, -1, -1, 520, -1, 535, -1, 259, - -1, -1, 261, -1, 262, -1, -1, -1, -1, -1, - 589, 549, -1, -1, -1, 577, -1, 610, 591, -1, - -1, -1, -1, -1, -1, -1, 588, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 616, -1, -1, - -1, 3, 621, 5, -1, 7, -1, 572, 10, 11, - 12, 13, 14, -1, 16, 17, 18, 19, 20, 21, - 22, -1, -1, -1, 26, 27, 28, 29, 30, 31, - -1, 33, 34, 35, 36, -1, -1, -1, -1, -1, - -1, 43, -1, 45, 46, 47, 48, 49, -1, 51, - 52, 53, 54, 55, -1, 57, 58, -1, 60, 61, - -1, 63, 64, 65, 66, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, -1, -1, -1, - -1, 83, -1, 85, 86, 87, 88, -1, -1, 91, - -1, -1, -1, -1, -1, 97, 98, 99, 100, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 116, 117, -1, 3, 120, 5, - -1, 7, -1, -1, 10, 11, 12, 13, 14, -1, + 9, 4, 25, 69, 63, 92, 197, 247, 211, 61, + 19, 114, 4, 115, 25, 101, 184, 307, 116, 268, + 5, 117, 173, 193, 125, 34, 241, 285, 269, 4, + 15, 8, 327, 5, 417, 5, 326, 60, 61, 6, + 2, 3, 502, 4, 38, 30, 31, 6, 63, 60, + 62, 63, 14, 507, 16, 5, 4, 7, 83, 4, + 4, 4, 210, 11, 8, 52, 3, 76, 358, 359, + 273, 5, 362, 52, 53, 93, 94, 6, 101, 11, + 93, 43, 6, 84, 83, 86, 111, 541, 92, 83, + 101, 23, 96, 78, 44, 94, 83, 5, 246, 5, + 118, 119, 64, 563, 83, 118, 119, 122, 120, 53, + 114, 83, 111, 83, 497, 8, 9, 94, 501, 94, + 105, 61, 363, 418, 61, 4, 93, 5, 319, 8, + 420, 334, 93, 94, 93, 85, 304, 87, 130, 354, + 310, 242, 357, 83, 295, 93, 3, 437, 93, 158, + 93, 118, 119, 10, 240, 109, 110, 118, 119, 118, + 119, 3, 452, 222, 93, 115, 225, 103, 10, 93, + 118, 119, 108, 118, 119, 118, 119, 83, 230, 202, + 172, 5, 6, 5, 243, 5, 476, 477, 83, 118, + 119, 202, 154, 245, 118, 119, 4, 24, 16, 26, + 18, 3, 10, 188, 3, 111, 265, 230, 170, 36, + 23, 10, 38, 3, 27, 218, 474, 240, 83, 468, + 10, 244, 245, 37, 38, 465, 218, 286, 52, 240, + 52, 83, 4, 244, 6, 322, 60, 83, 60, 61, + 263, 63, 64, 65, 4, 268, 6, 0, 210, 211, + 41, 42, 263, 41, 42, 5, 6, 268, 5, 83, + 5, 83, 285, 5, 522, 288, 11, 290, 371, 231, + 372, 529, 530, 531, 236, 373, 467, 288, 374, 290, + 37, 38, 39, 40, 246, 3, 309, 111, 113, 111, + 111, 283, 104, 105, 106, 107, 102, 356, 309, 95, + 323, 5, 52, 112, 266, 52, 329, 52, 92, 93, + 60, 273, 323, 60, 91, 60, 278, 88, 89, 90, + 237, 238, 239, 66, 411, 3, 4, 94, 94, 338, + 292, 6, 6, 83, 6, 6, 83, 41, 83, 3, + 343, 5, 11, 7, 5, 83, 10, 10, 52, 13, + 83, 3, 32, 611, 83, 317, 60, 83, 83, 94, + 115, 111, 5, 44, 111, 7, 111, 31, 83, 5, + 83, 94, 334, 335, 83, 378, 5, 83, 67, 83, + 5, 85, 86, 87, 88, 101, 378, 10, 52, 3, + 10, 55, 401, 97, 6, 404, 60, 61, 83, 63, + 64, 65, 66, 8, 4, 23, 10, 111, 115, 52, + 42, 403, 116, 117, 7, 94, 83, 60, 31, 83, + 443, 85, 86, 87, 88, 83, 61, 91, 5, 59, + 83, 6, 83, 97, 98, 99, 100, 3, 94, 8, + 83, 3, 83, 405, 453, 468, 408, 43, 500, 5, + 83, 474, 116, 117, 13, 83, 120, 468, 8, 83, + 3, 83, 83, 3, 523, 427, 553, 4, 111, 10, + 6, 6, 495, 482, 3, 5, 83, 500, 5, 471, + 5, 7, 15, 94, 495, 494, 6, 25, 94, 4, + 24, 514, 119, 4, 486, 8, 52, 520, 83, 522, + 566, 6, 24, 514, 60, 94, 529, 530, 531, 520, + 83, 11, 83, 8, 3, 83, 79, 3, 577, 4, + 559, 3, 6, 6, 3, 6, 6, 83, 322, 85, + 86, 87, 88, 567, 543, 544, 505, 546, 443, 302, + 500, 97, 551, 514, 412, 553, 410, 539, 471, 125, + 573, 168, 171, 240, 242, 111, 190, 313, 198, 547, + 116, 117, 573, 573, 464, 431, 248, 250, 252, 255, + 261, 468, 249, 535, 342, 251, -1, -1, -1, -1, + -1, 590, -1, 256, -1, -1, 578, 549, 611, 592, + -1, 257, 262, -1, 259, -1, -1, 589, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 3, 617, 5, + -1, 7, 621, -1, 10, 11, 12, 13, 14, -1, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, 26, 27, 28, 29, 30, 31, -1, 33, 34, 35, 36, -1, -1, -1, -1, -1, -1, 43, -1, 45, @@ -1438,7 +1418,7 @@ static const yytype_int16 yycheck[] = -1, 97, 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, -1, 3, 120, 5, -1, 7, -1, -1, - 10, -1, 12, 13, 14, -1, 16, 17, 18, 19, + 10, 11, 12, 13, 14, -1, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, 26, 27, 28, 29, 30, 31, -1, 33, 34, 35, 36, -1, -1, -1, -1, -1, -1, 43, -1, 45, 46, 47, 48, 49, @@ -1448,23 +1428,13 @@ static const yytype_int16 yycheck[] = -1, -1, -1, 83, -1, 85, 86, 87, 88, -1, -1, 91, -1, -1, -1, -1, -1, 97, 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 3, -1, 5, -1, 7, 116, 117, 10, 11, - 120, 13, 14, -1, 16, 17, 18, 19, 20, 21, - 22, -1, -1, -1, -1, 27, 28, 29, 30, 31, - -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 52, 53, 54, 55, -1, -1, 58, -1, 60, 61, - -1, 63, 64, 65, 66, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, -1, -1, -1, - -1, 83, -1, 85, 86, 87, 88, -1, -1, 91, - -1, -1, -1, -1, -1, 97, 98, 99, 100, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, - -1, 5, -1, 7, 116, 117, 10, 11, 120, 13, + -1, -1, -1, -1, -1, -1, 116, 117, -1, 3, + 120, 5, -1, 7, -1, -1, 10, -1, 12, 13, 14, -1, 16, 17, 18, 19, 20, 21, 22, -1, - -1, -1, -1, 27, 28, 29, 30, 31, -1, 33, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 52, 53, - 54, 55, -1, -1, 58, -1, 60, 61, -1, 63, + -1, -1, 26, 27, 28, 29, 30, 31, -1, 33, + 34, 35, 36, -1, -1, -1, -1, -1, -1, 43, + -1, 45, 46, 47, 48, 49, -1, 51, 52, 53, + 54, 55, -1, 57, 58, -1, 60, 61, -1, 63, 64, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, -1, -1, -1, 83, -1, 85, 86, 87, 88, -1, -1, 91, -1, -1, @@ -1491,38 +1461,50 @@ static const yytype_int16 yycheck[] = 78, -1, -1, -1, -1, 83, -1, 85, 86, 87, 88, -1, -1, 91, -1, -1, -1, -1, -1, 97, 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, - 3, -1, 5, -1, 7, -1, -1, 10, 116, 117, - 13, 14, 120, 16, 17, 18, 19, 20, 21, 22, - -1, -1, -1, -1, 27, 28, 29, 30, 31, -1, - 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, - 53, 54, 55, -1, -1, 58, -1, 60, 61, -1, - 63, 64, 65, 66, -1, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, -1, -1, -1, -1, - 83, -1, 85, 86, 87, 88, -1, -1, 91, -1, - -1, -1, -1, -1, 97, 98, 99, 100, 3, -1, - 5, -1, 7, -1, -1, 10, -1, -1, 13, -1, - -1, -1, -1, 116, 117, -1, -1, 120, -1, -1, - -1, -1, -1, -1, -1, -1, 31, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, - -1, 5, -1, 7, -1, -1, 10, 52, -1, 13, - 55, -1, -1, -1, -1, 60, 61, -1, 63, 64, - 65, 66, -1, -1, -1, -1, -1, 31, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 83, -1, - 85, 86, 87, 88, -1, -1, 91, -1, 52, -1, - -1, 55, 97, 98, 99, 100, 60, 61, -1, 63, - 64, 65, 66, -1, -1, -1, -1, -1, -1, -1, - -1, 116, 117, -1, -1, 120, -1, -1, -1, 83, - -1, 85, 86, 87, 88, -1, -1, 91, -1, -1, - -1, -1, -1, 97, 98, 99, 100, 5, 6, 7, - -1, -1, 10, -1, -1, 13, -1, -1, -1, -1, - -1, -1, 116, 117, -1, -1, 120, -1, -1, -1, - -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 3, -1, 5, -1, 7, 116, 117, + 10, 11, 120, 13, 14, -1, 16, 17, 18, 19, + 20, 21, 22, -1, -1, -1, -1, 27, 28, 29, + 30, 31, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 52, -1, -1, 55, -1, -1, - -1, -1, 60, 61, -1, 63, 64, 65, 66, -1, + -1, -1, 52, 53, 54, 55, -1, -1, 58, -1, + 60, 61, -1, 63, 64, 65, 66, -1, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, + -1, -1, -1, 83, -1, 85, 86, 87, 88, -1, + -1, 91, -1, -1, -1, -1, -1, 97, 98, 99, + 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 3, -1, 5, -1, 7, 116, 117, 10, 11, + 120, 13, 14, -1, 16, 17, 18, 19, 20, 21, + 22, -1, -1, -1, -1, 27, 28, 29, 30, 31, + -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 52, 53, 54, 55, -1, -1, 58, -1, 60, 61, + -1, 63, 64, 65, 66, -1, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, -1, -1, -1, + -1, 83, -1, 85, 86, 87, 88, -1, -1, 91, + -1, -1, -1, -1, -1, 97, 98, 99, 100, -1, + -1, -1, -1, -1, -1, -1, 3, -1, 5, -1, + 7, -1, -1, 10, 116, 117, 13, 14, 120, 16, + 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, + 27, 28, 29, 30, 31, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 83, 84, 85, 86, 87, + -1, -1, -1, -1, -1, 52, 53, 54, 55, -1, + -1, 58, -1, 60, 61, -1, 63, 64, 65, 66, + -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, -1, -1, -1, -1, 83, -1, 85, 86, + 87, 88, -1, -1, 91, -1, -1, -1, -1, -1, + 97, 98, 99, 100, 3, -1, 5, -1, 7, -1, + -1, 10, -1, -1, 13, -1, -1, -1, -1, 116, + 117, -1, -1, 120, -1, -1, -1, -1, -1, -1, + -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 5, 6, 7, + -1, -1, 10, 52, -1, 13, 55, -1, -1, -1, + -1, 60, 61, -1, 63, 64, 65, 66, -1, -1, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 83, -1, 85, 86, 87, 88, + -1, -1, 91, -1, 52, -1, -1, 55, 97, 98, + 99, 100, 60, 61, -1, 63, 64, 65, 66, -1, + -1, -1, -1, -1, -1, -1, -1, 116, 117, -1, + -1, 120, -1, -1, -1, 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, -1, -1, -1, 97, 98, 99, 100, -1, -1, 103, 104, 105, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, @@ -1593,20 +1575,22 @@ static const yytype_int16 yycheck[] = -1, -1, 55, 97, 98, 99, 100, 60, 61, -1, 63, 64, 65, 66, -1, 5, -1, 7, -1, -1, 10, -1, 116, 117, -1, -1, 120, -1, -1, -1, - 83, -1, 85, 86, 87, 88, 5, -1, 91, -1, + 83, -1, 85, 86, 87, 88, -1, -1, 91, -1, -1, 31, -1, -1, 97, 98, 99, 100, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 116, 117, 55, -1, 120, -1, -1, - -1, 61, 41, 63, 64, 65, 66, -1, -1, -1, - -1, -1, -1, 52, -1, -1, -1, -1, -1, -1, - -1, 60, -1, 83, -1, 85, 86, 87, 88, -1, - -1, 91, -1, 56, -1, -1, -1, 97, 98, 99, - 100, -1, -1, -1, 83, -1, 85, 86, 87, 88, - -1, -1, -1, -1, -1, -1, 116, 117, 97, -1, - 120, 84, 85, 86, 87, 88, 89, 90, -1, -1, - 93, -1, 111, -1, -1, -1, -1, 116, 117, -1, - 103, 104, 105, 106, 107, 108, 109, 110, -1, -1, - -1, -1, -1, -1, -1, 118, 119 + -1, -1, -1, -1, -1, 5, -1, 7, -1, -1, + 10, -1, -1, 116, 117, 55, -1, 120, -1, -1, + -1, 61, -1, 63, 64, 65, 66, -1, -1, -1, + -1, 31, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 83, -1, 85, 86, 87, 88, -1, + -1, 91, -1, -1, 94, 55, -1, 97, 98, 99, + 100, 61, -1, 63, 64, 65, 66, -1, -1, -1, + -1, -1, -1, -1, 56, -1, 116, 117, -1, -1, + 120, -1, -1, 83, -1, 85, 86, 87, 88, -1, + -1, 91, -1, -1, -1, -1, -1, 97, 98, 99, + 100, -1, 84, 85, 86, 87, 88, 89, 90, -1, + -1, 93, -1, -1, -1, -1, 116, 117, -1, -1, + 120, 103, 104, 105, 106, 107, 108, 109, 110, -1, + -1, -1, -1, -1, -1, -1, 118, 119 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -1669,12 +1653,12 @@ static const yytype_int16 yystos[] = 5, 5, 228, 237, 11, 7, 193, 255, 195, 94, 156, 201, 201, 15, 6, 165, 6, 94, 190, 24, 178, 25, 119, 4, 174, 165, 155, 8, 139, 4, - 8, 154, 139, 133, 11, 129, 200, 83, 160, 83, - 155, 225, 226, 167, 156, 163, 6, 24, 150, 156, - 156, 156, 8, 190, 200, 165, 165, 165, 223, 6, - 189, 94, 165, 83, 175, 11, 83, 53, 142, 133, - 11, 147, 3, 83, 11, 225, 79, 163, 190, 3, - 4, 6, 6, 3, 190, 165, 144, 8, 6, 3, + 8, 53, 154, 139, 133, 11, 129, 200, 83, 160, + 83, 155, 225, 226, 167, 156, 163, 6, 24, 150, + 156, 156, 156, 8, 190, 200, 165, 165, 165, 223, + 6, 189, 94, 165, 83, 175, 11, 83, 142, 8, + 133, 11, 147, 3, 83, 11, 225, 79, 163, 190, + 3, 4, 6, 6, 3, 190, 165, 144, 6, 3, 156, 6, 6, 165 }; @@ -1739,7 +1723,7 @@ static const yytype_int8 yyr2[] = 1, 3, 3, 3, 3, 0, 1, 1, 1, 1, 1, 3, 4, 5, 2, 3, 2, 3, 5, 5, 4, 4, 1, 1, 1, 4, 5, 3, 2, 3, - 2, 3, 5, 3, 0, 1, 1, 0, 1, 1, + 2, 3, 4, 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 0, 2, 1, 4, 4, 7, 6, 8, 1, 1, 1, 1, 1, 8, 6, 6, 3, 1, 2, 3, 3, 4, 1, @@ -2568,91 +2552,91 @@ YYLTYPE yylloc = yyloc_default; case 2: /* ast: section_list */ #line 202 "src/gwion.y" { arg->ppa->ast = (yyval.ast) = (yyvsp[0].ast); } -#line 2572 "src/parser.c" +#line 2556 "src/parser.c" break; case 3: /* ast: %empty */ #line 203 "src/gwion.y" { loc_t loc = { {1, 1}, {1,1} }; parser_error(&loc, arg, "file is empty.", 0201); YYERROR; } -#line 2578 "src/parser.c" +#line 2562 "src/parser.c" break; case 4: /* section_list: section */ #line 206 "src/gwion.y" { YYLIST_INI(Section, (yyval.ast), (yyvsp[0].section)); } -#line 2584 "src/parser.c" +#line 2568 "src/parser.c" break; case 5: /* section_list: section_list section */ #line 207 "src/gwion.y" { YYLIST_END(Section, (yyval.ast), (yyvsp[-1].ast), (yyvsp[0].section)); } -#line 2590 "src/parser.c" +#line 2574 "src/parser.c" break; case 6: /* section: stmt_list */ #line 210 "src/gwion.y" { (yyval.section) = MK_SECTION(stmt, stmt_list, (yyvsp[0].stmt_list)); } -#line 2596 "src/parser.c" +#line 2580 "src/parser.c" break; case 7: /* section: func_def */ #line 211 "src/gwion.y" { (yyval.section) = MK_SECTION(func, func_def, (yyvsp[0].func_def)); } -#line 2602 "src/parser.c" +#line 2586 "src/parser.c" break; case 8: /* section: class_def */ #line 212 "src/gwion.y" { (yyval.section) = MK_SECTION(class, class_def, (yyvsp[0].class_def)); } -#line 2608 "src/parser.c" +#line 2592 "src/parser.c" break; case 9: /* section: trait_def */ #line 213 "src/gwion.y" { (yyval.section) = MK_SECTION(trait, trait_def, (yyvsp[0].trait_def)); } -#line 2614 "src/parser.c" +#line 2598 "src/parser.c" break; case 10: /* section: extend_def */ #line 214 "src/gwion.y" { (yyval.section) = MK_SECTION(extend, extend_def, (yyvsp[0].extend_def)); } -#line 2620 "src/parser.c" +#line 2604 "src/parser.c" break; case 11: /* section: enum_def */ #line 215 "src/gwion.y" { (yyval.section) = MK_SECTION(enum, enum_def, (yyvsp[0].enum_def)); } -#line 2626 "src/parser.c" +#line 2610 "src/parser.c" break; case 12: /* section: union_def */ #line 216 "src/gwion.y" { (yyval.section) = MK_SECTION(union, union_def, (yyvsp[0].union_def)); } -#line 2632 "src/parser.c" +#line 2616 "src/parser.c" break; case 13: /* section: fptr_def */ #line 217 "src/gwion.y" { (yyval.section) = MK_SECTION(fptr, fptr_def, (yyvsp[0].fptr_def)); } -#line 2638 "src/parser.c" +#line 2622 "src/parser.c" break; case 14: /* section: type_def */ #line 218 "src/gwion.y" { (yyval.section) = MK_SECTION(type, type_def, (yyvsp[0].type_def)); } -#line 2644 "src/parser.c" +#line 2628 "src/parser.c" break; case 15: /* section: prim_def */ #line 219 "src/gwion.y" { (yyval.section) = MK_SECTION(primitive, prim_def, (yyvsp[0].prim_def)); } -#line 2650 "src/parser.c" +#line 2634 "src/parser.c" break; case 16: /* class_flag: flag modifier */ #line 222 "src/gwion.y" { (yyval.flag) = (yyvsp[-1].flag) | (yyvsp[0].flag); } -#line 2656 "src/parser.c" +#line 2640 "src/parser.c" break; case 17: /* class_def: "class" class_flag "" decl_template class_ext traits class_body */ @@ -2663,7 +2647,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.class_def)->base.tmpl = new_tmpl(mpool(arg), (yyvsp[-3].specialized_list)); (yyval.class_def)->traits = (yyvsp[-1].id_list); } -#line 2667 "src/parser.c" +#line 2651 "src/parser.c" break; case 18: /* class_def: "struct" class_flag "" decl_template traits class_body */ @@ -2675,25 +2659,25 @@ YYLTYPE yylloc = yyloc_default; (yyval.class_def)->cflag |= cflag_struct; (yyval.class_def)->traits = (yyvsp[-1].id_list); } -#line 2679 "src/parser.c" +#line 2663 "src/parser.c" break; case 19: /* class_body: "{" section_list "}" */ #line 240 "src/gwion.y" { (yyval.ast) = (yyvsp[-1].ast); } -#line 2685 "src/parser.c" +#line 2669 "src/parser.c" break; case 20: /* class_body: "{" "}" */ #line 240 "src/gwion.y" { (yyval.ast) = NULL; } -#line 2691 "src/parser.c" +#line 2675 "src/parser.c" break; case 21: /* class_body: ";" */ #line 240 "src/gwion.y" { (yyval.ast) = NULL; } -#line 2697 "src/parser.c" +#line 2681 "src/parser.c" break; case 22: /* trait_def: "trait" opt_global "" traits class_body */ @@ -2702,7 +2686,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.trait_def) = new_trait_def(mpool(arg), (yyvsp[-3].flag), (yyvsp[-2].sym), (yyvsp[0].ast), (yylsp[-2])); (yyval.trait_def)->traits = (yyvsp[-1].id_list); } -#line 2706 "src/parser.c" +#line 2690 "src/parser.c" break; case 23: /* number: INTEGER */ @@ -2713,7 +2697,7 @@ YYLTYPE yylloc = yyloc_default; } (yyval.gwint) = GWINT((yyvsp[0].yyint).num, (yyvsp[0].yyint).int_type); } -#line 2717 "src/parser.c" +#line 2701 "src/parser.c" break; case 24: /* decimal: number */ @@ -2724,7 +2708,7 @@ YYLTYPE yylloc = yyloc_default; } (yyval.gwint) = (yyvsp[0].gwint); } -#line 2728 "src/parser.c" +#line 2712 "src/parser.c" break; case 25: /* prim_def: "primitive" class_flag "" decimal ";" */ @@ -2732,31 +2716,31 @@ YYLTYPE yylloc = yyloc_default; { (yyval.prim_def) = new_prim_def(mpool(arg), (yyvsp[-2].sym), (yyvsp[-1].gwint).num, (yylsp[-2]), (yyvsp[-3].flag)); } -#line 2736 "src/parser.c" +#line 2720 "src/parser.c" break; case 26: /* class_ext: "extends" type_decl_exp */ #line 266 "src/gwion.y" { (yyval.type_decl) = (yyvsp[0].type_decl); } -#line 2742 "src/parser.c" +#line 2726 "src/parser.c" break; case 27: /* class_ext: %empty */ #line 266 "src/gwion.y" { (yyval.type_decl) = NULL; } -#line 2748 "src/parser.c" +#line 2732 "src/parser.c" break; case 28: /* traits: %empty */ #line 267 "src/gwion.y" { (yyval.id_list) = NULL; } -#line 2754 "src/parser.c" +#line 2738 "src/parser.c" break; case 29: /* traits: ":" id_list */ #line 267 "src/gwion.y" { (yyval.id_list) = (yyvsp[0].id_list); } -#line 2760 "src/parser.c" +#line 2744 "src/parser.c" break; case 30: /* extend_def: "extends" type_decl_empty ":" id_list ";" */ @@ -2764,19 +2748,19 @@ YYLTYPE yylloc = yyloc_default; { (yyval.extend_def) = new_extend_def(mpool(arg), (yyvsp[-3].type_decl), (yyvsp[-1].id_list)); } -#line 2768 "src/parser.c" +#line 2752 "src/parser.c" break; case 31: /* id_list: "" */ #line 274 "src/gwion.y" { YYLIST_INI(Symbol, (yyval.id_list), (yyvsp[0].sym)); } -#line 2774 "src/parser.c" +#line 2758 "src/parser.c" break; case 32: /* id_list: id_list "," "" */ #line 275 "src/gwion.y" { YYLIST_END(Symbol, (yyval.id_list), (yyvsp[-2].id_list), (yyvsp[0].sym)); } -#line 2780 "src/parser.c" +#line 2764 "src/parser.c" break; case 33: /* specialized: "" traits */ @@ -2787,7 +2771,7 @@ YYLTYPE yylloc = yyloc_default; .traits = (yyvsp[0].id_list), }; } -#line 2791 "src/parser.c" +#line 2775 "src/parser.c" break; case 34: /* specialized: "const" type_decl_empty "" */ @@ -2798,69 +2782,69 @@ YYLTYPE yylloc = yyloc_default; .td = (yyvsp[-1].type_decl), }; } -#line 2802 "src/parser.c" +#line 2786 "src/parser.c" break; case 35: /* specialized_list: specialized */ #line 290 "src/gwion.y" { YYLIST_INI(Specialized, (yyval.specialized_list), (yyvsp[0].specialized)); } -#line 2808 "src/parser.c" +#line 2792 "src/parser.c" break; case 36: /* specialized_list: specialized_list "," specialized */ #line 291 "src/gwion.y" { YYLIST_END(Specialized, (yyval.specialized_list), (yyvsp[-2].specialized_list), (yyvsp[0].specialized)); } -#line 2814 "src/parser.c" +#line 2798 "src/parser.c" break; case 37: /* stmt_list: stmt */ #line 293 "src/gwion.y" { YYLIST_INI(Stmt, (yyval.stmt_list), (yyvsp[0].stmt)); } -#line 2820 "src/parser.c" +#line 2804 "src/parser.c" break; case 38: /* stmt_list: stmt_list stmt */ #line 294 "src/gwion.y" { YYLIST_END(Stmt, (yyval.stmt_list), (yyvsp[-1].stmt_list), (yyvsp[0].stmt)); } -#line 2826 "src/parser.c" +#line 2810 "src/parser.c" break; case 39: /* fptr_base: flag type_decl_empty "" decl_template */ #line 296 "src/gwion.y" { (yyval.func_base) = new_func_base(mpool(arg), (yyvsp[-2].type_decl), (yyvsp[-1].sym), NULL, (yyvsp[-3].flag), (yylsp[-2])); if((yyvsp[0].specialized_list)) { (yyval.func_base)->tmpl = new_tmpl(mpool(arg), (yyvsp[0].specialized_list)); } } -#line 2833 "src/parser.c" +#line 2817 "src/parser.c" break; case 40: /* _func_effects: "perform" "" */ #line 299 "src/gwion.y" { vector_init(&(yyval.vector)); vector_add(&(yyval.vector), (m_uint)(yyvsp[0].sym)); } -#line 2839 "src/parser.c" +#line 2823 "src/parser.c" break; case 41: /* _func_effects: _func_effects "" */ #line 299 "src/gwion.y" { vector_add(&(yyval.vector), (m_uint)(yyvsp[0].sym)); } -#line 2845 "src/parser.c" +#line 2829 "src/parser.c" break; case 42: /* func_effects: %empty */ #line 300 "src/gwion.y" { (yyval.vector).ptr = NULL; } -#line 2851 "src/parser.c" +#line 2835 "src/parser.c" break; case 43: /* func_effects: _func_effects */ #line 300 "src/gwion.y" { (yyval.vector).ptr = (yyvsp[0].vector).ptr; } -#line 2857 "src/parser.c" +#line 2841 "src/parser.c" break; case 44: /* func_base: flag final type_decl_empty "" decl_template */ #line 302 "src/gwion.y" { (yyval.func_base) = new_func_base(mpool(arg), (yyvsp[-2].type_decl), (yyvsp[-1].sym), NULL, (yyvsp[-4].flag) | (yyvsp[-3].flag), (yylsp[-1])); if((yyvsp[0].specialized_list)) { (yyval.func_base)->tmpl = new_tmpl(mpool(arg), (yyvsp[0].specialized_list)); } } -#line 2864 "src/parser.c" +#line 2848 "src/parser.c" break; case 45: /* fptr_def: "funptr" fptr_base fptr_args func_effects ";" */ @@ -2870,31 +2854,31 @@ YYLTYPE yylloc = yyloc_default; (yyval.fptr_def) = new_fptr_def(mpool(arg), (yyvsp[-3].func_base)); (yyval.fptr_def)->base->effects.ptr = (yyvsp[-1].vector).ptr; } -#line 2874 "src/parser.c" +#line 2858 "src/parser.c" break; case 46: /* typedef_when: %empty */ #line 311 "src/gwion.y" { (yyval.exp) = NULL;} -#line 2880 "src/parser.c" +#line 2864 "src/parser.c" break; case 47: /* typedef_when: "when" binary_exp */ #line 311 "src/gwion.y" { (yyval.exp) = (yyvsp[0].exp); } -#line 2886 "src/parser.c" +#line 2870 "src/parser.c" break; case 48: /* type_def_type: "typedef" */ #line 312 "src/gwion.y" { (yyval.yybool) = false; } -#line 2892 "src/parser.c" +#line 2876 "src/parser.c" break; case 49: /* type_def_type: "distinct" */ #line 312 "src/gwion.y" { (yyval.yybool) = true; } -#line 2898 "src/parser.c" +#line 2882 "src/parser.c" break; case 50: /* type_def: type_def_type flag type_decl_array "" decl_template typedef_when ";" */ @@ -2907,13 +2891,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.type_def)->tmpl = new_tmpl(mpool(arg), (yyvsp[-2].specialized_list)); (yyval.type_def)->distinct = (yyvsp[-6].yybool); } -#line 2911 "src/parser.c" +#line 2895 "src/parser.c" break; case 51: /* type_decl_array: type_decl array */ #line 322 "src/gwion.y" { (yyvsp[-1].type_decl)->array = (yyvsp[0].array_sub); } -#line 2917 "src/parser.c" +#line 2901 "src/parser.c" break; case 53: /* type_decl_exp: type_decl_array */ @@ -2921,7 +2905,7 @@ YYLTYPE yylloc = yyloc_default; { if((yyvsp[0].type_decl)->array && !(yyvsp[0].type_decl)->array->exp) { parser_error(&(yyloc), arg, "can't instantiate with empty `[]`", 0203); YYERROR;} (yyval.type_decl) = (yyvsp[0].type_decl); } -#line 2925 "src/parser.c" +#line 2909 "src/parser.c" break; case 54: /* type_decl_empty: type_decl_array */ @@ -2929,7 +2913,7 @@ YYLTYPE yylloc = yyloc_default; { if((yyvsp[0].type_decl)->array && (yyvsp[0].type_decl)->array->exp) { parser_error(&(yyloc), arg, "type must be defined with empty []'s", 0204); YYERROR;} (yyval.type_decl) = (yyvsp[0].type_decl); } -#line 2933 "src/parser.c" +#line 2917 "src/parser.c" break; case 55: /* arg: type_decl_empty arg_decl ":" binary_exp */ @@ -2938,7 +2922,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.default_args).arg = (Arg) { .var = MK_VAR((yyvsp[-3].type_decl), (yyvsp[-2].var_decl)), .exp = (yyvsp[0].exp) }; (yyval.default_args).flag = fbflag_default; } -#line 2942 "src/parser.c" +#line 2926 "src/parser.c" break; case 56: /* arg: type_decl_empty arg_decl */ @@ -2947,7 +2931,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.default_args).arg = (Arg) { .var = MK_VAR((yyvsp[-1].type_decl), (yyvsp[0].var_decl)) }; (yyval.default_args).flag = fbflag_none; } -#line 2951 "src/parser.c" +#line 2935 "src/parser.c" break; case 57: /* arg_list: arg */ @@ -2956,7 +2940,7 @@ YYLTYPE yylloc = yyloc_default; YYLIST_INI(Arg, (yyval.default_args).args, (yyvsp[0].default_args).arg); (yyval.default_args).flag = (yyvsp[0].default_args).flag; } -#line 2960 "src/parser.c" +#line 2944 "src/parser.c" break; case 58: /* arg_list: arg_list "," arg */ @@ -2968,7 +2952,7 @@ YYLTYPE yylloc = yyloc_default; mp_vector_add(mpool(arg), &(yyvsp[-2].default_args).args, Arg, (yyvsp[0].default_args).arg); (yyval.default_args) = (yyvsp[-2].default_args); } -#line 2972 "src/parser.c" +#line 2956 "src/parser.c" break; case 59: /* locale_arg: arg */ @@ -2985,7 +2969,7 @@ YYLTYPE yylloc = yyloc_default; mp_vector_set((yyval.default_args).args, Arg, 1, (yyvsp[0].default_args).arg); (yyval.default_args).flag = (yyvsp[0].default_args).flag; } -#line 2989 "src/parser.c" +#line 2973 "src/parser.c" break; case 60: /* locale_arg: locale_arg "," arg */ @@ -2997,7 +2981,7 @@ YYLTYPE yylloc = yyloc_default; mp_vector_add(mpool(arg), &(yyvsp[-2].default_args).args, Arg, (yyvsp[0].default_args).arg); (yyval.default_args) = (yyvsp[-2].default_args); } -#line 3001 "src/parser.c" +#line 2985 "src/parser.c" break; case 62: /* locale_list: %empty */ @@ -3012,129 +2996,129 @@ YYLTYPE yylloc = yyloc_default; }; YYLIST_INI(Arg, (yyval.default_args).args, self); } -#line 3016 "src/parser.c" +#line 3000 "src/parser.c" break; case 63: /* fptr_arg: type_decl_empty fptr_arg_decl */ #line 387 "src/gwion.y" { (yyval.arg) = (Arg) { .var = MK_VAR((yyvsp[-1].type_decl), (yyvsp[0].var_decl)) }; } -#line 3022 "src/parser.c" +#line 3006 "src/parser.c" break; case 64: /* fptr_list: fptr_arg */ #line 389 "src/gwion.y" { YYLIST_INI(Arg, (yyval.arg_list), (yyvsp[0].arg)); } -#line 3028 "src/parser.c" +#line 3012 "src/parser.c" break; case 65: /* fptr_list: fptr_list "," fptr_arg */ #line 390 "src/gwion.y" { YYLIST_END(Arg, (yyval.arg_list), (yyvsp[-2].arg_list), (yyvsp[0].arg)); } -#line 3034 "src/parser.c" +#line 3018 "src/parser.c" break; case 66: /* code_stmt: "{" "}" */ #line 393 "src/gwion.y" { (yyval.stmt) = MK_STMT(ae_stmt_code, (yyloc)); } -#line 3041 "src/parser.c" +#line 3025 "src/parser.c" break; case 67: /* code_stmt: "{" stmt_list "}" */ #line 395 "src/gwion.y" { (yyval.stmt) = MK_STMT(ae_stmt_code, (yyloc), .stmt_code = { .stmt_list = (yyvsp[-1].stmt_list) });} -#line 3048 "src/parser.c" +#line 3032 "src/parser.c" break; case 68: /* code_list: "{" "}" */ #line 399 "src/gwion.y" { (yyval.stmt_list) = new_mp_vector(mpool(arg), Stmt, 0); } -#line 3054 "src/parser.c" +#line 3038 "src/parser.c" break; case 69: /* code_list: "{" stmt_list "}" */ #line 400 "src/gwion.y" { (yyval.stmt_list) = (yyvsp[-1].stmt_list); } -#line 3060 "src/parser.c" +#line 3044 "src/parser.c" break; case 70: /* stmt_pp: "" */ #line 403 "src/gwion.y" { /*if(!arg->ppa->fmt)return 0; */(yyval.stmt) = MK_STMT_PP(comment, (yyloc), .data = (yyvsp[0].sval)); } -#line 3066 "src/parser.c" +#line 3050 "src/parser.c" break; case 71: /* stmt_pp: "#include" */ #line 404 "src/gwion.y" { (yyval.stmt) = MK_STMT_PP(include, (yyloc), .data = (yyvsp[0].sval)); } -#line 3072 "src/parser.c" +#line 3056 "src/parser.c" break; case 72: /* stmt_pp: "#define" */ #line 405 "src/gwion.y" { (yyval.stmt) = MK_STMT_PP(define, (yyloc), .data = (yyvsp[0].sval)); } -#line 3078 "src/parser.c" +#line 3062 "src/parser.c" break; case 73: /* stmt_pp: "#pragma" */ #line 406 "src/gwion.y" { (yyval.stmt) = MK_STMT_PP(pragma, (yyloc), .data = (yyvsp[0].sval)); } -#line 3084 "src/parser.c" +#line 3068 "src/parser.c" break; case 74: /* stmt_pp: "#undef" */ #line 407 "src/gwion.y" { (yyval.stmt) = MK_STMT_PP(undef, (yyloc), .data = (yyvsp[0].sval)); } -#line 3090 "src/parser.c" +#line 3074 "src/parser.c" break; case 75: /* stmt_pp: "#ifdef" */ #line 408 "src/gwion.y" { (yyval.stmt) = MK_STMT_PP(ifdef, (yyloc), .data = (yyvsp[0].sval)); } -#line 3096 "src/parser.c" +#line 3080 "src/parser.c" break; case 76: /* stmt_pp: "#ifndef" */ #line 409 "src/gwion.y" { (yyval.stmt) = MK_STMT_PP(ifndef, (yyloc), .data = (yyvsp[0].sval)); } -#line 3102 "src/parser.c" +#line 3086 "src/parser.c" break; case 77: /* stmt_pp: "#else" */ #line 410 "src/gwion.y" { (yyval.stmt) = MK_STMT_PP(else, (yyloc), .data = (yyvsp[0].sval)); } -#line 3108 "src/parser.c" +#line 3092 "src/parser.c" break; case 78: /* stmt_pp: "#if" */ #line 411 "src/gwion.y" { (yyval.stmt) = MK_STMT_PP(endif, (yyloc), .data = (yyvsp[0].sval)); } -#line 3114 "src/parser.c" +#line 3098 "src/parser.c" break; case 79: /* stmt_pp: "\n" */ #line 412 "src/gwion.y" { if(!arg->ppa->fmt)return 0; (yyval.stmt) = MK_STMT_PP(nl, (yyloc), .data = (yyvsp[0].sval)); } -#line 3120 "src/parser.c" +#line 3104 "src/parser.c" break; case 80: /* stmt_pp: "import" */ #line 413 "src/gwion.y" { (yyval.stmt) = MK_STMT_PP(import, (yyloc), .data = (yyvsp[0].sval)); } -#line 3126 "src/parser.c" +#line 3110 "src/parser.c" break; case 81: /* stmt_pp: LOCALE_INI "" opt_exp LOCALE_END */ #line 415 "src/gwion.y" { (yyval.stmt) = MK_STMT_PP(locale, (yyloc), .xid = (yyvsp[-2].sym), .exp = (yyvsp[-1].exp)); } -#line 3132 "src/parser.c" +#line 3116 "src/parser.c" break; case 93: /* $@1: %empty */ #line 432 "src/gwion.y" {lex_spread(((Scanner*)scan));} -#line 3138 "src/parser.c" +#line 3122 "src/parser.c" break; case 94: /* spread_stmt: "..." "" ":" id_list "{" $@1 "}..." */ @@ -3147,7 +3131,7 @@ YYLTYPE yylloc = yyloc_default; }; (yyval.stmt) = MK_STMT(ae_stmt_spread, (yylsp[-5]), .stmt_spread = spread); } -#line 3151 "src/parser.c" +#line 3135 "src/parser.c" break; case 95: /* retry_stmt: "retry" ";" */ @@ -3156,19 +3140,19 @@ YYLTYPE yylloc = yyloc_default; if(!arg->handling) { parser_error(&(yylsp[-1]), arg, "`retry` outside of `handle` block", 0); YYERROR; } (yyval.stmt) = MK_STMT(ae_stmt_retry, (yylsp[-1]));} -#line 3160 "src/parser.c" +#line 3144 "src/parser.c" break; case 96: /* $@2: %empty */ #line 446 "src/gwion.y" { arg->handling = true; } -#line 3166 "src/parser.c" +#line 3150 "src/parser.c" break; case 97: /* handler: "handle" $@2 opt_id stmt */ #line 446 "src/gwion.y" { (yyval.handler) = (Handler){ .tag = MK_TAG((yyvsp[-1].sym), (yyvsp[-1].sym) ? (yylsp[-1]) :(yylsp[-3])), .stmt = cpy_stmt3(mpool(arg), &(yyvsp[0].stmt)) }; arg->handling = false; } -#line 3172 "src/parser.c" +#line 3156 "src/parser.c" break; case 98: /* handler_list: handler */ @@ -3177,7 +3161,7 @@ YYLTYPE yylloc = yyloc_default; YYLIST_INI(Handler, (yyval.handler_list).handlers, (yyvsp[0].handler)); (yyval.handler_list).has_xid = !!(yyvsp[0].handler).tag.sym; } -#line 3181 "src/parser.c" +#line 3165 "src/parser.c" break; case 99: /* handler_list: handler_list handler */ @@ -3198,32 +3182,32 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] (yyval.handler_list) = (yyvsp[-1].handler_list); // $1->next = $2; } -#line 3202 "src/parser.c" +#line 3186 "src/parser.c" break; case 100: /* try_stmt: "try" stmt handler_list */ #line 467 "src/gwion.y" { (yyval.stmt) = MK_STMT(ae_stmt_try, (yylsp[-2]), .stmt_try = { .stmt = cpy_stmt3(mpool(arg), &(yyvsp[-1].stmt)), .handler = (yyvsp[0].handler_list).handlers});} -#line 3209 "src/parser.c" +#line 3193 "src/parser.c" break; case 102: /* opt_id: %empty */ #line 470 "src/gwion.y" { (yyval.sym) = NULL; } -#line 3215 "src/parser.c" +#line 3199 "src/parser.c" break; case 104: /* opt_comma: %empty */ #line 471 "src/gwion.y" {} -#line 3221 "src/parser.c" +#line 3205 "src/parser.c" break; case 105: /* enum_value: "" */ #line 474 "src/gwion.y" { (yyval.enum_value) = (EnumValue) { .tag = MK_TAG((yyvsp[0].sym), (yylsp[0])) }; } -#line 3227 "src/parser.c" +#line 3211 "src/parser.c" break; case 106: /* enum_value: number "" "" */ @@ -3234,19 +3218,19 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] } (yyval.enum_value) = (EnumValue) {.tag = MK_TAG((yyvsp[0].sym), (yylsp[0])), .gwint = (yyvsp[-2].gwint), .set = true }; } -#line 3238 "src/parser.c" +#line 3222 "src/parser.c" break; case 107: /* enum_list: enum_value */ #line 482 "src/gwion.y" { YYLIST_INI(EnumValue, (yyval.enum_list), (yyvsp[0].enum_value)); } -#line 3244 "src/parser.c" +#line 3228 "src/parser.c" break; case 108: /* enum_list: enum_list "," enum_value */ #line 483 "src/gwion.y" { YYLIST_END(EnumValue, (yyval.enum_list), (yyvsp[-2].enum_list), (yyvsp[0].enum_value)) ;} -#line 3250 "src/parser.c" +#line 3234 "src/parser.c" break; case 109: /* enum_def: "enum" flag "" "{" enum_list opt_comma "}" */ @@ -3255,19 +3239,19 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] (yyval.enum_def) = new_enum_def(mpool(arg), (yyvsp[-2].enum_list), (yyvsp[-4].sym), (yyloc)); (yyval.enum_def)->flag = (yyvsp[-5].flag); } -#line 3259 "src/parser.c" +#line 3243 "src/parser.c" break; case 110: /* when_exp: "when" exp */ #line 491 "src/gwion.y" { (yyval.exp) = (yyvsp[0].exp); } -#line 3265 "src/parser.c" +#line 3249 "src/parser.c" break; case 111: /* when_exp: %empty */ #line 491 "src/gwion.y" { (yyval.exp) = NULL; } -#line 3271 "src/parser.c" +#line 3255 "src/parser.c" break; case 112: /* match_case_stmt: "case" exp when_exp ":" stmt_list */ @@ -3280,19 +3264,19 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] .list = (yyvsp[0].stmt_list) }); } -#line 3284 "src/parser.c" +#line 3268 "src/parser.c" break; case 113: /* match_list: match_case_stmt */ #line 503 "src/gwion.y" { YYLIST_INI(Stmt, (yyval.stmt_list), (yyvsp[0].stmt)); } -#line 3290 "src/parser.c" +#line 3274 "src/parser.c" break; case 114: /* match_list: match_list match_case_stmt */ #line 504 "src/gwion.y" { YYLIST_END(Stmt, (yyval.stmt_list), (yyvsp[-1].stmt_list), (yyvsp[0].stmt)); } -#line 3296 "src/parser.c" +#line 3280 "src/parser.c" break; case 115: /* match_stmt: "match" exp "{" match_list "}" "where" stmt */ @@ -3305,7 +3289,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] .where = cpy_stmt3(mpool(arg), &(yyvsp[0].stmt)) }); } -#line 3309 "src/parser.c" +#line 3293 "src/parser.c" break; case 116: /* match_stmt: "match" exp "{" match_list "}" */ @@ -3317,19 +3301,19 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] .list = (yyvsp[-1].stmt_list), }); } -#line 3321 "src/parser.c" +#line 3305 "src/parser.c" break; case 117: /* flow: "while" */ #line 524 "src/gwion.y" { (yyval.stmt_t) = ae_stmt_while; } -#line 3327 "src/parser.c" +#line 3311 "src/parser.c" break; case 118: /* flow: "until" */ #line 525 "src/gwion.y" { (yyval.stmt_t) = ae_stmt_until; } -#line 3333 "src/parser.c" +#line 3317 "src/parser.c" break; case 119: /* loop_stmt: flow "(" exp ")" stmt */ @@ -3340,7 +3324,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] .body = cpy_stmt3(mpool(arg), &(yyvsp[0].stmt)) }); } -#line 3344 "src/parser.c" +#line 3328 "src/parser.c" break; case 120: /* loop_stmt: "do" stmt flow exp ";" */ @@ -3352,7 +3336,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] .is_do = true }); } -#line 3356 "src/parser.c" +#line 3340 "src/parser.c" break; case 121: /* loop_stmt: "for" "(" exp_stmt exp_stmt ")" stmt */ @@ -3364,7 +3348,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] .body = cpy_stmt3(mpool(arg), &(yyvsp[0].stmt)), }); } -#line 3368 "src/parser.c" +#line 3352 "src/parser.c" break; case 122: /* loop_stmt: "for" "(" exp_stmt exp_stmt exp ")" stmt */ @@ -3377,7 +3361,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] .body = cpy_stmt3(mpool(arg), &(yyvsp[0].stmt)), }); } -#line 3381 "src/parser.c" +#line 3365 "src/parser.c" break; case 123: /* loop_stmt: "foreach" "(" "" ":" opt_var binary_exp ")" stmt */ @@ -3391,7 +3375,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] // what to do with opt_var? // list rem? } -#line 3395 "src/parser.c" +#line 3379 "src/parser.c" break; case 124: /* loop_stmt: "foreach" "(" "" "," "" ":" opt_var binary_exp ")" stmt */ @@ -3408,7 +3392,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] // what to do with opt_var? // list rem? } -#line 3412 "src/parser.c" +#line 3396 "src/parser.c" break; case 125: /* loop_stmt: "repeat" "(" binary_exp ")" stmt */ @@ -3419,7 +3403,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] .body = cpy_stmt3(mpool(arg), &(yyvsp[0].stmt)) }); } -#line 3423 "src/parser.c" +#line 3407 "src/parser.c" break; case 126: /* loop_stmt: "repeat" "(" "" "," binary_exp ")" stmt */ @@ -3432,7 +3416,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] (yyval.stmt).d.stmt_loop.idx = mp_malloc(mpool(arg), EachIdx); (yyval.stmt).d.stmt_loop.idx->var = (Var_Decl){ .tag = MK_TAG((yyvsp[-4].sym), (yylsp[-4])) }; } -#line 3436 "src/parser.c" +#line 3420 "src/parser.c" break; case 127: /* defer_stmt: "defer" stmt */ @@ -3447,7 +3431,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] (yyval.stmt) = MK_STMT(ae_stmt_defer, (yylsp[-1]), .stmt_defer = { .stmt = cpy_stmt3(mpool(arg), &(yyvsp[0].stmt)) }); } -#line 3451 "src/parser.c" +#line 3435 "src/parser.c" break; case 128: /* selection_stmt: "if" "(" exp ")" stmt */ @@ -3458,7 +3442,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] .if_body = cpy_stmt3(mpool(arg), &(yyvsp[0].stmt)) }); } -#line 3462 "src/parser.c" +#line 3446 "src/parser.c" break; case 129: /* selection_stmt: "if" "(" exp ")" stmt "else" stmt */ @@ -3470,61 +3454,61 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] .else_body = cpy_stmt3(mpool(arg), &(yyvsp[0].stmt)) }); } -#line 3474 "src/parser.c" +#line 3458 "src/parser.c" break; case 130: /* breaks: "break" */ #line 629 "src/gwion.y" { (yyval.stmt_t) = ae_stmt_break; } -#line 3480 "src/parser.c" +#line 3464 "src/parser.c" break; case 131: /* breaks: "continue" */ #line 629 "src/gwion.y" { (yyval.stmt_t) = ae_stmt_continue; } -#line 3486 "src/parser.c" +#line 3470 "src/parser.c" break; case 132: /* jump_stmt: "return" exp ";" */ #line 631 "src/gwion.y" { (yyval.stmt) = MK_STMT_RETURN((yylsp[-2]), (yyvsp[-1].exp)); } -#line 3492 "src/parser.c" +#line 3476 "src/parser.c" break; case 133: /* jump_stmt: "return" ";" */ #line 632 "src/gwion.y" { (yyval.stmt) = MK_STMT_RETURN((yylsp[-1]), NULL); } -#line 3498 "src/parser.c" +#line 3482 "src/parser.c" break; case 134: /* jump_stmt: breaks decimal ";" */ #line 633 "src/gwion.y" { (yyval.stmt) = MK_STMT((yyvsp[-2].stmt_t), (yylsp[-2]), .stmt_index = { .idx = (yyvsp[-1].gwint).num });} -#line 3504 "src/parser.c" +#line 3488 "src/parser.c" break; case 135: /* jump_stmt: breaks ";" */ #line 634 "src/gwion.y" { (yyval.stmt) = MK_STMT((yyvsp[-1].stmt_t), (yylsp[-1]), .stmt_index = { .idx = -1 });} -#line 3510 "src/parser.c" +#line 3494 "src/parser.c" break; case 136: /* exp_stmt: exp ";" */ #line 637 "src/gwion.y" { (yyval.stmt) = MK_STMT_EXP((yylsp[-1]), (yyvsp[-1].exp)); } -#line 3516 "src/parser.c" +#line 3500 "src/parser.c" break; case 137: /* exp_stmt: ";" */ #line 638 "src/gwion.y" { (yyval.stmt) = MK_STMT(ae_stmt_exp, (yylsp[0])); } -#line 3522 "src/parser.c" +#line 3506 "src/parser.c" break; case 138: /* exp: binary_exp */ #line 641 "src/gwion.y" { (yyval.exp) = (yyvsp[0].exp); } -#line 3528 "src/parser.c" +#line 3512 "src/parser.c" break; case 139: /* exp: binary_exp "," exp */ @@ -3536,43 +3520,43 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] } (yyvsp[-2].exp)->next = (yyvsp[0].exp); } -#line 3540 "src/parser.c" +#line 3524 "src/parser.c" break; case 141: /* binary_exp: binary_exp "@" decl_exp */ #line 653 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yylsp[-1])); } -#line 3546 "src/parser.c" +#line 3530 "src/parser.c" break; case 142: /* binary_exp: binary_exp "" decl_exp */ #line 654 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yylsp[-1])); } -#line 3552 "src/parser.c" +#line 3536 "src/parser.c" break; case 143: /* binary_exp: binary_exp OPTIONS decl_exp */ #line 655 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yylsp[-1])); } -#line 3558 "src/parser.c" +#line 3542 "src/parser.c" break; case 144: /* call_template: ":[" tmplarg_list "]" */ #line 657 "src/gwion.y" { (yyval.tmplarg_list) = (yyvsp[-1].tmplarg_list); } -#line 3564 "src/parser.c" +#line 3548 "src/parser.c" break; case 145: /* call_template: %empty */ #line 657 "src/gwion.y" { (yyval.tmplarg_list) = NULL; } -#line 3570 "src/parser.c" +#line 3554 "src/parser.c" break; case 151: /* array_exp: "[" exp "]" */ #line 662 "src/gwion.y" { (yyval.array_sub) = new_array_sub(mpool(arg), (yyvsp[-1].exp)); } -#line 3576 "src/parser.c" +#line 3560 "src/parser.c" break; case 152: /* array_exp: "[" exp "]" array_exp */ @@ -3580,67 +3564,67 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] { if((yyvsp[-2].exp)->next){ parser_error(&(yylsp[-2]), arg, "invalid format for array init [...][...]...", 0x0208); YYERROR; } (yyval.array_sub) = prepend_array_sub((yyvsp[0].array_sub), (yyvsp[-2].exp)); } -#line 3584 "src/parser.c" +#line 3568 "src/parser.c" break; case 153: /* array_exp: "[" exp "]" "[" "]" */ #line 666 "src/gwion.y" { parser_error(&(yylsp[-2]), arg, "partially empty array init [...][]...", 0x0209); YYERROR; } -#line 3590 "src/parser.c" +#line 3574 "src/parser.c" break; case 154: /* array_empty: "[" "]" */ #line 670 "src/gwion.y" { (yyval.array_sub) = new_array_sub(mpool(arg), NULL); } -#line 3596 "src/parser.c" +#line 3580 "src/parser.c" break; case 155: /* array_empty: array_empty "[" "]" */ #line 671 "src/gwion.y" { (yyval.array_sub) = prepend_array_sub((yyvsp[-2].array_sub), NULL); } -#line 3602 "src/parser.c" +#line 3586 "src/parser.c" break; case 156: /* array_empty: array_empty array_exp */ #line 672 "src/gwion.y" { parser_error(&(yylsp[-1]), arg, "partially empty array init [][...]", 0x0210); YYERROR; } -#line 3608 "src/parser.c" +#line 3592 "src/parser.c" break; case 157: /* dict_list: binary_exp ":" binary_exp */ #line 676 "src/gwion.y" { (yyvsp[-2].exp)->next = (yyvsp[0].exp); (yyval.exp) = (yyvsp[-2].exp); } -#line 3614 "src/parser.c" +#line 3598 "src/parser.c" break; case 158: /* dict_list: binary_exp ":" binary_exp "," dict_list */ #line 677 "src/gwion.y" { (yyvsp[-4].exp)->next = (yyvsp[-2].exp); (yyvsp[-2].exp)-> next = (yyvsp[0].exp); (yyval.exp) = (yyvsp[-4].exp); } -#line 3620 "src/parser.c" +#line 3604 "src/parser.c" break; case 159: /* range: "[" exp ":" exp "]" */ #line 680 "src/gwion.y" { (yyval.range) = new_range(mpool(arg), (yyvsp[-3].exp), (yyvsp[-1].exp)); } -#line 3626 "src/parser.c" +#line 3610 "src/parser.c" break; case 160: /* range: "[" exp ":" "]" */ #line 681 "src/gwion.y" { (yyval.range) = new_range(mpool(arg), (yyvsp[-2].exp), NULL); } -#line 3632 "src/parser.c" +#line 3616 "src/parser.c" break; case 161: /* range: "[" ":" exp "]" */ #line 682 "src/gwion.y" { (yyval.range) = new_range(mpool(arg), NULL, (yyvsp[-1].exp)); } -#line 3638 "src/parser.c" +#line 3622 "src/parser.c" break; case 165: /* decl_exp: type_decl_flag2 flag type_decl_array var_decl */ #line 688 "src/gwion.y" { (yyval.exp)= new_exp_decl(mpool(arg), (yyvsp[-1].type_decl), &(yyvsp[0].var_decl), (yyloc)); (yyval.exp)->d.exp_decl.var.td->flag |= (yyvsp[-3].flag) | (yyvsp[-2].flag); } -#line 3644 "src/parser.c" +#line 3628 "src/parser.c" break; case 166: /* decl_exp: type_decl_flag2 flag type_decl_array call_paren var_decl */ @@ -3650,147 +3634,147 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] (yyval.exp)->d.exp_decl.var.td->flag |= (yyvsp[-4].flag) | (yyvsp[-3].flag); (yyval.exp)->d.exp_decl.args = (yyvsp[-1].exp) ?: new_prim_nil(mpool(arg), (yylsp[-1])); } -#line 3654 "src/parser.c" +#line 3638 "src/parser.c" break; case 167: /* func_args: "(" arg_list ")" */ #line 695 "src/gwion.y" { (yyval.default_args) = (yyvsp[-1].default_args); } -#line 3660 "src/parser.c" +#line 3644 "src/parser.c" break; case 168: /* func_args: "(" ")" */ #line 695 "src/gwion.y" { (yyval.default_args) = (struct ParserArg){}; } -#line 3666 "src/parser.c" +#line 3650 "src/parser.c" break; case 169: /* fptr_args: "(" fptr_list ")" */ #line 696 "src/gwion.y" { (yyval.arg_list) = (yyvsp[-1].arg_list); } -#line 3672 "src/parser.c" +#line 3656 "src/parser.c" break; case 170: /* fptr_args: "(" ")" */ #line 696 "src/gwion.y" { (yyval.arg_list) = NULL; } -#line 3678 "src/parser.c" +#line 3662 "src/parser.c" break; case 171: /* decl_template: ":[" specialized_list "]" */ -#line 698 "src/gwion.y" - { (yyval.specialized_list) = (yyvsp[-1].specialized_list); } -#line 3684 "src/parser.c" +#line 699 "src/gwion.y" + { (yyval.specialized_list) = (yyvsp[-1].specialized_list); } +#line 3668 "src/parser.c" break; - case 172: /* decl_template: ":[" specialized_list "," "..." "]" */ -#line 699 "src/gwion.y" - { + case 172: /* decl_template: ":[" specialized_list "..." "]" */ +#line 700 "src/gwion.y" + { Specialized spec = { .tag = MK_TAG(insert_symbol("..."), (yylsp[-1])) }; - YYLIST_END(Specialized, (yyval.specialized_list), (yyvsp[-3].specialized_list), spec); + YYLIST_END(Specialized, (yyval.specialized_list), (yyvsp[-2].specialized_list), spec); } -#line 3693 "src/parser.c" +#line 3677 "src/parser.c" break; case 173: /* decl_template: ":[" "..." "]" */ -#line 703 "src/gwion.y" +#line 704 "src/gwion.y" { Specialized spec = { .tag = MK_TAG(insert_symbol("..."), (yylsp[-1])) }; YYLIST_INI(Specialized, (yyval.specialized_list), spec); } -#line 3702 "src/parser.c" +#line 3686 "src/parser.c" break; case 174: /* decl_template: %empty */ -#line 707 "src/gwion.y" +#line 708 "src/gwion.y" { (yyval.specialized_list) = NULL; } -#line 3708 "src/parser.c" +#line 3692 "src/parser.c" break; case 175: /* global: "global" */ -#line 709 "src/gwion.y" +#line 710 "src/gwion.y" { (yyval.flag) = ae_flag_global; /*arg->global = true;*/ } -#line 3714 "src/parser.c" +#line 3698 "src/parser.c" break; case 177: /* opt_global: %empty */ -#line 710 "src/gwion.y" +#line 711 "src/gwion.y" { (yyval.flag) = ae_flag_none; } -#line 3720 "src/parser.c" +#line 3704 "src/parser.c" break; case 178: /* storage_flag: "static" */ -#line 712 "src/gwion.y" +#line 713 "src/gwion.y" { (yyval.flag) = ae_flag_static; } -#line 3726 "src/parser.c" +#line 3710 "src/parser.c" break; case 180: /* access_flag: "private" */ -#line 714 "src/gwion.y" +#line 715 "src/gwion.y" { (yyval.flag) = ae_flag_private; } -#line 3732 "src/parser.c" +#line 3716 "src/parser.c" break; case 181: /* access_flag: "protect" */ -#line 715 "src/gwion.y" +#line 716 "src/gwion.y" { (yyval.flag) = ae_flag_protect; } -#line 3738 "src/parser.c" +#line 3722 "src/parser.c" break; case 182: /* flag: access_flag */ -#line 718 "src/gwion.y" +#line 719 "src/gwion.y" { (yyval.flag) = (yyvsp[0].flag); } -#line 3744 "src/parser.c" +#line 3728 "src/parser.c" break; case 183: /* flag: storage_flag */ -#line 719 "src/gwion.y" +#line 720 "src/gwion.y" { (yyval.flag) = (yyvsp[0].flag); } -#line 3750 "src/parser.c" +#line 3734 "src/parser.c" break; case 184: /* flag: access_flag storage_flag */ -#line 720 "src/gwion.y" +#line 721 "src/gwion.y" { (yyval.flag) = (yyvsp[-1].flag) | (yyvsp[0].flag); } -#line 3756 "src/parser.c" +#line 3740 "src/parser.c" break; case 185: /* flag: %empty */ -#line 721 "src/gwion.y" +#line 722 "src/gwion.y" { (yyval.flag) = ae_flag_none; } -#line 3762 "src/parser.c" +#line 3746 "src/parser.c" break; case 186: /* final: "final" */ -#line 724 "src/gwion.y" +#line 725 "src/gwion.y" { (yyval.flag) = ae_flag_final; } -#line 3768 "src/parser.c" +#line 3752 "src/parser.c" break; case 187: /* final: %empty */ -#line 724 "src/gwion.y" +#line 725 "src/gwion.y" { (yyval.flag) = ae_flag_none; } -#line 3774 "src/parser.c" +#line 3758 "src/parser.c" break; case 188: /* modifier: "abstract" final */ -#line 726 "src/gwion.y" +#line 727 "src/gwion.y" { (yyval.flag) = ae_flag_abstract | (yyvsp[0].flag); } -#line 3780 "src/parser.c" +#line 3764 "src/parser.c" break; case 190: /* func_def_base: "fun" func_base func_args code_list */ -#line 729 "src/gwion.y" +#line 730 "src/gwion.y" { (yyvsp[-2].func_base)->args = (yyvsp[-1].default_args).args; (yyvsp[-2].func_base)->fbflag |= (yyvsp[-1].default_args).flag; (yyval.func_def) = new_func_def(mpool(arg), (yyvsp[-2].func_base), (yyvsp[0].stmt_list)); } -#line 3790 "src/parser.c" +#line 3774 "src/parser.c" break; case 191: /* func_def_base: "fun" func_base func_args ";" */ -#line 734 "src/gwion.y" +#line 735 "src/gwion.y" { if((yyvsp[-1].default_args).flag == fbflag_default) { parser_error(&(yylsp[-2]), arg, "default arguments not allowed in abstract operators", 0210); YYERROR; }; @@ -3798,33 +3782,33 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] SET_FLAG((yyvsp[-2].func_base), abstract); (yyval.func_def) = new_func_def(mpool(arg), (yyvsp[-2].func_base), NULL); } -#line 3802 "src/parser.c" +#line 3786 "src/parser.c" break; case 192: /* func_def_base: LOCALE global "" "(" locale_list ")" code_list */ -#line 741 "src/gwion.y" +#line 742 "src/gwion.y" { Type_Decl *td = new_type_decl(mpool(arg), insert_symbol("float"), (yylsp[-4])); Func_Base *base = new_func_base(mpool(arg), td, (yyvsp[-4].sym), (yyvsp[-2].default_args).args, (yyvsp[-5].flag), (yylsp[-4])); base->fbflag |= fbflag_locale | (yyvsp[-2].default_args).flag; - (yyval.func_def) = new_func_def(mpool(arg), base, (yyvsp[0].stmt_list)); + (yyval.func_def) = new_func_def(mpool(arg), base, (yyvsp[0].stmt_list)); } -#line 3813 "src/parser.c" +#line 3797 "src/parser.c" break; case 193: /* func_def_base: LOCALE "" "(" locale_list ")" code_list */ -#line 747 "src/gwion.y" +#line 748 "src/gwion.y" { Type_Decl *td = new_type_decl(mpool(arg), insert_symbol("float"), (yylsp[-4])); Func_Base *base = new_func_base(mpool(arg), td, (yyvsp[-4].sym), (yyvsp[-2].default_args).args, ae_flag_none, (yylsp[-4])); base->fbflag |= fbflag_locale | (yyvsp[-2].default_args).flag; (yyval.func_def) = new_func_def(mpool(arg), base, (yyvsp[0].stmt_list)); } -#line 3824 "src/parser.c" +#line 3808 "src/parser.c" break; case 194: /* abstract_fdef: "fun" flag "abstract" type_decl_empty "" decl_template fptr_args ";" */ -#line 756 "src/gwion.y" +#line 757 "src/gwion.y" { Func_Base *base = new_func_base(mpool(arg), (yyvsp[-4].type_decl), (yyvsp[-3].sym), NULL, (yyvsp[-6].flag) | ae_flag_abstract, (yylsp[-3])); if((yyvsp[-2].specialized_list)) @@ -3832,11 +3816,11 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] base->args = (yyvsp[-1].arg_list); (yyval.func_def) = new_func_def(mpool(arg), base, NULL); } -#line 3836 "src/parser.c" +#line 3820 "src/parser.c" break; case 200: /* op_base: type_decl_empty op_op decl_template "(" arg "," arg ")" */ -#line 767 "src/gwion.y" +#line 768 "src/gwion.y" { if((yyvsp[-3].default_args).flag == fbflag_default || (yyvsp[-1].default_args).flag == fbflag_default) { parser_error(&(yylsp[-6]), arg, "default arguments not allowed in binary operators", 0210); YYERROR; }; @@ -3846,11 +3830,11 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] (yyval.func_base) = new_func_base(mpool(arg), (yyvsp[-7].type_decl), (yyvsp[-6].sym), args, ae_flag_none, (yylsp[-6])); if((yyvsp[-5].specialized_list))(yyval.func_base)->tmpl = new_tmpl(mpool(arg), (yyvsp[-5].specialized_list)); } -#line 3850 "src/parser.c" +#line 3834 "src/parser.c" break; case 201: /* op_base: type_decl_empty post_op decl_template "(" arg ")" */ -#line 777 "src/gwion.y" +#line 778 "src/gwion.y" { if((yyvsp[-1].default_args).flag == fbflag_default) { parser_error(&(yylsp[-4]), arg, "default arguments not allowed in postfix operators", 0210); YYERROR; }; @@ -3859,11 +3843,11 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] (yyval.func_base) = new_func_base(mpool(arg), (yyvsp[-5].type_decl), (yyvsp[-4].sym), args, ae_flag_none, (yylsp[-4])); if((yyvsp[-3].specialized_list))(yyval.func_base)->tmpl = new_tmpl(mpool(arg), (yyvsp[-3].specialized_list)); } -#line 3863 "src/parser.c" +#line 3847 "src/parser.c" break; case 202: /* op_base: unary_op type_decl_empty decl_template "(" arg ")" */ -#line 786 "src/gwion.y" +#line 787 "src/gwion.y" { if((yyvsp[-1].default_args).flag == fbflag_default) { parser_error(&(yylsp[-4]), arg, "default arguments not allowed in unary operators", 0210); YYERROR; }; @@ -3873,88 +3857,88 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] (yyval.func_base)->fbflag |= fbflag_unary; if((yyvsp[-3].specialized_list))(yyval.func_base)->tmpl = new_tmpl(mpool(arg), (yyvsp[-3].specialized_list)); } -#line 3877 "src/parser.c" +#line 3861 "src/parser.c" break; case 203: /* op_base: type_decl_empty OPID_A func_args */ -#line 796 "src/gwion.y" +#line 797 "src/gwion.y" { (yyval.func_base) = new_func_base(mpool(arg), (yyvsp[-2].type_decl), (yyvsp[-1].sym), (yyvsp[0].default_args).args, ae_flag_none, (yylsp[-1])); (yyval.func_base)->fbflag |= fbflag_internal; } -#line 3886 "src/parser.c" +#line 3870 "src/parser.c" break; case 204: /* operator: "operator" */ -#line 801 "src/gwion.y" +#line 802 "src/gwion.y" { (yyval.flag) = ae_flag_none; } -#line 3892 "src/parser.c" +#line 3876 "src/parser.c" break; case 205: /* operator: "operator" global */ -#line 801 "src/gwion.y" +#line 802 "src/gwion.y" { (yyval.flag) = (yyvsp[0].flag); } -#line 3898 "src/parser.c" +#line 3882 "src/parser.c" break; case 206: /* op_def: operator op_base code_list */ -#line 804 "src/gwion.y" +#line 805 "src/gwion.y" { (yyval.func_def) = new_func_def(mpool(arg), (yyvsp[-1].func_base), (yyvsp[0].stmt_list)); (yyvsp[-1].func_base)->fbflag |= fbflag_op; (yyvsp[-1].func_base)->flag |= (yyvsp[-2].flag); } -#line 3904 "src/parser.c" +#line 3888 "src/parser.c" break; case 207: /* op_def: operator op_base ";" */ -#line 806 "src/gwion.y" +#line 807 "src/gwion.y" { (yyval.func_def) = new_func_def(mpool(arg), (yyvsp[-1].func_base), NULL); (yyvsp[-1].func_base)->fbflag |= fbflag_op; (yyvsp[-1].func_base)->flag |= (yyvsp[-2].flag) | ae_flag_abstract; } -#line 3910 "src/parser.c" +#line 3894 "src/parser.c" break; case 208: /* op_def: operator "abstract" op_base ";" */ -#line 808 "src/gwion.y" +#line 809 "src/gwion.y" { (yyval.func_def) = new_func_def(mpool(arg), (yyvsp[-1].func_base), NULL); (yyvsp[-1].func_base)->fbflag |= fbflag_op; (yyvsp[-1].func_base)->flag |= (yyvsp[-3].flag) | ae_flag_abstract; } -#line 3916 "src/parser.c" +#line 3900 "src/parser.c" break; case 212: /* func_def: operator "new" func_args code_list */ -#line 812 "src/gwion.y" +#line 813 "src/gwion.y" { Func_Base *const base = new_func_base(mpool(arg), NULL, (yyvsp[-2].sym), (yyvsp[-1].default_args).args, (yyvsp[-3].flag), (yylsp[-2])); base->fbflag = (yyvsp[-1].default_args).flag; (yyval.func_def) = new_func_def(mpool(arg), base, (yyvsp[0].stmt_list)); } -#line 3926 "src/parser.c" +#line 3910 "src/parser.c" break; case 213: /* func_def: operator "new" func_args ";" */ -#line 818 "src/gwion.y" +#line 819 "src/gwion.y" { if((yyvsp[-1].default_args).flag == fbflag_default) { parser_error(&(yylsp[-2]), arg, "default arguments not allowed in abstract operators", 0210); YYERROR; }; Func_Base *const base = new_func_base(mpool(arg), NULL, (yyvsp[-2].sym), (yyvsp[-1].default_args).args, (yyvsp[-3].flag) | ae_flag_abstract, (yylsp[-2])); (yyval.func_def) = new_func_def(mpool(arg), base, NULL); } -#line 3937 "src/parser.c" +#line 3921 "src/parser.c" break; case 214: /* func_def: operator "abstract" "new" func_args ";" */ -#line 825 "src/gwion.y" +#line 826 "src/gwion.y" { if((yyvsp[-1].default_args).flag == fbflag_default) { parser_error(&(yylsp[-3]), arg, "default arguments not allowed in abstract operators", 0210); YYERROR; }; Func_Base *const base = new_func_base(mpool(arg), NULL, (yyvsp[-2].sym), (yyvsp[-1].default_args).args, (yyvsp[-4].flag) | ae_flag_abstract, (yylsp[-2])); (yyval.func_def) =new_func_def(mpool(arg), base, NULL); } -#line 3948 "src/parser.c" +#line 3932 "src/parser.c" break; case 215: /* type_decl_base: "" */ -#line 833 "src/gwion.y" +#line 834 "src/gwion.y" { (yyval.type_decl) = new_type_decl(mpool(arg), (yyvsp[0].sym), (yyloc)); } -#line 3954 "src/parser.c" +#line 3938 "src/parser.c" break; case 216: /* type_decl_base: "(" flag type_decl_empty decl_template fptr_args func_effects ")" */ -#line 834 "src/gwion.y" +#line 835 "src/gwion.y" { const Symbol name = sig_name(arg, (yylsp[-4]).first); (yyval.type_decl) = new_type_decl(mpool(arg), name, (yylsp[-6])); @@ -3966,116 +3950,116 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] fptr->base->effects.ptr = (yyvsp[-1].vector).ptr; (yyval.type_decl)->fptr = fptr; } -#line 3970 "src/parser.c" +#line 3954 "src/parser.c" break; case 217: /* type_decl_tmpl: type_decl_base call_template */ -#line 848 "src/gwion.y" +#line 849 "src/gwion.y" { (yyval.type_decl) = (yyvsp[-1].type_decl); (yyval.type_decl)->types = (yyvsp[0].tmplarg_list); } -#line 3976 "src/parser.c" +#line 3960 "src/parser.c" break; case 218: /* type_decl_tmpl: "&" type_decl_base call_template */ -#line 849 "src/gwion.y" +#line 850 "src/gwion.y" { (yyval.type_decl) = (yyvsp[-1].type_decl); (yyval.type_decl)->ref = true; (yyval.type_decl)->types = (yyvsp[0].tmplarg_list); } -#line 3982 "src/parser.c" +#line 3966 "src/parser.c" break; case 220: /* type_decl_noflag: type_decl_tmpl "." type_decl_noflag */ -#line 854 "src/gwion.y" +#line 855 "src/gwion.y" { (yyvsp[-2].type_decl)->next = (yyvsp[0].type_decl); } -#line 3988 "src/parser.c" +#line 3972 "src/parser.c" break; case 221: /* option: "?" */ -#line 857 "src/gwion.y" +#line 858 "src/gwion.y" { (yyval.uval) = 1; } -#line 3994 "src/parser.c" +#line 3978 "src/parser.c" break; case 222: /* option: OPTIONS */ -#line 857 "src/gwion.y" +#line 858 "src/gwion.y" { (yyval.uval) = strlen(s_name((yyvsp[0].sym))); } -#line 4000 "src/parser.c" +#line 3984 "src/parser.c" break; case 223: /* option: %empty */ -#line 857 "src/gwion.y" +#line 858 "src/gwion.y" { (yyval.uval) = 0; } -#line 4006 "src/parser.c" +#line 3990 "src/parser.c" break; case 224: /* type_decl_opt: type_decl_noflag option */ -#line 858 "src/gwion.y" +#line 859 "src/gwion.y" { (yyval.type_decl) = (yyvsp[-1].type_decl); (yyval.type_decl)->option = (yyvsp[0].uval); } -#line 4012 "src/parser.c" +#line 3996 "src/parser.c" break; case 226: /* type_decl: type_decl_flag type_decl_opt */ -#line 859 "src/gwion.y" +#line 860 "src/gwion.y" { (yyval.type_decl) = (yyvsp[0].type_decl); (yyval.type_decl)->flag |= (yyvsp[-1].flag); } -#line 4018 "src/parser.c" +#line 4002 "src/parser.c" break; case 227: /* type_decl_flag: "late" */ -#line 862 "src/gwion.y" +#line 863 "src/gwion.y" { (yyval.flag) = ae_flag_late; } -#line 4024 "src/parser.c" +#line 4008 "src/parser.c" break; case 228: /* type_decl_flag: "const" */ -#line 863 "src/gwion.y" +#line 864 "src/gwion.y" { (yyval.flag) = ae_flag_const; } -#line 4030 "src/parser.c" +#line 4014 "src/parser.c" break; case 229: /* opt_var: "var" */ -#line 865 "src/gwion.y" +#line 866 "src/gwion.y" { (yyval.yybool) = true; } -#line 4036 "src/parser.c" +#line 4020 "src/parser.c" break; case 230: /* opt_var: %empty */ -#line 865 "src/gwion.y" +#line 866 "src/gwion.y" { (yyval.yybool) = false; } -#line 4042 "src/parser.c" +#line 4026 "src/parser.c" break; case 231: /* type_decl_flag2: "var" */ -#line 867 "src/gwion.y" +#line 868 "src/gwion.y" { (yyval.flag) = ae_flag_none; } -#line 4048 "src/parser.c" +#line 4032 "src/parser.c" break; case 233: /* variable: "" ";" */ -#line 870 "src/gwion.y" +#line 871 "src/gwion.y" { Type_Decl *td = new_type_decl(mpool(arg), insert_symbol("None"), (yylsp[-1])); (yyval.variable) = (Variable) { .td = td, .vd = { .tag = MK_TAG((yyvsp[-1].sym), (yylsp[-1]))}}; } -#line 4057 "src/parser.c" +#line 4041 "src/parser.c" break; case 234: /* variable: type_decl_empty "" ";" */ -#line 874 "src/gwion.y" +#line 875 "src/gwion.y" { (yyval.variable) = (Variable) { .td = (yyvsp[-2].type_decl), .vd = { .tag = MK_TAG((yyvsp[-1].sym), (yylsp[-1]))}};} -#line 4063 "src/parser.c" +#line 4047 "src/parser.c" break; case 235: /* variable_list: variable */ -#line 876 "src/gwion.y" +#line 877 "src/gwion.y" { YYLIST_INI(Variable, (yyval.variable_list), (yyvsp[0].variable)); } -#line 4069 "src/parser.c" +#line 4053 "src/parser.c" break; case 236: /* variable_list: variable_list variable */ -#line 877 "src/gwion.y" +#line 878 "src/gwion.y" { YYLIST_END(Variable, (yyval.variable_list), (yyvsp[-1].variable_list), (yyvsp[0].variable)); } -#line 4075 "src/parser.c" +#line 4059 "src/parser.c" break; case 237: /* union_def: "union" flag "" decl_template "{" variable_list "}" */ -#line 880 "src/gwion.y" +#line 881 "src/gwion.y" { (yyval.union_def) = new_union_def(mpool(arg), (yyvsp[-1].variable_list), (yylsp[-4])); (yyval.union_def)->tag.sym = (yyvsp[-4].sym); // put tag in ctor @@ -4083,256 +4067,256 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] if((yyvsp[-3].specialized_list)) (yyval.union_def)->tmpl = new_tmpl(mpool(arg), (yyvsp[-3].specialized_list)); } -#line 4087 "src/parser.c" +#line 4071 "src/parser.c" break; case 238: /* var_decl: "" */ -#line 889 "src/gwion.y" +#line 890 "src/gwion.y" { (yyval.var_decl) = (struct Var_Decl_) { .tag = MK_TAG((yyvsp[0].sym), (yylsp[0]))}; } -#line 4093 "src/parser.c" +#line 4077 "src/parser.c" break; case 239: /* arg_decl: "" */ -#line 891 "src/gwion.y" +#line 892 "src/gwion.y" { (yyval.var_decl) = (struct Var_Decl_) { .tag = MK_TAG((yyvsp[0].sym), (yylsp[0]))}; } -#line 4099 "src/parser.c" +#line 4083 "src/parser.c" break; case 241: /* fptr_arg_decl: %empty */ -#line 892 "src/gwion.y" +#line 893 "src/gwion.y" { (yyval.var_decl) = (struct Var_Decl_){}; } -#line 4105 "src/parser.c" +#line 4089 "src/parser.c" break; case 255: /* opt_exp: exp */ -#line 900 "src/gwion.y" +#line 901 "src/gwion.y" { (yyval.exp) = (yyvsp[0].exp); } -#line 4111 "src/parser.c" +#line 4095 "src/parser.c" break; case 256: /* opt_exp: %empty */ -#line 900 "src/gwion.y" +#line 901 "src/gwion.y" { (yyval.exp) = NULL; } -#line 4117 "src/parser.c" +#line 4101 "src/parser.c" break; case 258: /* con_exp: log_or_exp "?" opt_exp ":" con_exp */ -#line 903 "src/gwion.y" +#line 904 "src/gwion.y" { (yyval.exp) = new_exp_if(mpool(arg), (yyvsp[-4].exp), (yyvsp[-2].exp), (yyvsp[0].exp), (yyloc)); } -#line 4123 "src/parser.c" +#line 4107 "src/parser.c" break; case 259: /* con_exp: log_or_exp "?:" con_exp */ -#line 905 "src/gwion.y" +#line 906 "src/gwion.y" { (yyval.exp) = new_exp_if(mpool(arg), (yyvsp[-2].exp), NULL, (yyvsp[0].exp), (yyloc)); } -#line 4129 "src/parser.c" +#line 4113 "src/parser.c" break; case 261: /* log_or_exp: log_or_exp "||" log_and_exp */ -#line 907 "src/gwion.y" +#line 908 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4135 "src/parser.c" +#line 4119 "src/parser.c" break; case 263: /* log_and_exp: log_and_exp "&&" inc_or_exp */ -#line 908 "src/gwion.y" +#line 909 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4141 "src/parser.c" +#line 4125 "src/parser.c" break; case 265: /* inc_or_exp: inc_or_exp "|" exc_or_exp */ -#line 909 "src/gwion.y" +#line 910 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4147 "src/parser.c" +#line 4131 "src/parser.c" break; case 267: /* exc_or_exp: exc_or_exp "^" and_exp */ -#line 910 "src/gwion.y" +#line 911 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4153 "src/parser.c" +#line 4137 "src/parser.c" break; case 269: /* and_exp: and_exp "&" eq_exp */ -#line 911 "src/gwion.y" +#line 912 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4159 "src/parser.c" +#line 4143 "src/parser.c" break; case 271: /* eq_exp: eq_exp eq_op rel_exp */ -#line 912 "src/gwion.y" +#line 913 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4165 "src/parser.c" +#line 4149 "src/parser.c" break; case 273: /* rel_exp: rel_exp rel_op shift_exp */ -#line 913 "src/gwion.y" +#line 914 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4171 "src/parser.c" +#line 4155 "src/parser.c" break; case 275: /* shift_exp: shift_exp shift_op add_exp */ -#line 914 "src/gwion.y" +#line 915 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4177 "src/parser.c" +#line 4161 "src/parser.c" break; case 277: /* add_exp: add_exp add_op mul_exp */ -#line 915 "src/gwion.y" +#line 916 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4183 "src/parser.c" +#line 4167 "src/parser.c" break; case 279: /* mul_exp: mul_exp mul_op dur_exp */ -#line 916 "src/gwion.y" +#line 917 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4189 "src/parser.c" +#line 4173 "src/parser.c" break; case 281: /* dur_exp: dur_exp "::" cast_exp */ -#line 917 "src/gwion.y" +#line 918 "src/gwion.y" { (yyval.exp) = new_exp_binary(mpool(arg), (yyvsp[-2].exp), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4195 "src/parser.c" +#line 4179 "src/parser.c" break; case 283: /* cast_exp: cast_exp "$" type_decl_empty */ -#line 920 "src/gwion.y" +#line 921 "src/gwion.y" { (yyval.exp) = new_exp_cast(mpool(arg), (yyvsp[0].type_decl), (yyvsp[-2].exp), (yyloc)); } -#line 4201 "src/parser.c" +#line 4185 "src/parser.c" break; case 290: /* unary_exp: unary_op unary_exp */ -#line 927 "src/gwion.y" +#line 928 "src/gwion.y" { (yyval.exp) = new_exp_unary(mpool(arg), (yyvsp[-1].sym), (yyvsp[0].exp), (yyloc)); } -#line 4207 "src/parser.c" +#line 4191 "src/parser.c" break; case 291: /* unary_exp: "spork" unary_exp */ -#line 928 "src/gwion.y" +#line 929 "src/gwion.y" { (yyval.exp) = new_exp_unary(mpool(arg), (yyvsp[-1].sym), (yyvsp[0].exp), (yylsp[-1])); } -#line 4213 "src/parser.c" +#line 4197 "src/parser.c" break; case 292: /* unary_exp: "fork" unary_exp */ -#line 929 "src/gwion.y" +#line 930 "src/gwion.y" { (yyval.exp) = new_exp_unary(mpool(arg), (yyvsp[-1].sym), (yyvsp[0].exp), (yylsp[-1])); } -#line 4219 "src/parser.c" +#line 4203 "src/parser.c" break; case 293: /* unary_exp: "new" type_decl_exp call_paren */ -#line 930 "src/gwion.y" +#line 931 "src/gwion.y" { (yyval.exp) = new_exp_unary2(mpool(arg), (yyvsp[-2].sym), (yyvsp[-1].type_decl), (yyvsp[0].exp) ?: new_prim_nil(mpool(arg), (yylsp[0])), (yyloc)); } -#line 4227 "src/parser.c" +#line 4211 "src/parser.c" break; case 294: /* unary_exp: "new" type_decl_exp */ -#line 933 "src/gwion.y" +#line 934 "src/gwion.y" {(yyval.exp) = new_exp_unary2(mpool(arg), (yyvsp[-1].sym), (yyvsp[0].type_decl), NULL, (yyloc)); } -#line 4233 "src/parser.c" +#line 4217 "src/parser.c" break; case 295: /* unary_exp: "spork" code_list */ -#line 934 "src/gwion.y" +#line 935 "src/gwion.y" { (yyval.exp) = new_exp_unary3(mpool(arg), (yyvsp[-1].sym), (yyvsp[0].stmt_list), (yylsp[-1])); } -#line 4239 "src/parser.c" +#line 4223 "src/parser.c" break; case 296: /* unary_exp: "fork" code_list */ -#line 935 "src/gwion.y" +#line 936 "src/gwion.y" { (yyval.exp) = new_exp_unary3(mpool(arg), (yyvsp[-1].sym), (yyvsp[0].stmt_list), (yylsp[-1])); } -#line 4245 "src/parser.c" +#line 4229 "src/parser.c" break; case 297: /* unary_exp: "spork" captures code_list */ -#line 936 "src/gwion.y" +#line 937 "src/gwion.y" { (yyval.exp) = new_exp_unary3(mpool(arg), (yyvsp[-2].sym), (yyvsp[0].stmt_list), (yylsp[-2])); (yyval.exp)->d.exp_unary.captures = (yyvsp[-1].captures); } -#line 4251 "src/parser.c" +#line 4235 "src/parser.c" break; case 298: /* unary_exp: "fork" captures code_list */ -#line 937 "src/gwion.y" +#line 938 "src/gwion.y" { (yyval.exp) = new_exp_unary3(mpool(arg), (yyvsp[-2].sym), (yyvsp[0].stmt_list), (yylsp[-2])); (yyval.exp)->d.exp_unary.captures = (yyvsp[-1].captures); } -#line 4257 "src/parser.c" +#line 4241 "src/parser.c" break; case 299: /* unary_exp: "$" type_decl_empty */ -#line 938 "src/gwion.y" +#line 939 "src/gwion.y" { (yyval.exp) = new_exp_td(mpool(arg), (yyvsp[0].type_decl), (yylsp[0])); } -#line 4263 "src/parser.c" +#line 4247 "src/parser.c" break; case 300: /* lambda_list: "" */ -#line 941 "src/gwion.y" +#line 942 "src/gwion.y" { Arg a = (Arg) { .var = MK_VAR(NULL, (Var_Decl){.tag = MK_TAG((yyvsp[0].sym), (yylsp[0]))})}; YYLIST_INI(Arg, (yyval.arg_list), a); } -#line 4271 "src/parser.c" +#line 4255 "src/parser.c" break; case 301: /* lambda_list: lambda_list "" */ -#line 944 "src/gwion.y" +#line 945 "src/gwion.y" { Arg a = (Arg) { .var = MK_VAR(NULL, (Var_Decl){ .tag = MK_TAG((yyvsp[0].sym), (yylsp[0]))})}; YYLIST_END(Arg, (yyval.arg_list), (yyvsp[-1].arg_list), a); } -#line 4280 "src/parser.c" +#line 4264 "src/parser.c" break; case 302: /* lambda_arg: "\\" lambda_list */ -#line 949 "src/gwion.y" +#line 950 "src/gwion.y" { (yyval.arg_list) = (yyvsp[0].arg_list); } -#line 4286 "src/parser.c" +#line 4270 "src/parser.c" break; case 303: /* lambda_arg: "\\" */ -#line 949 "src/gwion.y" +#line 950 "src/gwion.y" { (yyval.arg_list) = NULL; } -#line 4292 "src/parser.c" +#line 4276 "src/parser.c" break; case 305: /* tmplarg: type_decl_empty */ -#line 952 "src/gwion.y" +#line 953 "src/gwion.y" { (yyval.tmplarg) = (TmplArg) { .d = { .td = (yyvsp[0].type_decl)}, .type = tmplarg_td}; } -#line 4300 "src/parser.c" +#line 4284 "src/parser.c" break; case 306: /* tmplarg: tmplarg_exp */ -#line 955 "src/gwion.y" +#line 956 "src/gwion.y" { (yyval.tmplarg) = (TmplArg) { .d = { .exp = (yyvsp[0].exp)}, .type = tmplarg_exp}; } -#line 4308 "src/parser.c" +#line 4292 "src/parser.c" break; case 307: /* tmplarg_list: tmplarg */ -#line 959 "src/gwion.y" +#line 960 "src/gwion.y" { YYLIST_INI(TmplArg, (yyval.tmplarg_list), (yyvsp[0].tmplarg)); } -#line 4314 "src/parser.c" +#line 4298 "src/parser.c" break; case 308: /* tmplarg_list: tmplarg_list "," tmplarg */ -#line 960 "src/gwion.y" +#line 961 "src/gwion.y" { YYLIST_END(TmplArg, (yyval.tmplarg_list), (yyvsp[-2].tmplarg_list), (yyvsp[0].tmplarg)); } -#line 4320 "src/parser.c" +#line 4304 "src/parser.c" break; case 309: /* call_paren: "(" exp ")" */ -#line 963 "src/gwion.y" +#line 964 "src/gwion.y" { (yyval.exp) = (yyvsp[-1].exp); } -#line 4326 "src/parser.c" +#line 4310 "src/parser.c" break; case 310: /* call_paren: "(" ")" */ -#line 964 "src/gwion.y" +#line 965 "src/gwion.y" { (yyval.exp) = NULL; } -#line 4332 "src/parser.c" +#line 4316 "src/parser.c" break; case 313: /* dot_exp: post_exp "." "" */ -#line 968 "src/gwion.y" +#line 969 "src/gwion.y" { if((yyvsp[-2].exp)->next) { parser_error(&(yylsp[-2]), arg, "can't use multiple expressions" @@ -4341,66 +4325,66 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] }; (yyval.exp) = new_exp_dot(mpool(arg), (yyvsp[-2].exp), (yyvsp[0].sym), (yyloc)); } -#line 4345 "src/parser.c" +#line 4329 "src/parser.c" break; case 315: /* post_exp: post_exp array_exp */ -#line 979 "src/gwion.y" +#line 980 "src/gwion.y" { (yyval.exp) = new_exp_array(mpool(arg), (yyvsp[-1].exp), (yyvsp[0].array_sub), (yyloc)); } -#line 4351 "src/parser.c" +#line 4335 "src/parser.c" break; case 316: /* post_exp: post_exp range */ -#line 981 "src/gwion.y" +#line 982 "src/gwion.y" { (yyval.exp) = new_exp_slice(mpool(arg), (yyvsp[-1].exp), (yyvsp[0].range), (yyloc)); } -#line 4357 "src/parser.c" +#line 4341 "src/parser.c" break; case 317: /* post_exp: post_exp call_template call_paren */ -#line 983 "src/gwion.y" +#line 984 "src/gwion.y" { (yyval.exp) = new_exp_call(mpool(arg), (yyvsp[-2].exp), (yyvsp[0].exp), (yyloc)); if((yyvsp[-1].tmplarg_list))(yyval.exp)->d.exp_call.tmpl = new_tmpl_call(mpool(arg), (yyvsp[-1].tmplarg_list)); } -#line 4364 "src/parser.c" +#line 4348 "src/parser.c" break; case 318: /* post_exp: post_exp post_op */ -#line 986 "src/gwion.y" +#line 987 "src/gwion.y" { (yyval.exp) = new_exp_post(mpool(arg), (yyvsp[-1].exp), (yyvsp[0].sym), (yyloc)); } -#line 4370 "src/parser.c" +#line 4354 "src/parser.c" break; case 319: /* post_exp: dot_exp */ -#line 987 "src/gwion.y" +#line 988 "src/gwion.y" { (yyval.exp) = (yyvsp[0].exp); } -#line 4376 "src/parser.c" +#line 4360 "src/parser.c" break; case 320: /* interp_exp: "" */ -#line 991 "src/gwion.y" +#line 992 "src/gwion.y" { (yyval.exp) = new_prim_string(mpool(arg), (yyvsp[0].string).data, (yyvsp[0].string).delim, (yyloc)); } -#line 4382 "src/parser.c" +#line 4366 "src/parser.c" break; case 321: /* interp_exp: "" interp_exp */ -#line 992 "src/gwion.y" +#line 993 "src/gwion.y" { (yyval.exp) = new_prim_string(mpool(arg), (yyvsp[-1].string).data, (yyvsp[-1].string).delim, (yyloc)); (yyval.exp)->next = (yyvsp[0].exp); } -#line 4388 "src/parser.c" +#line 4372 "src/parser.c" break; case 322: /* interp_exp: exp INTERP_EXP interp_exp */ -#line 993 "src/gwion.y" +#line 994 "src/gwion.y" { (yyval.exp) = (yyvsp[-2].exp); (yyval.exp)->next = (yyvsp[0].exp); } -#line 4394 "src/parser.c" +#line 4378 "src/parser.c" break; case 323: /* interp: "${" interp_exp */ -#line 995 "src/gwion.y" +#line 996 "src/gwion.y" { (yyval.exp) = (yyvsp[0].exp); } -#line 4400 "src/parser.c" +#line 4384 "src/parser.c" break; case 324: /* interp: interp "${" interp_exp */ -#line 996 "src/gwion.y" +#line 997 "src/gwion.y" { if(!(yyvsp[0].exp)->next) { char c[strlen((yyvsp[-2].exp)->d.prim.d.string.data) + strlen((yyvsp[0].exp)->d.prim.d.string.data) + 1]; @@ -4411,86 +4395,86 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] } else (yyvsp[-2].exp)->next = (yyvsp[0].exp); } -#line 4415 "src/parser.c" +#line 4399 "src/parser.c" break; case 325: /* capture: "" */ -#line 1007 "src/gwion.y" +#line 1008 "src/gwion.y" { (yyval.capture) = (Capture){ .var = { .tag = MK_TAG((yyvsp[0].sym), (yylsp[0])) }};} -#line 4421 "src/parser.c" +#line 4405 "src/parser.c" break; case 326: /* capture: "&" "" */ -#line 1007 "src/gwion.y" +#line 1008 "src/gwion.y" { (yyval.capture) = (Capture){ .var = { .tag = MK_TAG((yyvsp[0].sym), (yylsp[0])) }, .is_ref = true }; } -#line 4427 "src/parser.c" +#line 4411 "src/parser.c" break; case 327: /* capture_list: capture */ -#line 1009 "src/gwion.y" +#line 1010 "src/gwion.y" { YYLIST_INI(Capture, (yyval.captures), (yyvsp[0].capture)); } -#line 4433 "src/parser.c" +#line 4417 "src/parser.c" break; case 328: /* capture_list: capture_list capture */ -#line 1010 "src/gwion.y" +#line 1011 "src/gwion.y" { YYLIST_END(Capture, (yyval.captures), (yyvsp[-1].captures), (yyvsp[0].capture)); } -#line 4439 "src/parser.c" +#line 4423 "src/parser.c" break; case 329: /* captures: ":" capture_list ":" */ -#line 1011 "src/gwion.y" +#line 1012 "src/gwion.y" { (yyval.captures) = (yyvsp[-1].captures); } -#line 4445 "src/parser.c" +#line 4429 "src/parser.c" break; case 330: /* captures: %empty */ -#line 1011 "src/gwion.y" +#line 1012 "src/gwion.y" { (yyval.captures) = NULL; } -#line 4451 "src/parser.c" +#line 4435 "src/parser.c" break; case 333: /* basic_exp: number */ -#line 1015 "src/gwion.y" +#line 1016 "src/gwion.y" { (yyval.exp) = new_prim_int( mpool(arg), (yyvsp[0].gwint).num, (yyloc)); (yyval.exp)->d.prim.d.gwint.int_type = (yyvsp[0].gwint).int_type; } -#line 4460 "src/parser.c" +#line 4444 "src/parser.c" break; case 334: /* basic_exp: "" */ -#line 1019 "src/gwion.y" +#line 1020 "src/gwion.y" { (yyval.exp) = new_prim_float( mpool(arg), (yyvsp[0].fval), (yyloc)); } -#line 4466 "src/parser.c" +#line 4450 "src/parser.c" break; case 335: /* basic_exp: "" */ -#line 1020 "src/gwion.y" +#line 1021 "src/gwion.y" { (yyval.exp) = new_prim_string( mpool(arg), (yyvsp[0].sval), 0, (yyloc)); } -#line 4472 "src/parser.c" +#line 4456 "src/parser.c" break; case 336: /* basic_exp: "" */ -#line 1021 "src/gwion.y" +#line 1022 "src/gwion.y" { (yyval.exp) = new_prim_char( mpool(arg), (yyvsp[0].sval), (yyloc)); } -#line 4478 "src/parser.c" +#line 4462 "src/parser.c" break; case 337: /* prim_exp: "" */ -#line 1024 "src/gwion.y" +#line 1025 "src/gwion.y" { (yyval.exp) = new_prim_id( mpool(arg), (yyvsp[0].sym), (yyloc)); } -#line 4484 "src/parser.c" +#line 4468 "src/parser.c" break; case 339: /* prim_exp: interp */ -#line 1026 "src/gwion.y" +#line 1027 "src/gwion.y" { (yyval.exp) = !(yyvsp[0].exp)->next ? (yyvsp[0].exp) : new_prim_interp(mpool(arg), (yyvsp[0].exp), (yyloc)); } -#line 4490 "src/parser.c" +#line 4474 "src/parser.c" break; case 340: /* prim_exp: "[" opt_exp array_lit_ed */ -#line 1027 "src/gwion.y" +#line 1028 "src/gwion.y" { if(!(yyvsp[-1].exp)) { parser_error(&(yylsp[-2]), arg, "must provide values/expressions for array [...]", 0); @@ -4499,76 +4483,76 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] Array_Sub array = new_array_sub(mpool(arg), (yyvsp[-1].exp)); (yyval.exp) = new_prim_array( mpool(arg), array, (yyloc)); } -#line 4503 "src/parser.c" +#line 4487 "src/parser.c" break; case 341: /* prim_exp: "{" dict_list "}" */ -#line 1035 "src/gwion.y" +#line 1036 "src/gwion.y" { (yyval.exp) = new_prim_dict( mpool(arg), (yyvsp[-1].exp), (yyloc)); } -#line 4509 "src/parser.c" +#line 4493 "src/parser.c" break; case 342: /* prim_exp: range */ -#line 1036 "src/gwion.y" +#line 1037 "src/gwion.y" { (yyval.exp) = new_prim_range( mpool(arg), (yyvsp[0].range), (yyloc)); } -#line 4515 "src/parser.c" +#line 4499 "src/parser.c" break; case 343: /* prim_exp: "<<<" exp ">>>" */ -#line 1037 "src/gwion.y" +#line 1038 "src/gwion.y" { (yyval.exp) = new_prim_hack( mpool(arg), (yyvsp[-1].exp), (yyloc)); } -#line 4521 "src/parser.c" +#line 4505 "src/parser.c" break; case 344: /* prim_exp: "(" exp ")" */ -#line 1038 "src/gwion.y" +#line 1039 "src/gwion.y" { (yyval.exp) = (yyvsp[-1].exp); if(!(yyvsp[-1].exp)->next) (yyval.exp)->paren = true; } -#line 4527 "src/parser.c" +#line 4511 "src/parser.c" break; case 345: /* prim_exp: "`foo`" */ -#line 1039 "src/gwion.y" +#line 1040 "src/gwion.y" { const loc_t loc = { .first = { .line = (yylsp[0]).first.line, .column = (yylsp[0]).first.column - 1}, .last = { .line = (yylsp[0]).last.line, .column = (yylsp[0]).last.column - 1}}; (yyval.exp) = new_prim_id(mpool(arg), (yyvsp[0].sym), loc); (yyval.exp)->d.prim.prim_type = ae_prim_locale; } -#line 4538 "src/parser.c" +#line 4522 "src/parser.c" break; case 346: /* prim_exp: lambda_arg captures code_list */ -#line 1045 "src/gwion.y" +#line 1046 "src/gwion.y" { (yyval.exp) = new_exp_lambda( mpool(arg), lambda_name(arg, (yylsp[-2]).first), (yyvsp[-2].arg_list), (yyvsp[0].stmt_list), (yylsp[-2])); (yyval.exp)->d.exp_lambda.def->captures = (yyvsp[-1].captures);} -#line 4544 "src/parser.c" +#line 4528 "src/parser.c" break; case 347: /* prim_exp: lambda_arg captures "{" binary_exp "}" */ -#line 1046 "src/gwion.y" +#line 1047 "src/gwion.y" { (yyval.exp) = new_exp_lambda2( mpool(arg), lambda_name(arg, (yylsp[-4]).first), (yyvsp[-4].arg_list), (yyvsp[-1].exp), (yylsp[-4])); (yyval.exp)->d.exp_lambda.def->captures = (yyvsp[-3].captures);} -#line 4550 "src/parser.c" +#line 4534 "src/parser.c" break; case 348: /* prim_exp: "(" op_op ")" */ -#line 1047 "src/gwion.y" +#line 1048 "src/gwion.y" { (yyval.exp) = new_prim_id( mpool(arg), (yyvsp[-1].sym), (yyloc)); (yyval.exp)->paren = true; } -#line 4556 "src/parser.c" +#line 4540 "src/parser.c" break; case 349: /* prim_exp: "perform" opt_id */ -#line 1048 "src/gwion.y" +#line 1049 "src/gwion.y" { (yyval.exp) = new_prim_perform(mpool(arg), (yyvsp[0].sym), (yylsp[0])); } -#line 4562 "src/parser.c" +#line 4546 "src/parser.c" break; case 350: /* prim_exp: "(" ")" */ -#line 1049 "src/gwion.y" +#line 1050 "src/gwion.y" { (yyval.exp) = new_prim_nil( mpool(arg), (yyloc)); } -#line 4568 "src/parser.c" +#line 4552 "src/parser.c" break; -#line 4572 "src/parser.c" +#line 4556 "src/parser.c" default: break; } @@ -4797,7 +4781,7 @@ mp_vector_add(mpool(arg), &(yyvsp[-1].handler_list).handlers, Handler, (yyvsp[0] return yyresult; } -#line 1051 "src/gwion.y" +#line 1052 "src/gwion.y" #undef scan #undef insert_symbol