[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, feature/namespaces, updated. gawk-4.1.0-
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, feature/namespaces, updated. gawk-4.1.0-3836-g17e79e7 |
Date: |
Mon, 31 Dec 2018 14:28:38 -0500 (EST) |
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, feature/namespaces has been updated
via 17e79e71846c38a3f32e424ec8b23a31c5695a08 (commit)
from b0a6a28a699cdc862eaa6bcc64a87f685449ad7d (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=17e79e71846c38a3f32e424ec8b23a31c5695a08
commit 17e79e71846c38a3f32e424ec8b23a31c5695a08
Author: Arnold D. Robbins <address@hidden>
Date: Mon Dec 31 21:28:23 2018 +0200
Clean up namespace handling for the profiler.
diff --git a/ChangeLog b/ChangeLog
index 3d7e24e..579caea 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2018-12-31 Arnold D. Robbins <address@hidden>
+
+ Clean up namespace handling for the profiler.
+
+ * awkgram.y (make_pp_namespace): Remove function, not needed.
+ (set_namespace): Use estrdup to save the current namespace.
+ * main.c (main): Before dumping the program, set current_namespace
+ to awk_namespace.
+ * profile.c (pprint): Use "awk" for comparison, not "awk::".
+ (pp_namespace): Just print the name in the @namespace line.
+ (adjust_namespace): Adjust for the fact that namespaces no longer
+ have the trailing "::".
+
2018-12-30 Arnold D. Robbins <address@hidden>
* awk.h (check_qualified_name): Remove declaration.
diff --git a/awkgram.c b/awkgram.c
index de745fb..0e7a211 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -102,7 +102,6 @@ static void set_namespace(INSTRUCTION *ns, INSTRUCTION
*comment);
static void next_sourcefile(void);
static char *tokexpand(void);
static NODE *set_profile_text(NODE *n, const char *str, size_t len);
-static char *make_pp_namespace();
static int check_qualified_special(char *token);
static INSTRUCTION *trailing_comment;
static INSTRUCTION *outer_comment;
@@ -229,7 +228,7 @@ extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
-#line 233 "awkgram.c" /* yacc.c:338 */
+#line 232 "awkgram.c" /* yacc.c:338 */
# ifndef YY_NULLPTR
# if defined __cplusplus
# if 201103L <= __cplusplus
@@ -682,27 +681,27 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 231, 231, 232, 237, 247, 251, 263, 271, 285,
- 296, 306, 316, 329, 339, 341, 346, 356, 358, 363,
- 365, 367, 373, 377, 382, 412, 424, 436, 442, 451,
- 469, 471, 473, 479, 487, 488, 492, 492, 526, 525,
- 559, 574, 576, 581, 582, 602, 607, 608, 612, 623,
- 628, 635, 743, 794, 844, 970, 991, 1012, 1022, 1032,
- 1042, 1053, 1066, 1084, 1083, 1097, 1115, 1115, 1213, 1213,
- 1246, 1276, 1284, 1285, 1291, 1292, 1299, 1304, 1317, 1332,
- 1334, 1342, 1349, 1351, 1359, 1368, 1370, 1379, 1380, 1388,
- 1393, 1393, 1406, 1412, 1424, 1428, 1450, 1451, 1457, 1458,
- 1467, 1468, 1473, 1478, 1495, 1497, 1499, 1506, 1507, 1513,
- 1514, 1519, 1521, 1528, 1530, 1538, 1543, 1554, 1555, 1560,
- 1562, 1569, 1571, 1579, 1584, 1594, 1595, 1600, 1607, 1611,
- 1613, 1615, 1628, 1645, 1655, 1662, 1664, 1669, 1671, 1673,
- 1681, 1683, 1688, 1690, 1695, 1697, 1699, 1756, 1758, 1760,
- 1762, 1764, 1766, 1768, 1770, 1784, 1789, 1794, 1819, 1825,
- 1827, 1829, 1831, 1833, 1835, 1840, 1844, 1876, 1884, 1890,
- 1896, 1909, 1910, 1911, 1916, 1921, 1925, 1929, 1944, 1965,
- 1970, 2007, 2049, 2050, 2056, 2057, 2062, 2064, 2071, 2088,
- 2105, 2107, 2114, 2119, 2127, 2137, 2149, 2158, 2162, 2167,
- 2171, 2175, 2179, 2184, 2185, 2189, 2193, 2197
+ 0, 230, 230, 231, 236, 246, 250, 262, 270, 284,
+ 295, 305, 315, 328, 338, 340, 345, 355, 357, 362,
+ 364, 366, 372, 376, 381, 411, 423, 435, 441, 450,
+ 468, 470, 472, 478, 486, 487, 491, 491, 525, 524,
+ 558, 573, 575, 580, 581, 601, 606, 607, 611, 622,
+ 627, 634, 742, 793, 843, 969, 990, 1011, 1021, 1031,
+ 1041, 1052, 1065, 1083, 1082, 1096, 1114, 1114, 1212, 1212,
+ 1245, 1275, 1283, 1284, 1290, 1291, 1298, 1303, 1316, 1331,
+ 1333, 1341, 1348, 1350, 1358, 1367, 1369, 1378, 1379, 1387,
+ 1392, 1392, 1405, 1411, 1423, 1427, 1449, 1450, 1456, 1457,
+ 1466, 1467, 1472, 1477, 1494, 1496, 1498, 1505, 1506, 1512,
+ 1513, 1518, 1520, 1527, 1529, 1537, 1542, 1553, 1554, 1559,
+ 1561, 1568, 1570, 1578, 1583, 1593, 1594, 1599, 1606, 1610,
+ 1612, 1614, 1627, 1644, 1654, 1661, 1663, 1668, 1670, 1672,
+ 1680, 1682, 1687, 1689, 1694, 1696, 1698, 1755, 1757, 1759,
+ 1761, 1763, 1765, 1767, 1769, 1783, 1788, 1793, 1818, 1824,
+ 1826, 1828, 1830, 1832, 1834, 1839, 1843, 1875, 1883, 1889,
+ 1895, 1908, 1909, 1910, 1915, 1920, 1924, 1928, 1943, 1964,
+ 1969, 2006, 2048, 2049, 2055, 2056, 2061, 2063, 2070, 2087,
+ 2104, 2106, 2113, 2118, 2126, 2136, 2148, 2157, 2161, 2166,
+ 2170, 2174, 2178, 2183, 2184, 2188, 2192, 2196
};
#endif
@@ -1898,22 +1897,22 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 231 "awkgram.y" /* yacc.c:1645 */
+#line 230 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 1904 "awkgram.c" /* yacc.c:1645 */
+#line 1903 "awkgram.c" /* yacc.c:1645 */
break;
case 3:
-#line 233 "awkgram.y" /* yacc.c:1645 */
+#line 232 "awkgram.y" /* yacc.c:1645 */
{
rule = 0;
yyerrok;
}
-#line 1913 "awkgram.c" /* yacc.c:1645 */
+#line 1912 "awkgram.c" /* yacc.c:1645 */
break;
case 4:
-#line 238 "awkgram.y" /* yacc.c:1645 */
+#line 237 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[0]) != NULL) {
if ((yyvsp[-1]) == NULL)
@@ -1923,19 +1922,19 @@ yyreduce:
}
(yyval) = (yyvsp[-1]);
}
-#line 1927 "awkgram.c" /* yacc.c:1645 */
+#line 1926 "awkgram.c" /* yacc.c:1645 */
break;
case 5:
-#line 248 "awkgram.y" /* yacc.c:1645 */
+#line 247 "awkgram.y" /* yacc.c:1645 */
{
next_sourcefile();
}
-#line 1935 "awkgram.c" /* yacc.c:1645 */
+#line 1934 "awkgram.c" /* yacc.c:1645 */
break;
case 6:
-#line 252 "awkgram.y" /* yacc.c:1645 */
+#line 251 "awkgram.y" /* yacc.c:1645 */
{
rule = 0;
/*
@@ -1944,11 +1943,11 @@ yyreduce:
*/
/* yyerrok; */
}
-#line 1948 "awkgram.c" /* yacc.c:1645 */
+#line 1947 "awkgram.c" /* yacc.c:1645 */
break;
case 7:
-#line 264 "awkgram.y" /* yacc.c:1645 */
+#line 263 "awkgram.y" /* yacc.c:1645 */
{
(void) append_rule((yyvsp[-1]), (yyvsp[0]));
if (pending_comment != NULL) {
@@ -1956,11 +1955,11 @@ yyreduce:
pending_comment = NULL;
}
}
-#line 1960 "awkgram.c" /* yacc.c:1645 */
+#line 1959 "awkgram.c" /* yacc.c:1645 */
break;
case 8:
-#line 272 "awkgram.y" /* yacc.c:1645 */
+#line 271 "awkgram.y" /* yacc.c:1645 */
{
if (rule != Rule) {
msg(_("%s blocks must have an action part"),
ruletab[rule]);
@@ -1974,11 +1973,11 @@ yyreduce:
(void) append_rule((yyvsp[-1]), NULL);
}
}
-#line 1978 "awkgram.c" /* yacc.c:1645 */
+#line 1977 "awkgram.c" /* yacc.c:1645 */
break;
case 9:
-#line 286 "awkgram.y" /* yacc.c:1645 */
+#line 285 "awkgram.y" /* yacc.c:1645 */
{
in_function = NULL;
(void) mk_function((yyvsp[-1]), (yyvsp[0]));
@@ -1989,11 +1988,11 @@ yyreduce:
}
yyerrok;
}
-#line 1993 "awkgram.c" /* yacc.c:1645 */
+#line 1992 "awkgram.c" /* yacc.c:1645 */
break;
case 10:
-#line 297 "awkgram.y" /* yacc.c:1645 */
+#line 296 "awkgram.y" /* yacc.c:1645 */
{
want_source = false;
at_seen = false;
@@ -2003,11 +2002,11 @@ yyreduce:
}
yyerrok;
}
-#line 2007 "awkgram.c" /* yacc.c:1645 */
+#line 2006 "awkgram.c" /* yacc.c:1645 */
break;
case 11:
-#line 307 "awkgram.y" /* yacc.c:1645 */
+#line 306 "awkgram.y" /* yacc.c:1645 */
{
want_source = false;
at_seen = false;
@@ -2017,11 +2016,11 @@ yyreduce:
}
yyerrok;
}
-#line 2021 "awkgram.c" /* yacc.c:1645 */
+#line 2020 "awkgram.c" /* yacc.c:1645 */
break;
case 12:
-#line 317 "awkgram.y" /* yacc.c:1645 */
+#line 316 "awkgram.y" /* yacc.c:1645 */
{
want_source = false;
at_seen = false;
@@ -2031,11 +2030,11 @@ yyreduce:
yyerrok;
}
-#line 2035 "awkgram.c" /* yacc.c:1645 */
+#line 2034 "awkgram.c" /* yacc.c:1645 */
break;
case 13:
-#line 330 "awkgram.y" /* yacc.c:1645 */
+#line 329 "awkgram.y" /* yacc.c:1645 */
{
void *srcfile = NULL;
@@ -2045,23 +2044,23 @@ yyreduce:
bcfree((yyvsp[0]));
(yyval) = (INSTRUCTION *) srcfile;
}
-#line 2049 "awkgram.c" /* yacc.c:1645 */
+#line 2048 "awkgram.c" /* yacc.c:1645 */
break;
case 14:
-#line 340 "awkgram.y" /* yacc.c:1645 */
+#line 339 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 2055 "awkgram.c" /* yacc.c:1645 */
+#line 2054 "awkgram.c" /* yacc.c:1645 */
break;
case 15:
-#line 342 "awkgram.y" /* yacc.c:1645 */
+#line 341 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 2061 "awkgram.c" /* yacc.c:1645 */
+#line 2060 "awkgram.c" /* yacc.c:1645 */
break;
case 16:
-#line 347 "awkgram.y" /* yacc.c:1645 */
+#line 346 "awkgram.y" /* yacc.c:1645 */
{
void *srcfile;
@@ -2071,58 +2070,58 @@ yyreduce:
bcfree((yyvsp[0]));
(yyval) = (INSTRUCTION *) srcfile;
}
-#line 2075 "awkgram.c" /* yacc.c:1645 */
+#line 2074 "awkgram.c" /* yacc.c:1645 */
break;
case 17:
-#line 357 "awkgram.y" /* yacc.c:1645 */
+#line 356 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 2081 "awkgram.c" /* yacc.c:1645 */
+#line 2080 "awkgram.c" /* yacc.c:1645 */
break;
case 18:
-#line 359 "awkgram.y" /* yacc.c:1645 */
+#line 358 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 2087 "awkgram.c" /* yacc.c:1645 */
+#line 2086 "awkgram.c" /* yacc.c:1645 */
break;
case 19:
-#line 364 "awkgram.y" /* yacc.c:1645 */
+#line 363 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 2093 "awkgram.c" /* yacc.c:1645 */
+#line 2092 "awkgram.c" /* yacc.c:1645 */
break;
case 20:
-#line 366 "awkgram.y" /* yacc.c:1645 */
+#line 365 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 2099 "awkgram.c" /* yacc.c:1645 */
+#line 2098 "awkgram.c" /* yacc.c:1645 */
break;
case 21:
-#line 368 "awkgram.y" /* yacc.c:1645 */
+#line 367 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 2105 "awkgram.c" /* yacc.c:1645 */
+#line 2104 "awkgram.c" /* yacc.c:1645 */
break;
case 22:
-#line 373 "awkgram.y" /* yacc.c:1645 */
+#line 372 "awkgram.y" /* yacc.c:1645 */
{
rule = Rule;
(yyval) = NULL;
}
-#line 2114 "awkgram.c" /* yacc.c:1645 */
+#line 2113 "awkgram.c" /* yacc.c:1645 */
break;
case 23:
-#line 378 "awkgram.y" /* yacc.c:1645 */
+#line 377 "awkgram.y" /* yacc.c:1645 */
{
rule = Rule;
}
-#line 2122 "awkgram.c" /* yacc.c:1645 */
+#line 2121 "awkgram.c" /* yacc.c:1645 */
break;
case 24:
-#line 383 "awkgram.y" /* yacc.c:1645 */
+#line 382 "awkgram.y" /* yacc.c:1645 */
{
INSTRUCTION *tp;
@@ -2152,11 +2151,11 @@ yyreduce:
(yyval) = list_append(list_merge((yyvsp[-2]),
(yyvsp[0])), tp);
rule = Rule;
}
-#line 2156 "awkgram.c" /* yacc.c:1645 */
+#line 2155 "awkgram.c" /* yacc.c:1645 */
break;
case 25:
-#line 413 "awkgram.y" /* yacc.c:1645 */
+#line 412 "awkgram.y" /* yacc.c:1645 */
{
static int begin_seen = 0;
@@ -2168,11 +2167,11 @@ yyreduce:
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2172 "awkgram.c" /* yacc.c:1645 */
+#line 2171 "awkgram.c" /* yacc.c:1645 */
break;
case 26:
-#line 425 "awkgram.y" /* yacc.c:1645 */
+#line 424 "awkgram.y" /* yacc.c:1645 */
{
static int end_seen = 0;
@@ -2184,31 +2183,31 @@ yyreduce:
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2188 "awkgram.c" /* yacc.c:1645 */
+#line 2187 "awkgram.c" /* yacc.c:1645 */
break;
case 27:
-#line 437 "awkgram.y" /* yacc.c:1645 */
+#line 436 "awkgram.y" /* yacc.c:1645 */
{
(yyvsp[0])->in_rule = rule = BEGINFILE;
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2198 "awkgram.c" /* yacc.c:1645 */
+#line 2197 "awkgram.c" /* yacc.c:1645 */
break;
case 28:
-#line 443 "awkgram.y" /* yacc.c:1645 */
+#line 442 "awkgram.y" /* yacc.c:1645 */
{
(yyvsp[0])->in_rule = rule = ENDFILE;
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2208 "awkgram.c" /* yacc.c:1645 */
+#line 2207 "awkgram.c" /* yacc.c:1645 */
break;
case 29:
-#line 452 "awkgram.y" /* yacc.c:1645 */
+#line 451 "awkgram.y" /* yacc.c:1645 */
{
INSTRUCTION *ip = make_braced_statements((yyvsp[-4]),
(yyvsp[-3]), (yyvsp[-2]));
@@ -2223,48 +2222,48 @@ yyreduce:
(yyval) = ip;
}
-#line 2227 "awkgram.c" /* yacc.c:1645 */
+#line 2226 "awkgram.c" /* yacc.c:1645 */
break;
case 30:
-#line 470 "awkgram.y" /* yacc.c:1645 */
+#line 469 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 2233 "awkgram.c" /* yacc.c:1645 */
+#line 2232 "awkgram.c" /* yacc.c:1645 */
break;
case 31:
-#line 472 "awkgram.y" /* yacc.c:1645 */
+#line 471 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 2239 "awkgram.c" /* yacc.c:1645 */
+#line 2238 "awkgram.c" /* yacc.c:1645 */
break;
case 32:
-#line 474 "awkgram.y" /* yacc.c:1645 */
+#line 473 "awkgram.y" /* yacc.c:1645 */
{
yyerror(_("`%s' is a built-in function, it cannot be
redefined"),
tokstart);
YYABORT;
}
-#line 2249 "awkgram.c" /* yacc.c:1645 */
+#line 2248 "awkgram.c" /* yacc.c:1645 */
break;
case 33:
-#line 480 "awkgram.y" /* yacc.c:1645 */
+#line 479 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = (yyvsp[0]);
at_seen = false;
}
-#line 2258 "awkgram.c" /* yacc.c:1645 */
+#line 2257 "awkgram.c" /* yacc.c:1645 */
break;
case 36:
-#line 492 "awkgram.y" /* yacc.c:1645 */
+#line 491 "awkgram.y" /* yacc.c:1645 */
{ want_param_names = FUNC_HEADER; }
-#line 2264 "awkgram.c" /* yacc.c:1645 */
+#line 2263 "awkgram.c" /* yacc.c:1645 */
break;
case 37:
-#line 493 "awkgram.y" /* yacc.c:1645 */
+#line 492 "awkgram.y" /* yacc.c:1645 */
{
INSTRUCTION *func_comment = NULL;
// Merge any comments found in the parameter list with those
@@ -2290,17 +2289,17 @@ yyreduce:
(yyval) = (yyvsp[-6]);
want_param_names = FUNC_BODY;
}
-#line 2294 "awkgram.c" /* yacc.c:1645 */
+#line 2293 "awkgram.c" /* yacc.c:1645 */
break;
case 38:
-#line 526 "awkgram.y" /* yacc.c:1645 */
+#line 525 "awkgram.y" /* yacc.c:1645 */
{ want_regexp = true; }
-#line 2300 "awkgram.c" /* yacc.c:1645 */
+#line 2299 "awkgram.c" /* yacc.c:1645 */
break;
case 39:
-#line 528 "awkgram.y" /* yacc.c:1645 */
+#line 527 "awkgram.y" /* yacc.c:1645 */
{
NODE *n, *exp;
char *re;
@@ -2329,11 +2328,11 @@ yyreduce:
(yyval)->opcode = Op_match_rec;
(yyval)->memory = n;
}
-#line 2333 "awkgram.c" /* yacc.c:1645 */
+#line 2332 "awkgram.c" /* yacc.c:1645 */
break;
case 40:
-#line 560 "awkgram.y" /* yacc.c:1645 */
+#line 559 "awkgram.y" /* yacc.c:1645 */
{
char *re;
size_t len;
@@ -2346,23 +2345,23 @@ yyreduce:
(yyval)->opcode = Op_push_re;
(yyval)->memory = make_typed_regex(re, len);
}
-#line 2350 "awkgram.c" /* yacc.c:1645 */
+#line 2349 "awkgram.c" /* yacc.c:1645 */
break;
case 41:
-#line 575 "awkgram.y" /* yacc.c:1645 */
+#line 574 "awkgram.y" /* yacc.c:1645 */
{ bcfree((yyvsp[0])); }
-#line 2356 "awkgram.c" /* yacc.c:1645 */
+#line 2355 "awkgram.c" /* yacc.c:1645 */
break;
case 43:
-#line 581 "awkgram.y" /* yacc.c:1645 */
+#line 580 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 2362 "awkgram.c" /* yacc.c:1645 */
+#line 2361 "awkgram.c" /* yacc.c:1645 */
break;
case 44:
-#line 583 "awkgram.y" /* yacc.c:1645 */
+#line 582 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[0]) == NULL) {
(yyval) = (yyvsp[-1]);
@@ -2382,29 +2381,29 @@ yyreduce:
yyerrok;
}
-#line 2386 "awkgram.c" /* yacc.c:1645 */
+#line 2385 "awkgram.c" /* yacc.c:1645 */
break;
case 45:
-#line 603 "awkgram.y" /* yacc.c:1645 */
+#line 602 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 2392 "awkgram.c" /* yacc.c:1645 */
+#line 2391 "awkgram.c" /* yacc.c:1645 */
break;
case 46:
-#line 607 "awkgram.y" /* yacc.c:1645 */
+#line 606 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 2398 "awkgram.c" /* yacc.c:1645 */
+#line 2397 "awkgram.c" /* yacc.c:1645 */
break;
case 47:
-#line 608 "awkgram.y" /* yacc.c:1645 */
+#line 607 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 2404 "awkgram.c" /* yacc.c:1645 */
+#line 2403 "awkgram.c" /* yacc.c:1645 */
break;
case 48:
-#line 613 "awkgram.y" /* yacc.c:1645 */
+#line 612 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[0]) != NULL) {
INSTRUCTION *ip;
@@ -2415,31 +2414,31 @@ yyreduce:
} else
(yyval) = NULL;
}
-#line 2419 "awkgram.c" /* yacc.c:1645 */
+#line 2418 "awkgram.c" /* yacc.c:1645 */
break;
case 49:
-#line 624 "awkgram.y" /* yacc.c:1645 */
+#line 623 "awkgram.y" /* yacc.c:1645 */
{
trailing_comment = (yyvsp[0]); // NULL or comment
(yyval) = make_braced_statements((yyvsp[-2]), (yyvsp[-1]),
(yyvsp[0]));
}
-#line 2428 "awkgram.c" /* yacc.c:1645 */
+#line 2427 "awkgram.c" /* yacc.c:1645 */
break;
case 50:
-#line 629 "awkgram.y" /* yacc.c:1645 */
+#line 628 "awkgram.y" /* yacc.c:1645 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]),
instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2439 "awkgram.c" /* yacc.c:1645 */
+#line 2438 "awkgram.c" /* yacc.c:1645 */
break;
case 51:
-#line 636 "awkgram.y" /* yacc.c:1645 */
+#line 635 "awkgram.y" /* yacc.c:1645 */
{
INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt;
INSTRUCTION *ip, *nextc, *tbreak;
@@ -2547,11 +2546,11 @@ yyreduce:
break_allowed--;
fix_break_continue(ip, tbreak, NULL);
}
-#line 2551 "awkgram.c" /* yacc.c:1645 */
+#line 2550 "awkgram.c" /* yacc.c:1645 */
break;
case 52:
-#line 744 "awkgram.y" /* yacc.c:1645 */
+#line 743 "awkgram.y" /* yacc.c:1645 */
{
/*
* -----------------
@@ -2602,11 +2601,11 @@ yyreduce:
continue_allowed--;
fix_break_continue(ip, tbreak, tcont);
}
-#line 2606 "awkgram.c" /* yacc.c:1645 */
+#line 2605 "awkgram.c" /* yacc.c:1645 */
break;
case 53:
-#line 795 "awkgram.y" /* yacc.c:1645 */
+#line 794 "awkgram.y" /* yacc.c:1645 */
{
/*
* -----------------
@@ -2656,11 +2655,11 @@ yyreduce:
/* else
$1 and $4 are NULLs */
}
-#line 2660 "awkgram.c" /* yacc.c:1645 */
+#line 2659 "awkgram.c" /* yacc.c:1645 */
break;
case 54:
-#line 845 "awkgram.y" /* yacc.c:1645 */
+#line 844 "awkgram.y" /* yacc.c:1645 */
{
INSTRUCTION *ip;
char *var_name = (yyvsp[-5])->lextok;
@@ -2786,11 +2785,11 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2790 "awkgram.c" /* yacc.c:1645 */
+#line 2789 "awkgram.c" /* yacc.c:1645 */
break;
case 55:
-#line 971 "awkgram.y" /* yacc.c:1645 */
+#line 970 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-7]) != NULL) {
merge_comments((yyvsp[-7]), NULL);
@@ -2811,11 +2810,11 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2815 "awkgram.c" /* yacc.c:1645 */
+#line 2814 "awkgram.c" /* yacc.c:1645 */
break;
case 56:
-#line 992 "awkgram.y" /* yacc.c:1645 */
+#line 991 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-6]) != NULL) {
merge_comments((yyvsp[-6]), NULL);
@@ -2836,22 +2835,22 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2840 "awkgram.c" /* yacc.c:1645 */
+#line 2839 "awkgram.c" /* yacc.c:1645 */
break;
case 57:
-#line 1013 "awkgram.y" /* yacc.c:1645 */
+#line 1012 "awkgram.y" /* yacc.c:1645 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]),
instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2851 "awkgram.c" /* yacc.c:1645 */
+#line 2850 "awkgram.c" /* yacc.c:1645 */
break;
case 58:
-#line 1023 "awkgram.y" /* yacc.c:1645 */
+#line 1022 "awkgram.y" /* yacc.c:1645 */
{
if (! break_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2861,11 +2860,11 @@ regular_loop:
if ((yyvsp[0]) != NULL)
(yyval) = list_append((yyval), (yyvsp[0]));
}
-#line 2865 "awkgram.c" /* yacc.c:1645 */
+#line 2864 "awkgram.c" /* yacc.c:1645 */
break;
case 59:
-#line 1033 "awkgram.y" /* yacc.c:1645 */
+#line 1032 "awkgram.y" /* yacc.c:1645 */
{
if (! continue_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2875,11 +2874,11 @@ regular_loop:
if ((yyvsp[0]) != NULL)
(yyval) = list_append((yyval), (yyvsp[0]));
}
-#line 2879 "awkgram.c" /* yacc.c:1645 */
+#line 2878 "awkgram.c" /* yacc.c:1645 */
break;
case 60:
-#line 1043 "awkgram.y" /* yacc.c:1645 */
+#line 1042 "awkgram.y" /* yacc.c:1645 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule && rule != Rule)
@@ -2890,11 +2889,11 @@ regular_loop:
if ((yyvsp[0]) != NULL)
(yyval) = list_append((yyval), (yyvsp[0]));
}
-#line 2894 "awkgram.c" /* yacc.c:1645 */
+#line 2893 "awkgram.c" /* yacc.c:1645 */
break;
case 61:
-#line 1054 "awkgram.y" /* yacc.c:1645 */
+#line 1053 "awkgram.y" /* yacc.c:1645 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule == BEGIN || rule == END || rule == ENDFILE)
@@ -2907,11 +2906,11 @@ regular_loop:
if ((yyvsp[0]) != NULL)
(yyval) = list_append((yyval), (yyvsp[0]));
}
-#line 2911 "awkgram.c" /* yacc.c:1645 */
+#line 2910 "awkgram.c" /* yacc.c:1645 */
break;
case 62:
-#line 1067 "awkgram.y" /* yacc.c:1645 */
+#line 1066 "awkgram.y" /* yacc.c:1645 */
{
/* Initialize the two possible jump targets, the actual target
* is resolved at run-time.
@@ -2928,20 +2927,20 @@ regular_loop:
if ((yyvsp[0]) != NULL)
(yyval) = list_append((yyval), (yyvsp[0]));
}
-#line 2932 "awkgram.c" /* yacc.c:1645 */
+#line 2931 "awkgram.c" /* yacc.c:1645 */
break;
case 63:
-#line 1084 "awkgram.y" /* yacc.c:1645 */
+#line 1083 "awkgram.y" /* yacc.c:1645 */
{
if (! in_function)
yyerror(_("`return' used outside function context"));
}
-#line 2941 "awkgram.c" /* yacc.c:1645 */
+#line 2940 "awkgram.c" /* yacc.c:1645 */
break;
case 64:
-#line 1087 "awkgram.y" /* yacc.c:1645 */
+#line 1086 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-1]) == NULL) {
(yyval) = list_create((yyvsp[-3]));
@@ -2952,28 +2951,28 @@ regular_loop:
if ((yyvsp[0]) != NULL)
(yyval) = list_append((yyval), (yyvsp[0]));
}
-#line 2956 "awkgram.c" /* yacc.c:1645 */
+#line 2955 "awkgram.c" /* yacc.c:1645 */
break;
case 65:
-#line 1098 "awkgram.y" /* yacc.c:1645 */
+#line 1097 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[0]) != NULL)
(yyval) = list_append((yyvsp[-1]), (yyvsp[0]));
else
(yyval) = (yyvsp[-1]);
}
-#line 2967 "awkgram.c" /* yacc.c:1645 */
+#line 2966 "awkgram.c" /* yacc.c:1645 */
break;
case 66:
-#line 1115 "awkgram.y" /* yacc.c:1645 */
+#line 1114 "awkgram.y" /* yacc.c:1645 */
{ in_print = true; in_parens = 0; }
-#line 2973 "awkgram.c" /* yacc.c:1645 */
+#line 2972 "awkgram.c" /* yacc.c:1645 */
break;
case 67:
-#line 1116 "awkgram.y" /* yacc.c:1645 */
+#line 1115 "awkgram.y" /* yacc.c:1645 */
{
/*
* Optimization: plain `print' has no expression list, so $3 is
null.
@@ -3070,17 +3069,17 @@ regular_print:
}
}
}
-#line 3074 "awkgram.c" /* yacc.c:1645 */
+#line 3073 "awkgram.c" /* yacc.c:1645 */
break;
case 68:
-#line 1213 "awkgram.y" /* yacc.c:1645 */
+#line 1212 "awkgram.y" /* yacc.c:1645 */
{ sub_counter = 0; }
-#line 3080 "awkgram.c" /* yacc.c:1645 */
+#line 3079 "awkgram.c" /* yacc.c:1645 */
break;
case 69:
-#line 1214 "awkgram.y" /* yacc.c:1645 */
+#line 1213 "awkgram.y" /* yacc.c:1645 */
{
char *arr = (yyvsp[-2])->lextok;
@@ -3113,11 +3112,11 @@ regular_print:
(yyval) = list_append(list_append((yyvsp[0]),
(yyvsp[-2])), (yyvsp[-3]));
}
}
-#line 3117 "awkgram.c" /* yacc.c:1645 */
+#line 3116 "awkgram.c" /* yacc.c:1645 */
break;
case 70:
-#line 1251 "awkgram.y" /* yacc.c:1645 */
+#line 1250 "awkgram.y" /* yacc.c:1645 */
{
static bool warned = false;
char *arr = (yyvsp[-1])->lextok;
@@ -3143,54 +3142,54 @@ regular_print:
fatal(_("`delete' is not allowed with
FUNCTAB"));
}
}
-#line 3147 "awkgram.c" /* yacc.c:1645 */
+#line 3146 "awkgram.c" /* yacc.c:1645 */
break;
case 71:
-#line 1277 "awkgram.y" /* yacc.c:1645 */
+#line 1276 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = optimize_assignment((yyvsp[0]));
}
-#line 3155 "awkgram.c" /* yacc.c:1645 */
+#line 3154 "awkgram.c" /* yacc.c:1645 */
break;
case 72:
-#line 1284 "awkgram.y" /* yacc.c:1645 */
+#line 1283 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3161 "awkgram.c" /* yacc.c:1645 */
+#line 3160 "awkgram.c" /* yacc.c:1645 */
break;
case 73:
-#line 1286 "awkgram.y" /* yacc.c:1645 */
+#line 1285 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3167 "awkgram.c" /* yacc.c:1645 */
+#line 3166 "awkgram.c" /* yacc.c:1645 */
break;
case 74:
-#line 1291 "awkgram.y" /* yacc.c:1645 */
+#line 1290 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3173 "awkgram.c" /* yacc.c:1645 */
+#line 3172 "awkgram.c" /* yacc.c:1645 */
break;
case 75:
-#line 1293 "awkgram.y" /* yacc.c:1645 */
+#line 1292 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-1]) == NULL)
(yyval) = list_create((yyvsp[0]));
else
(yyval) = list_prepend((yyvsp[-1]), (yyvsp[0]));
}
-#line 3184 "awkgram.c" /* yacc.c:1645 */
+#line 3183 "awkgram.c" /* yacc.c:1645 */
break;
case 76:
-#line 1300 "awkgram.y" /* yacc.c:1645 */
+#line 1299 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3190 "awkgram.c" /* yacc.c:1645 */
+#line 3189 "awkgram.c" /* yacc.c:1645 */
break;
case 77:
-#line 1305 "awkgram.y" /* yacc.c:1645 */
+#line 1304 "awkgram.y" /* yacc.c:1645 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -3203,11 +3202,11 @@ regular_print:
bcfree((yyvsp[-2]));
(yyval) = (yyvsp[-4]);
}
-#line 3207 "awkgram.c" /* yacc.c:1645 */
+#line 3206 "awkgram.c" /* yacc.c:1645 */
break;
case 78:
-#line 1318 "awkgram.y" /* yacc.c:1645 */
+#line 1317 "awkgram.y" /* yacc.c:1645 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -3219,17 +3218,17 @@ regular_print:
(yyvsp[-3])->comment = (yyvsp[-1]);
(yyval) = (yyvsp[-3]);
}
-#line 3223 "awkgram.c" /* yacc.c:1645 */
+#line 3222 "awkgram.c" /* yacc.c:1645 */
break;
case 79:
-#line 1333 "awkgram.y" /* yacc.c:1645 */
+#line 1332 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3229 "awkgram.c" /* yacc.c:1645 */
+#line 3228 "awkgram.c" /* yacc.c:1645 */
break;
case 80:
-#line 1335 "awkgram.y" /* yacc.c:1645 */
+#line 1334 "awkgram.y" /* yacc.c:1645 */
{
NODE *n = (yyvsp[0])->memory;
(void) force_number(n);
@@ -3237,28 +3236,28 @@ regular_print:
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3241 "awkgram.c" /* yacc.c:1645 */
+#line 3240 "awkgram.c" /* yacc.c:1645 */
break;
case 81:
-#line 1343 "awkgram.y" /* yacc.c:1645 */
+#line 1342 "awkgram.y" /* yacc.c:1645 */
{
NODE *n = (yyvsp[0])->lasti->memory;
bcfree((yyvsp[-1]));
add_sign_to_num(n, '+');
(yyval) = (yyvsp[0]);
}
-#line 3252 "awkgram.c" /* yacc.c:1645 */
+#line 3251 "awkgram.c" /* yacc.c:1645 */
break;
case 82:
-#line 1350 "awkgram.y" /* yacc.c:1645 */
+#line 1349 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3258 "awkgram.c" /* yacc.c:1645 */
+#line 3257 "awkgram.c" /* yacc.c:1645 */
break;
case 83:
-#line 1352 "awkgram.y" /* yacc.c:1645 */
+#line 1351 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[0])->memory->type == Node_regex)
(yyvsp[0])->opcode = Op_push_re;
@@ -3266,57 +3265,57 @@ regular_print:
(yyvsp[0])->opcode = Op_push;
(yyval) = (yyvsp[0]);
}
-#line 3270 "awkgram.c" /* yacc.c:1645 */
+#line 3269 "awkgram.c" /* yacc.c:1645 */
break;
case 84:
-#line 1360 "awkgram.y" /* yacc.c:1645 */
+#line 1359 "awkgram.y" /* yacc.c:1645 */
{
assert(((yyvsp[0])->memory->flags & REGEX) == REGEX);
(yyvsp[0])->opcode = Op_push_re;
(yyval) = (yyvsp[0]);
}
-#line 3280 "awkgram.c" /* yacc.c:1645 */
+#line 3279 "awkgram.c" /* yacc.c:1645 */
break;
case 85:
-#line 1369 "awkgram.y" /* yacc.c:1645 */
+#line 1368 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3286 "awkgram.c" /* yacc.c:1645 */
+#line 3285 "awkgram.c" /* yacc.c:1645 */
break;
case 86:
-#line 1371 "awkgram.y" /* yacc.c:1645 */
+#line 1370 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3292 "awkgram.c" /* yacc.c:1645 */
+#line 3291 "awkgram.c" /* yacc.c:1645 */
break;
case 88:
-#line 1381 "awkgram.y" /* yacc.c:1645 */
+#line 1380 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = (yyvsp[-1]);
}
-#line 3300 "awkgram.c" /* yacc.c:1645 */
+#line 3299 "awkgram.c" /* yacc.c:1645 */
break;
case 89:
-#line 1388 "awkgram.y" /* yacc.c:1645 */
+#line 1387 "awkgram.y" /* yacc.c:1645 */
{
in_print = false;
in_parens = 0;
(yyval) = NULL;
}
-#line 3310 "awkgram.c" /* yacc.c:1645 */
+#line 3309 "awkgram.c" /* yacc.c:1645 */
break;
case 90:
-#line 1393 "awkgram.y" /* yacc.c:1645 */
+#line 1392 "awkgram.y" /* yacc.c:1645 */
{ in_print = false; in_parens = 0; }
-#line 3316 "awkgram.c" /* yacc.c:1645 */
+#line 3315 "awkgram.c" /* yacc.c:1645 */
break;
case 91:
-#line 1394 "awkgram.y" /* yacc.c:1645 */
+#line 1393 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-2])->redir_type == redirect_twoway
&& (yyvsp[0])->lasti->opcode == Op_K_getline_redir
@@ -3326,21 +3325,21 @@ regular_print:
lintwarn(_("concatenation as I/O `>' redirection target
is ambiguous"));
(yyval) = list_prepend((yyvsp[0]), (yyvsp[-2]));
}
-#line 3330 "awkgram.c" /* yacc.c:1645 */
+#line 3329 "awkgram.c" /* yacc.c:1645 */
break;
case 92:
-#line 1407 "awkgram.y" /* yacc.c:1645 */
+#line 1406 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-1]) != NULL)
(yyvsp[-5])->comment = (yyvsp[-1]);
(yyval) = mk_condition((yyvsp[-3]), (yyvsp[-5]), (yyvsp[0]),
NULL, NULL);
}
-#line 3340 "awkgram.c" /* yacc.c:1645 */
+#line 3339 "awkgram.c" /* yacc.c:1645 */
break;
case 93:
-#line 1414 "awkgram.y" /* yacc.c:1645 */
+#line 1413 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-4]) != NULL)
(yyvsp[-8])->comment = (yyvsp[-4]);
@@ -3348,19 +3347,19 @@ regular_print:
(yyvsp[-2])->comment = (yyvsp[-1]);
(yyval) = mk_condition((yyvsp[-6]), (yyvsp[-8]), (yyvsp[-3]),
(yyvsp[-2]), (yyvsp[0]));
}
-#line 3352 "awkgram.c" /* yacc.c:1645 */
+#line 3351 "awkgram.c" /* yacc.c:1645 */
break;
case 94:
-#line 1425 "awkgram.y" /* yacc.c:1645 */
+#line 1424 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = (yyvsp[0]);
}
-#line 3360 "awkgram.c" /* yacc.c:1645 */
+#line 3359 "awkgram.c" /* yacc.c:1645 */
break;
case 95:
-#line 1429 "awkgram.y" /* yacc.c:1645 */
+#line 1428 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-1]) != NULL && (yyvsp[0]) != NULL) {
if ((yyvsp[-1])->memory->comment_type == EOL_COMMENT) {
@@ -3378,59 +3377,59 @@ regular_print:
} else
(yyval) = NULL;
}
-#line 3382 "awkgram.c" /* yacc.c:1645 */
+#line 3381 "awkgram.c" /* yacc.c:1645 */
break;
case 96:
-#line 1450 "awkgram.y" /* yacc.c:1645 */
+#line 1449 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3388 "awkgram.c" /* yacc.c:1645 */
+#line 3387 "awkgram.c" /* yacc.c:1645 */
break;
case 97:
-#line 1452 "awkgram.y" /* yacc.c:1645 */
+#line 1451 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3394 "awkgram.c" /* yacc.c:1645 */
+#line 3393 "awkgram.c" /* yacc.c:1645 */
break;
case 98:
-#line 1457 "awkgram.y" /* yacc.c:1645 */
+#line 1456 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3400 "awkgram.c" /* yacc.c:1645 */
+#line 3399 "awkgram.c" /* yacc.c:1645 */
break;
case 99:
-#line 1459 "awkgram.y" /* yacc.c:1645 */
+#line 1458 "awkgram.y" /* yacc.c:1645 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3409 "awkgram.c" /* yacc.c:1645 */
+#line 3408 "awkgram.c" /* yacc.c:1645 */
break;
case 100:
-#line 1467 "awkgram.y" /* yacc.c:1645 */
+#line 1466 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3415 "awkgram.c" /* yacc.c:1645 */
+#line 3414 "awkgram.c" /* yacc.c:1645 */
break;
case 101:
-#line 1469 "awkgram.y" /* yacc.c:1645 */
+#line 1468 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3421 "awkgram.c" /* yacc.c:1645 */
+#line 3420 "awkgram.c" /* yacc.c:1645 */
break;
case 102:
-#line 1474 "awkgram.y" /* yacc.c:1645 */
+#line 1473 "awkgram.y" /* yacc.c:1645 */
{
(yyvsp[0])->param_count = 0;
(yyval) = list_create((yyvsp[0]));
}
-#line 3430 "awkgram.c" /* yacc.c:1645 */
+#line 3429 "awkgram.c" /* yacc.c:1645 */
break;
case 103:
-#line 1479 "awkgram.y" /* yacc.c:1645 */
+#line 1478 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-2]) != NULL && (yyvsp[0]) != NULL) {
(yyvsp[0])->param_count =
(yyvsp[-2])->lasti->param_count + 1;
@@ -3447,76 +3446,76 @@ regular_print:
} else
(yyval) = NULL;
}
-#line 3451 "awkgram.c" /* yacc.c:1645 */
+#line 3450 "awkgram.c" /* yacc.c:1645 */
break;
case 104:
-#line 1496 "awkgram.y" /* yacc.c:1645 */
+#line 1495 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3457 "awkgram.c" /* yacc.c:1645 */
+#line 3456 "awkgram.c" /* yacc.c:1645 */
break;
case 105:
-#line 1498 "awkgram.y" /* yacc.c:1645 */
+#line 1497 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[-1]); }
-#line 3463 "awkgram.c" /* yacc.c:1645 */
+#line 3462 "awkgram.c" /* yacc.c:1645 */
break;
case 106:
-#line 1500 "awkgram.y" /* yacc.c:1645 */
+#line 1499 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[-2]); }
-#line 3469 "awkgram.c" /* yacc.c:1645 */
+#line 3468 "awkgram.c" /* yacc.c:1645 */
break;
case 107:
-#line 1506 "awkgram.y" /* yacc.c:1645 */
+#line 1505 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3475 "awkgram.c" /* yacc.c:1645 */
+#line 3474 "awkgram.c" /* yacc.c:1645 */
break;
case 108:
-#line 1508 "awkgram.y" /* yacc.c:1645 */
+#line 1507 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3481 "awkgram.c" /* yacc.c:1645 */
+#line 3480 "awkgram.c" /* yacc.c:1645 */
break;
case 109:
-#line 1513 "awkgram.y" /* yacc.c:1645 */
+#line 1512 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3487 "awkgram.c" /* yacc.c:1645 */
+#line 3486 "awkgram.c" /* yacc.c:1645 */
break;
case 110:
-#line 1515 "awkgram.y" /* yacc.c:1645 */
+#line 1514 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3493 "awkgram.c" /* yacc.c:1645 */
+#line 3492 "awkgram.c" /* yacc.c:1645 */
break;
case 111:
-#line 1520 "awkgram.y" /* yacc.c:1645 */
+#line 1519 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_expression_list(NULL, (yyvsp[0])); }
-#line 3499 "awkgram.c" /* yacc.c:1645 */
+#line 3498 "awkgram.c" /* yacc.c:1645 */
break;
case 112:
-#line 1522 "awkgram.y" /* yacc.c:1645 */
+#line 1521 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-1]) != NULL)
(yyvsp[-2])->lasti->comment = (yyvsp[-1]);
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3510 "awkgram.c" /* yacc.c:1645 */
+#line 3509 "awkgram.c" /* yacc.c:1645 */
break;
case 113:
-#line 1529 "awkgram.y" /* yacc.c:1645 */
+#line 1528 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3516 "awkgram.c" /* yacc.c:1645 */
+#line 3515 "awkgram.c" /* yacc.c:1645 */
break;
case 114:
-#line 1531 "awkgram.y" /* yacc.c:1645 */
+#line 1530 "awkgram.y" /* yacc.c:1645 */
{
/*
* Returning the expression list instead of NULL lets
@@ -3524,66 +3523,66 @@ regular_print:
*/
(yyval) = (yyvsp[-1]);
}
-#line 3528 "awkgram.c" /* yacc.c:1645 */
+#line 3527 "awkgram.c" /* yacc.c:1645 */
break;
case 115:
-#line 1539 "awkgram.y" /* yacc.c:1645 */
+#line 1538 "awkgram.y" /* yacc.c:1645 */
{
/* Ditto */
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
}
-#line 3537 "awkgram.c" /* yacc.c:1645 */
+#line 3536 "awkgram.c" /* yacc.c:1645 */
break;
case 116:
-#line 1544 "awkgram.y" /* yacc.c:1645 */
+#line 1543 "awkgram.y" /* yacc.c:1645 */
{
/* Ditto */
if ((yyvsp[-1]) != NULL)
(yyvsp[-2])->lasti->comment = (yyvsp[-1]);
(yyval) = (yyvsp[-2]);
}
-#line 3548 "awkgram.c" /* yacc.c:1645 */
+#line 3547 "awkgram.c" /* yacc.c:1645 */
break;
case 117:
-#line 1554 "awkgram.y" /* yacc.c:1645 */
+#line 1553 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3554 "awkgram.c" /* yacc.c:1645 */
+#line 3553 "awkgram.c" /* yacc.c:1645 */
break;
case 118:
-#line 1556 "awkgram.y" /* yacc.c:1645 */
+#line 1555 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3560 "awkgram.c" /* yacc.c:1645 */
+#line 3559 "awkgram.c" /* yacc.c:1645 */
break;
case 119:
-#line 1561 "awkgram.y" /* yacc.c:1645 */
+#line 1560 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_expression_list(NULL, (yyvsp[0])); }
-#line 3566 "awkgram.c" /* yacc.c:1645 */
+#line 3565 "awkgram.c" /* yacc.c:1645 */
break;
case 120:
-#line 1563 "awkgram.y" /* yacc.c:1645 */
+#line 1562 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-1]) != NULL)
(yyvsp[-2])->lasti->comment = (yyvsp[-1]);
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3577 "awkgram.c" /* yacc.c:1645 */
+#line 3576 "awkgram.c" /* yacc.c:1645 */
break;
case 121:
-#line 1570 "awkgram.y" /* yacc.c:1645 */
+#line 1569 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 3583 "awkgram.c" /* yacc.c:1645 */
+#line 3582 "awkgram.c" /* yacc.c:1645 */
break;
case 122:
-#line 1572 "awkgram.y" /* yacc.c:1645 */
+#line 1571 "awkgram.y" /* yacc.c:1645 */
{
/*
* Returning the expression list instead of NULL lets
@@ -3591,74 +3590,74 @@ regular_print:
*/
(yyval) = (yyvsp[-1]);
}
-#line 3595 "awkgram.c" /* yacc.c:1645 */
+#line 3594 "awkgram.c" /* yacc.c:1645 */
break;
case 123:
-#line 1580 "awkgram.y" /* yacc.c:1645 */
+#line 1579 "awkgram.y" /* yacc.c:1645 */
{
/* Ditto */
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
}
-#line 3604 "awkgram.c" /* yacc.c:1645 */
+#line 3603 "awkgram.c" /* yacc.c:1645 */
break;
case 124:
-#line 1585 "awkgram.y" /* yacc.c:1645 */
+#line 1584 "awkgram.y" /* yacc.c:1645 */
{
/* Ditto */
if ((yyvsp[-1]) != NULL)
(yyvsp[-2])->comment = (yyvsp[-1]);
(yyval) = (yyvsp[-2]);
}
-#line 3615 "awkgram.c" /* yacc.c:1645 */
+#line 3614 "awkgram.c" /* yacc.c:1645 */
break;
case 125:
-#line 1594 "awkgram.y" /* yacc.c:1645 */
+#line 1593 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3621 "awkgram.c" /* yacc.c:1645 */
+#line 3620 "awkgram.c" /* yacc.c:1645 */
break;
case 126:
-#line 1595 "awkgram.y" /* yacc.c:1645 */
+#line 1594 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = list_create((yyvsp[0])); }
-#line 3627 "awkgram.c" /* yacc.c:1645 */
+#line 3626 "awkgram.c" /* yacc.c:1645 */
break;
case 127:
-#line 1601 "awkgram.y" /* yacc.c:1645 */
+#line 1600 "awkgram.y" /* yacc.c:1645 */
{
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 3638 "awkgram.c" /* yacc.c:1645 */
+#line 3637 "awkgram.c" /* yacc.c:1645 */
break;
case 128:
-#line 1608 "awkgram.y" /* yacc.c:1645 */
+#line 1607 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = mk_assignment((yyvsp[-2]), list_create((yyvsp[0])),
(yyvsp[-1]));
}
-#line 3646 "awkgram.c" /* yacc.c:1645 */
+#line 3645 "awkgram.c" /* yacc.c:1645 */
break;
case 129:
-#line 1612 "awkgram.y" /* yacc.c:1645 */
+#line 1611 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3652 "awkgram.c" /* yacc.c:1645 */
+#line 3651 "awkgram.c" /* yacc.c:1645 */
break;
case 130:
-#line 1614 "awkgram.y" /* yacc.c:1645 */
+#line 1613 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3658 "awkgram.c" /* yacc.c:1645 */
+#line 3657 "awkgram.c" /* yacc.c:1645 */
break;
case 131:
-#line 1616 "awkgram.y" /* yacc.c:1645 */
+#line 1615 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-2])->lasti->opcode == Op_match_rec)
warning_ln((yyvsp[-1])->source_line,
@@ -3671,11 +3670,11 @@ regular_print:
bcfree((yyvsp[0]));
(yyval) = list_append((yyvsp[-2]), (yyvsp[-1]));
}
-#line 3675 "awkgram.c" /* yacc.c:1645 */
+#line 3674 "awkgram.c" /* yacc.c:1645 */
break;
case 132:
-#line 1629 "awkgram.y" /* yacc.c:1645 */
+#line 1628 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[-2])->lasti->opcode == Op_match_rec)
warning_ln((yyvsp[-1])->source_line,
@@ -3692,11 +3691,11 @@ regular_print:
(yyval) = list_append(list_merge((yyvsp[-2]),
(yyvsp[0])), (yyvsp[-1]));
}
}
-#line 3696 "awkgram.c" /* yacc.c:1645 */
+#line 3695 "awkgram.c" /* yacc.c:1645 */
break;
case 133:
-#line 1646 "awkgram.y" /* yacc.c:1645 */
+#line 1645 "awkgram.y" /* yacc.c:1645 */
{
if (do_lint_old)
warning_ln((yyvsp[-1])->source_line,
@@ -3706,91 +3705,91 @@ regular_print:
(yyvsp[-1])->expr_count = 1;
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])),
(yyvsp[-1]));
}
-#line 3710 "awkgram.c" /* yacc.c:1645 */
+#line 3709 "awkgram.c" /* yacc.c:1645 */
break;
case 134:
-#line 1656 "awkgram.y" /* yacc.c:1645 */
+#line 1655 "awkgram.y" /* yacc.c:1645 */
{
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 3721 "awkgram.c" /* yacc.c:1645 */
+#line 3720 "awkgram.c" /* yacc.c:1645 */
break;
case 135:
-#line 1663 "awkgram.y" /* yacc.c:1645 */
+#line 1662 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_condition((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]),
(yyvsp[-1]), (yyvsp[0])); }
-#line 3727 "awkgram.c" /* yacc.c:1645 */
+#line 3726 "awkgram.c" /* yacc.c:1645 */
break;
case 136:
-#line 1665 "awkgram.y" /* yacc.c:1645 */
+#line 1664 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3733 "awkgram.c" /* yacc.c:1645 */
+#line 3732 "awkgram.c" /* yacc.c:1645 */
break;
case 137:
-#line 1670 "awkgram.y" /* yacc.c:1645 */
+#line 1669 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3739 "awkgram.c" /* yacc.c:1645 */
+#line 3738 "awkgram.c" /* yacc.c:1645 */
break;
case 138:
-#line 1672 "awkgram.y" /* yacc.c:1645 */
+#line 1671 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3745 "awkgram.c" /* yacc.c:1645 */
+#line 3744 "awkgram.c" /* yacc.c:1645 */
break;
case 139:
-#line 1674 "awkgram.y" /* yacc.c:1645 */
+#line 1673 "awkgram.y" /* yacc.c:1645 */
{
(yyvsp[0])->opcode = Op_assign_quotient;
(yyval) = (yyvsp[0]);
}
-#line 3754 "awkgram.c" /* yacc.c:1645 */
+#line 3753 "awkgram.c" /* yacc.c:1645 */
break;
case 140:
-#line 1682 "awkgram.y" /* yacc.c:1645 */
+#line 1681 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3760 "awkgram.c" /* yacc.c:1645 */
+#line 3759 "awkgram.c" /* yacc.c:1645 */
break;
case 141:
-#line 1684 "awkgram.y" /* yacc.c:1645 */
+#line 1683 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3766 "awkgram.c" /* yacc.c:1645 */
+#line 3765 "awkgram.c" /* yacc.c:1645 */
break;
case 142:
-#line 1689 "awkgram.y" /* yacc.c:1645 */
+#line 1688 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3772 "awkgram.c" /* yacc.c:1645 */
+#line 3771 "awkgram.c" /* yacc.c:1645 */
break;
case 143:
-#line 1691 "awkgram.y" /* yacc.c:1645 */
+#line 1690 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3778 "awkgram.c" /* yacc.c:1645 */
+#line 3777 "awkgram.c" /* yacc.c:1645 */
break;
case 144:
-#line 1696 "awkgram.y" /* yacc.c:1645 */
+#line 1695 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3784 "awkgram.c" /* yacc.c:1645 */
+#line 3783 "awkgram.c" /* yacc.c:1645 */
break;
case 145:
-#line 1698 "awkgram.y" /* yacc.c:1645 */
+#line 1697 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 3790 "awkgram.c" /* yacc.c:1645 */
+#line 3789 "awkgram.c" /* yacc.c:1645 */
break;
case 146:
-#line 1700 "awkgram.y" /* yacc.c:1645 */
+#line 1699 "awkgram.y" /* yacc.c:1645 */
{
int count = 2;
bool is_simple_var = false;
@@ -3844,47 +3843,47 @@ regular_print:
max_args = count;
}
}
-#line 3848 "awkgram.c" /* yacc.c:1645 */
+#line 3847 "awkgram.c" /* yacc.c:1645 */
break;
case 148:
-#line 1759 "awkgram.y" /* yacc.c:1645 */
+#line 1758 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3854 "awkgram.c" /* yacc.c:1645 */
+#line 3853 "awkgram.c" /* yacc.c:1645 */
break;
case 149:
-#line 1761 "awkgram.y" /* yacc.c:1645 */
+#line 1760 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3860 "awkgram.c" /* yacc.c:1645 */
+#line 3859 "awkgram.c" /* yacc.c:1645 */
break;
case 150:
-#line 1763 "awkgram.y" /* yacc.c:1645 */
+#line 1762 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3866 "awkgram.c" /* yacc.c:1645 */
+#line 3865 "awkgram.c" /* yacc.c:1645 */
break;
case 151:
-#line 1765 "awkgram.y" /* yacc.c:1645 */
+#line 1764 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3872 "awkgram.c" /* yacc.c:1645 */
+#line 3871 "awkgram.c" /* yacc.c:1645 */
break;
case 152:
-#line 1767 "awkgram.y" /* yacc.c:1645 */
+#line 1766 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3878 "awkgram.c" /* yacc.c:1645 */
+#line 3877 "awkgram.c" /* yacc.c:1645 */
break;
case 153:
-#line 1769 "awkgram.y" /* yacc.c:1645 */
+#line 1768 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3884 "awkgram.c" /* yacc.c:1645 */
+#line 3883 "awkgram.c" /* yacc.c:1645 */
break;
case 154:
-#line 1771 "awkgram.y" /* yacc.c:1645 */
+#line 1770 "awkgram.y" /* yacc.c:1645 */
{
/*
* In BEGINFILE/ENDFILE, allow `getline [var] < file'
@@ -3898,29 +3897,29 @@ regular_print:
_("non-redirected `getline' undefined inside
END action"));
(yyval) = mk_getline((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]),
redirect_input);
}
-#line 3902 "awkgram.c" /* yacc.c:1645 */
+#line 3901 "awkgram.c" /* yacc.c:1645 */
break;
case 155:
-#line 1785 "awkgram.y" /* yacc.c:1645 */
+#line 1784 "awkgram.y" /* yacc.c:1645 */
{
(yyvsp[0])->opcode = Op_postincrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3911 "awkgram.c" /* yacc.c:1645 */
+#line 3910 "awkgram.c" /* yacc.c:1645 */
break;
case 156:
-#line 1790 "awkgram.y" /* yacc.c:1645 */
+#line 1789 "awkgram.y" /* yacc.c:1645 */
{
(yyvsp[0])->opcode = Op_postdecrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3920 "awkgram.c" /* yacc.c:1645 */
+#line 3919 "awkgram.c" /* yacc.c:1645 */
break;
case 157:
-#line 1795 "awkgram.y" /* yacc.c:1645 */
+#line 1794 "awkgram.y" /* yacc.c:1645 */
{
if (do_lint_old) {
warning_ln((yyvsp[-1])->source_line,
@@ -3940,64 +3939,64 @@ regular_print:
(yyval) = list_append(list_merge(t, (yyvsp[0])),
(yyvsp[-1]));
}
}
-#line 3944 "awkgram.c" /* yacc.c:1645 */
+#line 3943 "awkgram.c" /* yacc.c:1645 */
break;
case 158:
-#line 1820 "awkgram.y" /* yacc.c:1645 */
+#line 1819 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = mk_getline((yyvsp[-1]), (yyvsp[0]), (yyvsp[-3]),
(yyvsp[-2])->redir_type);
bcfree((yyvsp[-2]));
}
-#line 3953 "awkgram.c" /* yacc.c:1645 */
+#line 3952 "awkgram.c" /* yacc.c:1645 */
break;
case 159:
-#line 1826 "awkgram.y" /* yacc.c:1645 */
+#line 1825 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3959 "awkgram.c" /* yacc.c:1645 */
+#line 3958 "awkgram.c" /* yacc.c:1645 */
break;
case 160:
-#line 1828 "awkgram.y" /* yacc.c:1645 */
+#line 1827 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3965 "awkgram.c" /* yacc.c:1645 */
+#line 3964 "awkgram.c" /* yacc.c:1645 */
break;
case 161:
-#line 1830 "awkgram.y" /* yacc.c:1645 */
+#line 1829 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3971 "awkgram.c" /* yacc.c:1645 */
+#line 3970 "awkgram.c" /* yacc.c:1645 */
break;
case 162:
-#line 1832 "awkgram.y" /* yacc.c:1645 */
+#line 1831 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3977 "awkgram.c" /* yacc.c:1645 */
+#line 3976 "awkgram.c" /* yacc.c:1645 */
break;
case 163:
-#line 1834 "awkgram.y" /* yacc.c:1645 */
+#line 1833 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3983 "awkgram.c" /* yacc.c:1645 */
+#line 3982 "awkgram.c" /* yacc.c:1645 */
break;
case 164:
-#line 1836 "awkgram.y" /* yacc.c:1645 */
+#line 1835 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3989 "awkgram.c" /* yacc.c:1645 */
+#line 3988 "awkgram.c" /* yacc.c:1645 */
break;
case 165:
-#line 1841 "awkgram.y" /* yacc.c:1645 */
+#line 1840 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3997 "awkgram.c" /* yacc.c:1645 */
+#line 3996 "awkgram.c" /* yacc.c:1645 */
break;
case 166:
-#line 1845 "awkgram.y" /* yacc.c:1645 */
+#line 1844 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[0])->opcode == Op_match_rec) {
(yyvsp[0])->opcode = Op_nomatch;
@@ -4029,11 +4028,11 @@ regular_print:
}
}
}
-#line 4033 "awkgram.c" /* yacc.c:1645 */
+#line 4032 "awkgram.c" /* yacc.c:1645 */
break;
case 167:
-#line 1877 "awkgram.y" /* yacc.c:1645 */
+#line 1876 "awkgram.y" /* yacc.c:1645 */
{
// Always include. Allows us to lint warn on
// print "foo" > "bar" 1
@@ -4041,31 +4040,31 @@ regular_print:
// print "foo" > ("bar" 1)
(yyval) = list_append((yyvsp[-1]), bcalloc(Op_parens, 1,
sourceline));
}
-#line 4045 "awkgram.c" /* yacc.c:1645 */
+#line 4044 "awkgram.c" /* yacc.c:1645 */
break;
case 168:
-#line 1885 "awkgram.y" /* yacc.c:1645 */
+#line 1884 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 4055 "awkgram.c" /* yacc.c:1645 */
+#line 4054 "awkgram.c" /* yacc.c:1645 */
break;
case 169:
-#line 1891 "awkgram.y" /* yacc.c:1645 */
+#line 1890 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 4065 "awkgram.c" /* yacc.c:1645 */
+#line 4064 "awkgram.c" /* yacc.c:1645 */
break;
case 170:
-#line 1897 "awkgram.y" /* yacc.c:1645 */
+#line 1896 "awkgram.y" /* yacc.c:1645 */
{
static bool warned = false;
@@ -4078,45 +4077,45 @@ regular_print:
if ((yyval) == NULL)
YYABORT;
}
-#line 4082 "awkgram.c" /* yacc.c:1645 */
+#line 4081 "awkgram.c" /* yacc.c:1645 */
break;
case 173:
-#line 1912 "awkgram.y" /* yacc.c:1645 */
+#line 1911 "awkgram.y" /* yacc.c:1645 */
{
(yyvsp[-1])->opcode = Op_preincrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 4091 "awkgram.c" /* yacc.c:1645 */
+#line 4090 "awkgram.c" /* yacc.c:1645 */
break;
case 174:
-#line 1917 "awkgram.y" /* yacc.c:1645 */
+#line 1916 "awkgram.y" /* yacc.c:1645 */
{
(yyvsp[-1])->opcode = Op_predecrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 4100 "awkgram.c" /* yacc.c:1645 */
+#line 4099 "awkgram.c" /* yacc.c:1645 */
break;
case 175:
-#line 1922 "awkgram.y" /* yacc.c:1645 */
+#line 1921 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 4108 "awkgram.c" /* yacc.c:1645 */
+#line 4107 "awkgram.c" /* yacc.c:1645 */
break;
case 176:
-#line 1926 "awkgram.y" /* yacc.c:1645 */
+#line 1925 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 4116 "awkgram.c" /* yacc.c:1645 */
+#line 4115 "awkgram.c" /* yacc.c:1645 */
break;
case 177:
-#line 1930 "awkgram.y" /* yacc.c:1645 */
+#line 1929 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[0])->lasti->opcode == Op_push_i
&& ((yyvsp[0])->lasti->memory->flags & STRING) == 0
@@ -4131,11 +4130,11 @@ regular_print:
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
}
-#line 4135 "awkgram.c" /* yacc.c:1645 */
+#line 4134 "awkgram.c" /* yacc.c:1645 */
break;
case 178:
-#line 1945 "awkgram.y" /* yacc.c:1645 */
+#line 1944 "awkgram.y" /* yacc.c:1645 */
{
if ((yyvsp[0])->lasti->opcode == Op_push_i
&& ((yyvsp[0])->lasti->memory->flags & STRING) == 0
@@ -4153,20 +4152,20 @@ regular_print:
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
}
-#line 4157 "awkgram.c" /* yacc.c:1645 */
+#line 4156 "awkgram.c" /* yacc.c:1645 */
break;
case 179:
-#line 1966 "awkgram.y" /* yacc.c:1645 */
+#line 1965 "awkgram.y" /* yacc.c:1645 */
{
func_use((yyvsp[0])->lasti->func_name, FUNC_USE);
(yyval) = (yyvsp[0]);
}
-#line 4166 "awkgram.c" /* yacc.c:1645 */
+#line 4165 "awkgram.c" /* yacc.c:1645 */
break;
case 180:
-#line 1971 "awkgram.y" /* yacc.c:1645 */
+#line 1970 "awkgram.y" /* yacc.c:1645 */
{
/* indirect function call */
INSTRUCTION *f, *t;
@@ -4200,11 +4199,11 @@ regular_print:
(yyval) = list_prepend((yyvsp[0]), t);
at_seen = false;
}
-#line 4204 "awkgram.c" /* yacc.c:1645 */
+#line 4203 "awkgram.c" /* yacc.c:1645 */
break;
case 181:
-#line 2008 "awkgram.y" /* yacc.c:1645 */
+#line 2007 "awkgram.y" /* yacc.c:1645 */
{
NODE *n;
const char *name = (yyvsp[-3])->func_name;
@@ -4242,49 +4241,49 @@ regular_print:
(yyval) = list_append(t, (yyvsp[-3]));
}
}
-#line 4246 "awkgram.c" /* yacc.c:1645 */
+#line 4245 "awkgram.c" /* yacc.c:1645 */
break;
case 182:
-#line 2049 "awkgram.y" /* yacc.c:1645 */
+#line 2048 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 4252 "awkgram.c" /* yacc.c:1645 */
+#line 4251 "awkgram.c" /* yacc.c:1645 */
break;
case 183:
-#line 2051 "awkgram.y" /* yacc.c:1645 */
+#line 2050 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 4258 "awkgram.c" /* yacc.c:1645 */
+#line 4257 "awkgram.c" /* yacc.c:1645 */
break;
case 184:
-#line 2056 "awkgram.y" /* yacc.c:1645 */
+#line 2055 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 4264 "awkgram.c" /* yacc.c:1645 */
+#line 4263 "awkgram.c" /* yacc.c:1645 */
break;
case 185:
-#line 2058 "awkgram.y" /* yacc.c:1645 */
+#line 2057 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[-1]); }
-#line 4270 "awkgram.c" /* yacc.c:1645 */
+#line 4269 "awkgram.c" /* yacc.c:1645 */
break;
case 186:
-#line 2063 "awkgram.y" /* yacc.c:1645 */
+#line 2062 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 4276 "awkgram.c" /* yacc.c:1645 */
+#line 4275 "awkgram.c" /* yacc.c:1645 */
break;
case 187:
-#line 2065 "awkgram.y" /* yacc.c:1645 */
+#line 2064 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 4284 "awkgram.c" /* yacc.c:1645 */
+#line 4283 "awkgram.c" /* yacc.c:1645 */
break;
case 188:
-#line 2072 "awkgram.y" /* yacc.c:1645 */
+#line 2071 "awkgram.y" /* yacc.c:1645 */
{
INSTRUCTION *ip = (yyvsp[0])->lasti;
int count = ip->sub_count; /* # of SUBSEP-seperated
expressions */
@@ -4298,11 +4297,11 @@ regular_print:
sub_counter++; /* count # of dimensions */
(yyval) = (yyvsp[0]);
}
-#line 4302 "awkgram.c" /* yacc.c:1645 */
+#line 4301 "awkgram.c" /* yacc.c:1645 */
break;
case 189:
-#line 2089 "awkgram.y" /* yacc.c:1645 */
+#line 2088 "awkgram.y" /* yacc.c:1645 */
{
INSTRUCTION *t = (yyvsp[-1]);
if ((yyvsp[-1]) == NULL) {
@@ -4316,31 +4315,31 @@ regular_print:
(yyvsp[0])->sub_count = count_expressions(&t, false);
(yyval) = list_append(t, (yyvsp[0]));
}
-#line 4320 "awkgram.c" /* yacc.c:1645 */
+#line 4319 "awkgram.c" /* yacc.c:1645 */
break;
case 190:
-#line 2106 "awkgram.y" /* yacc.c:1645 */
+#line 2105 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 4326 "awkgram.c" /* yacc.c:1645 */
+#line 4325 "awkgram.c" /* yacc.c:1645 */
break;
case 191:
-#line 2108 "awkgram.y" /* yacc.c:1645 */
+#line 2107 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 4334 "awkgram.c" /* yacc.c:1645 */
+#line 4333 "awkgram.c" /* yacc.c:1645 */
break;
case 192:
-#line 2115 "awkgram.y" /* yacc.c:1645 */
+#line 2114 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[-1]); }
-#line 4340 "awkgram.c" /* yacc.c:1645 */
+#line 4339 "awkgram.c" /* yacc.c:1645 */
break;
case 193:
-#line 2120 "awkgram.y" /* yacc.c:1645 */
+#line 2119 "awkgram.y" /* yacc.c:1645 */
{
char *var_name = (yyvsp[0])->lextok;
@@ -4348,22 +4347,22 @@ regular_print:
(yyvsp[0])->memory = variable((yyvsp[0])->source_line,
var_name, Node_var_new);
(yyval) = list_create((yyvsp[0]));
}
-#line 4352 "awkgram.c" /* yacc.c:1645 */
+#line 4351 "awkgram.c" /* yacc.c:1645 */
break;
case 194:
-#line 2128 "awkgram.y" /* yacc.c:1645 */
+#line 2127 "awkgram.y" /* yacc.c:1645 */
{
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 4363 "awkgram.c" /* yacc.c:1645 */
+#line 4362 "awkgram.c" /* yacc.c:1645 */
break;
case 195:
-#line 2138 "awkgram.y" /* yacc.c:1645 */
+#line 2137 "awkgram.y" /* yacc.c:1645 */
{
INSTRUCTION *ip = (yyvsp[0])->nexti;
if (ip->opcode == Op_push
@@ -4375,85 +4374,85 @@ regular_print:
} else
(yyval) = (yyvsp[0]);
}
-#line 4379 "awkgram.c" /* yacc.c:1645 */
+#line 4378 "awkgram.c" /* yacc.c:1645 */
break;
case 196:
-#line 2150 "awkgram.y" /* yacc.c:1645 */
+#line 2149 "awkgram.y" /* yacc.c:1645 */
{
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
if ((yyvsp[0]) != NULL)
mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 4389 "awkgram.c" /* yacc.c:1645 */
+#line 4388 "awkgram.c" /* yacc.c:1645 */
break;
case 197:
-#line 2159 "awkgram.y" /* yacc.c:1645 */
+#line 2158 "awkgram.y" /* yacc.c:1645 */
{
(yyvsp[0])->opcode = Op_postincrement;
}
-#line 4397 "awkgram.c" /* yacc.c:1645 */
+#line 4396 "awkgram.c" /* yacc.c:1645 */
break;
case 198:
-#line 2163 "awkgram.y" /* yacc.c:1645 */
+#line 2162 "awkgram.y" /* yacc.c:1645 */
{
(yyvsp[0])->opcode = Op_postdecrement;
}
-#line 4405 "awkgram.c" /* yacc.c:1645 */
+#line 4404 "awkgram.c" /* yacc.c:1645 */
break;
case 199:
-#line 2167 "awkgram.y" /* yacc.c:1645 */
+#line 2166 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 4411 "awkgram.c" /* yacc.c:1645 */
+#line 4410 "awkgram.c" /* yacc.c:1645 */
break;
case 200:
-#line 2171 "awkgram.y" /* yacc.c:1645 */
+#line 2170 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); }
-#line 4417 "awkgram.c" /* yacc.c:1645 */
+#line 4416 "awkgram.c" /* yacc.c:1645 */
break;
case 201:
-#line 2175 "awkgram.y" /* yacc.c:1645 */
+#line 2174 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); yyerrok; }
-#line 4423 "awkgram.c" /* yacc.c:1645 */
+#line 4422 "awkgram.c" /* yacc.c:1645 */
break;
case 202:
-#line 2179 "awkgram.y" /* yacc.c:1645 */
+#line 2178 "awkgram.y" /* yacc.c:1645 */
{ yyerrok; }
-#line 4429 "awkgram.c" /* yacc.c:1645 */
+#line 4428 "awkgram.c" /* yacc.c:1645 */
break;
case 203:
-#line 2184 "awkgram.y" /* yacc.c:1645 */
+#line 2183 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = NULL; }
-#line 4435 "awkgram.c" /* yacc.c:1645 */
+#line 4434 "awkgram.c" /* yacc.c:1645 */
break;
case 205:
-#line 2189 "awkgram.y" /* yacc.c:1645 */
+#line 2188 "awkgram.y" /* yacc.c:1645 */
{ yyerrok; }
-#line 4441 "awkgram.c" /* yacc.c:1645 */
+#line 4440 "awkgram.c" /* yacc.c:1645 */
break;
case 206:
-#line 2193 "awkgram.y" /* yacc.c:1645 */
+#line 2192 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); yyerrok; }
-#line 4447 "awkgram.c" /* yacc.c:1645 */
+#line 4446 "awkgram.c" /* yacc.c:1645 */
break;
case 207:
-#line 2197 "awkgram.y" /* yacc.c:1645 */
+#line 2196 "awkgram.y" /* yacc.c:1645 */
{ (yyval) = (yyvsp[0]); yyerrok; }
-#line 4453 "awkgram.c" /* yacc.c:1645 */
+#line 4452 "awkgram.c" /* yacc.c:1645 */
break;
-#line 4457 "awkgram.c" /* yacc.c:1645 */
+#line 4456 "awkgram.c" /* yacc.c:1645 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -4680,7 +4679,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 2199 "awkgram.y" /* yacc.c:1903 */
+#line 2198 "awkgram.y" /* yacc.c:1903 */
struct token {
@@ -9288,7 +9287,7 @@ set_namespace(INSTRUCTION *ns, INSTRUCTION *comment)
// save info and push on front of list of namespaces seen
INSTRUCTION *new_ns = instruction(Op_K_namespace);
new_ns->comment = comment;
- new_ns->ns_name = make_pp_namespace(current_namespace);
+ new_ns->ns_name = estrdup(current_namespace, strlen(current_namespace));
new_ns->nexti = namespace_chain;
namespace_chain = new_ns;
@@ -9299,17 +9298,3 @@ set_namespace(INSTRUCTION *ns, INSTRUCTION *comment)
return;
}
-
-/* make_pp_namespace --- make namespace string for use by pretty printer */
-
-static char *
-make_pp_namespace()
-{
- size_t len = strlen(current_namespace) + 3;
- char *buf;
-
- emalloc(buf, char *, len, "make_pp_namespace");
- sprintf(buf, "%s::", current_namespace);
-
- return buf;
-}
diff --git a/awkgram.y b/awkgram.y
index 880a75b..4b542d0 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -59,7 +59,6 @@ static void set_namespace(INSTRUCTION *ns, INSTRUCTION
*comment);
static void next_sourcefile(void);
static char *tokexpand(void);
static NODE *set_profile_text(NODE *n, const char *str, size_t len);
-static char *make_pp_namespace();
static int check_qualified_special(char *token);
static INSTRUCTION *trailing_comment;
static INSTRUCTION *outer_comment;
@@ -6803,7 +6802,7 @@ set_namespace(INSTRUCTION *ns, INSTRUCTION *comment)
// save info and push on front of list of namespaces seen
INSTRUCTION *new_ns = instruction(Op_K_namespace);
new_ns->comment = comment;
- new_ns->ns_name = make_pp_namespace(current_namespace);
+ new_ns->ns_name = estrdup(current_namespace, strlen(current_namespace));
new_ns->nexti = namespace_chain;
namespace_chain = new_ns;
@@ -6814,17 +6813,3 @@ set_namespace(INSTRUCTION *ns, INSTRUCTION *comment)
return;
}
-
-/* make_pp_namespace --- make namespace string for use by pretty printer */
-
-static char *
-make_pp_namespace()
-{
- size_t len = strlen(current_namespace) + 3;
- char *buf;
-
- emalloc(buf, char *, len, "make_pp_namespace");
- sprintf(buf, "%s::", current_namespace);
-
- return buf;
-}
diff --git a/main.c b/main.c
index ac8c1c9..03a96f3 100644
--- a/main.c
+++ b/main.c
@@ -520,7 +520,7 @@ main(int argc, char **argv)
interpret(code_block);
if (do_pretty_print) {
- current_namespace = "awk::"; // for pretty printer
+ current_namespace = awk_namespace;
dump_prog(code_block);
dump_funcs();
}
diff --git a/profile.c b/profile.c
index 948c481..3d954d3 100644
--- a/profile.c
+++ b/profile.c
@@ -642,7 +642,7 @@ cleanup:
{
const char *fname;
if (pc->opcode == Op_builtin) {
- bool prepend_awk = (current_namespace !=
awk_namespace && strcmp(current_namespace, "awk::") != 0);
+ bool prepend_awk = (current_namespace !=
awk_namespace && strcmp(current_namespace, "awk") != 0);
fname = getfname(pc->builtin, prepend_awk);
} else
fname = (pc + 1)->func_name;
@@ -2038,10 +2038,7 @@ pp_namespace(const char *name, INSTRUCTION *comment)
if (do_profile)
indent(SPACEOVER);
- fprintf(prof_fp, "@namespace \"");
- for (; *name != '\0' && *name != ':'; name++)
- putc(*name, prof_fp);
- putc('"', prof_fp);
+ fprintf(prof_fp, "@namespace \"%s\"", name);
if (comment != NULL) {
putc('\t', prof_fp);
@@ -2073,7 +2070,7 @@ adjust_namespace(char *name, bool *malloced)
// unadorned name from symbol table, add awk:: if not in awk:: n.s.
if (strchr(name, ':') == NULL &&
current_namespace != awk_namespace && // can be equal if
namespace never changed
- strcmp(current_namespace, "awk::") != 0) {
+ strcmp(current_namespace, "awk") != 0) {
char *buf;
size_t len = 5 + strlen(name) + 1;
@@ -2088,7 +2085,7 @@ adjust_namespace(char *name, bool *malloced)
size_t len = strlen(current_namespace);
if (strncmp(current_namespace, name, len) == 0) {
- char *ret = name + len;
+ char *ret = name + len + 2;
return ret;
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 13 +
awkgram.c | 857 ++++++++++++++++++++++++++++++--------------------------------
awkgram.y | 17 +-
main.c | 2 +-
profile.c | 11 +-
5 files changed, 440 insertions(+), 460 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, feature/namespaces, updated. gawk-4.1.0-3836-g17e79e7,
Arnold Robbins <=