Ticket #1610: yyerror.patch
File yyerror.patch, 80.5 KB (added by plobsing, 12 years ago) |
---|
-
compilers/imcc/imcc.y
20 20 #define _PARSER 21 21 #define PARSER_MAIN 22 22 #include "imc.h" 23 #include "parrot/parrot.h" 23 24 #include "parrot/dynext.h" 24 25 #include "pmc/pmc_callcontext.h" 25 26 #include "pbc.h" … … 2495 2496 * outside the bison buffer, and thus, not "accessible" by 2496 2497 * us. This means it may segfault. */ 2497 2498 const char * const chr = yyget_text((yyscan_t)yyscanner); 2499 PMC * err_msgs = IMCC_INFO(interp)->error_messages; 2498 2500 2499 /* IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, s); */ 2500 /* --- This was called before, not sure if I should call some 2501 similar function that does not die like this one. */ 2501 IMCC_INFO(interp)->error_code = IMCC_PARSEFAIL_EXCEPTION; 2502 2502 2503 /* Basically, if current token is a newline, it mean the error was 2504 * before the newline, and thus, line is the line *after* the 2505 * error. Instead of duplicating code for both cases (the 'newline' and 2506 * non-newline case, do the test twice; efficiency is not important when 2507 * we have an error anyway. */ 2508 if (!at_eof(yyscanner)) { 2509 IMCC_warning(interp, "error:imcc:%s", s); 2503 /* don't bother printing the current token if it is either a newline or EOF */ 2504 VTABLE_push_string(interp, err_msgs, 2505 at_eof(yyscanner) || *chr == '\n' ? 2506 Parrot_str_new(interp, s, 0) : 2507 Parrot_sprintf_c(interp, "%s ('%s')", s, chr)); 2508 VTABLE_push_string(interp, err_msgs, IMCC_inc_str(interp)); 2510 2509 2511 /* don't print the current token if it is a newline */2512 if (*chr != '\n')2513 IMCC_warning(interp, " ('%s')", chr);2514 2515 IMCC_print_inc(interp);2516 }2517 2518 /* scanner is at EOF; just to be sure, don't print "current" token */2519 else {2520 IMCC_warning(interp, "error:imcc:%s", s);2521 IMCC_print_inc(interp);2522 }2523 2524 2510 return 0; 2525 2511 } 2526 2512 -
compilers/imcc/imclexer.c
5847 5847 5848 5848 void 5849 5849 imcc_run_compilation(PARROT_INTERP, void *yyscanner) { 5850 IMCC_INFO(interp)->error_messages = 5851 Parrot_pmc_new(interp, enum_class_ResizableStringArray); 5852 5850 5853 IMCC_TRY(IMCC_INFO(interp)->jump_buf, IMCC_INFO(interp)->error_code) { 5851 if (yyparse(yyscanner, interp)) { 5852 IMCC_INFO(interp)->error_code = IMCC_PARSEFAIL_EXCEPTION; 5853 IMCC_INFO(interp)->error_message = string_from_literal(interp, "syntax error ... somewhere"); 5854 return; 5855 } 5854 if (yyparse(yyscanner, interp)) 5855 return; /* error reporting handled in yyerror */ 5856 5856 5857 5857 imc_compile_all_units(interp); 5858 5858 } … … 5868 5868 IMCC_END_TRY; 5869 5869 } 5870 5870 5871 void 5872 IMCC_ print_inc(PARROT_INTERP)5871 STRING * 5872 IMCC_inc_str(PARROT_INTERP) 5873 5873 { 5874 return Parrot_str_join(interp, string_from_literal(interp, "\n"), 5875 IMCC_inc_stack(interp)); 5876 } 5877 5878 PMC * 5879 IMCC_inc_stack(PARROT_INTERP) 5880 { 5874 5881 macro_frame_t *f; 5875 const char *old = IMCC_INFO(interp)->frames->s.file; 5882 PMC *inc_stack = Parrot_pmc_new(interp, enum_class_ResizableStringArray); 5883 char *old; 5876 5884 5885 5877 5886 if (IMCC_INFO(interp)->frames && IMCC_INFO(interp)->frames->is_macro) 5878 fprintf(stderr, "\n\tin macro '.%s' line %d\n", 5879 IMCC_INFO(interp)->frames->s.file, IMCC_INFO(interp)->line); 5887 VTABLE_push_string(interp, inc_stack, 5888 Parrot_sprintf_c(interp, "\tin macro '.%s' line %d", 5889 IMCC_INFO(interp)->frames->s.file, IMCC_INFO(interp)->line)); 5880 5890 else 5881 fprintf(stderr, "\n\tin file '%s' line %d\n", 5882 IMCC_INFO(interp)->frames->s.file, IMCC_INFO(interp)->line); 5891 VTABLE_push_string(interp, inc_stack, 5892 Parrot_sprintf_c(interp, "\tin file '%s' line %d", 5893 IMCC_INFO(interp)->frames->s.file, IMCC_INFO(interp)->line)); 5883 5894 5884 5895 old = IMCC_INFO(interp)->frames->s.file; 5885 5896 for (f = IMCC_INFO(interp)->frames; f; f = (macro_frame_t *)f->s.next) { 5886 5897 if (!STREQ(f->s.file, old)) { 5887 fprintf(stderr, "\tincluded from '%s' line %d\n", 5888 f->s.file, f->s.line); 5898 VTABLE_push_string(interp, inc_stack, 5899 Parrot_sprintf_c(interp, "\tincluded from '%s' line %d", 5900 f->s.file, f->s.line)); 5889 5901 } 5890 5902 5891 5903 old = f->s.file; 5892 5904 } 5905 5906 5907 return inc_stack; 5893 5908 } 5894 5909 5895 5910 /* -
compilers/imcc/imc.h
416 416 /* HEADERIZER END: compilers/imcc/parser_util.c */ 417 417 418 418 /* imclexer.c */ 419 void IMCC_print_inc(PARROT_INTERP); 419 STRING *IMCC_inc_str(PARROT_INTERP); 420 PMC *IMCC_inc_stack(PARROT_INTERP); 420 421 421 422 /* Call convention independent API */ 422 423 … … 554 555 SymReg *cur_namespace; 555 556 struct nodeType_t *top_node; 556 557 struct parser_state_t *state; 557 STRING *error_message; /* The Error message*/558 PMC *error_messages; /* error messages (eg: syntax errors) */ 558 559 559 560 /* some values that were global... */ 560 561 Namespace *namespace_stack; -
compilers/imcc/main.c
636 636 637 637 imcc_run_compilation(interp, yyscanner); 638 638 if (IMCC_INFO(interp)->error_code) { 639 char * const error_str = Parrot_str_to_cstring(interp, 640 IMCC_INFO(interp)->error_message); 639 char *error_str; 640 PMC *err_msgs = IMCC_INFO(interp)->error_messages; 641 VTABLE_push_string(interp, err_msgs, IMCC_inc_str(interp)); 642 error_str = Parrot_str_to_cstring(interp, 643 Parrot_str_join(interp, 644 string_from_literal(interp, "\n"), 645 err_msgs)); 641 646 642 647 IMCC_INFO(interp)->error_code=IMCC_FATAL_EXCEPTION; 643 fprintf(stderr, "error:imcc:%s", error_str); 644 IMCC_print_inc(interp); 648 fprintf(stderr, "error:imcc:%s\n", error_str); 645 649 Parrot_str_free_cstring(error_str); 646 650 Parrot_exit(interp, IMCC_FATAL_EXCEPTION); 647 651 } -
compilers/imcc/imcc.l
1359 1359 1360 1360 void 1361 1361 imcc_run_compilation(PARROT_INTERP, void *yyscanner) { 1362 IMCC_INFO(interp)->error_messages = 1363 Parrot_pmc_new(interp, enum_class_ResizableStringArray); 1364 1362 1365 IMCC_TRY(IMCC_INFO(interp)->jump_buf, IMCC_INFO(interp)->error_code) { 1363 if (yyparse(yyscanner, interp)) { 1364 IMCC_INFO(interp)->error_code = IMCC_PARSEFAIL_EXCEPTION; 1365 IMCC_INFO(interp)->error_message = string_from_literal(interp, "syntax error ... somewhere"); 1366 return; 1367 } 1366 if (yyparse(yyscanner, interp)) 1367 return; /* error reporting handled in yyerror */ 1368 1368 1369 1369 imc_compile_all_units(interp); 1370 1370 } … … 1380 1380 IMCC_END_TRY; 1381 1381 } 1382 1382 1383 void 1384 IMCC_ print_inc(PARROT_INTERP)1383 STRING * 1384 IMCC_inc_str(PARROT_INTERP) 1385 1385 { 1386 return Parrot_str_join(interp, string_from_literal(interp, "\n"), 1387 IMCC_inc_stack(interp)); 1388 } 1389 1390 PMC * 1391 IMCC_inc_stack(PARROT_INTERP) 1392 { 1386 1393 macro_frame_t *f; 1387 const char *old = IMCC_INFO(interp)->frames->s.file; 1394 PMC *inc_stack = Parrot_pmc_new(interp, enum_class_ResizableStringArray); 1395 char *old; 1388 1396 1397 1389 1398 if (IMCC_INFO(interp)->frames && IMCC_INFO(interp)->frames->is_macro) 1390 fprintf(stderr, "\n\tin macro '.%s' line %d\n", 1391 IMCC_INFO(interp)->frames->s.file, IMCC_INFO(interp)->line); 1399 VTABLE_push_string(interp, inc_stack, 1400 Parrot_sprintf_c(interp, "\tin macro '.%s' line %d", 1401 IMCC_INFO(interp)->frames->s.file, IMCC_INFO(interp)->line)); 1392 1402 else 1393 fprintf(stderr, "\n\tin file '%s' line %d\n", 1394 IMCC_INFO(interp)->frames->s.file, IMCC_INFO(interp)->line); 1403 VTABLE_push_string(interp, inc_stack, 1404 Parrot_sprintf_c(interp, "\tin file '%s' line %d", 1405 IMCC_INFO(interp)->frames->s.file, IMCC_INFO(interp)->line)); 1395 1406 1396 1407 old = IMCC_INFO(interp)->frames->s.file; 1397 1408 for (f = IMCC_INFO(interp)->frames; f; f = (macro_frame_t *)f->s.next) { 1398 1409 if (!STREQ(f->s.file, old)) { 1399 fprintf(stderr, "\tincluded from '%s' line %d\n", 1400 f->s.file, f->s.line); 1410 VTABLE_push_string(interp, inc_stack, 1411 Parrot_sprintf_c(interp, "\tincluded from '%s' line %d", 1412 f->s.file, f->s.line)); 1401 1413 } 1402 1414 1403 1415 old = f->s.file; 1404 1416 } 1417 1418 1419 return inc_stack; 1405 1420 } 1406 1421 1407 1422 /* -
compilers/imcc/imcparser.c
101 101 #define _PARSER 102 102 #define PARSER_MAIN 103 103 #include "imc.h" 104 #include "parrot/parrot.h" 104 105 #include "parrot/dynext.h" 105 106 #include "pmc/pmc_callcontext.h" 106 107 #include "pbc.h" … … 1147 1148 1148 1149 1149 1150 /* Line 189 of yacc.c */ 1150 #line 114 0"compilers/imcc/imcparser.c"1151 #line 1141 "compilers/imcc/imcparser.c" 1151 1152 1152 1153 /* Enabling traces. */ 1153 1154 #ifndef YYDEBUG … … 1420 1421 { 1421 1422 1422 1423 /* Line 214 of yacc.c */ 1423 #line 106 8"compilers/imcc/imcc.y"1424 #line 1069 "compilers/imcc/imcc.y" 1424 1425 1425 1426 IdList * idlist; 1426 1427 int t; … … 1431 1432 1432 1433 1433 1434 /* Line 214 of yacc.c */ 1434 #line 142 4"compilers/imcc/imcparser.c"1435 #line 1425 "compilers/imcc/imcparser.c" 1435 1436 } YYSTYPE; 1436 1437 # define YYSTYPE_IS_TRIVIAL 1 1437 1438 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ … … 1443 1444 1444 1445 1445 1446 /* Line 264 of yacc.c */ 1446 #line 143 6"compilers/imcc/imcparser.c"1447 #line 1437 "compilers/imcc/imcparser.c" 1447 1448 1448 1449 #ifdef short 1449 1450 # undef short … … 1866 1867 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 1867 1868 static const yytype_uint16 yyrline[] = 1868 1869 { 1869 0, 116 3, 1163, 1167, 1168, 1172, 1173, 1174, 1180, 1186,1870 118 7, 1188, 1189, 1193, 1194, 1203, 1209, 1217, 1229, 1242,1871 124 2, 1251, 1251, 1258, 1258, 1267, 1268, 1272, 1273, 1277,1872 127 8, 1279, 1280, 1281, 1282, 1283, 1286, 1286, 1295, 1294,1873 130 7, 1311, 1324, 1328, 1332, 1332, 1344, 1346, 1350, 1365,1874 136 6, 1370, 1370, 1382, 1383, 1392, 1396, 1400, 1391, 1412,1875 141 3, 1414, 1427, 1427, 1431, 1456, 1460, 1466, 1475, 1481,1876 149 0, 1496, 1505, 1511, 1520, 1528, 1533, 1544, 1547, 1552,1877 156 0, 1561, 1562, 1563, 1564, 1575, 1586, 1589, 1591, 1596,1878 159 5, 1626, 1627, 1631, 1632, 1636, 1637, 1641, 1642, 1646,1879 164 7, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656,1880 165 7, 1658, 1659, 1663, 1668, 1672, 1676, 1680, 1684, 1689,1881 169 8, 1699, 1711, 1716, 1717, 1725, 1726, 1726, 1738, 1739,1882 174 3, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1755, 1755,1883 175 8, 1766, 1766, 1772, 1773, 1778, 1786, 1787, 1792, 1800,1884 180 4, 1809, 1808, 1821, 1822, 1826, 1827, 1837, 1842, 1852,1885 186 1, 1862, 1874, 1878, 1880, 1881, 1882, 1883, 1884, 1888,1886 18 89, 1893, 1894, 1898, 1909, 1910, 1921, 1928, 1937, 1945,1887 194 7, 1952, 1953, 1954, 1954, 1967, 1984, 1997, 1997, 2004,1888 200 5, 2005, 2011, 2017, 2021, 2033, 2034, 2035, 2036, 2037,1889 203 8, 2042, 2043, 2044, 2045, 2049, 2051, 2053, 2055, 2057,1890 206 0, 2067, 2066, 2075, 2076, 2077, 2078, 2086, 2087, 2088,1891 209 2, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101,1892 210 2, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111,1893 211 2, 2113, 2114, 2120, 2119, 2131, 2136, 2137, 2138, 2139,1894 214 0, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2153,1895 216 4, 2165, 2166, 2167, 2173, 2187, 2193, 2199, 2205, 2204,1896 221 3, 2214, 2224, 2234, 2241, 2246, 2256, 2260, 2261, 2265,1897 226 6, 2267, 2270, 2271, 2275, 2279, 2289, 2295, 2305, 2310,1898 231 4, 2315, 2319, 2323, 2327, 2334, 2338, 2342, 2349, 2350,1899 235 4, 2355, 2356, 2357, 2358, 2359, 2363, 2364, 2368, 2369,1900 237 3, 2374, 2378, 2379, 2386, 2393, 2394, 2395, 2399, 2400,1901 240 4, 2405, 2409, 2410, 2414, 2415, 2419, 2419, 2431, 2431,1902 244 3, 2444, 2452, 2459, 2460, 2461, 2462, 2463, 2467, 2468,1903 247 2, 2473, 24741870 0, 1164, 1164, 1168, 1169, 1173, 1174, 1175, 1181, 1187, 1871 1188, 1189, 1190, 1194, 1195, 1204, 1210, 1218, 1230, 1243, 1872 1243, 1252, 1252, 1259, 1259, 1268, 1269, 1273, 1274, 1278, 1873 1279, 1280, 1281, 1282, 1283, 1284, 1287, 1287, 1296, 1295, 1874 1308, 1312, 1325, 1329, 1333, 1333, 1345, 1347, 1351, 1366, 1875 1367, 1371, 1371, 1383, 1384, 1393, 1397, 1401, 1392, 1413, 1876 1414, 1415, 1428, 1428, 1432, 1457, 1461, 1467, 1476, 1482, 1877 1491, 1497, 1506, 1512, 1521, 1529, 1534, 1545, 1548, 1553, 1878 1561, 1562, 1563, 1564, 1565, 1576, 1587, 1590, 1592, 1597, 1879 1596, 1627, 1628, 1632, 1633, 1637, 1638, 1642, 1643, 1647, 1880 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1881 1658, 1659, 1660, 1664, 1669, 1673, 1677, 1681, 1685, 1690, 1882 1699, 1700, 1712, 1717, 1718, 1726, 1727, 1727, 1739, 1740, 1883 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1756, 1756, 1884 1759, 1767, 1767, 1773, 1774, 1779, 1787, 1788, 1793, 1801, 1885 1805, 1810, 1809, 1822, 1823, 1827, 1828, 1838, 1843, 1853, 1886 1862, 1863, 1875, 1879, 1881, 1882, 1883, 1884, 1885, 1889, 1887 1890, 1894, 1895, 1899, 1910, 1911, 1922, 1929, 1938, 1946, 1888 1948, 1953, 1954, 1955, 1955, 1968, 1985, 1998, 1998, 2005, 1889 2006, 2006, 2012, 2018, 2022, 2034, 2035, 2036, 2037, 2038, 1890 2039, 2043, 2044, 2045, 2046, 2050, 2052, 2054, 2056, 2058, 1891 2061, 2068, 2067, 2076, 2077, 2078, 2079, 2087, 2088, 2089, 1892 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 1893 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 1894 2113, 2114, 2115, 2121, 2120, 2132, 2137, 2138, 2139, 2140, 1895 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2154, 1896 2165, 2166, 2167, 2168, 2174, 2188, 2194, 2200, 2206, 2205, 1897 2214, 2215, 2225, 2235, 2242, 2247, 2257, 2261, 2262, 2266, 1898 2267, 2268, 2271, 2272, 2276, 2280, 2290, 2296, 2306, 2311, 1899 2315, 2316, 2320, 2324, 2328, 2335, 2339, 2343, 2350, 2351, 1900 2355, 2356, 2357, 2358, 2359, 2360, 2364, 2365, 2369, 2370, 1901 2374, 2375, 2379, 2380, 2387, 2394, 2395, 2396, 2400, 2401, 1902 2405, 2406, 2410, 2411, 2415, 2416, 2420, 2420, 2432, 2432, 1903 2444, 2445, 2453, 2460, 2461, 2462, 2463, 2464, 2468, 2469, 1904 2473, 2474, 2475 1904 1905 }; 1905 1906 #endif 1906 1907 … … 3260 3261 case 2: 3261 3262 3262 3263 /* Line 1464 of yacc.c */ 3263 #line 116 3"compilers/imcc/imcc.y"3264 #line 1164 "compilers/imcc/imcc.y" 3264 3265 { if (yynerrs) YYABORT; (yyval.i) = 0; } 3265 3266 break; 3266 3267 3267 3268 case 5: 3268 3269 3269 3270 /* Line 1464 of yacc.c */ 3270 #line 117 2"compilers/imcc/imcc.y"3271 #line 1173 "compilers/imcc/imcc.y" 3271 3272 { (yyval.i) = (yyvsp[(1) - (1)].i); } 3272 3273 break; 3273 3274 3274 3275 case 6: 3275 3276 3276 3277 /* Line 1464 of yacc.c */ 3277 #line 117 3"compilers/imcc/imcc.y"3278 #line 1174 "compilers/imcc/imcc.y" 3278 3279 { (yyval.i) = (yyvsp[(1) - (1)].i); } 3279 3280 break; 3280 3281 3281 3282 case 7: 3282 3283 3283 3284 /* Line 1464 of yacc.c */ 3284 #line 117 5"compilers/imcc/imcc.y"3285 #line 1176 "compilers/imcc/imcc.y" 3285 3286 { 3286 3287 (yyval.i) = (yyvsp[(1) - (1)].i); 3287 3288 imc_close_unit(interp, IMCC_INFO(interp)->cur_unit); … … 3292 3293 case 8: 3293 3294 3294 3295 /* Line 1464 of yacc.c */ 3295 #line 118 1"compilers/imcc/imcc.y"3296 #line 1182 "compilers/imcc/imcc.y" 3296 3297 { 3297 3298 (yyval.i) = (yyvsp[(1) - (1)].i); 3298 3299 imc_close_unit(interp, IMCC_INFO(interp)->cur_unit); … … 3303 3304 case 9: 3304 3305 3305 3306 /* Line 1464 of yacc.c */ 3306 #line 118 6"compilers/imcc/imcc.y"3307 #line 1187 "compilers/imcc/imcc.y" 3307 3308 { (yyval.i) = 0; } 3308 3309 break; 3309 3310 3310 3311 case 10: 3311 3312 3312 3313 /* Line 1464 of yacc.c */ 3313 #line 118 7"compilers/imcc/imcc.y"3314 #line 1188 "compilers/imcc/imcc.y" 3314 3315 { (yyval.i) = 0; } 3315 3316 break; 3316 3317 3317 3318 case 11: 3318 3319 3319 3320 /* Line 1464 of yacc.c */ 3320 #line 118 8"compilers/imcc/imcc.y"3321 #line 1189 "compilers/imcc/imcc.y" 3321 3322 { (yyval.i) = 0; } 3322 3323 break; 3323 3324 3324 3325 case 12: 3325 3326 3326 3327 /* Line 1464 of yacc.c */ 3327 #line 11 89"compilers/imcc/imcc.y"3328 #line 1190 "compilers/imcc/imcc.y" 3328 3329 { (yyval.i) = 0; } 3329 3330 break; 3330 3331 3331 3332 case 13: 3332 3333 3333 3334 /* Line 1464 of yacc.c */ 3334 #line 119 3"compilers/imcc/imcc.y"3335 #line 1194 "compilers/imcc/imcc.y" 3335 3336 { (yyval.i) = 0; } 3336 3337 break; 3337 3338 3338 3339 case 14: 3339 3340 3340 3341 /* Line 1464 of yacc.c */ 3341 #line 119 5"compilers/imcc/imcc.y"3342 #line 1196 "compilers/imcc/imcc.y" 3342 3343 { 3343 3344 (yyval.i) = 0; 3344 3345 do_loadlib(interp, (yyvsp[(2) - (3)].s)); … … 3349 3350 case 15: 3350 3351 3351 3352 /* Line 1464 of yacc.c */ 3352 #line 120 4"compilers/imcc/imcc.y"3353 #line 1205 "compilers/imcc/imcc.y" 3353 3354 { 3354 3355 IMCC_INFO(interp)->line = atoi((yyvsp[(2) - (5)].s)); 3355 3356 /* set_filename() frees the STRINGC */ … … 3360 3361 case 16: 3361 3362 3362 3363 /* Line 1464 of yacc.c */ 3363 #line 121 0"compilers/imcc/imcc.y"3364 #line 1211 "compilers/imcc/imcc.y" 3364 3365 { 3365 3366 /* set_filename() frees the STRINGC */ 3366 3367 set_filename(interp, (yyvsp[(2) - (3)].s)); … … 3370 3371 case 17: 3371 3372 3372 3373 /* Line 1464 of yacc.c */ 3373 #line 121 8"compilers/imcc/imcc.y"3374 #line 1219 "compilers/imcc/imcc.y" 3374 3375 { 3375 3376 /* We'll want to store an entry while emitting instructions, so just 3376 3377 * store annotation like it's an instruction. */ … … 3383 3384 case 18: 3384 3385 3385 3386 /* Line 1464 of yacc.c */ 3386 #line 123 0"compilers/imcc/imcc.y"3387 #line 1231 "compilers/imcc/imcc.y" 3387 3388 { 3388 3389 STRING * const hll_name = Parrot_str_unescape(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL); 3389 3390 Parrot_pcc_set_HLL(interp, CURRENT_CONTEXT(interp), … … 3398 3399 case 19: 3399 3400 3400 3401 /* Line 1464 of yacc.c */ 3401 #line 124 2"compilers/imcc/imcc.y"3402 #line 1243 "compilers/imcc/imcc.y" 3402 3403 { IMCC_INFO(interp)->is_def = 1; } 3403 3404 break; 3404 3405 3405 3406 case 20: 3406 3407 3407 3408 /* Line 1464 of yacc.c */ 3408 #line 124 3"compilers/imcc/imcc.y"3409 #line 1244 "compilers/imcc/imcc.y" 3409 3410 { 3410 3411 mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1); 3411 3412 mem_sys_free((yyvsp[(4) - (6)].s)); … … 3416 3417 case 21: 3417 3418 3418 3419 /* Line 1464 of yacc.c */ 3419 #line 125 1"compilers/imcc/imcc.y"3420 #line 1252 "compilers/imcc/imcc.y" 3420 3421 { IMCC_INFO(interp)->is_def = 1; } 3421 3422 break; 3422 3423 3423 3424 case 22: 3424 3425 3425 3426 /* Line 1464 of yacc.c */ 3426 #line 125 2"compilers/imcc/imcc.y"3427 #line 1253 "compilers/imcc/imcc.y" 3427 3428 { 3428 3429 (yyval.i) = mk_pmc_const(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s)); 3429 3430 mem_sys_free((yyvsp[(6) - (6)].s)); … … 3434 3435 case 23: 3435 3436 3436 3437 /* Line 1464 of yacc.c */ 3437 #line 125 8"compilers/imcc/imcc.y"3438 #line 1259 "compilers/imcc/imcc.y" 3438 3439 { IMCC_INFO(interp)->is_def = 1; } 3439 3440 break; 3440 3441 3441 3442 case 24: 3442 3443 3443 3444 /* Line 1464 of yacc.c */ 3444 #line 12 59"compilers/imcc/imcc.y"3445 #line 1260 "compilers/imcc/imcc.y" 3445 3446 { 3446 3447 (yyval.i) = mk_pmc_const_named(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s)); 3447 3448 mem_sys_free((yyvsp[(3) - (6)].s)); … … 3453 3454 case 29: 3454 3455 3455 3456 /* Line 1464 of yacc.c */ 3456 #line 127 7"compilers/imcc/imcc.y"3457 #line 1278 "compilers/imcc/imcc.y" 3457 3458 { (yyval.i) = 0; } 3458 3459 break; 3459 3460 3460 3461 case 30: 3461 3462 3462 3463 /* Line 1464 of yacc.c */ 3463 #line 127 8"compilers/imcc/imcc.y"3464 #line 1279 "compilers/imcc/imcc.y" 3464 3465 { (yyval.i) = 0; } 3465 3466 break; 3466 3467 3467 3468 case 31: 3468 3469 3469 3470 /* Line 1464 of yacc.c */ 3470 #line 12 79"compilers/imcc/imcc.y"3471 #line 1280 "compilers/imcc/imcc.y" 3471 3472 { (yyval.i) = 0; } 3472 3473 break; 3473 3474 3474 3475 case 32: 3475 3476 3476 3477 /* Line 1464 of yacc.c */ 3477 #line 128 0"compilers/imcc/imcc.y"3478 #line 1281 "compilers/imcc/imcc.y" 3478 3479 { (yyval.i) = 0; } 3479 3480 break; 3480 3481 3481 3482 case 33: 3482 3483 3483 3484 /* Line 1464 of yacc.c */ 3484 #line 128 1"compilers/imcc/imcc.y"3485 #line 1282 "compilers/imcc/imcc.y" 3485 3486 { (yyval.i) = (yyvsp[(1) - (1)].i); } 3486 3487 break; 3487 3488 3488 3489 case 36: 3489 3490 3490 3491 /* Line 1464 of yacc.c */ 3491 #line 128 6"compilers/imcc/imcc.y"3492 #line 1287 "compilers/imcc/imcc.y" 3492 3493 { clear_state(interp); } 3493 3494 break; 3494 3495 3495 3496 case 37: 3496 3497 3497 3498 /* Line 1464 of yacc.c */ 3498 #line 128 8"compilers/imcc/imcc.y"3499 #line 1289 "compilers/imcc/imcc.y" 3499 3500 { 3500 3501 (yyval.i) = INS(interp, IMCC_INFO(interp)->cur_unit, 3501 3502 (yyvsp[(2) - (3)].s), 0, IMCC_INFO(interp)->regs, … … 3507 3508 case 38: 3508 3509 3509 3510 /* Line 1464 of yacc.c */ 3510 #line 129 5"compilers/imcc/imcc.y"3511 #line 1296 "compilers/imcc/imcc.y" 3511 3512 { 3512 3513 imc_close_unit(interp, IMCC_INFO(interp)->cur_unit); 3513 3514 IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); … … 3517 3518 case 39: 3518 3519 3519 3520 /* Line 1464 of yacc.c */ 3520 #line 130 0"compilers/imcc/imcc.y"3521 #line 1301 "compilers/imcc/imcc.y" 3521 3522 { 3522 3523 (yyval.i) = iSUBROUTINE(interp, 3523 3524 IMCC_INFO(interp)->cur_unit, … … 3530 3531 case 40: 3531 3532 3532 3533 /* Line 1464 of yacc.c */ 3533 #line 130 8"compilers/imcc/imcc.y"3534 #line 1309 "compilers/imcc/imcc.y" 3534 3535 { 3535 3536 (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); 3536 3537 } … … 3539 3540 case 41: 3540 3541 3541 3542 /* Line 1464 of yacc.c */ 3542 #line 131 2"compilers/imcc/imcc.y"3543 #line 1313 "compilers/imcc/imcc.y" 3543 3544 { 3544 3545 char *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1); 3545 3546 SymReg *r = mk_pasm_reg(interp, (yyvsp[(4) - (4)].s)); … … 3557 3558 case 42: 3558 3559 3559 3560 /* Line 1464 of yacc.c */ 3560 #line 132 4"compilers/imcc/imcc.y"3561 #line 1325 "compilers/imcc/imcc.y" 3561 3562 { (yyval.i) = 0;} 3562 3563 break; 3563 3564 3564 3565 case 44: 3565 3566 3566 3567 /* Line 1464 of yacc.c */ 3567 #line 133 2"compilers/imcc/imcc.y"3568 #line 1333 "compilers/imcc/imcc.y" 3568 3569 { IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); } 3569 3570 break; 3570 3571 3571 3572 case 45: 3572 3573 3573 3574 /* Line 1464 of yacc.c */ 3574 #line 133 5"compilers/imcc/imcc.y"3575 #line 1336 "compilers/imcc/imcc.y" 3575 3576 { 3576 3577 /* if (optimizer_level & OPT_PASM) 3577 3578 imc_compile_unit(interp, IMCC_INFO(interp)->cur_unit); … … 3584 3585 case 48: 3585 3586 3586 3587 /* Line 1464 of yacc.c */ 3587 #line 135 1"compilers/imcc/imcc.y"3588 #line 1352 "compilers/imcc/imcc.y" 3588 3589 { 3589 3590 int re_open = 0; 3590 3591 (yyval.i) = 0; … … 3601 3602 case 49: 3602 3603 3603 3604 /* Line 1464 of yacc.c */ 3604 #line 136 5"compilers/imcc/imcc.y"3605 #line 1366 "compilers/imcc/imcc.y" 3605 3606 { (yyval.sr) = (yyvsp[(2) - (3)].sr); } 3606 3607 break; 3607 3608 3608 3609 case 50: 3609 3610 3610 3611 /* Line 1464 of yacc.c */ 3611 #line 136 6"compilers/imcc/imcc.y"3612 #line 1367 "compilers/imcc/imcc.y" 3612 3613 { (yyval.sr) = NULL; } 3613 3614 break; 3614 3615 3615 3616 case 51: 3616 3617 3617 3618 /* Line 1464 of yacc.c */ 3618 #line 137 0"compilers/imcc/imcc.y"3619 #line 1371 "compilers/imcc/imcc.y" 3619 3620 { 3620 3621 IMCC_INFO(interp)->nkeys = 0; 3621 3622 } … … 3624 3625 case 52: 3625 3626 3626 3627 /* Line 1464 of yacc.c */ 3627 #line 137 4"compilers/imcc/imcc.y"3628 #line 1375 "compilers/imcc/imcc.y" 3628 3629 { 3629 3630 (yyval.sr) = link_keys(interp, 3630 3631 IMCC_INFO(interp)->nkeys, … … 3635 3636 case 53: 3636 3637 3637 3638 /* Line 1464 of yacc.c */ 3638 #line 138 2"compilers/imcc/imcc.y"3639 #line 1383 "compilers/imcc/imcc.y" 3639 3640 { IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); } 3640 3641 break; 3641 3642 3642 3643 case 54: 3643 3644 3644 3645 /* Line 1464 of yacc.c */ 3645 #line 138 4"compilers/imcc/imcc.y"3646 #line 1385 "compilers/imcc/imcc.y" 3646 3647 { 3647 3648 IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr); 3648 3649 (yyval.sr) = IMCC_INFO(interp)->keys[0]; … … 3652 3653 case 55: 3653 3654 3654 3655 /* Line 1464 of yacc.c */ 3655 #line 139 2"compilers/imcc/imcc.y"3656 #line 1393 "compilers/imcc/imcc.y" 3656 3657 { 3657 3658 IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB); 3658 3659 } … … 3661 3662 case 56: 3662 3663 3663 3664 /* Line 1464 of yacc.c */ 3664 #line 139 6"compilers/imcc/imcc.y"3665 #line 1397 "compilers/imcc/imcc.y" 3665 3666 { 3666 3667 iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr)); 3667 3668 } … … 3670 3671 case 57: 3671 3672 3672 3673 /* Line 1464 of yacc.c */ 3673 #line 140 0"compilers/imcc/imcc.y"3674 #line 1401 "compilers/imcc/imcc.y" 3674 3675 { 3675 3676 IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(5) - (6)].t); 3676 3677 if (!IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid) { … … 3683 3684 case 58: 3684 3685 3685 3686 /* Line 1464 of yacc.c */ 3686 #line 140 8"compilers/imcc/imcc.y"3687 #line 1409 "compilers/imcc/imcc.y" 3687 3688 { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; } 3688 3689 break; 3689 3690 3690 3691 case 59: 3691 3692 3692 3693 /* Line 1464 of yacc.c */ 3693 #line 141 2"compilers/imcc/imcc.y"3694 #line 1413 "compilers/imcc/imcc.y" 3694 3695 { (yyval.sr) = 0; } 3695 3696 break; 3696 3697 3697 3698 case 60: 3698 3699 3699 3700 /* Line 1464 of yacc.c */ 3700 #line 141 3"compilers/imcc/imcc.y"3701 #line 1414 "compilers/imcc/imcc.y" 3701 3702 { (yyval.sr) = 0; } 3702 3703 break; 3703 3704 3704 3705 case 61: 3705 3706 3706 3707 /* Line 1464 of yacc.c */ 3707 #line 141 5"compilers/imcc/imcc.y"3708 #line 1416 "compilers/imcc/imcc.y" 3708 3709 { 3709 3710 if (IMCC_INFO(interp)->adv_named_id) { 3710 3711 add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call, … … 3719 3720 case 62: 3720 3721 3721 3722 /* Line 1464 of yacc.c */ 3722 #line 142 7"compilers/imcc/imcc.y"3723 #line 1428 "compilers/imcc/imcc.y" 3723 3724 { IMCC_INFO(interp)->is_def = 1; } 3724 3725 break; 3725 3726 3726 3727 case 63: 3727 3728 3728 3729 /* Line 1464 of yacc.c */ 3729 #line 142 7"compilers/imcc/imcc.y"3730 #line 1428 "compilers/imcc/imcc.y" 3730 3731 { (yyval.sr) = (yyvsp[(3) - (3)].sr); IMCC_INFO(interp)->is_def = 0; } 3731 3732 break; 3732 3733 3733 3734 case 64: 3734 3735 3735 3736 /* Line 1464 of yacc.c */ 3736 #line 143 2"compilers/imcc/imcc.y"3737 #line 1433 "compilers/imcc/imcc.y" 3737 3738 { 3738 3739 if ((yyvsp[(3) - (3)].t) & VT_OPT_FLAG && (yyvsp[(1) - (3)].t) != 'I') { 3739 3740 const char *type; … … 3758 3759 case 65: 3759 3760 3760 3761 /* Line 1464 of yacc.c */ 3761 #line 145 6"compilers/imcc/imcc.y"3762 #line 1457 "compilers/imcc/imcc.y" 3762 3763 { (yyval.t) = 0; } 3763 3764 break; 3764 3765 3765 3766 case 66: 3766 3767 3767 3768 /* Line 1464 of yacc.c */ 3768 #line 146 1"compilers/imcc/imcc.y"3769 #line 1462 "compilers/imcc/imcc.y" 3769 3770 { 3770 3771 (yyval.t) = 0; 3771 3772 IMCC_INFO(interp)->cur_unit->outer = mk_sub_address_fromc(interp, (yyvsp[(3) - (4)].s)); … … 3776 3777 case 67: 3777 3778 3778 3779 /* Line 1464 of yacc.c */ 3779 #line 146 7"compilers/imcc/imcc.y"3780 #line 1468 "compilers/imcc/imcc.y" 3780 3781 { 3781 3782 (yyval.t) = 0; 3782 3783 IMCC_INFO(interp)->cur_unit->outer = mk_const(interp, (yyvsp[(3) - (4)].s), 'S'); … … 3787 3788 case 68: 3788 3789 3789 3790 /* Line 1464 of yacc.c */ 3790 #line 147 6"compilers/imcc/imcc.y"3791 #line 1477 "compilers/imcc/imcc.y" 3791 3792 { 3792 3793 (yyval.t) = P_VTABLE; 3793 3794 IMCC_INFO(interp)->cur_unit->vtable_name = NULL; … … 3798 3799 case 69: 3799 3800 3800 3801 /* Line 1464 of yacc.c */ 3801 #line 148 2"compilers/imcc/imcc.y"3802 #line 1483 "compilers/imcc/imcc.y" 3802 3803 { 3803 3804 (yyval.t) = P_VTABLE; 3804 3805 IMCC_INFO(interp)->cur_unit->vtable_name = (yyvsp[(3) - (4)].s); … … 3809 3810 case 70: 3810 3811 3811 3812 /* Line 1464 of yacc.c */ 3812 #line 149 1"compilers/imcc/imcc.y"3813 #line 1492 "compilers/imcc/imcc.y" 3813 3814 { 3814 3815 (yyval.t) = P_METHOD; 3815 3816 IMCC_INFO(interp)->cur_unit->method_name = NULL; … … 3820 3821 case 71: 3821 3822 3822 3823 /* Line 1464 of yacc.c */ 3823 #line 149 7"compilers/imcc/imcc.y"3824 #line 1498 "compilers/imcc/imcc.y" 3824 3825 { 3825 3826 (yyval.t) = P_METHOD; 3826 3827 IMCC_INFO(interp)->cur_unit->method_name = (yyvsp[(3) - (4)].s); … … 3831 3832 case 72: 3832 3833 3833 3834 /* Line 1464 of yacc.c */ 3834 #line 150 6"compilers/imcc/imcc.y"3835 #line 1507 "compilers/imcc/imcc.y" 3835 3836 { 3836 3837 (yyval.t) = P_NSENTRY; 3837 3838 IMCC_INFO(interp)->cur_unit->ns_entry_name = NULL; … … 3842 3843 case 73: 3843 3844 3844 3845 /* Line 1464 of yacc.c */ 3845 #line 151 2"compilers/imcc/imcc.y"3846 #line 1513 "compilers/imcc/imcc.y" 3846 3847 { 3847 3848 (yyval.t) = P_NSENTRY; 3848 3849 IMCC_INFO(interp)->cur_unit->ns_entry_name = (yyvsp[(3) - (4)].s); … … 3853 3854 case 74: 3854 3855 3855 3856 /* Line 1464 of yacc.c */ 3856 #line 152 1"compilers/imcc/imcc.y"3857 #line 1522 "compilers/imcc/imcc.y" 3857 3858 { 3858 3859 (yyval.t) = 0; 3859 3860 IMCC_INFO(interp)->cur_unit->instance_of = (yyvsp[(3) - (4)].s); … … 3863 3864 case 75: 3864 3865 3865 3866 /* Line 1464 of yacc.c */ 3866 #line 15 29"compilers/imcc/imcc.y"3867 #line 1530 "compilers/imcc/imcc.y" 3867 3868 { 3868 3869 (yyval.t) = 0; 3869 3870 IMCC_INFO(interp)->cur_unit->subid = NULL; … … 3873 3874 case 76: 3874 3875 3875 3876 /* Line 1464 of yacc.c */ 3876 #line 153 4"compilers/imcc/imcc.y"3877 #line 1535 "compilers/imcc/imcc.y" 3877 3878 { 3878 3879 (yyval.t) = 0; 3879 3880 IMCC_INFO(interp)->cur_unit->subid = mk_const(interp, (yyvsp[(3) - (4)].s), 'S'); … … 3885 3886 case 77: 3886 3887 3887 3888 /* Line 1464 of yacc.c */ 3888 #line 154 4"compilers/imcc/imcc.y"3889 #line 1545 "compilers/imcc/imcc.y" 3889 3890 { 3890 3891 add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, NULL); 3891 3892 } … … 3894 3895 case 78: 3895 3896 3896 3897 /* Line 1464 of yacc.c */ 3897 #line 154 8"compilers/imcc/imcc.y"3898 #line 1549 "compilers/imcc/imcc.y" 3898 3899 { 3899 3900 (yyval.t) = 0; 3900 3901 add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr)); … … 3904 3905 case 79: 3905 3906 3906 3907 /* Line 1464 of yacc.c */ 3907 #line 155 3"compilers/imcc/imcc.y"3908 #line 1554 "compilers/imcc/imcc.y" 3908 3909 { 3909 3910 (yyval.t) = 0; 3910 3911 add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr)); … … 3914 3915 case 80: 3915 3916 3916 3917 /* Line 1464 of yacc.c */ 3917 #line 156 0"compilers/imcc/imcc.y"3918 #line 1561 "compilers/imcc/imcc.y" 3918 3919 { (yyval.sr) = mk_const(interp, "INTVAL", 'S'); } 3919 3920 break; 3920 3921 3921 3922 case 81: 3922 3923 3923 3924 /* Line 1464 of yacc.c */ 3924 #line 156 1"compilers/imcc/imcc.y"3925 #line 1562 "compilers/imcc/imcc.y" 3925 3926 { (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); } 3926 3927 break; 3927 3928 3928 3929 case 82: 3929 3930 3930 3931 /* Line 1464 of yacc.c */ 3931 #line 156 2"compilers/imcc/imcc.y"3932 #line 1563 "compilers/imcc/imcc.y" 3932 3933 { (yyval.sr) = mk_const(interp, "PMC", 'S'); } 3933 3934 break; 3934 3935 3935 3936 case 83: 3936 3937 3937 3938 /* Line 1464 of yacc.c */ 3938 #line 156 3"compilers/imcc/imcc.y"3939 #line 1564 "compilers/imcc/imcc.y" 3939 3940 { (yyval.sr) = mk_const(interp, "STRING", 'S'); } 3940 3941 break; 3941 3942 3942 3943 case 84: 3943 3944 3944 3945 /* Line 1464 of yacc.c */ 3945 #line 156 5"compilers/imcc/imcc.y"3946 #line 1566 "compilers/imcc/imcc.y" 3946 3947 { 3947 3948 SymReg *r; 3948 3949 if (strcmp((yyvsp[(1) - (1)].s), "_") != 0) … … 3958 3959 case 85: 3959 3960 3960 3961 /* Line 1464 of yacc.c */ 3961 #line 157 6"compilers/imcc/imcc.y"3962 #line 1577 "compilers/imcc/imcc.y" 3962 3963 { 3963 3964 SymReg *r; 3964 3965 if (strcmp((yyvsp[(1) - (1)].s), "_") != 0) … … 3974 3975 case 86: 3975 3976 3976 3977 /* Line 1464 of yacc.c */ 3977 #line 158 6"compilers/imcc/imcc.y"3978 #line 1587 "compilers/imcc/imcc.y" 3978 3979 { (yyval.sr) = (yyvsp[(2) - (3)].sr); } 3979 3980 break; 3980 3981 3981 3982 case 89: 3982 3983 3983 3984 /* Line 1464 of yacc.c */ 3984 #line 159 6"compilers/imcc/imcc.y"3985 #line 1597 "compilers/imcc/imcc.y" 3985 3986 { 3986 3987 char name[128]; 3987 3988 SymReg *r, *r1; … … 4008 4009 case 90: 4009 4010 4010 4011 /* Line 1464 of yacc.c */ 4011 #line 162 2"compilers/imcc/imcc.y"4012 #line 1623 "compilers/imcc/imcc.y" 4012 4013 { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; } 4013 4014 break; 4014 4015 4015 4016 case 91: 4016 4017 4017 4018 /* Line 1464 of yacc.c */ 4018 #line 162 6"compilers/imcc/imcc.y"4019 #line 1627 "compilers/imcc/imcc.y" 4019 4020 { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; } 4020 4021 break; 4021 4022 4022 4023 case 92: 4023 4024 4024 4025 /* Line 1464 of yacc.c */ 4025 #line 162 7"compilers/imcc/imcc.y"4026 #line 1628 "compilers/imcc/imcc.y" 4026 4027 { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; } 4027 4028 break; 4028 4029 4029 4030 case 93: 4030 4031 4031 4032 /* Line 1464 of yacc.c */ 4032 #line 163 1"compilers/imcc/imcc.y"4033 #line 1632 "compilers/imcc/imcc.y" 4033 4034 { (yyval.i) = NULL; } 4034 4035 break; 4035 4036 4036 4037 case 94: 4037 4038 4038 4039 /* Line 1464 of yacc.c */ 4039 #line 163 2"compilers/imcc/imcc.y"4040 #line 1633 "compilers/imcc/imcc.y" 4040 4041 { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); } 4041 4042 break; 4042 4043 4043 4044 case 95: 4044 4045 4045 4046 /* Line 1464 of yacc.c */ 4046 #line 163 6"compilers/imcc/imcc.y"4047 #line 1637 "compilers/imcc/imcc.y" 4047 4048 { (yyval.t) = 0; } 4048 4049 break; 4049 4050 4050 4051 case 97: 4051 4052 4052 4053 /* Line 1464 of yacc.c */ 4053 #line 164 1"compilers/imcc/imcc.y"4054 #line 1642 "compilers/imcc/imcc.y" 4054 4055 { (yyval.t) = (yyvsp[(1) - (1)].t); } 4055 4056 break; 4056 4057 4057 4058 case 98: 4058 4059 4059 4060 /* Line 1464 of yacc.c */ 4060 #line 164 2"compilers/imcc/imcc.y"4061 #line 1643 "compilers/imcc/imcc.y" 4061 4062 { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); } 4062 4063 break; 4063 4064 4064 4065 case 99: 4065 4066 4066 4067 /* Line 1464 of yacc.c */ 4067 #line 164 6"compilers/imcc/imcc.y"4068 #line 1647 "compilers/imcc/imcc.y" 4068 4069 { (yyval.t) = P_LOAD; } 4069 4070 break; 4070 4071 4071 4072 case 100: 4072 4073 4073 4074 /* Line 1464 of yacc.c */ 4074 #line 164 7"compilers/imcc/imcc.y"4075 #line 1648 "compilers/imcc/imcc.y" 4075 4076 { (yyval.t) = P_INIT; } 4076 4077 break; 4077 4078 4078 4079 case 101: 4079 4080 4080 4081 /* Line 1464 of yacc.c */ 4081 #line 164 8"compilers/imcc/imcc.y"4082 #line 1649 "compilers/imcc/imcc.y" 4082 4083 { (yyval.t) = P_MAIN; } 4083 4084 break; 4084 4085 4085 4086 case 102: 4086 4087 4087 4088 /* Line 1464 of yacc.c */ 4088 #line 16 49"compilers/imcc/imcc.y"4089 #line 1650 "compilers/imcc/imcc.y" 4089 4090 { (yyval.t) = P_IMMEDIATE; } 4090 4091 break; 4091 4092 4092 4093 case 103: 4093 4094 4094 4095 /* Line 1464 of yacc.c */ 4095 #line 165 0"compilers/imcc/imcc.y"4096 #line 1651 "compilers/imcc/imcc.y" 4096 4097 { (yyval.t) = P_POSTCOMP; } 4097 4098 break; 4098 4099 4099 4100 case 104: 4100 4101 4101 4102 /* Line 1464 of yacc.c */ 4102 #line 165 1"compilers/imcc/imcc.y"4103 #line 1652 "compilers/imcc/imcc.y" 4103 4104 { (yyval.t) = P_ANON; } 4104 4105 break; 4105 4106 4106 4107 case 105: 4107 4108 4108 4109 /* Line 1464 of yacc.c */ 4109 #line 165 2"compilers/imcc/imcc.y"4110 #line 1653 "compilers/imcc/imcc.y" 4110 4111 { (yyval.t) = P_NEED_LEX; } 4111 4112 break; 4112 4113 4113 4114 case 113: 4114 4115 4115 4116 /* Line 1464 of yacc.c */ 4116 #line 166 4"compilers/imcc/imcc.y"4117 #line 1665 "compilers/imcc/imcc.y" 4117 4118 { 4118 4119 add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr)); 4119 4120 add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr)); … … 4123 4124 case 114: 4124 4125 4125 4126 /* Line 1464 of yacc.c */ 4126 #line 16 69"compilers/imcc/imcc.y"4127 #line 1670 "compilers/imcc/imcc.y" 4127 4128 { 4128 4129 add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); 4129 4130 } … … 4132 4133 case 115: 4133 4134 4134 4135 /* Line 1464 of yacc.c */ 4135 #line 167 3"compilers/imcc/imcc.y"4136 #line 1674 "compilers/imcc/imcc.y" 4136 4137 { 4137 4138 add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); 4138 4139 } … … 4141 4142 case 116: 4142 4143 4143 4144 /* Line 1464 of yacc.c */ 4144 #line 167 7"compilers/imcc/imcc.y"4145 #line 1678 "compilers/imcc/imcc.y" 4145 4146 { 4146 4147 add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); 4147 4148 } … … 4150 4151 case 117: 4151 4152 4152 4153 /* Line 1464 of yacc.c */ 4153 #line 168 1"compilers/imcc/imcc.y"4154 #line 1682 "compilers/imcc/imcc.y" 4154 4155 { 4155 4156 add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (3)].s), 'S')); 4156 4157 } … … 4159 4160 case 118: 4160 4161 4161 4162 /* Line 1464 of yacc.c */ 4162 #line 168 5"compilers/imcc/imcc.y"4163 #line 1686 "compilers/imcc/imcc.y" 4163 4164 { 4164 4165 add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr)); 4165 4166 add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr)); … … 4169 4170 case 119: 4170 4171 4171 4172 /* Line 1464 of yacc.c */ 4172 #line 169 0"compilers/imcc/imcc.y"4173 #line 1691 "compilers/imcc/imcc.y" 4173 4174 { 4174 4175 add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (5)].s), 'S')); 4175 4176 add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr)); … … 4179 4180 case 120: 4180 4181 4181 4182 /* Line 1464 of yacc.c */ 4182 #line 169 8"compilers/imcc/imcc.y"4183 #line 1699 "compilers/imcc/imcc.y" 4183 4184 { (yyval.sr) = 0; } 4184 4185 break; 4185 4186 4186 4187 case 121: 4187 4188 4188 4189 /* Line 1464 of yacc.c */ 4189 #line 1 699"compilers/imcc/imcc.y"4190 #line 1700 "compilers/imcc/imcc.y" 4190 4191 { 4191 4192 if (IMCC_INFO(interp)->adv_named_id) { 4192 4193 add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call, … … 4201 4202 case 122: 4202 4203 4203 4204 /* Line 1464 of yacc.c */ 4204 #line 171 1"compilers/imcc/imcc.y"4205 #line 1712 "compilers/imcc/imcc.y" 4205 4206 { (yyval.sr) = (yyvsp[(2) - (2)].sr); } 4206 4207 break; 4207 4208 4208 4209 case 123: 4209 4210 4210 4211 /* Line 1464 of yacc.c */ 4211 #line 171 6"compilers/imcc/imcc.y"4212 #line 1717 "compilers/imcc/imcc.y" 4212 4213 { (yyval.sr) = 0; } 4213 4214 break; 4214 4215 4215 4216 case 124: 4216 4217 4217 4218 /* Line 1464 of yacc.c */ 4218 #line 171 8"compilers/imcc/imcc.y"4219 #line 1719 "compilers/imcc/imcc.y" 4219 4220 { 4220 4221 if ((yyvsp[(2) - (3)].sr)) 4221 4222 add_pcc_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); … … 4225 4226 case 125: 4226 4227 4227 4228 /* Line 1464 of yacc.c */ 4228 #line 172 5"compilers/imcc/imcc.y"4229 #line 1726 "compilers/imcc/imcc.y" 4229 4230 { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); } 4230 4231 break; 4231 4232 4232 4233 case 126: 4233 4234 4234 4235 /* Line 1464 of yacc.c */ 4235 #line 172 6"compilers/imcc/imcc.y"4236 #line 1727 "compilers/imcc/imcc.y" 4236 4237 { IMCC_INFO(interp)->is_def = 1; } 4237 4238 break; 4238 4239 4239 4240 case 127: 4240 4241 4241 4242 /* Line 1464 of yacc.c */ 4242 #line 172 7"compilers/imcc/imcc.y"4243 #line 1728 "compilers/imcc/imcc.y" 4243 4244 { 4244 4245 IdList * const l = (yyvsp[(4) - (4)].idlist); 4245 4246 SymReg *ignored; … … 4253 4254 case 128: 4254 4255 4255 4256 /* Line 1464 of yacc.c */ 4256 #line 173 8"compilers/imcc/imcc.y"4257 #line 1739 "compilers/imcc/imcc.y" 4257 4258 { (yyval.t) = 0; } 4258 4259 break; 4259 4260 4260 4261 case 129: 4261 4262 4262 4263 /* Line 1464 of yacc.c */ 4263 #line 17 39"compilers/imcc/imcc.y"4264 #line 1740 "compilers/imcc/imcc.y" 4264 4265 { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); } 4265 4266 break; 4266 4267 4267 4268 case 130: 4268 4269 4269 4270 /* Line 1464 of yacc.c */ 4270 #line 174 3"compilers/imcc/imcc.y"4271 #line 1744 "compilers/imcc/imcc.y" 4271 4272 { (yyval.t) = VT_FLAT; } 4272 4273 break; 4273 4274 4274 4275 case 131: 4275 4276 4276 4277 /* Line 1464 of yacc.c */ 4277 #line 174 4"compilers/imcc/imcc.y"4278 #line 1745 "compilers/imcc/imcc.y" 4278 4279 { (yyval.t) = VT_OPTIONAL; } 4279 4280 break; 4280 4281 4281 4282 case 132: 4282 4283 4283 4284 /* Line 1464 of yacc.c */ 4284 #line 174 5"compilers/imcc/imcc.y"4285 #line 1746 "compilers/imcc/imcc.y" 4285 4286 { (yyval.t) = VT_OPT_FLAG; } 4286 4287 break; 4287 4288 4288 4289 case 133: 4289 4290 4290 4291 /* Line 1464 of yacc.c */ 4291 #line 174 6"compilers/imcc/imcc.y"4292 #line 1747 "compilers/imcc/imcc.y" 4292 4293 { (yyval.t) = VT_NAMED; } 4293 4294 break; 4294 4295 4295 4296 case 134: 4296 4297 4297 4298 /* Line 1464 of yacc.c */ 4298 #line 174 7"compilers/imcc/imcc.y"4299 #line 1748 "compilers/imcc/imcc.y" 4299 4300 { adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = VT_NAMED; mem_sys_free((yyvsp[(3) - (4)].s)); } 4300 4301 break; 4301 4302 4302 4303 case 135: 4303 4304 4304 4305 /* Line 1464 of yacc.c */ 4305 #line 174 8"compilers/imcc/imcc.y"4306 #line 1749 "compilers/imcc/imcc.y" 4306 4307 { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = VT_NAMED; mem_sys_free((yyvsp[(3) - (4)].s)); } 4307 4308 break; 4308 4309 4309 4310 case 136: 4310 4311 4311 4312 /* Line 1464 of yacc.c */ 4312 #line 17 49"compilers/imcc/imcc.y"4313 #line 1750 "compilers/imcc/imcc.y" 4313 4314 { (yyval.t) = 0; } 4314 4315 break; 4315 4316 4316 4317 case 137: 4317 4318 4318 4319 /* Line 1464 of yacc.c */ 4319 #line 175 0"compilers/imcc/imcc.y"4320 #line 1751 "compilers/imcc/imcc.y" 4320 4321 { (yyval.t) = VT_CALL_SIG; } 4321 4322 break; 4322 4323 4323 4324 case 138: 4324 4325 4325 4326 /* Line 1464 of yacc.c */ 4326 #line 175 5"compilers/imcc/imcc.y"4327 #line 1756 "compilers/imcc/imcc.y" 4327 4328 { begin_return_or_yield(interp, 0); } 4328 4329 break; 4329 4330 4330 4331 case 139: 4331 4332 4332 4333 /* Line 1464 of yacc.c */ 4333 #line 175 7"compilers/imcc/imcc.y"4334 #line 1758 "compilers/imcc/imcc.y" 4334 4335 { (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; } 4335 4336 break; 4336 4337 4337 4338 case 140: 4338 4339 4339 4340 /* Line 1464 of yacc.c */ 4340 #line 17 59"compilers/imcc/imcc.y"4341 #line 1760 "compilers/imcc/imcc.y" 4341 4342 { 4342 4343 IMCC_INFO(interp)->asm_state = AsmDefault; 4343 4344 (yyval.i) = 0; … … 4347 4348 case 141: 4348 4349 4349 4350 /* Line 1464 of yacc.c */ 4350 #line 176 6"compilers/imcc/imcc.y"4351 #line 1767 "compilers/imcc/imcc.y" 4351 4352 { begin_return_or_yield(interp, 1); } 4352 4353 break; 4353 4354 4354 4355 case 142: 4355 4356 4356 4357 /* Line 1464 of yacc.c */ 4357 #line 176 8"compilers/imcc/imcc.y"4358 #line 1769 "compilers/imcc/imcc.y" 4358 4359 { (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; } 4359 4360 break; 4360 4361 4361 4362 case 143: 4362 4363 4363 4364 /* Line 1464 of yacc.c */ 4364 #line 177 2"compilers/imcc/imcc.y"4365 #line 1773 "compilers/imcc/imcc.y" 4365 4366 { (yyval.sr) = 0; } 4366 4367 break; 4367 4368 4368 4369 case 144: 4369 4370 4370 4371 /* Line 1464 of yacc.c */ 4371 #line 177 4"compilers/imcc/imcc.y"4372 #line 1775 "compilers/imcc/imcc.y" 4372 4373 { 4373 4374 if ((yyvsp[(1) - (2)].sr)) 4374 4375 add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr)); … … 4378 4379 case 145: 4379 4380 4380 4381 /* Line 1464 of yacc.c */ 4381 #line 17 79"compilers/imcc/imcc.y"4382 #line 1780 "compilers/imcc/imcc.y" 4382 4383 { 4383 4384 if ((yyvsp[(2) - (3)].sr)) 4384 4385 add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr)); … … 4388 4389 case 146: 4389 4390 4390 4391 /* Line 1464 of yacc.c */ 4391 #line 178 6"compilers/imcc/imcc.y"4392 #line 1787 "compilers/imcc/imcc.y" 4392 4393 { (yyval.sr) = 0; } 4393 4394 break; 4394 4395 4395 4396 case 147: 4396 4397 4397 4398 /* Line 1464 of yacc.c */ 4398 #line 178 8"compilers/imcc/imcc.y"4399 #line 1789 "compilers/imcc/imcc.y" 4399 4400 { 4400 4401 if ((yyvsp[(1) - (2)].sr)) 4401 4402 add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr)); … … 4405 4406 case 148: 4406 4407 4407 4408 /* Line 1464 of yacc.c */ 4408 #line 179 3"compilers/imcc/imcc.y"4409 #line 1794 "compilers/imcc/imcc.y" 4409 4410 { 4410 4411 if ((yyvsp[(2) - (3)].sr)) 4411 4412 add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr)); … … 4415 4416 case 149: 4416 4417 4417 4418 /* Line 1464 of yacc.c */ 4418 #line 180 0"compilers/imcc/imcc.y"4419 #line 1801 "compilers/imcc/imcc.y" 4419 4420 { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); } 4420 4421 break; 4421 4422 4422 4423 case 150: 4423 4424 4424 4425 /* Line 1464 of yacc.c */ 4425 #line 180 4"compilers/imcc/imcc.y"4426 #line 1805 "compilers/imcc/imcc.y" 4426 4427 { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); } 4427 4428 break; 4428 4429 4429 4430 case 151: 4430 4431 4431 4432 /* Line 1464 of yacc.c */ 4432 #line 18 09"compilers/imcc/imcc.y"4433 #line 1810 "compilers/imcc/imcc.y" 4433 4434 { 4434 4435 if (IMCC_INFO(interp)->asm_state == AsmDefault) 4435 4436 begin_return_or_yield(interp, (yyvsp[(1) - (2)].t)); … … 4439 4440 case 152: 4440 4441 4441 4442 /* Line 1464 of yacc.c */ 4442 #line 181 4"compilers/imcc/imcc.y"4443 #line 1815 "compilers/imcc/imcc.y" 4443 4444 { 4444 4445 IMCC_INFO(interp)->asm_state = AsmDefault; 4445 4446 (yyval.t) = 0; … … 4449 4450 case 153: 4450 4451 4451 4452 /* Line 1464 of yacc.c */ 4452 #line 182 1"compilers/imcc/imcc.y"4453 #line 1822 "compilers/imcc/imcc.y" 4453 4454 { (yyval.t) = 0; } 4454 4455 break; 4455 4456 4456 4457 case 154: 4457 4458 4458 4459 /* Line 1464 of yacc.c */ 4459 #line 182 2"compilers/imcc/imcc.y"4460 #line 1823 "compilers/imcc/imcc.y" 4460 4461 { (yyval.t) = 1; } 4461 4462 break; 4462 4463 4463 4464 case 155: 4464 4465 4465 4466 /* Line 1464 of yacc.c */ 4466 #line 182 6"compilers/imcc/imcc.y"4467 #line 1827 "compilers/imcc/imcc.y" 4467 4468 { (yyval.i) = 0; } 4468 4469 break; 4469 4470 4470 4471 case 156: 4471 4472 4472 4473 /* Line 1464 of yacc.c */ 4473 #line 182 8"compilers/imcc/imcc.y"4474 #line 1829 "compilers/imcc/imcc.y" 4474 4475 { 4475 4476 if (IMCC_INFO(interp)->adv_named_id) { 4476 4477 add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, … … 4485 4486 case 157: 4486 4487 4487 4488 /* Line 1464 of yacc.c */ 4488 #line 183 8"compilers/imcc/imcc.y"4489 #line 1839 "compilers/imcc/imcc.y" 4489 4490 { 4490 4491 SymReg * const name = mk_const(interp, (yyvsp[(1) - (3)].s), 'S'); 4491 4492 add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(3) - (3)].sr)); … … 4495 4496 case 158: 4496 4497 4497 4498 /* Line 1464 of yacc.c */ 4498 #line 184 3"compilers/imcc/imcc.y"4499 #line 1844 "compilers/imcc/imcc.y" 4499 4500 { 4500 4501 if (IMCC_INFO(interp)->adv_named_id) { 4501 4502 add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, … … 4510 4511 case 159: 4511 4512 4512 4513 /* Line 1464 of yacc.c */ 4513 #line 185 3"compilers/imcc/imcc.y"4514 #line 1854 "compilers/imcc/imcc.y" 4514 4515 { 4515 4516 SymReg * const name = mk_const(interp, (yyvsp[(3) - (5)].s), 'S'); 4516 4517 add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(5) - (5)].sr)); … … 4520 4521 case 162: 4521 4522 4522 4523 /* Line 1464 of yacc.c */ 4523 #line 187 4"compilers/imcc/imcc.y"4524 #line 1875 "compilers/imcc/imcc.y" 4524 4525 { clear_state(interp); } 4525 4526 break; 4526 4527 4527 4528 case 163: 4528 4529 4529 4530 /* Line 1464 of yacc.c */ 4530 #line 18 79"compilers/imcc/imcc.y"4531 #line 1880 "compilers/imcc/imcc.y" 4531 4532 { (yyval.i) = (yyvsp[(2) - (2)].i); } 4532 4533 break; 4533 4534 4534 4535 case 164: 4535 4536 4536 4537 /* Line 1464 of yacc.c */ 4537 #line 188 0"compilers/imcc/imcc.y"4538 #line 1881 "compilers/imcc/imcc.y" 4538 4539 { (yyval.i) = 0; } 4539 4540 break; 4540 4541 4541 4542 case 165: 4542 4543 4543 4544 /* Line 1464 of yacc.c */ 4544 #line 188 1"compilers/imcc/imcc.y"4545 #line 1882 "compilers/imcc/imcc.y" 4545 4546 { (yyval.i) = 0; } 4546 4547 break; 4547 4548 4548 4549 case 166: 4549 4550 4550 4551 /* Line 1464 of yacc.c */ 4551 #line 188 2"compilers/imcc/imcc.y"4552 #line 1883 "compilers/imcc/imcc.y" 4552 4553 { (yyval.i) = 0; } 4553 4554 break; 4554 4555 4555 4556 case 167: 4556 4557 4557 4558 /* Line 1464 of yacc.c */ 4558 #line 188 3"compilers/imcc/imcc.y"4559 #line 1884 "compilers/imcc/imcc.y" 4559 4560 { (yyval.i) = 0; } 4560 4561 break; 4561 4562 4562 4563 case 168: 4563 4564 4564 4565 /* Line 1464 of yacc.c */ 4565 #line 188 4"compilers/imcc/imcc.y"4566 #line 1885 "compilers/imcc/imcc.y" 4566 4567 { (yyval.i) = (yyvsp[(1) - (1)].i); } 4567 4568 break; 4568 4569 4569 4570 case 169: 4570 4571 4571 4572 /* Line 1464 of yacc.c */ 4572 #line 188 8"compilers/imcc/imcc.y"4573 #line 1889 "compilers/imcc/imcc.y" 4573 4574 { (yyval.i) = NULL; } 4574 4575 break; 4575 4576 4576 4577 case 173: 4577 4578 4578 4579 /* Line 1464 of yacc.c */ 4579 #line 1 899"compilers/imcc/imcc.y"4580 #line 1900 "compilers/imcc/imcc.y" 4580 4581 { 4581 4582 Instruction * const i = iLABEL(interp, IMCC_INFO(interp)->cur_unit, mk_local_label(interp, (yyvsp[(1) - (1)].s))); 4582 4583 mem_sys_free((yyvsp[(1) - (1)].s)); … … 4587 4588 case 174: 4588 4589 4589 4590 /* Line 1464 of yacc.c */ 4590 #line 19 09"compilers/imcc/imcc.y"4591 #line 1910 "compilers/imcc/imcc.y" 4591 4592 { (yyval.i) = (yyvsp[(2) - (3)].i); } 4592 4593 break; 4593 4594 4594 4595 case 175: 4595 4596 4596 4597 /* Line 1464 of yacc.c */ 4597 #line 191 1"compilers/imcc/imcc.y"4598 #line 1912 "compilers/imcc/imcc.y" 4598 4599 { 4599 4600 if (yynerrs >= PARROT_MAX_RECOVER_ERRORS) { 4600 4601 IMCC_warning(interp, "Too many errors. Correct some first.\n"); … … 4607 4608 case 176: 4608 4609 4609 4610 /* Line 1464 of yacc.c */ 4610 #line 192 2"compilers/imcc/imcc.y"4611 #line 1923 "compilers/imcc/imcc.y" 4611 4612 { 4612 4613 IdList* const l = (yyvsp[(1) - (1)].idlist); 4613 4614 l->next = NULL; … … 4618 4619 case 177: 4619 4620 4620 4621 /* Line 1464 of yacc.c */ 4621 #line 19 29"compilers/imcc/imcc.y"4622 #line 1930 "compilers/imcc/imcc.y" 4622 4623 { 4623 4624 IdList* const l = (yyvsp[(3) - (3)].idlist); 4624 4625 l->next = (yyvsp[(1) - (3)].idlist); … … 4629 4630 case 178: 4630 4631 4631 4632 /* Line 1464 of yacc.c */ 4632 #line 193 8"compilers/imcc/imcc.y"4633 #line 1939 "compilers/imcc/imcc.y" 4633 4634 { 4634 4635 IdList* const l = mem_gc_allocate_n_zeroed_typed(interp, 1, IdList); 4635 4636 l->id = (yyvsp[(1) - (2)].s); … … 4640 4641 case 183: 4641 4642 4642 4643 /* Line 1464 of yacc.c */ 4643 #line 195 4"compilers/imcc/imcc.y"4644 #line 1955 "compilers/imcc/imcc.y" 4644 4645 { IMCC_INFO(interp)->is_def = 1; } 4645 4646 break; 4646 4647 4647 4648 case 184: 4648 4649 4649 4650 /* Line 1464 of yacc.c */ 4650 #line 195 5"compilers/imcc/imcc.y"4651 #line 1956 "compilers/imcc/imcc.y" 4651 4652 { 4652 4653 IdList *l = (yyvsp[(4) - (4)].idlist); 4653 4654 while (l) { … … 4665 4666 case 185: 4666 4667 4667 4668 /* Line 1464 of yacc.c */ 4668 #line 196 8"compilers/imcc/imcc.y"4669 #line 1969 "compilers/imcc/imcc.y" 4669 4670 { 4670 4671 if ((yyvsp[(4) - (4)].sr)->set != 'P') { 4671 4672 mem_sys_free((yyvsp[(2) - (4)].s)); … … 4687 4688 case 186: 4688 4689 4689 4690 /* Line 1464 of yacc.c */ 4690 #line 198 5"compilers/imcc/imcc.y"4691 #line 1986 "compilers/imcc/imcc.y" 4691 4692 { 4692 4693 if ((yyvsp[(4) - (4)].sr)->set != 'P') { 4693 4694 mem_sys_free((yyvsp[(2) - (4)].s)); … … 4705 4706 case 187: 4706 4707 4707 4708 /* Line 1464 of yacc.c */ 4708 #line 199 7"compilers/imcc/imcc.y"4709 #line 1998 "compilers/imcc/imcc.y" 4709 4710 { IMCC_INFO(interp)->is_def = 1; } 4710 4711 break; 4711 4712 4712 4713 case 188: 4713 4714 4714 4715 /* Line 1464 of yacc.c */ 4715 #line 199 8"compilers/imcc/imcc.y"4716 #line 1999 "compilers/imcc/imcc.y" 4716 4717 { 4717 4718 mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 0); 4718 4719 IMCC_INFO(interp)->is_def = 0; … … 4723 4724 case 190: 4724 4725 4725 4726 /* Line 1464 of yacc.c */ 4726 #line 200 5"compilers/imcc/imcc.y"4727 #line 2006 "compilers/imcc/imcc.y" 4727 4728 { IMCC_INFO(interp)->is_def = 1; } 4728 4729 break; 4729 4730 4730 4731 case 191: 4731 4732 4732 4733 /* Line 1464 of yacc.c */ 4733 #line 200 6"compilers/imcc/imcc.y"4734 #line 2007 "compilers/imcc/imcc.y" 4734 4735 { 4735 4736 mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1); 4736 4737 IMCC_INFO(interp)->is_def = 0; … … 4741 4742 case 192: 4742 4743 4743 4744 /* Line 1464 of yacc.c */ 4744 #line 201 2"compilers/imcc/imcc.y"4745 #line 2013 "compilers/imcc/imcc.y" 4745 4746 { 4746 4747 (yyval.i) = NULL; 4747 4748 IMCC_INFO(interp)->cur_call->pcc_sub->tailcall = 1; … … 4752 4753 case 193: 4753 4754 4754 4755 /* Line 1464 of yacc.c */ 4755 #line 201 8"compilers/imcc/imcc.y"4756 #line 2019 "compilers/imcc/imcc.y" 4756 4757 { 4757 4758 (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr)); 4758 4759 } … … 4761 4762 case 194: 4762 4763 4763 4764 /* Line 1464 of yacc.c */ 4764 #line 202 2"compilers/imcc/imcc.y"4765 #line 2023 "compilers/imcc/imcc.y" 4765 4766 { 4766 4767 (yyval.i) = INS(interp, 4767 4768 IMCC_INFO(interp)->cur_unit, … … 4778 4779 case 195: 4779 4780 4780 4781 /* Line 1464 of yacc.c */ 4781 #line 203 3"compilers/imcc/imcc.y"4782 #line 2034 "compilers/imcc/imcc.y" 4782 4783 { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); } 4783 4784 break; 4784 4785 4785 4786 case 196: 4786 4787 4787 4788 /* Line 1464 of yacc.c */ 4788 #line 203 4"compilers/imcc/imcc.y"4789 #line 2035 "compilers/imcc/imcc.y" 4789 4790 { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; } 4790 4791 break; 4791 4792 4792 4793 case 197: 4793 4794 4794 4795 /* Line 1464 of yacc.c */ 4795 #line 203 5"compilers/imcc/imcc.y"4796 #line 2036 "compilers/imcc/imcc.y" 4796 4797 { (yyval.i) = 0; } 4797 4798 break; 4798 4799 4799 4800 case 200: 4800 4801 4801 4802 /* Line 1464 of yacc.c */ 4802 #line 203 8"compilers/imcc/imcc.y"4803 #line 2039 "compilers/imcc/imcc.y" 4803 4804 { (yyval.i) = 0;} 4804 4805 break; 4805 4806 4806 4807 case 201: 4807 4808 4808 4809 /* Line 1464 of yacc.c */ 4809 #line 204 2"compilers/imcc/imcc.y"4810 #line 2043 "compilers/imcc/imcc.y" 4810 4811 { (yyval.t) = 'I'; } 4811 4812 break; 4812 4813 4813 4814 case 202: 4814 4815 4815 4816 /* Line 1464 of yacc.c */ 4816 #line 204 3"compilers/imcc/imcc.y"4817 #line 2044 "compilers/imcc/imcc.y" 4817 4818 { (yyval.t) = 'N'; } 4818 4819 break; 4819 4820 4820 4821 case 203: 4821 4822 4822 4823 /* Line 1464 of yacc.c */ 4823 #line 204 4"compilers/imcc/imcc.y"4824 #line 2045 "compilers/imcc/imcc.y" 4824 4825 { (yyval.t) = 'S'; } 4825 4826 break; 4826 4827 4827 4828 case 204: 4828 4829 4829 4830 /* Line 1464 of yacc.c */ 4830 #line 204 5"compilers/imcc/imcc.y"4831 #line 2046 "compilers/imcc/imcc.y" 4831 4832 { (yyval.t) = 'P'; } 4832 4833 break; 4833 4834 4834 4835 case 205: 4835 4836 4836 4837 /* Line 1464 of yacc.c */ 4837 #line 205 0"compilers/imcc/imcc.y"4838 #line 2051 "compilers/imcc/imcc.y" 4838 4839 { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "set", 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); } 4839 4840 break; 4840 4841 4841 4842 case 206: 4842 4843 4843 4844 /* Line 1464 of yacc.c */ 4844 #line 205 2"compilers/imcc/imcc.y"4845 #line 2053 "compilers/imcc/imcc.y" 4845 4846 { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (4)].s), 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr)); } 4846 4847 break; 4847 4848 4848 4849 case 207: 4849 4850 4850 4851 /* Line 1464 of yacc.c */ 4851 #line 205 4"compilers/imcc/imcc.y"4852 #line 2055 "compilers/imcc/imcc.y" 4852 4853 { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(4) - (5)].s), 3, (yyvsp[(1) - (5)].sr), (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr)); } 4853 4854 break; 4854 4855 4855 4856 case 208: 4856 4857 4857 4858 /* Line 1464 of yacc.c */ 4858 #line 205 6"compilers/imcc/imcc.y"4859 #line 2057 "compilers/imcc/imcc.y" 4859 4860 { (yyval.i) = iINDEXFETCH(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(5) - (6)].sr)); } 4860 4861 break; 4861 4862 4862 4863 case 209: 4863 4864 4864 4865 /* Line 1464 of yacc.c */ 4865 #line 205 8"compilers/imcc/imcc.y"4866 #line 2059 "compilers/imcc/imcc.y" 4866 4867 { (yyval.i) = iINDEXSET(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(6) - (6)].sr)); } 4867 4868 break; 4868 4869 4869 4870 case 210: 4870 4871 4871 4872 /* Line 1464 of yacc.c */ 4872 #line 206 1"compilers/imcc/imcc.y"4873 #line 2062 "compilers/imcc/imcc.y" 4873 4874 { 4874 4875 add_pcc_result(interp, (yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr)); 4875 4876 IMCC_INFO(interp)->cur_call = NULL; … … 4880 4881 case 211: 4881 4882 4882 4883 /* Line 1464 of yacc.c */ 4883 #line 206 7"compilers/imcc/imcc.y"4884 #line 2068 "compilers/imcc/imcc.y" 4884 4885 { 4885 4886 (yyval.i) = IMCC_create_itcall_label(interp); 4886 4887 } … … 4889 4890 case 212: 4890 4891 4891 4892 /* Line 1464 of yacc.c */ 4892 #line 207 1"compilers/imcc/imcc.y"4893 #line 2072 "compilers/imcc/imcc.y" 4893 4894 { 4894 4895 IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr)); 4895 4896 IMCC_INFO(interp)->cur_call = NULL; … … 4899 4900 case 216: 4900 4901 4901 4902 /* Line 1464 of yacc.c */ 4902 #line 20 79"compilers/imcc/imcc.y"4903 #line 2080 "compilers/imcc/imcc.y" 4903 4904 { 4904 4905 (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr)); 4905 4906 } … … 4908 4909 case 217: 4909 4910 4910 4911 /* Line 1464 of yacc.c */ 4911 #line 208 6"compilers/imcc/imcc.y"4912 #line 2087 "compilers/imcc/imcc.y" 4912 4913 { (yyval.s) = (char *)"not"; } 4913 4914 break; 4914 4915 4915 4916 case 218: 4916 4917 4917 4918 /* Line 1464 of yacc.c */ 4918 #line 208 7"compilers/imcc/imcc.y"4919 #line 2088 "compilers/imcc/imcc.y" 4919 4920 { (yyval.s) = (char *)"bnot"; } 4920 4921 break; 4921 4922 4922 4923 case 219: 4923 4924 4924 4925 /* Line 1464 of yacc.c */ 4925 #line 208 8"compilers/imcc/imcc.y"4926 #line 2089 "compilers/imcc/imcc.y" 4926 4927 { (yyval.s) = (char *)"neg"; } 4927 4928 break; 4928 4929 4929 4930 case 220: 4930 4931 4931 4932 /* Line 1464 of yacc.c */ 4932 #line 209 2"compilers/imcc/imcc.y"4933 #line 2093 "compilers/imcc/imcc.y" 4933 4934 { (yyval.s) = (char *)"sub"; } 4934 4935 break; 4935 4936 4936 4937 case 221: 4937 4938 4938 4939 /* Line 1464 of yacc.c */ 4939 #line 209 3"compilers/imcc/imcc.y"4940 #line 2094 "compilers/imcc/imcc.y" 4940 4941 { (yyval.s) = (char *)"add"; } 4941 4942 break; 4942 4943 4943 4944 case 222: 4944 4945 4945 4946 /* Line 1464 of yacc.c */ 4946 #line 209 4"compilers/imcc/imcc.y"4947 #line 2095 "compilers/imcc/imcc.y" 4947 4948 { (yyval.s) = (char *)"mul"; } 4948 4949 break; 4949 4950 4950 4951 case 223: 4951 4952 4952 4953 /* Line 1464 of yacc.c */ 4953 #line 209 5"compilers/imcc/imcc.y"4954 #line 2096 "compilers/imcc/imcc.y" 4954 4955 { (yyval.s) = (char *)"div"; } 4955 4956 break; 4956 4957 4957 4958 case 224: 4958 4959 4959 4960 /* Line 1464 of yacc.c */ 4960 #line 209 6"compilers/imcc/imcc.y"4961 #line 2097 "compilers/imcc/imcc.y" 4961 4962 { (yyval.s) = (char *)"mod"; } 4962 4963 break; 4963 4964 4964 4965 case 225: 4965 4966 4966 4967 /* Line 1464 of yacc.c */ 4967 #line 209 7"compilers/imcc/imcc.y"4968 #line 2098 "compilers/imcc/imcc.y" 4968 4969 { (yyval.s) = (char *)"fdiv"; } 4969 4970 break; 4970 4971 4971 4972 case 226: 4972 4973 4973 4974 /* Line 1464 of yacc.c */ 4974 #line 209 8"compilers/imcc/imcc.y"4975 #line 2099 "compilers/imcc/imcc.y" 4975 4976 { (yyval.s) = (char *)"pow"; } 4976 4977 break; 4977 4978 4978 4979 case 227: 4979 4980 4980 4981 /* Line 1464 of yacc.c */ 4981 #line 2 099"compilers/imcc/imcc.y"4982 #line 2100 "compilers/imcc/imcc.y" 4982 4983 { (yyval.s) = (char *)"concat"; } 4983 4984 break; 4984 4985 4985 4986 case 228: 4986 4987 4987 4988 /* Line 1464 of yacc.c */ 4988 #line 210 0"compilers/imcc/imcc.y"4989 #line 2101 "compilers/imcc/imcc.y" 4989 4990 { (yyval.s) = (char *)"iseq"; } 4990 4991 break; 4991 4992 4992 4993 case 229: 4993 4994 4994 4995 /* Line 1464 of yacc.c */ 4995 #line 210 1"compilers/imcc/imcc.y"4996 #line 2102 "compilers/imcc/imcc.y" 4996 4997 { (yyval.s) = (char *)"isne"; } 4997 4998 break; 4998 4999 4999 5000 case 230: 5000 5001 5001 5002 /* Line 1464 of yacc.c */ 5002 #line 210 2"compilers/imcc/imcc.y"5003 #line 2103 "compilers/imcc/imcc.y" 5003 5004 { (yyval.s) = (char *)"isgt"; } 5004 5005 break; 5005 5006 5006 5007 case 231: 5007 5008 5008 5009 /* Line 1464 of yacc.c */ 5009 #line 210 3"compilers/imcc/imcc.y"5010 #line 2104 "compilers/imcc/imcc.y" 5010 5011 { (yyval.s) = (char *)"isge"; } 5011 5012 break; 5012 5013 5013 5014 case 232: 5014 5015 5015 5016 /* Line 1464 of yacc.c */ 5016 #line 210 4"compilers/imcc/imcc.y"5017 #line 2105 "compilers/imcc/imcc.y" 5017 5018 { (yyval.s) = (char *)"islt"; } 5018 5019 break; 5019 5020 5020 5021 case 233: 5021 5022 5022 5023 /* Line 1464 of yacc.c */ 5023 #line 210 5"compilers/imcc/imcc.y"5024 #line 2106 "compilers/imcc/imcc.y" 5024 5025 { (yyval.s) = (char *)"isle"; } 5025 5026 break; 5026 5027 5027 5028 case 234: 5028 5029 5029 5030 /* Line 1464 of yacc.c */ 5030 #line 210 6"compilers/imcc/imcc.y"5031 #line 2107 "compilers/imcc/imcc.y" 5031 5032 { (yyval.s) = (char *)"shl"; } 5032 5033 break; 5033 5034 5034 5035 case 235: 5035 5036 5036 5037 /* Line 1464 of yacc.c */ 5037 #line 210 7"compilers/imcc/imcc.y"5038 #line 2108 "compilers/imcc/imcc.y" 5038 5039 { (yyval.s) = (char *)"shr"; } 5039 5040 break; 5040 5041 5041 5042 case 236: 5042 5043 5043 5044 /* Line 1464 of yacc.c */ 5044 #line 210 8"compilers/imcc/imcc.y"5045 #line 2109 "compilers/imcc/imcc.y" 5045 5046 { (yyval.s) = (char *)"lsr"; } 5046 5047 break; 5047 5048 5048 5049 case 237: 5049 5050 5050 5051 /* Line 1464 of yacc.c */ 5051 #line 21 09"compilers/imcc/imcc.y"5052 #line 2110 "compilers/imcc/imcc.y" 5052 5053 { (yyval.s) = (char *)"and"; } 5053 5054 break; 5054 5055 5055 5056 case 238: 5056 5057 5057 5058 /* Line 1464 of yacc.c */ 5058 #line 211 0"compilers/imcc/imcc.y"5059 #line 2111 "compilers/imcc/imcc.y" 5059 5060 { (yyval.s) = (char *)"or"; } 5060 5061 break; 5061 5062 5062 5063 case 239: 5063 5064 5064 5065 /* Line 1464 of yacc.c */ 5065 #line 211 1"compilers/imcc/imcc.y"5066 #line 2112 "compilers/imcc/imcc.y" 5066 5067 { (yyval.s) = (char *)"xor"; } 5067 5068 break; 5068 5069 5069 5070 case 240: 5070 5071 5071 5072 /* Line 1464 of yacc.c */ 5072 #line 211 2"compilers/imcc/imcc.y"5073 #line 2113 "compilers/imcc/imcc.y" 5073 5074 { (yyval.s) = (char *)"band"; } 5074 5075 break; 5075 5076 5076 5077 case 241: 5077 5078 5078 5079 /* Line 1464 of yacc.c */ 5079 #line 211 3"compilers/imcc/imcc.y"5080 #line 2114 "compilers/imcc/imcc.y" 5080 5081 { (yyval.s) = (char *)"bor"; } 5081 5082 break; 5082 5083 5083 5084 case 242: 5084 5085 5085 5086 /* Line 1464 of yacc.c */ 5086 #line 211 4"compilers/imcc/imcc.y"5087 #line 2115 "compilers/imcc/imcc.y" 5087 5088 { (yyval.s) = (char *)"bxor"; } 5088 5089 break; 5089 5090 5090 5091 case 243: 5091 5092 5092 5093 /* Line 1464 of yacc.c */ 5093 #line 212 0"compilers/imcc/imcc.y"5094 #line 2121 "compilers/imcc/imcc.y" 5094 5095 { 5095 5096 (yyval.i) = IMCC_create_itcall_label(interp); 5096 5097 (yyval.i)->type &= ~ITCALL; … … 5101 5102 case 244: 5102 5103 5103 5104 /* Line 1464 of yacc.c */ 5104 #line 212 5"compilers/imcc/imcc.y"5105 #line 2126 "compilers/imcc/imcc.y" 5105 5106 { (yyval.i) = 0; } 5106 5107 break; 5107 5108 5108 5109 case 245: 5109 5110 5110 5111 /* Line 1464 of yacc.c */ 5111 #line 213 2"compilers/imcc/imcc.y"5112 #line 2133 "compilers/imcc/imcc.y" 5112 5113 { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(2) - (3)].s), 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); } 5113 5114 break; 5114 5115 5115 5116 case 246: 5116 5117 5117 5118 /* Line 1464 of yacc.c */ 5118 #line 213 6"compilers/imcc/imcc.y"5119 #line 2137 "compilers/imcc/imcc.y" 5119 5120 { (yyval.s) = (char *)"add"; } 5120 5121 break; 5121 5122 5122 5123 case 247: 5123 5124 5124 5125 /* Line 1464 of yacc.c */ 5125 #line 213 7"compilers/imcc/imcc.y"5126 #line 2138 "compilers/imcc/imcc.y" 5126 5127 { (yyval.s) = (char *)"sub"; } 5127 5128 break; 5128 5129 5129 5130 case 248: 5130 5131 5131 5132 /* Line 1464 of yacc.c */ 5132 #line 213 8"compilers/imcc/imcc.y"5133 #line 2139 "compilers/imcc/imcc.y" 5133 5134 { (yyval.s) = (char *)"mul"; } 5134 5135 break; 5135 5136 5136 5137 case 249: 5137 5138 5138 5139 /* Line 1464 of yacc.c */ 5139 #line 21 39"compilers/imcc/imcc.y"5140 #line 2140 "compilers/imcc/imcc.y" 5140 5141 { (yyval.s) = (char *)"div"; } 5141 5142 break; 5142 5143 5143 5144 case 250: 5144 5145 5145 5146 /* Line 1464 of yacc.c */ 5146 #line 214 0"compilers/imcc/imcc.y"5147 #line 2141 "compilers/imcc/imcc.y" 5147 5148 { (yyval.s) = (char *)"mod"; } 5148 5149 break; 5149 5150 5150 5151 case 251: 5151 5152 5152 5153 /* Line 1464 of yacc.c */ 5153 #line 214 1"compilers/imcc/imcc.y"5154 #line 2142 "compilers/imcc/imcc.y" 5154 5155 { (yyval.s) = (char *)"fdiv"; } 5155 5156 break; 5156 5157 5157 5158 case 252: 5158 5159 5159 5160 /* Line 1464 of yacc.c */ 5160 #line 214 2"compilers/imcc/imcc.y"5161 #line 2143 "compilers/imcc/imcc.y" 5161 5162 { (yyval.s) = (char *)"concat"; } 5162 5163 break; 5163 5164 5164 5165 case 253: 5165 5166 5166 5167 /* Line 1464 of yacc.c */ 5167 #line 214 3"compilers/imcc/imcc.y"5168 #line 2144 "compilers/imcc/imcc.y" 5168 5169 { (yyval.s) = (char *)"band"; } 5169 5170 break; 5170 5171 5171 5172 case 254: 5172 5173 5173 5174 /* Line 1464 of yacc.c */ 5174 #line 214 4"compilers/imcc/imcc.y"5175 #line 2145 "compilers/imcc/imcc.y" 5175 5176 { (yyval.s) = (char *)"bor"; } 5176 5177 break; 5177 5178 5178 5179 case 255: 5179 5180 5180 5181 /* Line 1464 of yacc.c */ 5181 #line 214 5"compilers/imcc/imcc.y"5182 #line 2146 "compilers/imcc/imcc.y" 5182 5183 { (yyval.s) = (char *)"bxor"; } 5183 5184 break; 5184 5185 5185 5186 case 256: 5186 5187 5187 5188 /* Line 1464 of yacc.c */ 5188 #line 214 6"compilers/imcc/imcc.y"5189 #line 2147 "compilers/imcc/imcc.y" 5189 5190 { (yyval.s) = (char *)"shr"; } 5190 5191 break; 5191 5192 5192 5193 case 257: 5193 5194 5194 5195 /* Line 1464 of yacc.c */ 5195 #line 214 7"compilers/imcc/imcc.y"5196 #line 2148 "compilers/imcc/imcc.y" 5196 5197 { (yyval.s) = (char *)"shl"; } 5197 5198 break; 5198 5199 5199 5200 case 258: 5200 5201 5201 5202 /* Line 1464 of yacc.c */ 5202 #line 214 8"compilers/imcc/imcc.y"5203 #line 2149 "compilers/imcc/imcc.y" 5203 5204 { (yyval.s) = (char *)"lsr"; } 5204 5205 break; 5205 5206 5206 5207 case 259: 5207 5208 5208 5209 /* Line 1464 of yacc.c */ 5209 #line 215 4"compilers/imcc/imcc.y"5210 #line 2155 "compilers/imcc/imcc.y" 5210 5211 { 5211 5212 (yyval.i) = func_ins(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (4)].sr), (yyvsp[(3) - (4)].s), 5212 5213 IMCC_INFO(interp) -> regs, … … 5219 5220 case 260: 5220 5221 5221 5222 /* Line 1464 of yacc.c */ 5222 #line 216 4"compilers/imcc/imcc.y"5223 #line 2165 "compilers/imcc/imcc.y" 5223 5224 { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } 5224 5225 break; 5225 5226 5226 5227 case 261: 5227 5228 5228 5229 /* Line 1464 of yacc.c */ 5229 #line 216 5"compilers/imcc/imcc.y"5230 #line 2166 "compilers/imcc/imcc.y" 5230 5231 { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } 5231 5232 break; 5232 5233 5233 5234 case 262: 5234 5235 5235 5236 /* Line 1464 of yacc.c */ 5236 #line 216 6"compilers/imcc/imcc.y"5237 #line 2167 "compilers/imcc/imcc.y" 5237 5238 { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } 5238 5239 break; 5239 5240 5240 5241 case 263: 5241 5242 5242 5243 /* Line 1464 of yacc.c */ 5243 #line 216 8"compilers/imcc/imcc.y"5244 #line 2169 "compilers/imcc/imcc.y" 5244 5245 { 5245 5246 (yyval.sr) = (yyvsp[(1) - (1)].sr); 5246 5247 if ((yyvsp[(1) - (1)].sr)->set != 'P') … … 5251 5252 case 264: 5252 5253 5253 5254 /* Line 1464 of yacc.c */ 5254 #line 217 4"compilers/imcc/imcc.y"5255 #line 2175 "compilers/imcc/imcc.y" 5255 5256 { 5256 5257 /* disallow bareword method names; SREG name constants are fine */ 5257 5258 const char * const name = (yyvsp[(3) - (3)].sr)->name; … … 5270 5271 case 265: 5271 5272 5272 5273 /* Line 1464 of yacc.c */ 5273 #line 218 8"compilers/imcc/imcc.y"5274 #line 2189 "compilers/imcc/imcc.y" 5274 5275 { 5275 5276 IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); 5276 5277 (yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'U'); … … 5281 5282 case 266: 5282 5283 5283 5284 /* Line 1464 of yacc.c */ 5284 #line 219 4"compilers/imcc/imcc.y"5285 #line 2195 "compilers/imcc/imcc.y" 5285 5286 { 5286 5287 IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); 5287 5288 (yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'S'); … … 5292 5293 case 267: 5293 5294 5294 5295 /* Line 1464 of yacc.c */ 5295 #line 2 199"compilers/imcc/imcc.y"5296 #line 2200 "compilers/imcc/imcc.y" 5296 5297 { IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); } 5297 5298 break; 5298 5299 5299 5300 case 268: 5300 5301 5301 5302 /* Line 1464 of yacc.c */ 5302 #line 220 5"compilers/imcc/imcc.y"5303 #line 2206 "compilers/imcc/imcc.y" 5303 5304 { 5304 5305 (yyval.i) = IMCC_create_itcall_label(interp); 5305 5306 IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr)); … … 5309 5310 case 269: 5310 5311 5311 5312 /* Line 1464 of yacc.c */ 5312 #line 22 09"compilers/imcc/imcc.y"5313 #line 2210 "compilers/imcc/imcc.y" 5313 5314 { (yyval.i) = (yyvsp[(2) - (5)].i); } 5314 5315 break; 5315 5316 5316 5317 case 270: 5317 5318 5318 5319 /* Line 1464 of yacc.c */ 5319 #line 221 3"compilers/imcc/imcc.y"5320 #line 2214 "compilers/imcc/imcc.y" 5320 5321 { (yyval.sr) = 0; } 5321 5322 break; 5322 5323 5323 5324 case 271: 5324 5325 5325 5326 /* Line 1464 of yacc.c */ 5326 #line 221 5"compilers/imcc/imcc.y"5327 #line 2216 "compilers/imcc/imcc.y" 5327 5328 { 5328 5329 (yyval.sr) = 0; 5329 5330 if (IMCC_INFO(interp)->adv_named_id) { … … 5338 5339 case 272: 5339 5340 5340 5341 /* Line 1464 of yacc.c */ 5341 #line 222 5"compilers/imcc/imcc.y"5342 #line 2226 "compilers/imcc/imcc.y" 5342 5343 { 5343 5344 (yyval.sr) = 0; 5344 5345 if (IMCC_INFO(interp)->adv_named_id) { … … 5353 5354 case 273: 5354 5355 5355 5356 /* Line 1464 of yacc.c */ 5356 #line 223 5"compilers/imcc/imcc.y"5357 #line 2236 "compilers/imcc/imcc.y" 5357 5358 { 5358 5359 (yyval.sr) = 0; 5359 5360 add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, … … 5365 5366 case 274: 5366 5367 5367 5368 /* Line 1464 of yacc.c */ 5368 #line 224 2"compilers/imcc/imcc.y"5369 #line 2243 "compilers/imcc/imcc.y" 5369 5370 { 5370 5371 (yyval.sr) = 0; 5371 5372 add_pcc_named_arg_var(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); … … 5375 5376 case 275: 5376 5377 5377 5378 /* Line 1464 of yacc.c */ 5378 #line 224 7"compilers/imcc/imcc.y"5379 #line 2248 "compilers/imcc/imcc.y" 5379 5380 { 5380 5381 (yyval.sr) = 0; 5381 5382 add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, … … 5387 5388 case 276: 5388 5389 5389 5390 /* Line 1464 of yacc.c */ 5390 #line 225 6"compilers/imcc/imcc.y"5391 #line 2257 "compilers/imcc/imcc.y" 5391 5392 { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); } 5392 5393 break; 5393 5394 5394 5395 case 277: 5395 5396 5396 5397 /* Line 1464 of yacc.c */ 5397 #line 226 0"compilers/imcc/imcc.y"5398 #line 2261 "compilers/imcc/imcc.y" 5398 5399 { (yyval.t) = 0; } 5399 5400 break; 5400 5401 5401 5402 case 278: 5402 5403 5403 5404 /* Line 1464 of yacc.c */ 5404 #line 226 1"compilers/imcc/imcc.y"5405 #line 2262 "compilers/imcc/imcc.y" 5405 5406 { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); } 5406 5407 break; 5407 5408 5408 5409 case 279: 5409 5410 5410 5411 /* Line 1464 of yacc.c */ 5411 #line 226 5"compilers/imcc/imcc.y"5412 #line 2266 "compilers/imcc/imcc.y" 5412 5413 { (yyval.t) = VT_FLAT; } 5413 5414 break; 5414 5415 5415 5416 case 280: 5416 5417 5417 5418 /* Line 1464 of yacc.c */ 5418 #line 226 6"compilers/imcc/imcc.y"5419 #line 2267 "compilers/imcc/imcc.y" 5419 5420 { (yyval.t) = VT_NAMED; } 5420 5421 break; 5421 5422 5422 5423 case 281: 5423 5424 5424 5425 /* Line 1464 of yacc.c */ 5425 #line 226 7"compilers/imcc/imcc.y"5426 #line 2268 "compilers/imcc/imcc.y" 5426 5427 { (yyval.t) = VT_CALL_SIG; } 5427 5428 break; 5428 5429 5429 5430 case 282: 5430 5431 5431 5432 /* Line 1464 of yacc.c */ 5432 #line 227 0"compilers/imcc/imcc.y"5433 #line 2271 "compilers/imcc/imcc.y" 5433 5434 { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; } 5434 5435 break; 5435 5436 5436 5437 case 283: 5437 5438 5438 5439 /* Line 1464 of yacc.c */ 5439 #line 227 1"compilers/imcc/imcc.y"5440 #line 2272 "compilers/imcc/imcc.y" 5440 5441 { adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; } 5441 5442 break; 5442 5443 5443 5444 case 284: 5444 5445 5445 5446 /* Line 1464 of yacc.c */ 5446 #line 227 5"compilers/imcc/imcc.y"5447 #line 2276 "compilers/imcc/imcc.y" 5447 5448 { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); } 5448 5449 break; 5449 5450 5450 5451 case 285: 5451 5452 5452 5453 /* Line 1464 of yacc.c */ 5453 #line 228 0"compilers/imcc/imcc.y"5454 #line 2281 "compilers/imcc/imcc.y" 5454 5455 { 5455 5456 (yyval.sr) = 0; 5456 5457 if (IMCC_INFO(interp)->adv_named_id) { … … 5465 5466 case 286: 5466 5467 5467 5468 /* Line 1464 of yacc.c */ 5468 #line 229 0"compilers/imcc/imcc.y"5469 #line 2291 "compilers/imcc/imcc.y" 5469 5470 { 5470 5471 add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, 5471 5472 mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr)); … … 5476 5477 case 287: 5477 5478 5478 5479 /* Line 1464 of yacc.c */ 5479 #line 229 6"compilers/imcc/imcc.y"5480 #line 2297 "compilers/imcc/imcc.y" 5480 5481 { 5481 5482 (yyval.sr) = 0; 5482 5483 if (IMCC_INFO(interp)->adv_named_id) { … … 5491 5492 case 288: 5492 5493 5493 5494 /* Line 1464 of yacc.c */ 5494 #line 230 6"compilers/imcc/imcc.y"5495 #line 2307 "compilers/imcc/imcc.y" 5495 5496 { 5496 5497 add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(1) - (3)].s), 'S'), (yyvsp[(3) - (3)].sr)); 5497 5498 mem_sys_free((yyvsp[(1) - (3)].s)); … … 5501 5502 case 289: 5502 5503 5503 5504 /* Line 1464 of yacc.c */ 5504 #line 231 0"compilers/imcc/imcc.y"5505 #line 2311 "compilers/imcc/imcc.y" 5505 5506 { (yyval.sr) = 0; } 5506 5507 break; 5507 5508 5508 5509 case 290: 5509 5510 5510 5511 /* Line 1464 of yacc.c */ 5511 #line 231 4"compilers/imcc/imcc.y"5512 #line 2315 "compilers/imcc/imcc.y" 5512 5513 { (yyval.i) = (yyvsp[(1) - (1)].i); } 5513 5514 break; 5514 5515 5515 5516 case 291: 5516 5517 5517 5518 /* Line 1464 of yacc.c */ 5518 #line 231 5"compilers/imcc/imcc.y"5519 #line 2316 "compilers/imcc/imcc.y" 5519 5520 { (yyval.i) = (yyvsp[(1) - (1)].i); } 5520 5521 break; 5521 5522 5522 5523 case 292: 5523 5524 5524 5525 /* Line 1464 of yacc.c */ 5525 #line 232 0"compilers/imcc/imcc.y"5526 #line 2321 "compilers/imcc/imcc.y" 5526 5527 { 5527 5528 (yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, inv_op((yyvsp[(3) - (6)].s)), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr)); 5528 5529 } … … 5531 5532 case 293: 5532 5533 5533 5534 /* Line 1464 of yacc.c */ 5534 #line 232 4"compilers/imcc/imcc.y"5535 #line 2325 "compilers/imcc/imcc.y" 5535 5536 { 5536 5537 (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr)); 5537 5538 } … … 5540 5541 case 294: 5541 5542 5542 5543 /* Line 1464 of yacc.c */ 5543 #line 232 8"compilers/imcc/imcc.y"5544 #line 2329 "compilers/imcc/imcc.y" 5544 5545 { 5545 5546 (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr)); 5546 5547 } … … 5549 5550 case 295: 5550 5551 5551 5552 /* Line 1464 of yacc.c */ 5552 #line 233 5"compilers/imcc/imcc.y"5553 #line 2336 "compilers/imcc/imcc.y" 5553 5554 { 5554 5555 (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr)); 5555 5556 } … … 5558 5559 case 296: 5559 5560 5560 5561 /* Line 1464 of yacc.c */ 5561 #line 23 39"compilers/imcc/imcc.y"5562 #line 2340 "compilers/imcc/imcc.y" 5562 5563 { 5563 5564 (yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr)); 5564 5565 } … … 5567 5568 case 297: 5568 5569 5569 5570 /* Line 1464 of yacc.c */ 5570 #line 234 3"compilers/imcc/imcc.y"5571 #line 2344 "compilers/imcc/imcc.y" 5571 5572 { 5572 5573 (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr)); 5573 5574 } … … 5576 5577 case 298: 5577 5578 5578 5579 /* Line 1464 of yacc.c */ 5579 #line 23 49"compilers/imcc/imcc.y"5580 #line 2350 "compilers/imcc/imcc.y" 5580 5581 { (yyval.t) = 0; } 5581 5582 break; 5582 5583 5583 5584 case 299: 5584 5585 5585 5586 /* Line 1464 of yacc.c */ 5586 #line 235 0"compilers/imcc/imcc.y"5587 #line 2351 "compilers/imcc/imcc.y" 5587 5588 { (yyval.t) = 0; } 5588 5589 break; 5589 5590 5590 5591 case 300: 5591 5592 5592 5593 /* Line 1464 of yacc.c */ 5593 #line 235 4"compilers/imcc/imcc.y"5594 #line 2355 "compilers/imcc/imcc.y" 5594 5595 { (yyval.s) = (char *)"eq"; } 5595 5596 break; 5596 5597 5597 5598 case 301: 5598 5599 5599 5600 /* Line 1464 of yacc.c */ 5600 #line 235 5"compilers/imcc/imcc.y"5601 #line 2356 "compilers/imcc/imcc.y" 5601 5602 { (yyval.s) = (char *)"ne"; } 5602 5603 break; 5603 5604 5604 5605 case 302: 5605 5606 5606 5607 /* Line 1464 of yacc.c */ 5607 #line 235 6"compilers/imcc/imcc.y"5608 #line 2357 "compilers/imcc/imcc.y" 5608 5609 { (yyval.s) = (char *)"gt"; } 5609 5610 break; 5610 5611 5611 5612 case 303: 5612 5613 5613 5614 /* Line 1464 of yacc.c */ 5614 #line 235 7"compilers/imcc/imcc.y"5615 #line 2358 "compilers/imcc/imcc.y" 5615 5616 { (yyval.s) = (char *)"ge"; } 5616 5617 break; 5617 5618 5618 5619 case 304: 5619 5620 5620 5621 /* Line 1464 of yacc.c */ 5621 #line 235 8"compilers/imcc/imcc.y"5622 #line 2359 "compilers/imcc/imcc.y" 5622 5623 { (yyval.s) = (char *)"lt"; } 5623 5624 break; 5624 5625 5625 5626 case 305: 5626 5627 5627 5628 /* Line 1464 of yacc.c */ 5628 #line 23 59"compilers/imcc/imcc.y"5629 #line 2360 "compilers/imcc/imcc.y" 5629 5630 { (yyval.s) = (char *)"le"; } 5630 5631 break; 5631 5632 5632 5633 case 308: 5633 5634 5634 5635 /* Line 1464 of yacc.c */ 5635 #line 236 8"compilers/imcc/imcc.y"5636 #line 2369 "compilers/imcc/imcc.y" 5636 5637 { (yyval.sr) = NULL; } 5637 5638 break; 5638 5639 5639 5640 case 309: 5640 5641 5641 5642 /* Line 1464 of yacc.c */ 5642 #line 23 69"compilers/imcc/imcc.y"5643 #line 2370 "compilers/imcc/imcc.y" 5643 5644 { (yyval.sr) = (yyvsp[(1) - (1)].sr); } 5644 5645 break; 5645 5646 5646 5647 case 310: 5647 5648 5648 5649 /* Line 1464 of yacc.c */ 5649 #line 237 3"compilers/imcc/imcc.y"5650 #line 2374 "compilers/imcc/imcc.y" 5650 5651 { (yyval.sr) = IMCC_INFO(interp)->regs[0]; } 5651 5652 break; 5652 5653 5653 5654 case 312: 5654 5655 5655 5656 /* Line 1464 of yacc.c */ 5656 #line 237 8"compilers/imcc/imcc.y"5657 #line 2379 "compilers/imcc/imcc.y" 5657 5658 { IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); } 5658 5659 break; 5659 5660 5660 5661 case 313: 5661 5662 5662 5663 /* Line 1464 of yacc.c */ 5663 #line 238 0"compilers/imcc/imcc.y"5664 #line 2381 "compilers/imcc/imcc.y" 5664 5665 { 5665 5666 IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (4)].sr); 5666 5667 IMCC_INFO(interp) -> keyvec |= KEY_BIT(IMCC_INFO(interp)->nargs); … … 5672 5673 case 314: 5673 5674 5674 5675 /* Line 1464 of yacc.c */ 5675 #line 238 7"compilers/imcc/imcc.y"5676 #line 2388 "compilers/imcc/imcc.y" 5676 5677 { 5677 5678 IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr); 5678 5679 (yyval.sr) = (yyvsp[(2) - (3)].sr); … … 5682 5683 case 316: 5683 5684 5684 5685 /* Line 1464 of yacc.c */ 5685 #line 239 4"compilers/imcc/imcc.y"5686 #line 2395 "compilers/imcc/imcc.y" 5686 5687 { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } 5687 5688 break; 5688 5689 5689 5690 case 317: 5690 5691 5691 5692 /* Line 1464 of yacc.c */ 5692 #line 239 5"compilers/imcc/imcc.y"5693 #line 2396 "compilers/imcc/imcc.y" 5693 5694 { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } 5694 5695 break; 5695 5696 5696 5697 case 318: 5697 5698 5698 5699 /* Line 1464 of yacc.c */ 5699 #line 2 399"compilers/imcc/imcc.y"5700 #line 2400 "compilers/imcc/imcc.y" 5700 5701 { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } 5701 5702 break; 5702 5703 5703 5704 case 319: 5704 5705 5705 5706 /* Line 1464 of yacc.c */ 5706 #line 240 0"compilers/imcc/imcc.y"5707 #line 2401 "compilers/imcc/imcc.y" 5707 5708 { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } 5708 5709 break; 5709 5710 5710 5711 case 320: 5711 5712 5712 5713 /* Line 1464 of yacc.c */ 5713 #line 240 4"compilers/imcc/imcc.y"5714 #line 2405 "compilers/imcc/imcc.y" 5714 5715 { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } 5715 5716 break; 5716 5717 5717 5718 case 321: 5718 5719 5719 5720 /* Line 1464 of yacc.c */ 5720 #line 240 5"compilers/imcc/imcc.y"5721 #line 2406 "compilers/imcc/imcc.y" 5721 5722 { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } 5722 5723 break; 5723 5724 5724 5725 case 326: 5725 5726 5726 5727 /* Line 1464 of yacc.c */ 5727 #line 24 19"compilers/imcc/imcc.y"5728 #line 2420 "compilers/imcc/imcc.y" 5728 5729 { 5729 5730 IMCC_INFO(interp)->nkeys = 0; 5730 5731 } … … 5733 5734 case 327: 5734 5735 5735 5736 /* Line 1464 of yacc.c */ 5736 #line 242 3"compilers/imcc/imcc.y"5737 #line 2424 "compilers/imcc/imcc.y" 5737 5738 { 5738 5739 (yyval.sr) = link_keys(interp, 5739 5740 IMCC_INFO(interp)->nkeys, … … 5744 5745 case 328: 5745 5746 5746 5747 /* Line 1464 of yacc.c */ 5747 #line 243 1"compilers/imcc/imcc.y"5748 #line 2432 "compilers/imcc/imcc.y" 5748 5749 { 5749 5750 IMCC_INFO(interp)->nkeys = 0; 5750 5751 } … … 5753 5754 case 329: 5754 5755 5755 5756 /* Line 1464 of yacc.c */ 5756 #line 243 5"compilers/imcc/imcc.y"5757 #line 2436 "compilers/imcc/imcc.y" 5757 5758 { 5758 5759 (yyval.sr) = link_keys(interp, 5759 5760 IMCC_INFO(interp)->nkeys, … … 5764 5765 case 330: 5765 5766 5766 5767 /* Line 1464 of yacc.c */ 5767 #line 244 3"compilers/imcc/imcc.y"5768 #line 2444 "compilers/imcc/imcc.y" 5768 5769 { IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); } 5769 5770 break; 5770 5771 5771 5772 case 331: 5772 5773 5773 5774 /* Line 1464 of yacc.c */ 5774 #line 244 5"compilers/imcc/imcc.y"5775 #line 2446 "compilers/imcc/imcc.y" 5775 5776 { 5776 5777 IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr); 5777 5778 (yyval.sr) = IMCC_INFO(interp)->keys[0]; … … 5781 5782 case 332: 5782 5783 5783 5784 /* Line 1464 of yacc.c */ 5784 #line 245 3"compilers/imcc/imcc.y"5785 #line 2454 "compilers/imcc/imcc.y" 5785 5786 { 5786 5787 (yyval.sr) = (yyvsp[(1) - (1)].sr); 5787 5788 } … … 5790 5791 case 333: 5791 5792 5792 5793 /* Line 1464 of yacc.c */ 5793 #line 24 59"compilers/imcc/imcc.y"5794 #line 2460 "compilers/imcc/imcc.y" 5794 5795 { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); } 5795 5796 break; 5796 5797 5797 5798 case 334: 5798 5799 5799 5800 /* Line 1464 of yacc.c */ 5800 #line 246 0"compilers/imcc/imcc.y"5801 #line 2461 "compilers/imcc/imcc.y" 5801 5802 { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); } 5802 5803 break; 5803 5804 5804 5805 case 335: 5805 5806 5806 5807 /* Line 1464 of yacc.c */ 5807 #line 246 1"compilers/imcc/imcc.y"5808 #line 2462 "compilers/imcc/imcc.y" 5808 5809 { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); } 5809 5810 break; 5810 5811 5811 5812 case 336: 5812 5813 5813 5814 /* Line 1464 of yacc.c */ 5814 #line 246 2"compilers/imcc/imcc.y"5815 #line 2463 "compilers/imcc/imcc.y" 5815 5816 { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); } 5816 5817 break; 5817 5818 5818 5819 case 337: 5819 5820 5820 5821 /* Line 1464 of yacc.c */ 5821 #line 246 3"compilers/imcc/imcc.y"5822 #line 2464 "compilers/imcc/imcc.y" 5822 5823 { (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } 5823 5824 break; 5824 5825 5825 5826 case 338: 5826 5827 5827 5828 /* Line 1464 of yacc.c */ 5828 #line 246 7"compilers/imcc/imcc.y"5829 #line 2468 "compilers/imcc/imcc.y" 5829 5830 { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); } 5830 5831 break; 5831 5832 5832 5833 case 339: 5833 5834 5834 5835 /* Line 1464 of yacc.c */ 5835 #line 246 8"compilers/imcc/imcc.y"5836 #line 2469 "compilers/imcc/imcc.y" 5836 5837 { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); } 5837 5838 break; 5838 5839 5839 5840 case 340: 5840 5841 5841 5842 /* Line 1464 of yacc.c */ 5842 #line 247 2"compilers/imcc/imcc.y"5843 #line 2473 "compilers/imcc/imcc.y" 5843 5844 { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); } 5844 5845 break; 5845 5846 5846 5847 case 341: 5847 5848 5848 5849 /* Line 1464 of yacc.c */ 5849 #line 247 3"compilers/imcc/imcc.y"5850 #line 2474 "compilers/imcc/imcc.y" 5850 5851 { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); } 5851 5852 break; 5852 5853 5853 5854 case 342: 5854 5855 5855 5856 /* Line 1464 of yacc.c */ 5856 #line 247 4"compilers/imcc/imcc.y"5857 #line 2475 "compilers/imcc/imcc.y" 5857 5858 { (yyval.sr) = (yyvsp[(1) - (1)].sr); } 5858 5859 break; 5859 5860 5860 5861 5861 5862 5862 5863 /* Line 1464 of yacc.c */ 5863 #line 585 3"compilers/imcc/imcparser.c"5864 #line 5854 "compilers/imcc/imcparser.c" 5864 5865 default: break; 5865 5866 } 5866 5867 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); … … 6072 6073 6073 6074 6074 6075 /* Line 1684 of yacc.c */ 6075 #line 248 0"compilers/imcc/imcc.y"6076 #line 2481 "compilers/imcc/imcc.y" 6076 6077 6077 6078 6078 6079 /* I need this prototype somewhere... */ … … 6091 6092 * outside the bison buffer, and thus, not "accessible" by 6092 6093 * us. This means it may segfault. */ 6093 6094 const char * const chr = yyget_text((yyscan_t)yyscanner); 6095 PMC * err_msgs = IMCC_INFO(interp)->error_messages; 6094 6096 6095 /* IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, s); */ 6096 /* --- This was called before, not sure if I should call some 6097 similar function that does not die like this one. */ 6097 IMCC_INFO(interp)->error_code = IMCC_PARSEFAIL_EXCEPTION; 6098 6098 6099 /* Basically, if current token is a newline, it mean the error was 6100 * before the newline, and thus, line is the line *after* the 6101 * error. Instead of duplicating code for both cases (the 'newline' and 6102 * non-newline case, do the test twice; efficiency is not important when 6103 * we have an error anyway. */ 6104 if (!at_eof(yyscanner)) { 6105 IMCC_warning(interp, "error:imcc:%s", s); 6099 /* don't bother printing the current token if it is either a newline or EOF */ 6100 VTABLE_push_string(interp, err_msgs, 6101 at_eof(yyscanner) || *chr == '\n' ? 6102 Parrot_str_new(interp, s, 0) : 6103 Parrot_sprintf_c(interp, "%s ('%s')", s, chr)); 6104 VTABLE_push_string(interp, err_msgs, IMCC_inc_str(interp)); 6106 6105 6107 /* don't print the current token if it is a newline */6108 if (*chr != '\n')6109 IMCC_warning(interp, " ('%s')", chr);6110 6111 IMCC_print_inc(interp);6112 }6113 6114 /* scanner is at EOF; just to be sure, don't print "current" token */6115 else {6116 IMCC_warning(interp, "error:imcc:%s", s);6117 IMCC_print_inc(interp);6118 }6119 6120 6106 return 0; 6121 6107 } 6122 6108 -
compilers/imcc/debug.c
46 46 { 47 47 ASSERT_ARGS(IMCC_fatal) 48 48 va_list ap; 49 STRING *msg; 49 50 50 51 va_start(ap, fmt); 51 IMCC_INFO(interp)->error_message= Parrot_vsprintf_c(interp, fmt, ap);52 msg = Parrot_vsprintf_c(interp, fmt, ap); 52 53 va_end(ap); 54 55 VTABLE_push_string(interp, IMCC_INFO(interp)->error_messages, msg); 53 56 IMCC_THROW(IMCC_INFO(interp)->jump_buf, IMCC_FATAL_EXCEPTION); 54 57 } 55 58 … … 70 73 { 71 74 ASSERT_ARGS(IMCC_fataly) 72 75 va_list ap; 76 STRING *msg; 73 77 74 78 va_start(ap, fmt); 75 IMCC_INFO(interp)->error_message= Parrot_vsprintf_c(interp, fmt, ap);79 msg = Parrot_vsprintf_c(interp, fmt, ap); 76 80 va_end(ap); 81 82 VTABLE_push_string(interp, IMCC_INFO(interp)->error_messages, msg); 77 83 IMCC_THROW(IMCC_INFO(interp)->jump_buf, IMCC_FATALY_EXCEPTION); 78 84 } 79 85 -
compilers/imcc/parser_util.c
630 630 } 631 631 else { 632 632 PackFile_Segment_destroy(interp, (PackFile_Segment *)new_cs); 633 *error_message = IMCC_INFO(interp)->error_message; 633 *error_message = Parrot_str_join(interp, 634 string_from_literal(interp, "\n"), 635 IMCC_INFO(interp)->error_messages); 634 636 } 635 637 636 638 if (imc_info) { … … 892 894 if (!IMCC_INFO(interp)->error_code) 893 895 cs = interp->code; 894 896 else 895 *error_message = IMCC_INFO(interp)->error_message; 897 *error_message = Parrot_str_join(interp, 898 string_from_literal(interp, "\n"), 899 IMCC_INFO(interp)->error_messages); 896 900 897 901 if (cs_save) 898 902 (void)Parrot_switch_to_cs(interp, cs_save, 0); -
compilers/imcc/imcparser.h
295 295 { 296 296 297 297 /* Line 1685 of yacc.c */ 298 #line 106 8"compilers/imcc/imcc.y"298 #line 1069 "compilers/imcc/imcc.y" 299 299 300 300 IdList * idlist; 301 301 int t;