[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1035-g85699a
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1035-g85699a5 |
Date: |
Fri, 16 Jan 2015 11:55:33 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, master has been updated
via 85699a5cba88f4ee910e2c3ef42b5cc165102b51 (commit)
from 28f563a6f54c8ea9c63537356966508c4685b538 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=85699a5cba88f4ee910e2c3ef42b5cc165102b51
commit 85699a5cba88f4ee910e2c3ef42b5cc165102b51
Author: Arnold D. Robbins <address@hidden>
Date: Fri Jan 16 13:55:10 2015 +0200
Bug fix in pretty-printing comments and test case.
diff --git a/ChangeLog b/ChangeLog
index cce3816..0101eb2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-16 Stephen Davies <address@hidden>
+
+ * awkgram.y (rule): Set first_rule to false. Catches more cases
+ for gathering comments. Thanks to Hermann Peifer for the test case.
+
2015-01-15 Arnold D. Robbins <address@hidden>
* dfa.h, dfa.c: Sync with grep. Mainly copyright updates.
diff --git a/awkgram.c b/awkgram.c
index 2148dfa..a10e3f6 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -657,25 +657,25 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 204, 204, 206, 211, 212, 216, 228, 232, 243,
- 249, 254, 262, 270, 272, 277, 285, 287, 293, 301,
- 311, 341, 355, 369, 377, 388, 400, 402, 404, 410,
- 415, 416, 420, 455, 454, 488, 490, 495, 501, 529,
- 534, 535, 539, 541, 543, 550, 640, 682, 724, 837,
- 844, 851, 861, 870, 879, 888, 899, 915, 914, 938,
- 950, 950, 1048, 1048, 1081, 1111, 1117, 1118, 1124, 1125,
- 1132, 1137, 1149, 1163, 1165, 1173, 1178, 1180, 1188, 1190,
- 1199, 1200, 1208, 1213, 1213, 1224, 1228, 1236, 1237, 1240,
- 1242, 1247, 1248, 1257, 1258, 1263, 1268, 1274, 1276, 1278,
- 1285, 1286, 1292, 1293, 1298, 1300, 1305, 1307, 1315, 1320,
- 1329, 1336, 1338, 1340, 1356, 1366, 1373, 1375, 1380, 1382,
- 1384, 1392, 1394, 1399, 1401, 1406, 1408, 1410, 1460, 1462,
- 1464, 1466, 1468, 1470, 1472, 1474, 1488, 1493, 1498, 1523,
- 1529, 1531, 1533, 1535, 1537, 1539, 1544, 1548, 1580, 1582,
- 1588, 1594, 1607, 1608, 1609, 1614, 1619, 1623, 1627, 1642,
- 1655, 1660, 1696, 1714, 1715, 1721, 1722, 1727, 1729, 1736,
- 1753, 1770, 1772, 1779, 1784, 1792, 1802, 1814, 1823, 1827,
- 1831, 1835, 1839, 1843, 1846, 1848, 1852, 1856, 1860
+ 0, 204, 204, 206, 211, 212, 216, 228, 233, 244,
+ 250, 255, 263, 271, 273, 278, 286, 288, 294, 302,
+ 312, 342, 356, 370, 378, 389, 401, 403, 405, 411,
+ 416, 417, 421, 456, 455, 489, 491, 496, 502, 530,
+ 535, 536, 540, 542, 544, 551, 641, 683, 725, 838,
+ 845, 852, 862, 871, 880, 889, 900, 916, 915, 939,
+ 951, 951, 1049, 1049, 1082, 1112, 1118, 1119, 1125, 1126,
+ 1133, 1138, 1150, 1164, 1166, 1174, 1179, 1181, 1189, 1191,
+ 1200, 1201, 1209, 1214, 1214, 1225, 1229, 1237, 1238, 1241,
+ 1243, 1248, 1249, 1258, 1259, 1264, 1269, 1275, 1277, 1279,
+ 1286, 1287, 1293, 1294, 1299, 1301, 1306, 1308, 1316, 1321,
+ 1330, 1337, 1339, 1341, 1357, 1367, 1374, 1376, 1381, 1383,
+ 1385, 1393, 1395, 1400, 1402, 1407, 1409, 1411, 1461, 1463,
+ 1465, 1467, 1469, 1471, 1473, 1475, 1489, 1494, 1499, 1524,
+ 1530, 1532, 1534, 1536, 1538, 1540, 1545, 1549, 1581, 1583,
+ 1589, 1595, 1608, 1609, 1610, 1615, 1620, 1624, 1628, 1643,
+ 1656, 1661, 1697, 1715, 1716, 1722, 1723, 1728, 1730, 1737,
+ 1754, 1771, 1773, 1780, 1785, 1793, 1803, 1815, 1824, 1828,
+ 1832, 1836, 1840, 1844, 1847, 1849, 1853, 1857, 1861
};
#endif
@@ -1881,12 +1881,13 @@ yyreduce:
#line 229 "awkgram.y" /* yacc.c:1646 */
{
(void) append_rule((yyvsp[-1]), (yyvsp[0]));
+ first_rule = false;
}
-#line 1886 "awkgram.c" /* yacc.c:1646 */
+#line 1887 "awkgram.c" /* yacc.c:1646 */
break;
case 8:
-#line 233 "awkgram.y" /* yacc.c:1646 */
+#line 234 "awkgram.y" /* yacc.c:1646 */
{
if (rule != Rule) {
msg(_("%s blocks must have an action part"),
ruletab[rule]);
@@ -1897,39 +1898,39 @@ yyreduce:
} else /* pattern rule with non-empty pattern */
(void) append_rule((yyvsp[-1]), NULL);
}
-#line 1901 "awkgram.c" /* yacc.c:1646 */
+#line 1902 "awkgram.c" /* yacc.c:1646 */
break;
case 9:
-#line 244 "awkgram.y" /* yacc.c:1646 */
+#line 245 "awkgram.y" /* yacc.c:1646 */
{
in_function = NULL;
(void) mk_function((yyvsp[-1]), (yyvsp[0]));
yyerrok;
}
-#line 1911 "awkgram.c" /* yacc.c:1646 */
+#line 1912 "awkgram.c" /* yacc.c:1646 */
break;
case 10:
-#line 250 "awkgram.y" /* yacc.c:1646 */
+#line 251 "awkgram.y" /* yacc.c:1646 */
{
want_source = false;
yyerrok;
}
-#line 1920 "awkgram.c" /* yacc.c:1646 */
+#line 1921 "awkgram.c" /* yacc.c:1646 */
break;
case 11:
-#line 255 "awkgram.y" /* yacc.c:1646 */
+#line 256 "awkgram.y" /* yacc.c:1646 */
{
want_source = false;
yyerrok;
}
-#line 1929 "awkgram.c" /* yacc.c:1646 */
+#line 1930 "awkgram.c" /* yacc.c:1646 */
break;
case 12:
-#line 263 "awkgram.y" /* yacc.c:1646 */
+#line 264 "awkgram.y" /* yacc.c:1646 */
{
if (include_source((yyvsp[0])) < 0)
YYABORT;
@@ -1937,23 +1938,23 @@ yyreduce:
bcfree((yyvsp[0]));
(yyval) = NULL;
}
-#line 1941 "awkgram.c" /* yacc.c:1646 */
+#line 1942 "awkgram.c" /* yacc.c:1646 */
break;
case 13:
-#line 271 "awkgram.y" /* yacc.c:1646 */
+#line 272 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1947 "awkgram.c" /* yacc.c:1646 */
+#line 1948 "awkgram.c" /* yacc.c:1646 */
break;
case 14:
-#line 273 "awkgram.y" /* yacc.c:1646 */
+#line 274 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1953 "awkgram.c" /* yacc.c:1646 */
+#line 1954 "awkgram.c" /* yacc.c:1646 */
break;
case 15:
-#line 278 "awkgram.y" /* yacc.c:1646 */
+#line 279 "awkgram.y" /* yacc.c:1646 */
{
if (load_library((yyvsp[0])) < 0)
YYABORT;
@@ -1961,23 +1962,23 @@ yyreduce:
bcfree((yyvsp[0]));
(yyval) = NULL;
}
-#line 1965 "awkgram.c" /* yacc.c:1646 */
+#line 1966 "awkgram.c" /* yacc.c:1646 */
break;
case 16:
-#line 286 "awkgram.y" /* yacc.c:1646 */
+#line 287 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1971 "awkgram.c" /* yacc.c:1646 */
+#line 1972 "awkgram.c" /* yacc.c:1646 */
break;
case 17:
-#line 288 "awkgram.y" /* yacc.c:1646 */
+#line 289 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1977 "awkgram.c" /* yacc.c:1646 */
+#line 1978 "awkgram.c" /* yacc.c:1646 */
break;
case 18:
-#line 293 "awkgram.y" /* yacc.c:1646 */
+#line 294 "awkgram.y" /* yacc.c:1646 */
{
rule = Rule;
if (comment != NULL) {
@@ -1986,11 +1987,11 @@ yyreduce:
} else
(yyval) = NULL;
}
-#line 1990 "awkgram.c" /* yacc.c:1646 */
+#line 1991 "awkgram.c" /* yacc.c:1646 */
break;
case 19:
-#line 302 "awkgram.y" /* yacc.c:1646 */
+#line 303 "awkgram.y" /* yacc.c:1646 */
{
rule = Rule;
if (comment != NULL) {
@@ -1999,11 +2000,11 @@ yyreduce:
} else
(yyval) = (yyvsp[0]);
}
-#line 2003 "awkgram.c" /* yacc.c:1646 */
+#line 2004 "awkgram.c" /* yacc.c:1646 */
break;
case 20:
-#line 312 "awkgram.y" /* yacc.c:1646 */
+#line 313 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *tp;
@@ -2033,11 +2034,11 @@ yyreduce:
(yyval) = list_append(list_merge((yyvsp[-3]),
(yyvsp[0])), tp);
rule = Rule;
}
-#line 2037 "awkgram.c" /* yacc.c:1646 */
+#line 2038 "awkgram.c" /* yacc.c:1646 */
break;
case 21:
-#line 342 "awkgram.y" /* yacc.c:1646 */
+#line 343 "awkgram.y" /* yacc.c:1646 */
{
static int begin_seen = 0;
@@ -2051,11 +2052,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2055 "awkgram.c" /* yacc.c:1646 */
+#line 2056 "awkgram.c" /* yacc.c:1646 */
break;
case 22:
-#line 356 "awkgram.y" /* yacc.c:1646 */
+#line 357 "awkgram.y" /* yacc.c:1646 */
{
static int end_seen = 0;
@@ -2069,11 +2070,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2073 "awkgram.c" /* yacc.c:1646 */
+#line 2074 "awkgram.c" /* yacc.c:1646 */
break;
case 23:
-#line 370 "awkgram.y" /* yacc.c:1646 */
+#line 371 "awkgram.y" /* yacc.c:1646 */
{
func_first = false;
(yyvsp[0])->in_rule = rule = BEGINFILE;
@@ -2081,11 +2082,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2085 "awkgram.c" /* yacc.c:1646 */
+#line 2086 "awkgram.c" /* yacc.c:1646 */
break;
case 24:
-#line 378 "awkgram.y" /* yacc.c:1646 */
+#line 379 "awkgram.y" /* yacc.c:1646 */
{
func_first = false;
(yyvsp[0])->in_rule = rule = ENDFILE;
@@ -2093,11 +2094,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2097 "awkgram.c" /* yacc.c:1646 */
+#line 2098 "awkgram.c" /* yacc.c:1646 */
break;
case 25:
-#line 389 "awkgram.y" /* yacc.c:1646 */
+#line 390 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip;
if ((yyvsp[-3]) == NULL)
@@ -2106,39 +2107,39 @@ yyreduce:
ip = (yyvsp[-3]);
(yyval) = ip;
}
-#line 2110 "awkgram.c" /* yacc.c:1646 */
+#line 2111 "awkgram.c" /* yacc.c:1646 */
break;
case 26:
-#line 401 "awkgram.y" /* yacc.c:1646 */
+#line 402 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2116 "awkgram.c" /* yacc.c:1646 */
+#line 2117 "awkgram.c" /* yacc.c:1646 */
break;
case 27:
-#line 403 "awkgram.y" /* yacc.c:1646 */
+#line 404 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2122 "awkgram.c" /* yacc.c:1646 */
+#line 2123 "awkgram.c" /* yacc.c:1646 */
break;
case 28:
-#line 405 "awkgram.y" /* yacc.c:1646 */
+#line 406 "awkgram.y" /* yacc.c:1646 */
{
yyerror(_("`%s' is a built-in function, it cannot be
redefined"),
tokstart);
YYABORT;
}
-#line 2132 "awkgram.c" /* yacc.c:1646 */
+#line 2133 "awkgram.c" /* yacc.c:1646 */
break;
case 29:
-#line 411 "awkgram.y" /* yacc.c:1646 */
+#line 412 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2138 "awkgram.c" /* yacc.c:1646 */
+#line 2139 "awkgram.c" /* yacc.c:1646 */
break;
case 32:
-#line 421 "awkgram.y" /* yacc.c:1646 */
+#line 422 "awkgram.y" /* yacc.c:1646 */
{
/*
* treat any comments between BOF and the first function
@@ -2165,17 +2166,17 @@ yyreduce:
/* $4 already free'd in install_function */
(yyval) = (yyvsp[-5]);
}
-#line 2169 "awkgram.c" /* yacc.c:1646 */
+#line 2170 "awkgram.c" /* yacc.c:1646 */
break;
case 33:
-#line 455 "awkgram.y" /* yacc.c:1646 */
+#line 456 "awkgram.y" /* yacc.c:1646 */
{ want_regexp = true; }
-#line 2175 "awkgram.c" /* yacc.c:1646 */
+#line 2176 "awkgram.c" /* yacc.c:1646 */
break;
case 34:
-#line 457 "awkgram.y" /* yacc.c:1646 */
+#line 458 "awkgram.y" /* yacc.c:1646 */
{
NODE *n, *exp;
char *re;
@@ -2204,28 +2205,28 @@ yyreduce:
(yyval)->opcode = Op_match_rec;
(yyval)->memory = n;
}
-#line 2208 "awkgram.c" /* yacc.c:1646 */
+#line 2209 "awkgram.c" /* yacc.c:1646 */
break;
case 35:
-#line 489 "awkgram.y" /* yacc.c:1646 */
+#line 490 "awkgram.y" /* yacc.c:1646 */
{ bcfree((yyvsp[0])); }
-#line 2214 "awkgram.c" /* yacc.c:1646 */
+#line 2215 "awkgram.c" /* yacc.c:1646 */
break;
case 37:
-#line 495 "awkgram.y" /* yacc.c:1646 */
+#line 496 "awkgram.y" /* yacc.c:1646 */
{
if (comment != NULL) {
(yyval) = list_create(comment);
comment = NULL;
} else (yyval) = NULL;
}
-#line 2225 "awkgram.c" /* yacc.c:1646 */
+#line 2226 "awkgram.c" /* yacc.c:1646 */
break;
case 38:
-#line 502 "awkgram.y" /* yacc.c:1646 */
+#line 503 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0]) == NULL) {
if (comment == NULL)
@@ -2253,40 +2254,40 @@ yyreduce:
}
yyerrok;
}
-#line 2257 "awkgram.c" /* yacc.c:1646 */
+#line 2258 "awkgram.c" /* yacc.c:1646 */
break;
case 39:
-#line 530 "awkgram.y" /* yacc.c:1646 */
+#line 531 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2263 "awkgram.c" /* yacc.c:1646 */
+#line 2264 "awkgram.c" /* yacc.c:1646 */
break;
case 42:
-#line 540 "awkgram.y" /* yacc.c:1646 */
+#line 541 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2269 "awkgram.c" /* yacc.c:1646 */
+#line 2270 "awkgram.c" /* yacc.c:1646 */
break;
case 43:
-#line 542 "awkgram.y" /* yacc.c:1646 */
+#line 543 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 2275 "awkgram.c" /* yacc.c:1646 */
+#line 2276 "awkgram.c" /* yacc.c:1646 */
break;
case 44:
-#line 544 "awkgram.y" /* yacc.c:1646 */
+#line 545 "awkgram.y" /* yacc.c:1646 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]),
instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2286 "awkgram.c" /* yacc.c:1646 */
+#line 2287 "awkgram.c" /* yacc.c:1646 */
break;
case 45:
-#line 551 "awkgram.y" /* yacc.c:1646 */
+#line 552 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt;
INSTRUCTION *ip, *nextc, *tbreak;
@@ -2376,11 +2377,11 @@ yyreduce:
break_allowed--;
fix_break_continue(ip, tbreak, NULL);
}
-#line 2380 "awkgram.c" /* yacc.c:1646 */
+#line 2381 "awkgram.c" /* yacc.c:1646 */
break;
case 46:
-#line 641 "awkgram.y" /* yacc.c:1646 */
+#line 642 "awkgram.y" /* yacc.c:1646 */
{
/*
* -----------------
@@ -2422,11 +2423,11 @@ yyreduce:
continue_allowed--;
fix_break_continue(ip, tbreak, tcont);
}
-#line 2426 "awkgram.c" /* yacc.c:1646 */
+#line 2427 "awkgram.c" /* yacc.c:1646 */
break;
case 47:
-#line 683 "awkgram.y" /* yacc.c:1646 */
+#line 684 "awkgram.y" /* yacc.c:1646 */
{
/*
* -----------------
@@ -2468,11 +2469,11 @@ yyreduce:
} /* else
$1 and $4 are NULLs */
}
-#line 2472 "awkgram.c" /* yacc.c:1646 */
+#line 2473 "awkgram.c" /* yacc.c:1646 */
break;
case 48:
-#line 725 "awkgram.y" /* yacc.c:1646 */
+#line 726 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip;
char *var_name = (yyvsp[-5])->lextok;
@@ -2585,44 +2586,44 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2589 "awkgram.c" /* yacc.c:1646 */
+#line 2590 "awkgram.c" /* yacc.c:1646 */
break;
case 49:
-#line 838 "awkgram.y" /* yacc.c:1646 */
+#line 839 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_for_loop((yyvsp[-11]), (yyvsp[-9]), (yyvsp[-6]),
(yyvsp[-3]), (yyvsp[0]));
break_allowed--;
continue_allowed--;
}
-#line 2600 "awkgram.c" /* yacc.c:1646 */
+#line 2601 "awkgram.c" /* yacc.c:1646 */
break;
case 50:
-#line 845 "awkgram.y" /* yacc.c:1646 */
+#line 846 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_for_loop((yyvsp[-10]), (yyvsp[-8]), (INSTRUCTION
*) NULL, (yyvsp[-3]), (yyvsp[0]));
break_allowed--;
continue_allowed--;
}
-#line 2611 "awkgram.c" /* yacc.c:1646 */
+#line 2612 "awkgram.c" /* yacc.c:1646 */
break;
case 51:
-#line 852 "awkgram.y" /* yacc.c:1646 */
+#line 853 "awkgram.y" /* yacc.c:1646 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]),
instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2622 "awkgram.c" /* yacc.c:1646 */
+#line 2623 "awkgram.c" /* yacc.c:1646 */
break;
case 52:
-#line 862 "awkgram.y" /* yacc.c:1646 */
+#line 863 "awkgram.y" /* yacc.c:1646 */
{
if (! break_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2631,11 +2632,11 @@ regular_loop:
(yyval) = list_create((yyvsp[-1]));
}
-#line 2635 "awkgram.c" /* yacc.c:1646 */
+#line 2636 "awkgram.c" /* yacc.c:1646 */
break;
case 53:
-#line 871 "awkgram.y" /* yacc.c:1646 */
+#line 872 "awkgram.y" /* yacc.c:1646 */
{
if (! continue_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2644,11 +2645,11 @@ regular_loop:
(yyval) = list_create((yyvsp[-1]));
}
-#line 2648 "awkgram.c" /* yacc.c:1646 */
+#line 2649 "awkgram.c" /* yacc.c:1646 */
break;
case 54:
-#line 880 "awkgram.y" /* yacc.c:1646 */
+#line 881 "awkgram.y" /* yacc.c:1646 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule && rule != Rule)
@@ -2657,11 +2658,11 @@ regular_loop:
(yyvsp[-1])->target_jmp = ip_rec;
(yyval) = list_create((yyvsp[-1]));
}
-#line 2661 "awkgram.c" /* yacc.c:1646 */
+#line 2662 "awkgram.c" /* yacc.c:1646 */
break;
case 55:
-#line 889 "awkgram.y" /* yacc.c:1646 */
+#line 890 "awkgram.y" /* yacc.c:1646 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule == BEGIN || rule == END || rule == ENDFILE)
@@ -2672,11 +2673,11 @@ regular_loop:
(yyvsp[-1])->target_endfile = ip_endfile;
(yyval) = list_create((yyvsp[-1]));
}
-#line 2676 "awkgram.c" /* yacc.c:1646 */
+#line 2677 "awkgram.c" /* yacc.c:1646 */
break;
case 56:
-#line 900 "awkgram.y" /* yacc.c:1646 */
+#line 901 "awkgram.y" /* yacc.c:1646 */
{
/* Initialize the two possible jump targets, the actual target
* is resolved at run-time.
@@ -2691,20 +2692,20 @@ regular_loop:
} else
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
}
-#line 2695 "awkgram.c" /* yacc.c:1646 */
+#line 2696 "awkgram.c" /* yacc.c:1646 */
break;
case 57:
-#line 915 "awkgram.y" /* yacc.c:1646 */
+#line 916 "awkgram.y" /* yacc.c:1646 */
{
if (! in_function)
yyerror(_("`return' used outside function context"));
}
-#line 2704 "awkgram.c" /* yacc.c:1646 */
+#line 2705 "awkgram.c" /* yacc.c:1646 */
break;
case 58:
-#line 918 "awkgram.y" /* yacc.c:1646 */
+#line 919 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-1]) == NULL) {
(yyval) = list_create((yyvsp[-3]));
@@ -2725,17 +2726,17 @@ regular_loop:
(yyval) = list_append((yyvsp[-1]), (yyvsp[-3]));
}
}
-#line 2729 "awkgram.c" /* yacc.c:1646 */
+#line 2730 "awkgram.c" /* yacc.c:1646 */
break;
case 60:
-#line 950 "awkgram.y" /* yacc.c:1646 */
+#line 951 "awkgram.y" /* yacc.c:1646 */
{ in_print = true; in_parens = 0; }
-#line 2735 "awkgram.c" /* yacc.c:1646 */
+#line 2736 "awkgram.c" /* yacc.c:1646 */
break;
case 61:
-#line 951 "awkgram.y" /* yacc.c:1646 */
+#line 952 "awkgram.y" /* yacc.c:1646 */
{
/*
* Optimization: plain `print' has no expression list, so $3 is
null.
@@ -2832,17 +2833,17 @@ regular_print:
}
}
}
-#line 2836 "awkgram.c" /* yacc.c:1646 */
+#line 2837 "awkgram.c" /* yacc.c:1646 */
break;
case 62:
-#line 1048 "awkgram.y" /* yacc.c:1646 */
+#line 1049 "awkgram.y" /* yacc.c:1646 */
{ sub_counter = 0; }
-#line 2842 "awkgram.c" /* yacc.c:1646 */
+#line 2843 "awkgram.c" /* yacc.c:1646 */
break;
case 63:
-#line 1049 "awkgram.y" /* yacc.c:1646 */
+#line 1050 "awkgram.y" /* yacc.c:1646 */
{
char *arr = (yyvsp[-2])->lextok;
@@ -2875,11 +2876,11 @@ regular_print:
(yyval) = list_append(list_append((yyvsp[0]),
(yyvsp[-2])), (yyvsp[-3]));
}
}
-#line 2879 "awkgram.c" /* yacc.c:1646 */
+#line 2880 "awkgram.c" /* yacc.c:1646 */
break;
case 64:
-#line 1086 "awkgram.y" /* yacc.c:1646 */
+#line 1087 "awkgram.y" /* yacc.c:1646 */
{
static bool warned = false;
char *arr = (yyvsp[-1])->lextok;
@@ -2905,52 +2906,52 @@ regular_print:
fatal(_("`delete' is not allowed with
FUNCTAB"));
}
}
-#line 2909 "awkgram.c" /* yacc.c:1646 */
+#line 2910 "awkgram.c" /* yacc.c:1646 */
break;
case 65:
-#line 1112 "awkgram.y" /* yacc.c:1646 */
+#line 1113 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = optimize_assignment((yyvsp[0])); }
-#line 2915 "awkgram.c" /* yacc.c:1646 */
+#line 2916 "awkgram.c" /* yacc.c:1646 */
break;
case 66:
-#line 1117 "awkgram.y" /* yacc.c:1646 */
+#line 1118 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2921 "awkgram.c" /* yacc.c:1646 */
+#line 2922 "awkgram.c" /* yacc.c:1646 */
break;
case 67:
-#line 1119 "awkgram.y" /* yacc.c:1646 */
+#line 1120 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2927 "awkgram.c" /* yacc.c:1646 */
+#line 2928 "awkgram.c" /* yacc.c:1646 */
break;
case 68:
-#line 1124 "awkgram.y" /* yacc.c:1646 */
+#line 1125 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2933 "awkgram.c" /* yacc.c:1646 */
+#line 2934 "awkgram.c" /* yacc.c:1646 */
break;
case 69:
-#line 1126 "awkgram.y" /* yacc.c:1646 */
+#line 1127 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-1]) == NULL)
(yyval) = list_create((yyvsp[0]));
else
(yyval) = list_prepend((yyvsp[-1]), (yyvsp[0]));
}
-#line 2944 "awkgram.c" /* yacc.c:1646 */
+#line 2945 "awkgram.c" /* yacc.c:1646 */
break;
case 70:
-#line 1133 "awkgram.y" /* yacc.c:1646 */
+#line 1134 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2950 "awkgram.c" /* yacc.c:1646 */
+#line 2951 "awkgram.c" /* yacc.c:1646 */
break;
case 71:
-#line 1138 "awkgram.y" /* yacc.c:1646 */
+#line 1139 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -2962,11 +2963,11 @@ regular_print:
bcfree((yyvsp[-2]));
(yyval) = (yyvsp[-4]);
}
-#line 2966 "awkgram.c" /* yacc.c:1646 */
+#line 2967 "awkgram.c" /* yacc.c:1646 */
break;
case 72:
-#line 1150 "awkgram.y" /* yacc.c:1646 */
+#line 1151 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -2977,17 +2978,17 @@ regular_print:
(yyvsp[-3])->case_stmt = casestmt;
(yyval) = (yyvsp[-3]);
}
-#line 2981 "awkgram.c" /* yacc.c:1646 */
+#line 2982 "awkgram.c" /* yacc.c:1646 */
break;
case 73:
-#line 1164 "awkgram.y" /* yacc.c:1646 */
+#line 1165 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2987 "awkgram.c" /* yacc.c:1646 */
+#line 2988 "awkgram.c" /* yacc.c:1646 */
break;
case 74:
-#line 1166 "awkgram.y" /* yacc.c:1646 */
+#line 1167 "awkgram.y" /* yacc.c:1646 */
{
NODE *n = (yyvsp[0])->memory;
(void) force_number(n);
@@ -2995,71 +2996,71 @@ regular_print:
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 2999 "awkgram.c" /* yacc.c:1646 */
+#line 3000 "awkgram.c" /* yacc.c:1646 */
break;
case 75:
-#line 1174 "awkgram.y" /* yacc.c:1646 */
+#line 1175 "awkgram.y" /* yacc.c:1646 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3008 "awkgram.c" /* yacc.c:1646 */
+#line 3009 "awkgram.c" /* yacc.c:1646 */
break;
case 76:
-#line 1179 "awkgram.y" /* yacc.c:1646 */
+#line 1180 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3014 "awkgram.c" /* yacc.c:1646 */
+#line 3015 "awkgram.c" /* yacc.c:1646 */
break;
case 77:
-#line 1181 "awkgram.y" /* yacc.c:1646 */
+#line 1182 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_push_re;
(yyval) = (yyvsp[0]);
}
-#line 3023 "awkgram.c" /* yacc.c:1646 */
+#line 3024 "awkgram.c" /* yacc.c:1646 */
break;
case 78:
-#line 1189 "awkgram.y" /* yacc.c:1646 */
+#line 1190 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3029 "awkgram.c" /* yacc.c:1646 */
+#line 3030 "awkgram.c" /* yacc.c:1646 */
break;
case 79:
-#line 1191 "awkgram.y" /* yacc.c:1646 */
+#line 1192 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3035 "awkgram.c" /* yacc.c:1646 */
+#line 3036 "awkgram.c" /* yacc.c:1646 */
break;
case 81:
-#line 1201 "awkgram.y" /* yacc.c:1646 */
+#line 1202 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-1]);
}
-#line 3043 "awkgram.c" /* yacc.c:1646 */
+#line 3044 "awkgram.c" /* yacc.c:1646 */
break;
case 82:
-#line 1208 "awkgram.y" /* yacc.c:1646 */
+#line 1209 "awkgram.y" /* yacc.c:1646 */
{
in_print = false;
in_parens = 0;
(yyval) = NULL;
}
-#line 3053 "awkgram.c" /* yacc.c:1646 */
+#line 3054 "awkgram.c" /* yacc.c:1646 */
break;
case 83:
-#line 1213 "awkgram.y" /* yacc.c:1646 */
+#line 1214 "awkgram.y" /* yacc.c:1646 */
{ in_print = false; in_parens = 0; }
-#line 3059 "awkgram.c" /* yacc.c:1646 */
+#line 3060 "awkgram.c" /* yacc.c:1646 */
break;
case 84:
-#line 1214 "awkgram.y" /* yacc.c:1646 */
+#line 1215 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-2])->redir_type == redirect_twoway
&& (yyvsp[0])->lasti->opcode == Op_K_getline_redir
@@ -3067,136 +3068,136 @@ regular_print:
yyerror(_("multistage two-way pipelines don't work"));
(yyval) = list_prepend((yyvsp[0]), (yyvsp[-2]));
}
-#line 3071 "awkgram.c" /* yacc.c:1646 */
+#line 3072 "awkgram.c" /* yacc.c:1646 */
break;
case 85:
-#line 1225 "awkgram.y" /* yacc.c:1646 */
+#line 1226 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_condition((yyvsp[-3]), (yyvsp[-5]), (yyvsp[0]),
NULL, NULL);
}
-#line 3079 "awkgram.c" /* yacc.c:1646 */
+#line 3080 "awkgram.c" /* yacc.c:1646 */
break;
case 86:
-#line 1230 "awkgram.y" /* yacc.c:1646 */
+#line 1231 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_condition((yyvsp[-6]), (yyvsp[-8]), (yyvsp[-3]),
(yyvsp[-2]), (yyvsp[0]));
}
-#line 3087 "awkgram.c" /* yacc.c:1646 */
+#line 3088 "awkgram.c" /* yacc.c:1646 */
break;
case 91:
-#line 1247 "awkgram.y" /* yacc.c:1646 */
+#line 1248 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3093 "awkgram.c" /* yacc.c:1646 */
+#line 3094 "awkgram.c" /* yacc.c:1646 */
break;
case 92:
-#line 1249 "awkgram.y" /* yacc.c:1646 */
+#line 1250 "awkgram.y" /* yacc.c:1646 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3102 "awkgram.c" /* yacc.c:1646 */
+#line 3103 "awkgram.c" /* yacc.c:1646 */
break;
case 93:
-#line 1257 "awkgram.y" /* yacc.c:1646 */
+#line 1258 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3108 "awkgram.c" /* yacc.c:1646 */
+#line 3109 "awkgram.c" /* yacc.c:1646 */
break;
case 94:
-#line 1259 "awkgram.y" /* yacc.c:1646 */
+#line 1260 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3114 "awkgram.c" /* yacc.c:1646 */
+#line 3115 "awkgram.c" /* yacc.c:1646 */
break;
case 95:
-#line 1264 "awkgram.y" /* yacc.c:1646 */
+#line 1265 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->param_count = 0;
(yyval) = list_create((yyvsp[0]));
}
-#line 3123 "awkgram.c" /* yacc.c:1646 */
+#line 3124 "awkgram.c" /* yacc.c:1646 */
break;
case 96:
-#line 1269 "awkgram.y" /* yacc.c:1646 */
+#line 1270 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->param_count = (yyvsp[-2])->lasti->param_count + 1;
(yyval) = list_append((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3133 "awkgram.c" /* yacc.c:1646 */
+#line 3134 "awkgram.c" /* yacc.c:1646 */
break;
case 97:
-#line 1275 "awkgram.y" /* yacc.c:1646 */
+#line 1276 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3139 "awkgram.c" /* yacc.c:1646 */
+#line 3140 "awkgram.c" /* yacc.c:1646 */
break;
case 98:
-#line 1277 "awkgram.y" /* yacc.c:1646 */
+#line 1278 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3145 "awkgram.c" /* yacc.c:1646 */
+#line 3146 "awkgram.c" /* yacc.c:1646 */
break;
case 99:
-#line 1279 "awkgram.y" /* yacc.c:1646 */
+#line 1280 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-2]); }
-#line 3151 "awkgram.c" /* yacc.c:1646 */
+#line 3152 "awkgram.c" /* yacc.c:1646 */
break;
case 100:
-#line 1285 "awkgram.y" /* yacc.c:1646 */
+#line 1286 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3157 "awkgram.c" /* yacc.c:1646 */
+#line 3158 "awkgram.c" /* yacc.c:1646 */
break;
case 101:
-#line 1287 "awkgram.y" /* yacc.c:1646 */
+#line 1288 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3163 "awkgram.c" /* yacc.c:1646 */
+#line 3164 "awkgram.c" /* yacc.c:1646 */
break;
case 102:
-#line 1292 "awkgram.y" /* yacc.c:1646 */
+#line 1293 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3169 "awkgram.c" /* yacc.c:1646 */
+#line 3170 "awkgram.c" /* yacc.c:1646 */
break;
case 103:
-#line 1294 "awkgram.y" /* yacc.c:1646 */
+#line 1295 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3175 "awkgram.c" /* yacc.c:1646 */
+#line 3176 "awkgram.c" /* yacc.c:1646 */
break;
case 104:
-#line 1299 "awkgram.y" /* yacc.c:1646 */
+#line 1300 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_expression_list(NULL, (yyvsp[0])); }
-#line 3181 "awkgram.c" /* yacc.c:1646 */
+#line 3182 "awkgram.c" /* yacc.c:1646 */
break;
case 105:
-#line 1301 "awkgram.y" /* yacc.c:1646 */
+#line 1302 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3190 "awkgram.c" /* yacc.c:1646 */
+#line 3191 "awkgram.c" /* yacc.c:1646 */
break;
case 106:
-#line 1306 "awkgram.y" /* yacc.c:1646 */
+#line 1307 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3196 "awkgram.c" /* yacc.c:1646 */
+#line 3197 "awkgram.c" /* yacc.c:1646 */
break;
case 107:
-#line 1308 "awkgram.y" /* yacc.c:1646 */
+#line 1309 "awkgram.y" /* yacc.c:1646 */
{
/*
* Returning the expression list instead of NULL lets
@@ -3204,52 +3205,52 @@ regular_print:
*/
(yyval) = (yyvsp[-1]);
}
-#line 3208 "awkgram.c" /* yacc.c:1646 */
+#line 3209 "awkgram.c" /* yacc.c:1646 */
break;
case 108:
-#line 1316 "awkgram.y" /* yacc.c:1646 */
+#line 1317 "awkgram.y" /* yacc.c:1646 */
{
/* Ditto */
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
}
-#line 3217 "awkgram.c" /* yacc.c:1646 */
+#line 3218 "awkgram.c" /* yacc.c:1646 */
break;
case 109:
-#line 1321 "awkgram.y" /* yacc.c:1646 */
+#line 1322 "awkgram.y" /* yacc.c:1646 */
{
/* Ditto */
(yyval) = (yyvsp[-2]);
}
-#line 3226 "awkgram.c" /* yacc.c:1646 */
+#line 3227 "awkgram.c" /* yacc.c:1646 */
break;
case 110:
-#line 1330 "awkgram.y" /* yacc.c:1646 */
+#line 1331 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint && (yyvsp[0])->lasti->opcode == Op_match_rec)
lintwarn_ln((yyvsp[-1])->source_line,
_("regular expression on right of assignment"));
(yyval) = mk_assignment((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1]));
}
-#line 3237 "awkgram.c" /* yacc.c:1646 */
+#line 3238 "awkgram.c" /* yacc.c:1646 */
break;
case 111:
-#line 1337 "awkgram.y" /* yacc.c:1646 */
+#line 1338 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3243 "awkgram.c" /* yacc.c:1646 */
+#line 3244 "awkgram.c" /* yacc.c:1646 */
break;
case 112:
-#line 1339 "awkgram.y" /* yacc.c:1646 */
+#line 1340 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3249 "awkgram.c" /* yacc.c:1646 */
+#line 3250 "awkgram.c" /* yacc.c:1646 */
break;
case 113:
-#line 1341 "awkgram.y" /* yacc.c:1646 */
+#line 1342 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-2])->lasti->opcode == Op_match_rec)
warning_ln((yyvsp[-1])->source_line,
@@ -3265,11 +3266,11 @@ regular_print:
(yyval) = list_append(list_merge((yyvsp[-2]),
(yyvsp[0])), (yyvsp[-1]));
}
}
-#line 3269 "awkgram.c" /* yacc.c:1646 */
+#line 3270 "awkgram.c" /* yacc.c:1646 */
break;
case 114:
-#line 1357 "awkgram.y" /* yacc.c:1646 */
+#line 1358 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint_old)
warning_ln((yyvsp[-1])->source_line,
@@ -3279,91 +3280,91 @@ regular_print:
(yyvsp[-1])->expr_count = 1;
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])),
(yyvsp[-1]));
}
-#line 3283 "awkgram.c" /* yacc.c:1646 */
+#line 3284 "awkgram.c" /* yacc.c:1646 */
break;
case 115:
-#line 1367 "awkgram.y" /* yacc.c:1646 */
+#line 1368 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint && (yyvsp[0])->lasti->opcode == Op_match_rec)
lintwarn_ln((yyvsp[-1])->source_line,
_("regular expression on right of comparison"));
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])),
(yyvsp[-1]));
}
-#line 3294 "awkgram.c" /* yacc.c:1646 */
+#line 3295 "awkgram.c" /* yacc.c:1646 */
break;
case 116:
-#line 1374 "awkgram.y" /* yacc.c:1646 */
+#line 1375 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_condition((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]),
(yyvsp[-1]), (yyvsp[0])); }
-#line 3300 "awkgram.c" /* yacc.c:1646 */
+#line 3301 "awkgram.c" /* yacc.c:1646 */
break;
case 117:
-#line 1376 "awkgram.y" /* yacc.c:1646 */
+#line 1377 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3306 "awkgram.c" /* yacc.c:1646 */
+#line 3307 "awkgram.c" /* yacc.c:1646 */
break;
case 118:
-#line 1381 "awkgram.y" /* yacc.c:1646 */
+#line 1382 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3312 "awkgram.c" /* yacc.c:1646 */
+#line 3313 "awkgram.c" /* yacc.c:1646 */
break;
case 119:
-#line 1383 "awkgram.y" /* yacc.c:1646 */
+#line 1384 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3318 "awkgram.c" /* yacc.c:1646 */
+#line 3319 "awkgram.c" /* yacc.c:1646 */
break;
case 120:
-#line 1385 "awkgram.y" /* yacc.c:1646 */
+#line 1386 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_assign_quotient;
(yyval) = (yyvsp[0]);
}
-#line 3327 "awkgram.c" /* yacc.c:1646 */
+#line 3328 "awkgram.c" /* yacc.c:1646 */
break;
case 121:
-#line 1393 "awkgram.y" /* yacc.c:1646 */
+#line 1394 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3333 "awkgram.c" /* yacc.c:1646 */
+#line 3334 "awkgram.c" /* yacc.c:1646 */
break;
case 122:
-#line 1395 "awkgram.y" /* yacc.c:1646 */
+#line 1396 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3339 "awkgram.c" /* yacc.c:1646 */
+#line 3340 "awkgram.c" /* yacc.c:1646 */
break;
case 123:
-#line 1400 "awkgram.y" /* yacc.c:1646 */
+#line 1401 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3345 "awkgram.c" /* yacc.c:1646 */
+#line 3346 "awkgram.c" /* yacc.c:1646 */
break;
case 124:
-#line 1402 "awkgram.y" /* yacc.c:1646 */
+#line 1403 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3351 "awkgram.c" /* yacc.c:1646 */
+#line 3352 "awkgram.c" /* yacc.c:1646 */
break;
case 125:
-#line 1407 "awkgram.y" /* yacc.c:1646 */
+#line 1408 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3357 "awkgram.c" /* yacc.c:1646 */
+#line 3358 "awkgram.c" /* yacc.c:1646 */
break;
case 126:
-#line 1409 "awkgram.y" /* yacc.c:1646 */
+#line 1410 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3363 "awkgram.c" /* yacc.c:1646 */
+#line 3364 "awkgram.c" /* yacc.c:1646 */
break;
case 127:
-#line 1411 "awkgram.y" /* yacc.c:1646 */
+#line 1412 "awkgram.y" /* yacc.c:1646 */
{
int count = 2;
bool is_simple_var = false;
@@ -3410,47 +3411,47 @@ regular_print:
max_args = count;
}
}
-#line 3414 "awkgram.c" /* yacc.c:1646 */
+#line 3415 "awkgram.c" /* yacc.c:1646 */
break;
case 129:
-#line 1463 "awkgram.y" /* yacc.c:1646 */
+#line 1464 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3420 "awkgram.c" /* yacc.c:1646 */
+#line 3421 "awkgram.c" /* yacc.c:1646 */
break;
case 130:
-#line 1465 "awkgram.y" /* yacc.c:1646 */
+#line 1466 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3426 "awkgram.c" /* yacc.c:1646 */
+#line 3427 "awkgram.c" /* yacc.c:1646 */
break;
case 131:
-#line 1467 "awkgram.y" /* yacc.c:1646 */
+#line 1468 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3432 "awkgram.c" /* yacc.c:1646 */
+#line 3433 "awkgram.c" /* yacc.c:1646 */
break;
case 132:
-#line 1469 "awkgram.y" /* yacc.c:1646 */
+#line 1470 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3438 "awkgram.c" /* yacc.c:1646 */
+#line 3439 "awkgram.c" /* yacc.c:1646 */
break;
case 133:
-#line 1471 "awkgram.y" /* yacc.c:1646 */
+#line 1472 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3444 "awkgram.c" /* yacc.c:1646 */
+#line 3445 "awkgram.c" /* yacc.c:1646 */
break;
case 134:
-#line 1473 "awkgram.y" /* yacc.c:1646 */
+#line 1474 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3450 "awkgram.c" /* yacc.c:1646 */
+#line 3451 "awkgram.c" /* yacc.c:1646 */
break;
case 135:
-#line 1475 "awkgram.y" /* yacc.c:1646 */
+#line 1476 "awkgram.y" /* yacc.c:1646 */
{
/*
* In BEGINFILE/ENDFILE, allow `getline [var] < file'
@@ -3464,29 +3465,29 @@ regular_print:
_("non-redirected `getline' undefined inside
END action"));
(yyval) = mk_getline((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]),
redirect_input);
}
-#line 3468 "awkgram.c" /* yacc.c:1646 */
+#line 3469 "awkgram.c" /* yacc.c:1646 */
break;
case 136:
-#line 1489 "awkgram.y" /* yacc.c:1646 */
+#line 1490 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postincrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3477 "awkgram.c" /* yacc.c:1646 */
+#line 3478 "awkgram.c" /* yacc.c:1646 */
break;
case 137:
-#line 1494 "awkgram.y" /* yacc.c:1646 */
+#line 1495 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postdecrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3486 "awkgram.c" /* yacc.c:1646 */
+#line 3487 "awkgram.c" /* yacc.c:1646 */
break;
case 138:
-#line 1499 "awkgram.y" /* yacc.c:1646 */
+#line 1500 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint_old) {
warning_ln((yyvsp[-1])->source_line,
@@ -3506,64 +3507,64 @@ regular_print:
(yyval) = list_append(list_merge(t, (yyvsp[0])),
(yyvsp[-1]));
}
}
-#line 3510 "awkgram.c" /* yacc.c:1646 */
+#line 3511 "awkgram.c" /* yacc.c:1646 */
break;
case 139:
-#line 1524 "awkgram.y" /* yacc.c:1646 */
+#line 1525 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_getline((yyvsp[-1]), (yyvsp[0]), (yyvsp[-3]),
(yyvsp[-2])->redir_type);
bcfree((yyvsp[-2]));
}
-#line 3519 "awkgram.c" /* yacc.c:1646 */
+#line 3520 "awkgram.c" /* yacc.c:1646 */
break;
case 140:
-#line 1530 "awkgram.y" /* yacc.c:1646 */
+#line 1531 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3525 "awkgram.c" /* yacc.c:1646 */
+#line 3526 "awkgram.c" /* yacc.c:1646 */
break;
case 141:
-#line 1532 "awkgram.y" /* yacc.c:1646 */
+#line 1533 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3531 "awkgram.c" /* yacc.c:1646 */
+#line 3532 "awkgram.c" /* yacc.c:1646 */
break;
case 142:
-#line 1534 "awkgram.y" /* yacc.c:1646 */
+#line 1535 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3537 "awkgram.c" /* yacc.c:1646 */
+#line 3538 "awkgram.c" /* yacc.c:1646 */
break;
case 143:
-#line 1536 "awkgram.y" /* yacc.c:1646 */
+#line 1537 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3543 "awkgram.c" /* yacc.c:1646 */
+#line 3544 "awkgram.c" /* yacc.c:1646 */
break;
case 144:
-#line 1538 "awkgram.y" /* yacc.c:1646 */
+#line 1539 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3549 "awkgram.c" /* yacc.c:1646 */
+#line 3550 "awkgram.c" /* yacc.c:1646 */
break;
case 145:
-#line 1540 "awkgram.y" /* yacc.c:1646 */
+#line 1541 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3555 "awkgram.c" /* yacc.c:1646 */
+#line 3556 "awkgram.c" /* yacc.c:1646 */
break;
case 146:
-#line 1545 "awkgram.y" /* yacc.c:1646 */
+#line 1546 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3563 "awkgram.c" /* yacc.c:1646 */
+#line 3564 "awkgram.c" /* yacc.c:1646 */
break;
case 147:
-#line 1549 "awkgram.y" /* yacc.c:1646 */
+#line 1550 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0])->opcode == Op_match_rec) {
(yyvsp[0])->opcode = Op_nomatch;
@@ -3595,37 +3596,37 @@ regular_print:
}
}
}
-#line 3599 "awkgram.c" /* yacc.c:1646 */
+#line 3600 "awkgram.c" /* yacc.c:1646 */
break;
case 148:
-#line 1581 "awkgram.y" /* yacc.c:1646 */
+#line 1582 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3605 "awkgram.c" /* yacc.c:1646 */
+#line 3606 "awkgram.c" /* yacc.c:1646 */
break;
case 149:
-#line 1583 "awkgram.y" /* yacc.c:1646 */
+#line 1584 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 3615 "awkgram.c" /* yacc.c:1646 */
+#line 3616 "awkgram.c" /* yacc.c:1646 */
break;
case 150:
-#line 1589 "awkgram.y" /* yacc.c:1646 */
+#line 1590 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 3625 "awkgram.c" /* yacc.c:1646 */
+#line 3626 "awkgram.c" /* yacc.c:1646 */
break;
case 151:
-#line 1595 "awkgram.y" /* yacc.c:1646 */
+#line 1596 "awkgram.y" /* yacc.c:1646 */
{
static bool warned = false;
@@ -3638,45 +3639,45 @@ regular_print:
if ((yyval) == NULL)
YYABORT;
}
-#line 3642 "awkgram.c" /* yacc.c:1646 */
+#line 3643 "awkgram.c" /* yacc.c:1646 */
break;
case 154:
-#line 1610 "awkgram.y" /* yacc.c:1646 */
+#line 1611 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-1])->opcode = Op_preincrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 3651 "awkgram.c" /* yacc.c:1646 */
+#line 3652 "awkgram.c" /* yacc.c:1646 */
break;
case 155:
-#line 1615 "awkgram.y" /* yacc.c:1646 */
+#line 1616 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-1])->opcode = Op_predecrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 3660 "awkgram.c" /* yacc.c:1646 */
+#line 3661 "awkgram.c" /* yacc.c:1646 */
break;
case 156:
-#line 1620 "awkgram.y" /* yacc.c:1646 */
+#line 1621 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3668 "awkgram.c" /* yacc.c:1646 */
+#line 3669 "awkgram.c" /* yacc.c:1646 */
break;
case 157:
-#line 1624 "awkgram.y" /* yacc.c:1646 */
+#line 1625 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3676 "awkgram.c" /* yacc.c:1646 */
+#line 3677 "awkgram.c" /* yacc.c:1646 */
break;
case 158:
-#line 1628 "awkgram.y" /* yacc.c:1646 */
+#line 1629 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0])->lasti->opcode == Op_push_i
&& ((yyvsp[0])->lasti->memory->flags & (STRCUR|STRING))
== 0
@@ -3691,11 +3692,11 @@ regular_print:
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
}
-#line 3695 "awkgram.c" /* yacc.c:1646 */
+#line 3696 "awkgram.c" /* yacc.c:1646 */
break;
case 159:
-#line 1643 "awkgram.y" /* yacc.c:1646 */
+#line 1644 "awkgram.y" /* yacc.c:1646 */
{
/*
* was: $$ = $2
@@ -3705,20 +3706,20 @@ regular_print:
(yyvsp[-1])->memory = make_number(0.0);
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
-#line 3709 "awkgram.c" /* yacc.c:1646 */
+#line 3710 "awkgram.c" /* yacc.c:1646 */
break;
case 160:
-#line 1656 "awkgram.y" /* yacc.c:1646 */
+#line 1657 "awkgram.y" /* yacc.c:1646 */
{
func_use((yyvsp[0])->lasti->func_name, FUNC_USE);
(yyval) = (yyvsp[0]);
}
-#line 3718 "awkgram.c" /* yacc.c:1646 */
+#line 3719 "awkgram.c" /* yacc.c:1646 */
break;
case 161:
-#line 1661 "awkgram.y" /* yacc.c:1646 */
+#line 1662 "awkgram.y" /* yacc.c:1646 */
{
/* indirect function call */
INSTRUCTION *f, *t;
@@ -3751,11 +3752,11 @@ regular_print:
(yyval) = list_prepend((yyvsp[0]), t);
}
-#line 3755 "awkgram.c" /* yacc.c:1646 */
+#line 3756 "awkgram.c" /* yacc.c:1646 */
break;
case 162:
-#line 1697 "awkgram.y" /* yacc.c:1646 */
+#line 1698 "awkgram.y" /* yacc.c:1646 */
{
param_sanity((yyvsp[-1]));
(yyvsp[-3])->opcode = Op_func_call;
@@ -3769,49 +3770,49 @@ regular_print:
(yyval) = list_append(t, (yyvsp[-3]));
}
}
-#line 3773 "awkgram.c" /* yacc.c:1646 */
+#line 3774 "awkgram.c" /* yacc.c:1646 */
break;
case 163:
-#line 1714 "awkgram.y" /* yacc.c:1646 */
+#line 1715 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3779 "awkgram.c" /* yacc.c:1646 */
+#line 3780 "awkgram.c" /* yacc.c:1646 */
break;
case 164:
-#line 1716 "awkgram.y" /* yacc.c:1646 */
+#line 1717 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3785 "awkgram.c" /* yacc.c:1646 */
+#line 3786 "awkgram.c" /* yacc.c:1646 */
break;
case 165:
-#line 1721 "awkgram.y" /* yacc.c:1646 */
+#line 1722 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3791 "awkgram.c" /* yacc.c:1646 */
+#line 3792 "awkgram.c" /* yacc.c:1646 */
break;
case 166:
-#line 1723 "awkgram.y" /* yacc.c:1646 */
+#line 1724 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3797 "awkgram.c" /* yacc.c:1646 */
+#line 3798 "awkgram.c" /* yacc.c:1646 */
break;
case 167:
-#line 1728 "awkgram.y" /* yacc.c:1646 */
+#line 1729 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3803 "awkgram.c" /* yacc.c:1646 */
+#line 3804 "awkgram.c" /* yacc.c:1646 */
break;
case 168:
-#line 1730 "awkgram.y" /* yacc.c:1646 */
+#line 1731 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 3811 "awkgram.c" /* yacc.c:1646 */
+#line 3812 "awkgram.c" /* yacc.c:1646 */
break;
case 169:
-#line 1737 "awkgram.y" /* yacc.c:1646 */
+#line 1738 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip = (yyvsp[0])->lasti;
int count = ip->sub_count; /* # of SUBSEP-seperated
expressions */
@@ -3825,11 +3826,11 @@ regular_print:
sub_counter++; /* count # of dimensions */
(yyval) = (yyvsp[0]);
}
-#line 3829 "awkgram.c" /* yacc.c:1646 */
+#line 3830 "awkgram.c" /* yacc.c:1646 */
break;
case 170:
-#line 1754 "awkgram.y" /* yacc.c:1646 */
+#line 1755 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *t = (yyvsp[-1]);
if ((yyvsp[-1]) == NULL) {
@@ -3843,31 +3844,31 @@ regular_print:
(yyvsp[0])->sub_count = count_expressions(&t, false);
(yyval) = list_append(t, (yyvsp[0]));
}
-#line 3847 "awkgram.c" /* yacc.c:1646 */
+#line 3848 "awkgram.c" /* yacc.c:1646 */
break;
case 171:
-#line 1771 "awkgram.y" /* yacc.c:1646 */
+#line 1772 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3853 "awkgram.c" /* yacc.c:1646 */
+#line 3854 "awkgram.c" /* yacc.c:1646 */
break;
case 172:
-#line 1773 "awkgram.y" /* yacc.c:1646 */
+#line 1774 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 3861 "awkgram.c" /* yacc.c:1646 */
+#line 3862 "awkgram.c" /* yacc.c:1646 */
break;
case 173:
-#line 1780 "awkgram.y" /* yacc.c:1646 */
+#line 1781 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3867 "awkgram.c" /* yacc.c:1646 */
+#line 3868 "awkgram.c" /* yacc.c:1646 */
break;
case 174:
-#line 1785 "awkgram.y" /* yacc.c:1646 */
+#line 1786 "awkgram.y" /* yacc.c:1646 */
{
char *var_name = (yyvsp[0])->lextok;
@@ -3875,22 +3876,22 @@ regular_print:
(yyvsp[0])->memory = variable((yyvsp[0])->source_line,
var_name, Node_var_new);
(yyval) = list_create((yyvsp[0]));
}
-#line 3879 "awkgram.c" /* yacc.c:1646 */
+#line 3880 "awkgram.c" /* yacc.c:1646 */
break;
case 175:
-#line 1793 "awkgram.y" /* yacc.c:1646 */
+#line 1794 "awkgram.y" /* yacc.c:1646 */
{
char *arr = (yyvsp[-1])->lextok;
(yyvsp[-1])->memory = variable((yyvsp[-1])->source_line, arr,
Node_var_new);
(yyvsp[-1])->opcode = Op_push_array;
(yyval) = list_prepend((yyvsp[0]), (yyvsp[-1]));
}
-#line 3890 "awkgram.c" /* yacc.c:1646 */
+#line 3891 "awkgram.c" /* yacc.c:1646 */
break;
case 176:
-#line 1803 "awkgram.y" /* yacc.c:1646 */
+#line 1804 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip = (yyvsp[0])->nexti;
if (ip->opcode == Op_push
@@ -3902,73 +3903,73 @@ regular_print:
} else
(yyval) = (yyvsp[0]);
}
-#line 3906 "awkgram.c" /* yacc.c:1646 */
+#line 3907 "awkgram.c" /* yacc.c:1646 */
break;
case 177:
-#line 1815 "awkgram.y" /* yacc.c:1646 */
+#line 1816 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
if ((yyvsp[0]) != NULL)
mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3916 "awkgram.c" /* yacc.c:1646 */
+#line 3917 "awkgram.c" /* yacc.c:1646 */
break;
case 178:
-#line 1824 "awkgram.y" /* yacc.c:1646 */
+#line 1825 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postincrement;
}
-#line 3924 "awkgram.c" /* yacc.c:1646 */
+#line 3925 "awkgram.c" /* yacc.c:1646 */
break;
case 179:
-#line 1828 "awkgram.y" /* yacc.c:1646 */
+#line 1829 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postdecrement;
}
-#line 3932 "awkgram.c" /* yacc.c:1646 */
+#line 3933 "awkgram.c" /* yacc.c:1646 */
break;
case 180:
-#line 1831 "awkgram.y" /* yacc.c:1646 */
+#line 1832 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3938 "awkgram.c" /* yacc.c:1646 */
+#line 3939 "awkgram.c" /* yacc.c:1646 */
break;
case 182:
-#line 1839 "awkgram.y" /* yacc.c:1646 */
+#line 1840 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3944 "awkgram.c" /* yacc.c:1646 */
+#line 3945 "awkgram.c" /* yacc.c:1646 */
break;
case 183:
-#line 1843 "awkgram.y" /* yacc.c:1646 */
+#line 1844 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3950 "awkgram.c" /* yacc.c:1646 */
+#line 3951 "awkgram.c" /* yacc.c:1646 */
break;
case 186:
-#line 1852 "awkgram.y" /* yacc.c:1646 */
+#line 1853 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3956 "awkgram.c" /* yacc.c:1646 */
+#line 3957 "awkgram.c" /* yacc.c:1646 */
break;
case 187:
-#line 1856 "awkgram.y" /* yacc.c:1646 */
+#line 1857 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); yyerrok; }
-#line 3962 "awkgram.c" /* yacc.c:1646 */
+#line 3963 "awkgram.c" /* yacc.c:1646 */
break;
case 188:
-#line 1860 "awkgram.y" /* yacc.c:1646 */
+#line 1861 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3968 "awkgram.c" /* yacc.c:1646 */
+#line 3969 "awkgram.c" /* yacc.c:1646 */
break;
-#line 3972 "awkgram.c" /* yacc.c:1646 */
+#line 3973 "awkgram.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -4196,7 +4197,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1862 "awkgram.y" /* yacc.c:1906 */
+#line 1863 "awkgram.y" /* yacc.c:1906 */
struct token {
diff --git a/awkgram.y b/awkgram.y
index d054ec9..5e3bade 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -228,6 +228,7 @@ rule
: pattern action
{
(void) append_rule($1, $2);
+ first_rule = false;
}
| pattern statement_term
{
diff --git a/test/ChangeLog b/test/ChangeLog
index 500fdb0..7527801 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-16 Arnold D. Robbins <address@hidden>
+
+ * Makefile.am (profile8): New test.
+ * profile8.awk, profile8.ok: New files.
+
2015-01-14 Arnold D. Robbins <address@hidden>
* Makefile.am (dumpvars): Grep out ENVIRON and PROCINFO since
diff --git a/test/Makefile.am b/test/Makefile.am
index c3d8309..a60547f 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1727,6 +1727,11 @@ profile7:
@sed 1,2d < address@hidden > _$@; rm address@hidden
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+profile8:
+ @echo $@
+ @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/address@hidden > /dev/null
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
posix2008sub:
@echo $@
@$(AWK) --posix -f "$(srcdir)"/address@hidden > _$@ 2>&1
diff --git a/test/Makefile.in b/test/Makefile.in
index 3c03635..73012c8 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -2152,6 +2152,11 @@ profile7:
@sed 1,2d < address@hidden > _$@; rm address@hidden
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+profile8:
+ @echo $@
+ @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/address@hidden > /dev/null
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
posix2008sub:
@echo $@
@$(AWK) --posix -f "$(srcdir)"/address@hidden > _$@ 2>&1
diff --git a/test/profile8.awk b/test/profile8.awk
new file mode 100644
index 0000000..16252ce
--- /dev/null
+++ b/test/profile8.awk
@@ -0,0 +1,9 @@
+# Some
+# header
+# comments
+
+# Add up
+{ sum += $1 }
+
+# Print sum
+END { print sum }
diff --git a/test/profile8.ok b/test/profile8.ok
new file mode 100644
index 0000000..34f7a96
--- /dev/null
+++ b/test/profile8.ok
@@ -0,0 +1,14 @@
+# Some
+# header
+# comments
+
+# Add up
+{
+ sum += $1
+}
+
+# Print sum
+END {
+ print sum
+}
+
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +
awkgram.c | 701 +++++++++++++++++++++++++++--------------------------
awkgram.y | 1 +
test/ChangeLog | 5 +
test/Makefile.am | 5 +
test/Makefile.in | 5 +
test/profile8.awk | 9 +
test/profile8.ok | 14 +
8 files changed, 395 insertions(+), 350 deletions(-)
create mode 100644 test/profile8.awk
create mode 100644 test/profile8.ok
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1035-g85699a5,
Arnold Robbins <=