summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-09-15 19:49:03 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-09-15 19:49:03 +0300
commitdc510090126eb27d2e0514f42a4da4863873903d (patch)
tree2006a0e42c4819682f4be5fd4b2645aee9683ca1
parent23681ec5b179a4e981781ce2daa08f61cb7317d4 (diff)
parent3fcce8a32e825dd10384d5276c420c2514442fe2 (diff)
downloadgawk-dc510090126eb27d2e0514f42a4da4863873903d.tar.gz
Merge branch 'gawk-4.1-stable'
-rw-r--r--ChangeLog15
-rw-r--r--NEWS4
-rw-r--r--awk.h3
-rw-r--r--awkgram.c764
-rw-r--r--awkgram.y46
-rw-r--r--builtin.c2
-rw-r--r--command.c6
-rw-r--r--command.y6
-rw-r--r--doc/ChangeLog5
-rw-r--r--doc/gawk.info909
-rw-r--r--doc/gawk.texi15
-rw-r--r--doc/gawktexi.in15
-rw-r--r--eval.c1
-rw-r--r--ext.c30
-rw-r--r--main.c4
-rw-r--r--node.c4
16 files changed, 943 insertions, 886 deletions
diff --git a/ChangeLog b/ChangeLog
index a6745c5b..69d9a565 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2014-09-15 Arnold D. Robbins <arnold@skeeve.com>
+
+ Finish removing use of isalpha and isalnum.
+
+ * awk.h (is_alpha, is_alnum, is_identchar): Add declarations.
+ * awkgram.y (yylex): Use is_alpha.
+ (is_alpha, is_alnum): New functions.
+ (is_identchar): Use is_alnum.
+ * builtin.c (r_format_tree): Use is_alpha, is_alnum.
+ * command.y (yylex): Use is_alpha, is_identchar.
+ * ext.c (is_letter): Use is_alpha.
+ (is_identifier_char): Removed; replaced uses with is_identchar.
+ * main.c (arg_assign): Use is_alpha, is_alnum.
+ * node.c (r_force_number): Use is_alpha.
+
2014-09-14 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (is_identchar): Change from simple macro to function
diff --git a/NEWS b/NEWS
index 37cb5f95..58c77e7a 100644
--- a/NEWS
+++ b/NEWS
@@ -53,6 +53,10 @@ Changes from 4.1.1 to 4.1.2
5. Indirect function calls now work for both built-in and
extension functions.
+6. In non-English locales, it was accidentally possible to use "letters"
+ beside those of the English alphabet in identifiers. This has
+ been fixed. (isalpha and isalnum are NOT our friends.)
+
XX. A number of bugs have been fixed. See the ChangeLog.
Changes from 4.1.0 to 4.1.1
diff --git a/awk.h b/awk.h
index 0b76aea2..cd055962 100644
--- a/awk.h
+++ b/awk.h
@@ -1373,6 +1373,9 @@ extern void negate_num(NODE *n);
typedef NODE *(*builtin_func_t)(int); /* function that implements a built-in */
extern builtin_func_t lookup_builtin(const char *name);
extern void install_builtins(void);
+extern bool is_alpha(int c);
+extern bool is_alnum(int c);
+extern bool is_identchar(int c);
/* builtin.c */
extern double double_to_int(double d);
extern NODE *do_exp(int nargs);
diff --git a/awkgram.c b/awkgram.c
index 899a8493..4369666a 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -195,9 +195,7 @@ extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
-static bool is_identchar(int c);
-
-#line 201 "awkgram.c" /* yacc.c:339 */
+#line 199 "awkgram.c" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
@@ -351,7 +349,7 @@ int yyparse (void);
/* Copy the second part of user declarations. */
-#line 355 "awkgram.c" /* yacc.c:358 */
+#line 353 "awkgram.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -653,25 +651,25 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 200, 200, 202, 207, 208, 214, 226, 230, 241,
- 247, 252, 260, 268, 270, 275, 283, 285, 291, 292,
- 294, 320, 331, 342, 348, 357, 367, 369, 371, 377,
- 382, 383, 387, 406, 405, 439, 441, 446, 447, 460,
- 465, 466, 470, 472, 474, 481, 571, 613, 655, 768,
- 775, 782, 792, 801, 810, 819, 830, 846, 845, 869,
- 881, 881, 979, 979, 1012, 1042, 1048, 1049, 1055, 1056,
- 1063, 1068, 1080, 1094, 1096, 1104, 1109, 1111, 1119, 1121,
- 1130, 1131, 1139, 1144, 1144, 1155, 1159, 1167, 1168, 1171,
- 1173, 1178, 1179, 1188, 1189, 1194, 1199, 1205, 1207, 1209,
- 1216, 1217, 1223, 1224, 1229, 1231, 1236, 1238, 1246, 1251,
- 1260, 1267, 1269, 1271, 1287, 1297, 1304, 1306, 1311, 1313,
- 1315, 1323, 1325, 1330, 1332, 1337, 1339, 1341, 1391, 1393,
- 1395, 1397, 1399, 1401, 1403, 1405, 1419, 1424, 1429, 1454,
- 1460, 1462, 1464, 1466, 1468, 1470, 1475, 1479, 1511, 1513,
- 1519, 1525, 1538, 1539, 1540, 1545, 1550, 1554, 1558, 1573,
- 1586, 1591, 1627, 1645, 1646, 1652, 1653, 1658, 1660, 1667,
- 1684, 1701, 1703, 1710, 1715, 1723, 1733, 1745, 1754, 1758,
- 1762, 1766, 1770, 1774, 1777, 1779, 1783, 1787, 1791
+ 0, 198, 198, 200, 205, 206, 212, 224, 228, 239,
+ 245, 250, 258, 266, 268, 273, 281, 283, 289, 290,
+ 292, 318, 329, 340, 346, 355, 365, 367, 369, 375,
+ 380, 381, 385, 404, 403, 437, 439, 444, 445, 458,
+ 463, 464, 468, 470, 472, 479, 569, 611, 653, 766,
+ 773, 780, 790, 799, 808, 817, 828, 844, 843, 867,
+ 879, 879, 977, 977, 1010, 1040, 1046, 1047, 1053, 1054,
+ 1061, 1066, 1078, 1092, 1094, 1102, 1107, 1109, 1117, 1119,
+ 1128, 1129, 1137, 1142, 1142, 1153, 1157, 1165, 1166, 1169,
+ 1171, 1176, 1177, 1186, 1187, 1192, 1197, 1203, 1205, 1207,
+ 1214, 1215, 1221, 1222, 1227, 1229, 1234, 1236, 1244, 1249,
+ 1258, 1265, 1267, 1269, 1285, 1295, 1302, 1304, 1309, 1311,
+ 1313, 1321, 1323, 1328, 1330, 1335, 1337, 1339, 1389, 1391,
+ 1393, 1395, 1397, 1399, 1401, 1403, 1417, 1422, 1427, 1452,
+ 1458, 1460, 1462, 1464, 1466, 1468, 1473, 1477, 1509, 1511,
+ 1517, 1523, 1536, 1537, 1538, 1543, 1548, 1552, 1556, 1571,
+ 1584, 1589, 1625, 1643, 1644, 1650, 1651, 1656, 1658, 1665,
+ 1682, 1699, 1701, 1708, 1713, 1721, 1731, 1743, 1752, 1756,
+ 1760, 1764, 1768, 1772, 1775, 1777, 1781, 1785, 1789
};
#endif
@@ -1844,26 +1842,26 @@ yyreduce:
switch (yyn)
{
case 3:
-#line 203 "awkgram.y" /* yacc.c:1646 */
+#line 201 "awkgram.y" /* yacc.c:1646 */
{
rule = 0;
yyerrok;
}
-#line 1853 "awkgram.c" /* yacc.c:1646 */
+#line 1851 "awkgram.c" /* yacc.c:1646 */
break;
case 5:
-#line 209 "awkgram.y" /* yacc.c:1646 */
+#line 207 "awkgram.y" /* yacc.c:1646 */
{
next_sourcefile();
if (sourcefile == srcfiles)
process_deferred();
}
-#line 1863 "awkgram.c" /* yacc.c:1646 */
+#line 1861 "awkgram.c" /* yacc.c:1646 */
break;
case 6:
-#line 215 "awkgram.y" /* yacc.c:1646 */
+#line 213 "awkgram.y" /* yacc.c:1646 */
{
rule = 0;
/*
@@ -1872,19 +1870,19 @@ yyreduce:
*/
/* yyerrok; */
}
-#line 1876 "awkgram.c" /* yacc.c:1646 */
+#line 1874 "awkgram.c" /* yacc.c:1646 */
break;
case 7:
-#line 227 "awkgram.y" /* yacc.c:1646 */
+#line 225 "awkgram.y" /* yacc.c:1646 */
{
(void) append_rule((yyvsp[-1]), (yyvsp[0]));
}
-#line 1884 "awkgram.c" /* yacc.c:1646 */
+#line 1882 "awkgram.c" /* yacc.c:1646 */
break;
case 8:
-#line 231 "awkgram.y" /* yacc.c:1646 */
+#line 229 "awkgram.y" /* yacc.c:1646 */
{
if (rule != Rule) {
msg(_("%s blocks must have an action part"), ruletab[rule]);
@@ -1895,39 +1893,39 @@ yyreduce:
} else /* pattern rule with non-empty pattern */
(void) append_rule((yyvsp[-1]), NULL);
}
-#line 1899 "awkgram.c" /* yacc.c:1646 */
+#line 1897 "awkgram.c" /* yacc.c:1646 */
break;
case 9:
-#line 242 "awkgram.y" /* yacc.c:1646 */
+#line 240 "awkgram.y" /* yacc.c:1646 */
{
in_function = NULL;
(void) mk_function((yyvsp[-1]), (yyvsp[0]));
yyerrok;
}
-#line 1909 "awkgram.c" /* yacc.c:1646 */
+#line 1907 "awkgram.c" /* yacc.c:1646 */
break;
case 10:
-#line 248 "awkgram.y" /* yacc.c:1646 */
+#line 246 "awkgram.y" /* yacc.c:1646 */
{
want_source = false;
yyerrok;
}
-#line 1918 "awkgram.c" /* yacc.c:1646 */
+#line 1916 "awkgram.c" /* yacc.c:1646 */
break;
case 11:
-#line 253 "awkgram.y" /* yacc.c:1646 */
+#line 251 "awkgram.y" /* yacc.c:1646 */
{
want_source = false;
yyerrok;
}
-#line 1927 "awkgram.c" /* yacc.c:1646 */
+#line 1925 "awkgram.c" /* yacc.c:1646 */
break;
case 12:
-#line 261 "awkgram.y" /* yacc.c:1646 */
+#line 259 "awkgram.y" /* yacc.c:1646 */
{
if (include_source((yyvsp[0])) < 0)
YYABORT;
@@ -1935,23 +1933,23 @@ yyreduce:
bcfree((yyvsp[0]));
(yyval) = NULL;
}
-#line 1939 "awkgram.c" /* yacc.c:1646 */
+#line 1937 "awkgram.c" /* yacc.c:1646 */
break;
case 13:
-#line 269 "awkgram.y" /* yacc.c:1646 */
+#line 267 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1945 "awkgram.c" /* yacc.c:1646 */
+#line 1943 "awkgram.c" /* yacc.c:1646 */
break;
case 14:
-#line 271 "awkgram.y" /* yacc.c:1646 */
+#line 269 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1951 "awkgram.c" /* yacc.c:1646 */
+#line 1949 "awkgram.c" /* yacc.c:1646 */
break;
case 15:
-#line 276 "awkgram.y" /* yacc.c:1646 */
+#line 274 "awkgram.y" /* yacc.c:1646 */
{
if (load_library((yyvsp[0])) < 0)
YYABORT;
@@ -1959,35 +1957,35 @@ yyreduce:
bcfree((yyvsp[0]));
(yyval) = NULL;
}
-#line 1963 "awkgram.c" /* yacc.c:1646 */
+#line 1961 "awkgram.c" /* yacc.c:1646 */
break;
case 16:
-#line 284 "awkgram.y" /* yacc.c:1646 */
+#line 282 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1969 "awkgram.c" /* yacc.c:1646 */
+#line 1967 "awkgram.c" /* yacc.c:1646 */
break;
case 17:
-#line 286 "awkgram.y" /* yacc.c:1646 */
+#line 284 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1975 "awkgram.c" /* yacc.c:1646 */
+#line 1973 "awkgram.c" /* yacc.c:1646 */
break;
case 18:
-#line 291 "awkgram.y" /* yacc.c:1646 */
+#line 289 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; rule = Rule; }
-#line 1981 "awkgram.c" /* yacc.c:1646 */
+#line 1979 "awkgram.c" /* yacc.c:1646 */
break;
case 19:
-#line 293 "awkgram.y" /* yacc.c:1646 */
+#line 291 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); rule = Rule; }
-#line 1987 "awkgram.c" /* yacc.c:1646 */
+#line 1985 "awkgram.c" /* yacc.c:1646 */
break;
case 20:
-#line 295 "awkgram.y" /* yacc.c:1646 */
+#line 293 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *tp;
@@ -2013,11 +2011,11 @@ yyreduce:
(yyval) = list_append(list_merge((yyvsp[-3]), (yyvsp[0])), tp);
rule = Rule;
}
-#line 2017 "awkgram.c" /* yacc.c:1646 */
+#line 2015 "awkgram.c" /* yacc.c:1646 */
break;
case 21:
-#line 321 "awkgram.y" /* yacc.c:1646 */
+#line 319 "awkgram.y" /* yacc.c:1646 */
{
static int begin_seen = 0;
if (do_lint_old && ++begin_seen == 2)
@@ -2028,11 +2026,11 @@ yyreduce:
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2032 "awkgram.c" /* yacc.c:1646 */
+#line 2030 "awkgram.c" /* yacc.c:1646 */
break;
case 22:
-#line 332 "awkgram.y" /* yacc.c:1646 */
+#line 330 "awkgram.y" /* yacc.c:1646 */
{
static int end_seen = 0;
if (do_lint_old && ++end_seen == 2)
@@ -2043,70 +2041,70 @@ yyreduce:
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2047 "awkgram.c" /* yacc.c:1646 */
+#line 2045 "awkgram.c" /* yacc.c:1646 */
break;
case 23:
-#line 343 "awkgram.y" /* yacc.c:1646 */
+#line 341 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->in_rule = rule = BEGINFILE;
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2057 "awkgram.c" /* yacc.c:1646 */
+#line 2055 "awkgram.c" /* yacc.c:1646 */
break;
case 24:
-#line 349 "awkgram.y" /* yacc.c:1646 */
+#line 347 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->in_rule = rule = ENDFILE;
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2067 "awkgram.c" /* yacc.c:1646 */
+#line 2065 "awkgram.c" /* yacc.c:1646 */
break;
case 25:
-#line 358 "awkgram.y" /* yacc.c:1646 */
+#line 356 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-3]) == NULL)
(yyval) = list_create(instruction(Op_no_op));
else
(yyval) = (yyvsp[-3]);
}
-#line 2078 "awkgram.c" /* yacc.c:1646 */
+#line 2076 "awkgram.c" /* yacc.c:1646 */
break;
case 26:
-#line 368 "awkgram.y" /* yacc.c:1646 */
+#line 366 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2084 "awkgram.c" /* yacc.c:1646 */
+#line 2082 "awkgram.c" /* yacc.c:1646 */
break;
case 27:
-#line 370 "awkgram.y" /* yacc.c:1646 */
+#line 368 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2090 "awkgram.c" /* yacc.c:1646 */
+#line 2088 "awkgram.c" /* yacc.c:1646 */
break;
case 28:
-#line 372 "awkgram.y" /* yacc.c:1646 */
+#line 370 "awkgram.y" /* yacc.c:1646 */
{
yyerror(_("`%s' is a built-in function, it cannot be redefined"),
tokstart);
YYABORT;
}
-#line 2100 "awkgram.c" /* yacc.c:1646 */
+#line 2098 "awkgram.c" /* yacc.c:1646 */
break;
case 29:
-#line 378 "awkgram.y" /* yacc.c:1646 */
+#line 376 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2106 "awkgram.c" /* yacc.c:1646 */
+#line 2104 "awkgram.c" /* yacc.c:1646 */
break;
case 32:
-#line 388 "awkgram.y" /* yacc.c:1646 */
+#line 386 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-5])->source_file = source;
if (install_function((yyvsp[-4])->lextok, (yyvsp[-5]), (yyvsp[-2])) < 0)
@@ -2117,17 +2115,17 @@ yyreduce:
/* $4 already free'd in install_function */
(yyval) = (yyvsp[-5]);
}
-#line 2121 "awkgram.c" /* yacc.c:1646 */
+#line 2119 "awkgram.c" /* yacc.c:1646 */
break;
case 33:
-#line 406 "awkgram.y" /* yacc.c:1646 */
+#line 404 "awkgram.y" /* yacc.c:1646 */
{ want_regexp = true; }
-#line 2127 "awkgram.c" /* yacc.c:1646 */
+#line 2125 "awkgram.c" /* yacc.c:1646 */
break;
case 34:
-#line 408 "awkgram.y" /* yacc.c:1646 */
+#line 406 "awkgram.y" /* yacc.c:1646 */
{
NODE *n, *exp;
char *re;
@@ -2156,23 +2154,23 @@ yyreduce:
(yyval)->opcode = Op_match_rec;
(yyval)->memory = n;
}
-#line 2160 "awkgram.c" /* yacc.c:1646 */
+#line 2158 "awkgram.c" /* yacc.c:1646 */
break;
case 35:
-#line 440 "awkgram.y" /* yacc.c:1646 */
+#line 438 "awkgram.y" /* yacc.c:1646 */
{ bcfree((yyvsp[0])); }
-#line 2166 "awkgram.c" /* yacc.c:1646 */
+#line 2164 "awkgram.c" /* yacc.c:1646 */
break;
case 37:
-#line 446 "awkgram.y" /* yacc.c:1646 */
+#line 444 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2172 "awkgram.c" /* yacc.c:1646 */
+#line 2170 "awkgram.c" /* yacc.c:1646 */
break;
case 38:
-#line 448 "awkgram.y" /* yacc.c:1646 */
+#line 446 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0]) == NULL)
(yyval) = (yyvsp[-1]);
@@ -2185,40 +2183,40 @@ yyreduce:
}
yyerrok;
}
-#line 2189 "awkgram.c" /* yacc.c:1646 */
+#line 2187 "awkgram.c" /* yacc.c:1646 */
break;
case 39:
-#line 461 "awkgram.y" /* yacc.c:1646 */
+#line 459 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2195 "awkgram.c" /* yacc.c:1646 */
+#line 2193 "awkgram.c" /* yacc.c:1646 */
break;
case 42:
-#line 471 "awkgram.y" /* yacc.c:1646 */
+#line 469 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2201 "awkgram.c" /* yacc.c:1646 */
+#line 2199 "awkgram.c" /* yacc.c:1646 */
break;
case 43:
-#line 473 "awkgram.y" /* yacc.c:1646 */
+#line 471 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 2207 "awkgram.c" /* yacc.c:1646 */
+#line 2205 "awkgram.c" /* yacc.c:1646 */
break;
case 44:
-#line 475 "awkgram.y" /* yacc.c:1646 */
+#line 473 "awkgram.y" /* yacc.c:1646 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]), instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2218 "awkgram.c" /* yacc.c:1646 */
+#line 2216 "awkgram.c" /* yacc.c:1646 */
break;
case 45:
-#line 482 "awkgram.y" /* yacc.c:1646 */
+#line 480 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt;
INSTRUCTION *ip, *nextc, *tbreak;
@@ -2308,11 +2306,11 @@ yyreduce:
break_allowed--;
fix_break_continue(ip, tbreak, NULL);
}
-#line 2312 "awkgram.c" /* yacc.c:1646 */
+#line 2310 "awkgram.c" /* yacc.c:1646 */
break;
case 46:
-#line 572 "awkgram.y" /* yacc.c:1646 */
+#line 570 "awkgram.y" /* yacc.c:1646 */
{
/*
* -----------------
@@ -2354,11 +2352,11 @@ yyreduce:
continue_allowed--;
fix_break_continue(ip, tbreak, tcont);
}
-#line 2358 "awkgram.c" /* yacc.c:1646 */
+#line 2356 "awkgram.c" /* yacc.c:1646 */
break;
case 47:
-#line 614 "awkgram.y" /* yacc.c:1646 */
+#line 612 "awkgram.y" /* yacc.c:1646 */
{
/*
* -----------------
@@ -2400,11 +2398,11 @@ yyreduce:
} /* else
$1 and $4 are NULLs */
}
-#line 2404 "awkgram.c" /* yacc.c:1646 */
+#line 2402 "awkgram.c" /* yacc.c:1646 */
break;
case 48:
-#line 656 "awkgram.y" /* yacc.c:1646 */
+#line 654 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip;
char *var_name = (yyvsp[-5])->lextok;
@@ -2517,44 +2515,44 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2521 "awkgram.c" /* yacc.c:1646 */
+#line 2519 "awkgram.c" /* yacc.c:1646 */
break;
case 49:
-#line 769 "awkgram.y" /* yacc.c:1646 */
+#line 767 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_for_loop((yyvsp[-11]), (yyvsp[-9]), (yyvsp[-6]), (yyvsp[-3]), (yyvsp[0]));
break_allowed--;
continue_allowed--;
}
-#line 2532 "awkgram.c" /* yacc.c:1646 */
+#line 2530 "awkgram.c" /* yacc.c:1646 */
break;
case 50:
-#line 776 "awkgram.y" /* yacc.c:1646 */
+#line 774 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_for_loop((yyvsp[-10]), (yyvsp[-8]), (INSTRUCTION *) NULL, (yyvsp[-3]), (yyvsp[0]));
break_allowed--;
continue_allowed--;
}
-#line 2543 "awkgram.c" /* yacc.c:1646 */
+#line 2541 "awkgram.c" /* yacc.c:1646 */
break;
case 51:
-#line 783 "awkgram.y" /* yacc.c:1646 */
+#line 781 "awkgram.y" /* yacc.c:1646 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]), instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2554 "awkgram.c" /* yacc.c:1646 */
+#line 2552 "awkgram.c" /* yacc.c:1646 */
break;
case 52:
-#line 793 "awkgram.y" /* yacc.c:1646 */
+#line 791 "awkgram.y" /* yacc.c:1646 */
{
if (! break_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2563,11 +2561,11 @@ regular_loop:
(yyval) = list_create((yyvsp[-1]));
}
-#line 2567 "awkgram.c" /* yacc.c:1646 */
+#line 2565 "awkgram.c" /* yacc.c:1646 */
break;
case 53:
-#line 802 "awkgram.y" /* yacc.c:1646 */
+#line 800 "awkgram.y" /* yacc.c:1646 */
{
if (! continue_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2576,11 +2574,11 @@ regular_loop:
(yyval) = list_create((yyvsp[-1]));
}
-#line 2580 "awkgram.c" /* yacc.c:1646 */
+#line 2578 "awkgram.c" /* yacc.c:1646 */
break;
case 54:
-#line 811 "awkgram.y" /* yacc.c:1646 */
+#line 809 "awkgram.y" /* yacc.c:1646 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule && rule != Rule)
@@ -2589,11 +2587,11 @@ regular_loop:
(yyvsp[-1])->target_jmp = ip_rec;
(yyval) = list_create((yyvsp[-1]));
}
-#line 2593 "awkgram.c" /* yacc.c:1646 */
+#line 2591 "awkgram.c" /* yacc.c:1646 */
break;
case 55:
-#line 820 "awkgram.y" /* yacc.c:1646 */
+#line 818 "awkgram.y" /* yacc.c:1646 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule == BEGIN || rule == END || rule == ENDFILE)
@@ -2604,11 +2602,11 @@ regular_loop:
(yyvsp[-1])->target_endfile = ip_endfile;
(yyval) = list_create((yyvsp[-1]));
}
-#line 2608 "awkgram.c" /* yacc.c:1646 */
+#line 2606 "awkgram.c" /* yacc.c:1646 */
break;
case 56:
-#line 831 "awkgram.y" /* yacc.c:1646 */
+#line 829 "awkgram.y" /* yacc.c:1646 */
{
/* Initialize the two possible jump targets, the actual target
* is resolved at run-time.
@@ -2623,20 +2621,20 @@ regular_loop:
} else
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
}
-#line 2627 "awkgram.c" /* yacc.c:1646 */
+#line 2625 "awkgram.c" /* yacc.c:1646 */
break;
case 57:
-#line 846 "awkgram.y" /* yacc.c:1646 */
+#line 844 "awkgram.y" /* yacc.c:1646 */
{
if (! in_function)
yyerror(_("`return' used outside function context"));
}
-#line 2636 "awkgram.c" /* yacc.c:1646 */
+#line 2634 "awkgram.c" /* yacc.c:1646 */
break;
case 58:
-#line 849 "awkgram.y" /* yacc.c:1646 */
+#line 847 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-1]) == NULL) {
(yyval) = list_create((yyvsp[-3]));
@@ -2657,17 +2655,17 @@ regular_loop:
(yyval) = list_append((yyvsp[-1]), (yyvsp[-3]));
}
}
-#line 2661 "awkgram.c" /* yacc.c:1646 */
+#line 2659 "awkgram.c" /* yacc.c:1646 */
break;
case 60:
-#line 881 "awkgram.y" /* yacc.c:1646 */
+#line 879 "awkgram.y" /* yacc.c:1646 */
{ in_print = true; in_parens = 0; }
-#line 2667 "awkgram.c" /* yacc.c:1646 */
+#line 2665 "awkgram.c" /* yacc.c:1646 */
break;
case 61:
-#line 882 "awkgram.y" /* yacc.c:1646 */
+#line 880 "awkgram.y" /* yacc.c:1646 */
{
/*
* Optimization: plain `print' has no expression list, so $3 is null.
@@ -2764,17 +2762,17 @@ regular_print:
}
}
}
-#line 2768 "awkgram.c" /* yacc.c:1646 */
+#line 2766 "awkgram.c" /* yacc.c:1646 */
break;
case 62:
-#line 979 "awkgram.y" /* yacc.c:1646 */
+#line 977 "awkgram.y" /* yacc.c:1646 */
{ sub_counter = 0; }
-#line 2774 "awkgram.c" /* yacc.c:1646 */
+#line 2772 "awkgram.c" /* yacc.c:1646 */
break;
case 63:
-#line 980 "awkgram.y" /* yacc.c:1646 */
+#line 978 "awkgram.y" /* yacc.c:1646 */
{
char *arr = (yyvsp[-2])->lextok;
@@ -2807,11 +2805,11 @@ regular_print:
(yyval) = list_append(list_append((yyvsp[0]), (yyvsp[-2])), (yyvsp[-3]));
}
}
-#line 2811 "awkgram.c" /* yacc.c:1646 */
+#line 2809 "awkgram.c" /* yacc.c:1646 */
break;
case 64:
-#line 1017 "awkgram.y" /* yacc.c:1646 */
+#line 1015 "awkgram.y" /* yacc.c:1646 */
{
static bool warned = false;
char *arr = (yyvsp[-1])->lextok;
@@ -2837,52 +2835,52 @@ regular_print:
fatal(_("`delete' is not allowed with FUNCTAB"));
}
}
-#line 2841 "awkgram.c" /* yacc.c:1646 */
+#line 2839 "awkgram.c" /* yacc.c:1646 */
break;
case 65:
-#line 1043 "awkgram.y" /* yacc.c:1646 */
+#line 1041 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = optimize_assignment((yyvsp[0])); }
-#line 2847 "awkgram.c" /* yacc.c:1646 */
+#line 2845 "awkgram.c" /* yacc.c:1646 */
break;
case 66:
-#line 1048 "awkgram.y" /* yacc.c:1646 */
+#line 1046 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2853 "awkgram.c" /* yacc.c:1646 */
+#line 2851 "awkgram.c" /* yacc.c:1646 */
break;
case 67:
-#line 1050 "awkgram.y" /* yacc.c:1646 */
+#line 1048 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2859 "awkgram.c" /* yacc.c:1646 */
+#line 2857 "awkgram.c" /* yacc.c:1646 */
break;
case 68:
-#line 1055 "awkgram.y" /* yacc.c:1646 */
+#line 1053 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2865 "awkgram.c" /* yacc.c:1646 */
+#line 2863 "awkgram.c" /* yacc.c:1646 */
break;
case 69:
-#line 1057 "awkgram.y" /* yacc.c:1646 */
+#line 1055 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-1]) == NULL)
(yyval) = list_create((yyvsp[0]));
else
(yyval) = list_prepend((yyvsp[-1]), (yyvsp[0]));
}
-#line 2876 "awkgram.c" /* yacc.c:1646 */
+#line 2874 "awkgram.c" /* yacc.c:1646 */
break;
case 70:
-#line 1064 "awkgram.y" /* yacc.c:1646 */
+#line 1062 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2882 "awkgram.c" /* yacc.c:1646 */
+#line 2880 "awkgram.c" /* yacc.c:1646 */
break;
case 71:
-#line 1069 "awkgram.y" /* yacc.c:1646 */
+#line 1067 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -2894,11 +2892,11 @@ regular_print:
bcfree((yyvsp[-2]));
(yyval) = (yyvsp[-4]);
}
-#line 2898 "awkgram.c" /* yacc.c:1646 */
+#line 2896 "awkgram.c" /* yacc.c:1646 */
break;
case 72:
-#line 1081 "awkgram.y" /* yacc.c:1646 */
+#line 1079 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -2909,17 +2907,17 @@ regular_print:
(yyvsp[-3])->case_stmt = casestmt;
(yyval) = (yyvsp[-3]);
}
-#line 2913 "awkgram.c" /* yacc.c:1646 */
+#line 2911 "awkgram.c" /* yacc.c:1646 */
break;
case 73:
-#line 1095 "awkgram.y" /* yacc.c:1646 */
+#line 1093 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2919 "awkgram.c" /* yacc.c:1646 */
+#line 2917 "awkgram.c" /* yacc.c:1646 */
break;
case 74:
-#line 1097 "awkgram.y" /* yacc.c:1646 */
+#line 1095 "awkgram.y" /* yacc.c:1646 */
{
NODE *n = (yyvsp[0])->memory;
(void) force_number(n);
@@ -2927,71 +2925,71 @@ regular_print:
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 2931 "awkgram.c" /* yacc.c:1646 */
+#line 2929 "awkgram.c" /* yacc.c:1646 */
break;
case 75:
-#line 1105 "awkgram.y" /* yacc.c:1646 */
+#line 1103 "awkgram.y" /* yacc.c:1646 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 2940 "awkgram.c" /* yacc.c:1646 */
+#line 2938 "awkgram.c" /* yacc.c:1646 */
break;
case 76:
-#line 1110 "awkgram.y" /* yacc.c:1646 */
+#line 1108 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2946 "awkgram.c" /* yacc.c:1646 */
+#line 2944 "awkgram.c" /* yacc.c:1646 */
break;
case 77:
-#line 1112 "awkgram.y" /* yacc.c:1646 */
+#line 1110 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_push_re;
(yyval) = (yyvsp[0]);
}
-#line 2955 "awkgram.c" /* yacc.c:1646 */
+#line 2953 "awkgram.c" /* yacc.c:1646 */
break;
case 78:
-#line 1120 "awkgram.y" /* yacc.c:1646 */
+#line 1118 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2961 "awkgram.c" /* yacc.c:1646 */
+#line 2959 "awkgram.c" /* yacc.c:1646 */
break;
case 79:
-#line 1122 "awkgram.y" /* yacc.c:1646 */
+#line 1120 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2967 "awkgram.c" /* yacc.c:1646 */
+#line 2965 "awkgram.c" /* yacc.c:1646 */
break;
case 81:
-#line 1132 "awkgram.y" /* yacc.c:1646 */
+#line 1130 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-1]);
}
-#line 2975 "awkgram.c" /* yacc.c:1646 */
+#line 2973 "awkgram.c" /* yacc.c:1646 */
break;
case 82:
-#line 1139 "awkgram.y" /* yacc.c:1646 */
+#line 1137 "awkgram.y" /* yacc.c:1646 */
{
in_print = false;
in_parens = 0;
(yyval) = NULL;
}
-#line 2985 "awkgram.c" /* yacc.c:1646 */
+#line 2983 "awkgram.c" /* yacc.c:1646 */
break;
case 83:
-#line 1144 "awkgram.y" /* yacc.c:1646 */
+#line 1142 "awkgram.y" /* yacc.c:1646 */
{ in_print = false; in_parens = 0; }
-#line 2991 "awkgram.c" /* yacc.c:1646 */
+#line 2989 "awkgram.c" /* yacc.c:1646 */
break;
case 84:
-#line 1145 "awkgram.y" /* yacc.c:1646 */
+#line 1143 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-2])->redir_type == redirect_twoway
&& (yyvsp[0])->lasti->opcode == Op_K_getline_redir
@@ -2999,136 +2997,136 @@ regular_print:
yyerror(_("multistage two-way pipelines don't work"));
(yyval) = list_prepend((yyvsp[0]), (yyvsp[-2]));
}
-#line 3003 "awkgram.c" /* yacc.c:1646 */
+#line 3001 "awkgram.c" /* yacc.c:1646 */
break;
case 85:
-#line 1156 "awkgram.y" /* yacc.c:1646 */
+#line 1154 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_condition((yyvsp[-3]), (yyvsp[-5]), (yyvsp[0]), NULL, NULL);
}
-#line 3011 "awkgram.c" /* yacc.c:1646 */
+#line 3009 "awkgram.c" /* yacc.c:1646 */
break;
case 86:
-#line 1161 "awkgram.y" /* yacc.c:1646 */
+#line 1159 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_condition((yyvsp[-6]), (yyvsp[-8]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[0]));
}
-#line 3019 "awkgram.c" /* yacc.c:1646 */
+#line 3017 "awkgram.c" /* yacc.c:1646 */
break;
case 91:
-#line 1178 "awkgram.y" /* yacc.c:1646 */
+#line 1176 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3025 "awkgram.c" /* yacc.c:1646 */
+#line 3023 "awkgram.c" /* yacc.c:1646 */
break;
case 92:
-#line 1180 "awkgram.y" /* yacc.c:1646 */
+#line 1178 "awkgram.y" /* yacc.c:1646 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3034 "awkgram.c" /* yacc.c:1646 */
+#line 3032 "awkgram.c" /* yacc.c:1646 */
break;
case 93:
-#line 1188 "awkgram.y" /* yacc.c:1646 */
+#line 1186 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3040 "awkgram.c" /* yacc.c:1646 */
+#line 3038 "awkgram.c" /* yacc.c:1646 */
break;
case 94:
-#line 1190 "awkgram.y" /* yacc.c:1646 */
+#line 1188 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]) ; }
-#line 3046 "awkgram.c" /* yacc.c:1646 */
+#line 3044 "awkgram.c" /* yacc.c:1646 */
break;
case 95:
-#line 1195 "awkgram.y" /* yacc.c:1646 */
+#line 1193 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->param_count = 0;
(yyval) = list_create((yyvsp[0]));
}
-#line 3055 "awkgram.c" /* yacc.c:1646 */
+#line 3053 "awkgram.c" /* yacc.c:1646 */
break;
case 96:
-#line 1200 "awkgram.y" /* yacc.c:1646 */
+#line 1198 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->param_count = (yyvsp[-2])->lasti->param_count + 1;
(yyval) = list_append((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3065 "awkgram.c" /* yacc.c:1646 */
+#line 3063 "awkgram.c" /* yacc.c:1646 */
break;
case 97:
-#line 1206 "awkgram.y" /* yacc.c:1646 */
+#line 1204 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3071 "awkgram.c" /* yacc.c:1646 */
+#line 3069 "awkgram.c" /* yacc.c:1646 */
break;
case 98:
-#line 1208 "awkgram.y" /* yacc.c:1646 */
+#line 1206 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3077 "awkgram.c" /* yacc.c:1646 */
+#line 3075 "awkgram.c" /* yacc.c:1646 */
break;
case 99:
-#line 1210 "awkgram.y" /* yacc.c:1646 */
+#line 1208 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-2]); }
-#line 3083 "awkgram.c" /* yacc.c:1646 */
+#line 3081 "awkgram.c" /* yacc.c:1646 */
break;
case 100:
-#line 1216 "awkgram.y" /* yacc.c:1646 */
+#line 1214 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3089 "awkgram.c" /* yacc.c:1646 */
+#line 3087 "awkgram.c" /* yacc.c:1646 */
break;
case 101:
-#line 1218 "awkgram.y" /* yacc.c:1646 */
+#line 1216 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3095 "awkgram.c" /* yacc.c:1646 */
+#line 3093 "awkgram.c" /* yacc.c:1646 */
break;
case 102:
-#line 1223 "awkgram.y" /* yacc.c:1646 */
+#line 1221 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3101 "awkgram.c" /* yacc.c:1646 */
+#line 3099 "awkgram.c" /* yacc.c:1646 */
break;
case 103:
-#line 1225 "awkgram.y" /* yacc.c:1646 */
+#line 1223 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3107 "awkgram.c" /* yacc.c:1646 */
+#line 3105 "awkgram.c" /* yacc.c:1646 */
break;
case 104:
-#line 1230 "awkgram.y" /* yacc.c:1646 */
+#line 1228 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_expression_list(NULL, (yyvsp[0])); }
-#line 3113 "awkgram.c" /* yacc.c:1646 */
+#line 3111 "awkgram.c" /* yacc.c:1646 */
break;
case 105:
-#line 1232 "awkgram.y" /* yacc.c:1646 */
+#line 1230 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3122 "awkgram.c" /* yacc.c:1646 */
+#line 3120 "awkgram.c" /* yacc.c:1646 */
break;
case 106:
-#line 1237 "awkgram.y" /* yacc.c:1646 */
+#line 1235 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3128 "awkgram.c" /* yacc.c:1646 */
+#line 3126 "awkgram.c" /* yacc.c:1646 */
break;
case 107:
-#line 1239 "awkgram.y" /* yacc.c:1646 */
+#line 1237 "awkgram.y" /* yacc.c:1646 */
{
/*
* Returning the expression list instead of NULL lets
@@ -3136,52 +3134,52 @@ regular_print:
*/
(yyval) = (yyvsp[-1]);
}
-#line 3140 "awkgram.c" /* yacc.c:1646 */
+#line 3138 "awkgram.c" /* yacc.c:1646 */
break;
case 108:
-#line 1247 "awkgram.y" /* yacc.c:1646 */
+#line 1245 "awkgram.y" /* yacc.c:1646 */
{
/* Ditto */
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
}
-#line 3149 "awkgram.c" /* yacc.c:1646 */
+#line 3147 "awkgram.c" /* yacc.c:1646 */
break;
case 109:
-#line 1252 "awkgram.y" /* yacc.c:1646 */
+#line 1250 "awkgram.y" /* yacc.c:1646 */
{
/* Ditto */
(yyval) = (yyvsp[-2]);
}
-#line 3158 "awkgram.c" /* yacc.c:1646 */
+#line 3156 "awkgram.c" /* yacc.c:1646 */
break;
case 110:
-#line 1261 "awkgram.y" /* yacc.c:1646 */
+#line 1259 "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 3169 "awkgram.c" /* yacc.c:1646 */
+#line 3167 "awkgram.c" /* yacc.c:1646 */
break;
case 111:
-#line 1268 "awkgram.y" /* yacc.c:1646 */
+#line 1266 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3175 "awkgram.c" /* yacc.c:1646 */
+#line 3173 "awkgram.c" /* yacc.c:1646 */
break;
case 112:
-#line 1270 "awkgram.y" /* yacc.c:1646 */
+#line 1268 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3181 "awkgram.c" /* yacc.c:1646 */
+#line 3179 "awkgram.c" /* yacc.c:1646 */
break;
case 113:
-#line 1272 "awkgram.y" /* yacc.c:1646 */
+#line 1270 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-2])->lasti->opcode == Op_match_rec)
warning_ln((yyvsp[-1])->source_line,
@@ -3197,11 +3195,11 @@ regular_print:
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1]));
}
}
-#line 3201 "awkgram.c" /* yacc.c:1646 */
+#line 3199 "awkgram.c" /* yacc.c:1646 */
break;
case 114:
-#line 1288 "awkgram.y" /* yacc.c:1646 */
+#line 1286 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint_old)
warning_ln((yyvsp[-1])->source_line,
@@ -3211,91 +3209,91 @@ regular_print:
(yyvsp[-1])->expr_count = 1;
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1]));
}
-#line 3215 "awkgram.c" /* yacc.c:1646 */
+#line 3213 "awkgram.c" /* yacc.c:1646 */
break;
case 115:
-#line 1298 "awkgram.y" /* yacc.c:1646 */
+#line 1296 "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 3226 "awkgram.c" /* yacc.c:1646 */
+#line 3224 "awkgram.c" /* yacc.c:1646 */
break;
case 116:
-#line 1305 "awkgram.y" /* yacc.c:1646 */
+#line 1303 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_condition((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])); }
-#line 3232 "awkgram.c" /* yacc.c:1646 */
+#line 3230 "awkgram.c" /* yacc.c:1646 */
break;
case 117:
-#line 1307 "awkgram.y" /* yacc.c:1646 */
+#line 1305 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3238 "awkgram.c" /* yacc.c:1646 */
+#line 3236 "awkgram.c" /* yacc.c:1646 */
break;
case 118:
-#line 1312 "awkgram.y" /* yacc.c:1646 */
+#line 1310 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3244 "awkgram.c" /* yacc.c:1646 */
+#line 3242 "awkgram.c" /* yacc.c:1646 */
break;
case 119:
-#line 1314 "awkgram.y" /* yacc.c:1646 */
+#line 1312 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3250 "awkgram.c" /* yacc.c:1646 */
+#line 3248 "awkgram.c" /* yacc.c:1646 */
break;
case 120:
-#line 1316 "awkgram.y" /* yacc.c:1646 */
+#line 1314 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_assign_quotient;
(yyval) = (yyvsp[0]);
}
-#line 3259 "awkgram.c" /* yacc.c:1646 */
+#line 3257 "awkgram.c" /* yacc.c:1646 */
break;
case 121:
-#line 1324 "awkgram.y" /* yacc.c:1646 */
+#line 1322 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3265 "awkgram.c" /* yacc.c:1646 */
+#line 3263 "awkgram.c" /* yacc.c:1646 */
break;
case 122:
-#line 1326 "awkgram.y" /* yacc.c:1646 */
+#line 1324 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3271 "awkgram.c" /* yacc.c:1646 */
+#line 3269 "awkgram.c" /* yacc.c:1646 */
break;
case 123:
-#line 1331 "awkgram.y" /* yacc.c:1646 */
+#line 1329 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3277 "awkgram.c" /* yacc.c:1646 */
+#line 3275 "awkgram.c" /* yacc.c:1646 */
break;
case 124:
-#line 1333 "awkgram.y" /* yacc.c:1646 */
+#line 1331 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3283 "awkgram.c" /* yacc.c:1646 */
+#line 3281 "awkgram.c" /* yacc.c:1646 */
break;
case 125:
-#line 1338 "awkgram.y" /* yacc.c:1646 */
+#line 1336 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3289 "awkgram.c" /* yacc.c:1646 */
+#line 3287 "awkgram.c" /* yacc.c:1646 */
break;
case 126:
-#line 1340 "awkgram.y" /* yacc.c:1646 */
+#line 1338 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3295 "awkgram.c" /* yacc.c:1646 */
+#line 3293 "awkgram.c" /* yacc.c:1646 */
break;
case 127:
-#line 1342 "awkgram.y" /* yacc.c:1646 */
+#line 1340 "awkgram.y" /* yacc.c:1646 */
{
int count = 2;
bool is_simple_var = false;
@@ -3342,47 +3340,47 @@ regular_print:
max_args = count;
}
}
-#line 3346 "awkgram.c" /* yacc.c:1646 */
+#line 3344 "awkgram.c" /* yacc.c:1646 */
break;
case 129:
-#line 1394 "awkgram.y" /* yacc.c:1646 */
+#line 1392 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3352 "awkgram.c" /* yacc.c:1646 */
+#line 3350 "awkgram.c" /* yacc.c:1646 */
break;
case 130:
-#line 1396 "awkgram.y" /* yacc.c:1646 */
+#line 1394 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3358 "awkgram.c" /* yacc.c:1646 */
+#line 3356 "awkgram.c" /* yacc.c:1646 */
break;
case 131:
-#line 1398 "awkgram.y" /* yacc.c:1646 */
+#line 1396 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3364 "awkgram.c" /* yacc.c:1646 */
+#line 3362 "awkgram.c" /* yacc.c:1646 */
break;
case 132:
-#line 1400 "awkgram.y" /* yacc.c:1646 */
+#line 1398 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3370 "awkgram.c" /* yacc.c:1646 */
+#line 3368 "awkgram.c" /* yacc.c:1646 */
break;
case 133:
-#line 1402 "awkgram.y" /* yacc.c:1646 */
+#line 1400 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3376 "awkgram.c" /* yacc.c:1646 */
+#line 3374 "awkgram.c" /* yacc.c:1646 */
break;
case 134:
-#line 1404 "awkgram.y" /* yacc.c:1646 */
+#line 1402 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3382 "awkgram.c" /* yacc.c:1646 */
+#line 3380 "awkgram.c" /* yacc.c:1646 */
break;
case 135:
-#line 1406 "awkgram.y" /* yacc.c:1646 */
+#line 1404 "awkgram.y" /* yacc.c:1646 */
{
/*
* In BEGINFILE/ENDFILE, allow `getline [var] < file'
@@ -3396,29 +3394,29 @@ regular_print:
_("non-redirected `getline' undefined inside END action"));
(yyval) = mk_getline((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), redirect_input);
}
-#line 3400 "awkgram.c" /* yacc.c:1646 */
+#line 3398 "awkgram.c" /* yacc.c:1646 */
break;
case 136:
-#line 1420 "awkgram.y" /* yacc.c:1646 */
+#line 1418 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postincrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3409 "awkgram.c" /* yacc.c:1646 */
+#line 3407 "awkgram.c" /* yacc.c:1646 */
break;
case 137:
-#line 1425 "awkgram.y" /* yacc.c:1646 */
+#line 1423 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postdecrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3418 "awkgram.c" /* yacc.c:1646 */
+#line 3416 "awkgram.c" /* yacc.c:1646 */
break;
case 138:
-#line 1430 "awkgram.y" /* yacc.c:1646 */
+#line 1428 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint_old) {
warning_ln((yyvsp[-1])->source_line,
@@ -3438,64 +3436,64 @@ regular_print:
(yyval) = list_append(list_merge(t, (yyvsp[0])), (yyvsp[-1]));
}
}
-#line 3442 "awkgram.c" /* yacc.c:1646 */
+#line 3440 "awkgram.c" /* yacc.c:1646 */
break;
case 139:
-#line 1455 "awkgram.y" /* yacc.c:1646 */
+#line 1453 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_getline((yyvsp[-1]), (yyvsp[0]), (yyvsp[-3]), (yyvsp[-2])->redir_type);
bcfree((yyvsp[-2]));
}
-#line 3451 "awkgram.c" /* yacc.c:1646 */
+#line 3449 "awkgram.c" /* yacc.c:1646 */
break;
case 140:
-#line 1461 "awkgram.y" /* yacc.c:1646 */
+#line 1459 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3457 "awkgram.c" /* yacc.c:1646 */
+#line 3455 "awkgram.c" /* yacc.c:1646 */
break;
case 141:
-#line 1463 "awkgram.y" /* yacc.c:1646 */
+#line 1461 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3463 "awkgram.c" /* yacc.c:1646 */
+#line 3461 "awkgram.c" /* yacc.c:1646 */
break;
case 142:
-#line 1465 "awkgram.y" /* yacc.c:1646 */
+#line 1463 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3469 "awkgram.c" /* yacc.c:1646 */
+#line 3467 "awkgram.c" /* yacc.c:1646 */
break;
case 143:
-#line 1467 "awkgram.y" /* yacc.c:1646 */
+#line 1465 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3475 "awkgram.c" /* yacc.c:1646 */
+#line 3473 "awkgram.c" /* yacc.c:1646 */
break;
case 144:
-#line 1469 "awkgram.y" /* yacc.c:1646 */
+#line 1467 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3481 "awkgram.c" /* yacc.c:1646 */
+#line 3479 "awkgram.c" /* yacc.c:1646 */
break;
case 145:
-#line 1471 "awkgram.y" /* yacc.c:1646 */
+#line 1469 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3487 "awkgram.c" /* yacc.c:1646 */
+#line 3485 "awkgram.c" /* yacc.c:1646 */
break;
case 146:
-#line 1476 "awkgram.y" /* yacc.c:1646 */
+#line 1474 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3495 "awkgram.c" /* yacc.c:1646 */
+#line 3493 "awkgram.c" /* yacc.c:1646 */
break;
case 147:
-#line 1480 "awkgram.y" /* yacc.c:1646 */
+#line 1478 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0])->opcode == Op_match_rec) {
(yyvsp[0])->opcode = Op_nomatch;
@@ -3527,37 +3525,37 @@ regular_print:
}
}
}
-#line 3531 "awkgram.c" /* yacc.c:1646 */
+#line 3529 "awkgram.c" /* yacc.c:1646 */
break;
case 148:
-#line 1512 "awkgram.y" /* yacc.c:1646 */
+#line 1510 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3537 "awkgram.c" /* yacc.c:1646 */
+#line 3535 "awkgram.c" /* yacc.c:1646 */
break;
case 149:
-#line 1514 "awkgram.y" /* yacc.c:1646 */
+#line 1512 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 3547 "awkgram.c" /* yacc.c:1646 */
+#line 3545 "awkgram.c" /* yacc.c:1646 */
break;
case 150:
-#line 1520 "awkgram.y" /* yacc.c:1646 */
+#line 1518 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 3557 "awkgram.c" /* yacc.c:1646 */
+#line 3555 "awkgram.c" /* yacc.c:1646 */
break;
case 151:
-#line 1526 "awkgram.y" /* yacc.c:1646 */
+#line 1524 "awkgram.y" /* yacc.c:1646 */
{
static bool warned = false;
@@ -3570,45 +3568,45 @@ regular_print:
if ((yyval) == NULL)
YYABORT;
}
-#line 3574 "awkgram.c" /* yacc.c:1646 */
+#line 3572 "awkgram.c" /* yacc.c:1646 */
break;
case 154:
-#line 1541 "awkgram.y" /* yacc.c:1646 */
+#line 1539 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-1])->opcode = Op_preincrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 3583 "awkgram.c" /* yacc.c:1646 */
+#line 3581 "awkgram.c" /* yacc.c:1646 */
break;
case 155:
-#line 1546 "awkgram.y" /* yacc.c:1646 */
+#line 1544 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-1])->opcode = Op_predecrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 3592 "awkgram.c" /* yacc.c:1646 */
+#line 3590 "awkgram.c" /* yacc.c:1646 */
break;
case 156:
-#line 1551 "awkgram.y" /* yacc.c:1646 */
+#line 1549 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3600 "awkgram.c" /* yacc.c:1646 */
+#line 3598 "awkgram.c" /* yacc.c:1646 */
break;
case 157:
-#line 1555 "awkgram.y" /* yacc.c:1646 */
+#line 1553 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3608 "awkgram.c" /* yacc.c:1646 */
+#line 3606 "awkgram.c" /* yacc.c:1646 */
break;
case 158:
-#line 1559 "awkgram.y" /* yacc.c:1646 */
+#line 1557 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0])->lasti->opcode == Op_push_i
&& ((yyvsp[0])->lasti->memory->flags & (STRCUR|STRING)) == 0
@@ -3623,11 +3621,11 @@ regular_print:
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
}
-#line 3627 "awkgram.c" /* yacc.c:1646 */
+#line 3625 "awkgram.c" /* yacc.c:1646 */
break;
case 159:
-#line 1574 "awkgram.y" /* yacc.c:1646 */
+#line 1572 "awkgram.y" /* yacc.c:1646 */
{
/*
* was: $$ = $2
@@ -3637,20 +3635,20 @@ regular_print:
(yyvsp[-1])->memory = make_number(0.0);
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
-#line 3641 "awkgram.c" /* yacc.c:1646 */
+#line 3639 "awkgram.c" /* yacc.c:1646 */
break;
case 160:
-#line 1587 "awkgram.y" /* yacc.c:1646 */
+#line 1585 "awkgram.y" /* yacc.c:1646 */
{
func_use((yyvsp[0])->lasti->func_name, FUNC_USE);
(yyval) = (yyvsp[0]);
}
-#line 3650 "awkgram.c" /* yacc.c:1646 */
+#line 3648 "awkgram.c" /* yacc.c:1646 */
break;
case 161:
-#line 1592 "awkgram.y" /* yacc.c:1646 */
+#line 1590 "awkgram.y" /* yacc.c:1646 */
{
/* indirect function call */
INSTRUCTION *f, *t;
@@ -3683,11 +3681,11 @@ regular_print:
(yyval) = list_prepend((yyvsp[0]), t);
}
-#line 3687 "awkgram.c" /* yacc.c:1646 */
+#line 3685 "awkgram.c" /* yacc.c:1646 */
break;
case 162:
-#line 1628 "awkgram.y" /* yacc.c:1646 */
+#line 1626 "awkgram.y" /* yacc.c:1646 */
{
param_sanity((yyvsp[-1]));
(yyvsp[-3])->opcode = Op_func_call;
@@ -3701,49 +3699,49 @@ regular_print:
(yyval) = list_append(t, (yyvsp[-3]));
}
}
-#line 3705 "awkgram.c" /* yacc.c:1646 */
+#line 3703 "awkgram.c" /* yacc.c:1646 */
break;
case 163:
-#line 1645 "awkgram.y" /* yacc.c:1646 */
+#line 1643 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3711 "awkgram.c" /* yacc.c:1646 */
+#line 3709 "awkgram.c" /* yacc.c:1646 */
break;
case 164:
-#line 1647 "awkgram.y" /* yacc.c:1646 */
+#line 1645 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3717 "awkgram.c" /* yacc.c:1646 */
+#line 3715 "awkgram.c" /* yacc.c:1646 */
break;
case 165:
-#line 1652 "awkgram.y" /* yacc.c:1646 */
+#line 1650 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3723 "awkgram.c" /* yacc.c:1646 */
+#line 3721 "awkgram.c" /* yacc.c:1646 */
break;
case 166:
-#line 1654 "awkgram.y" /* yacc.c:1646 */
+#line 1652 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3729 "awkgram.c" /* yacc.c:1646 */
+#line 3727 "awkgram.c" /* yacc.c:1646 */
break;
case 167:
-#line 1659 "awkgram.y" /* yacc.c:1646 */
+#line 1657 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3735 "awkgram.c" /* yacc.c:1646 */
+#line 3733 "awkgram.c" /* yacc.c:1646 */
break;
case 168:
-#line 1661 "awkgram.y" /* yacc.c:1646 */
+#line 1659 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 3743 "awkgram.c" /* yacc.c:1646 */
+#line 3741 "awkgram.c" /* yacc.c:1646 */
break;
case 169:
-#line 1668 "awkgram.y" /* yacc.c:1646 */
+#line 1666 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip = (yyvsp[0])->lasti;
int count = ip->sub_count; /* # of SUBSEP-seperated expressions */
@@ -3757,11 +3755,11 @@ regular_print:
sub_counter++; /* count # of dimensions */
(yyval) = (yyvsp[0]);
}
-#line 3761 "awkgram.c" /* yacc.c:1646 */
+#line 3759 "awkgram.c" /* yacc.c:1646 */
break;
case 170:
-#line 1685 "awkgram.y" /* yacc.c:1646 */
+#line 1683 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *t = (yyvsp[-1]);
if ((yyvsp[-1]) == NULL) {
@@ -3775,31 +3773,31 @@ regular_print:
(yyvsp[0])->sub_count = count_expressions(&t, false);
(yyval) = list_append(t, (yyvsp[0]));
}
-#line 3779 "awkgram.c" /* yacc.c:1646 */
+#line 3777 "awkgram.c" /* yacc.c:1646 */
break;
case 171:
-#line 1702 "awkgram.y" /* yacc.c:1646 */
+#line 1700 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3785 "awkgram.c" /* yacc.c:1646 */
+#line 3783 "awkgram.c" /* yacc.c:1646 */
break;
case 172:
-#line 1704 "awkgram.y" /* yacc.c:1646 */
+#line 1702 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 3793 "awkgram.c" /* yacc.c:1646 */
+#line 3791 "awkgram.c" /* yacc.c:1646 */
break;
case 173:
-#line 1711 "awkgram.y" /* yacc.c:1646 */
+#line 1709 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3799 "awkgram.c" /* yacc.c:1646 */
+#line 3797 "awkgram.c" /* yacc.c:1646 */
break;
case 174:
-#line 1716 "awkgram.y" /* yacc.c:1646 */
+#line 1714 "awkgram.y" /* yacc.c:1646 */
{
char *var_name = (yyvsp[0])->lextok;
@@ -3807,22 +3805,22 @@ regular_print:
(yyvsp[0])->memory = variable((yyvsp[0])->source_line, var_name, Node_var_new);
(yyval) = list_create((yyvsp[0]));
}
-#line 3811 "awkgram.c" /* yacc.c:1646 */
+#line 3809 "awkgram.c" /* yacc.c:1646 */
break;
case 175:
-#line 1724 "awkgram.y" /* yacc.c:1646 */
+#line 1722 "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 3822 "awkgram.c" /* yacc.c:1646 */
+#line 3820 "awkgram.c" /* yacc.c:1646 */
break;
case 176:
-#line 1734 "awkgram.y" /* yacc.c:1646 */
+#line 1732 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip = (yyvsp[0])->nexti;
if (ip->opcode == Op_push
@@ -3834,73 +3832,73 @@ regular_print:
} else
(yyval) = (yyvsp[0]);
}
-#line 3838 "awkgram.c" /* yacc.c:1646 */
+#line 3836 "awkgram.c" /* yacc.c:1646 */
break;
case 177:
-#line 1746 "awkgram.y" /* yacc.c:1646 */
+#line 1744 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
if ((yyvsp[0]) != NULL)
mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3848 "awkgram.c" /* yacc.c:1646 */
+#line 3846 "awkgram.c" /* yacc.c:1646 */
break;
case 178:
-#line 1755 "awkgram.y" /* yacc.c:1646 */
+#line 1753 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postincrement;
}
-#line 3856 "awkgram.c" /* yacc.c:1646 */
+#line 3854 "awkgram.c" /* yacc.c:1646 */
break;
case 179:
-#line 1759 "awkgram.y" /* yacc.c:1646 */
+#line 1757 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postdecrement;
}
-#line 3864 "awkgram.c" /* yacc.c:1646 */
+#line 3862 "awkgram.c" /* yacc.c:1646 */
break;
case 180:
-#line 1762 "awkgram.y" /* yacc.c:1646 */
+#line 1760 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3870 "awkgram.c" /* yacc.c:1646 */
+#line 3868 "awkgram.c" /* yacc.c:1646 */
break;
case 182:
-#line 1770 "awkgram.y" /* yacc.c:1646 */
+#line 1768 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3876 "awkgram.c" /* yacc.c:1646 */
+#line 3874 "awkgram.c" /* yacc.c:1646 */
break;
case 183:
-#line 1774 "awkgram.y" /* yacc.c:1646 */
+#line 1772 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3882 "awkgram.c" /* yacc.c:1646 */
+#line 3880 "awkgram.c" /* yacc.c:1646 */
break;
case 186:
-#line 1783 "awkgram.y" /* yacc.c:1646 */
+#line 1781 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3888 "awkgram.c" /* yacc.c:1646 */
+#line 3886 "awkgram.c" /* yacc.c:1646 */
break;
case 187:
-#line 1787 "awkgram.y" /* yacc.c:1646 */
+#line 1785 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); yyerrok; }
-#line 3894 "awkgram.c" /* yacc.c:1646 */
+#line 3892 "awkgram.c" /* yacc.c:1646 */
break;
case 188:
-#line 1791 "awkgram.y" /* yacc.c:1646 */
+#line 1789 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3900 "awkgram.c" /* yacc.c:1646 */
+#line 3898 "awkgram.c" /* yacc.c:1646 */
break;
-#line 3904 "awkgram.c" /* yacc.c:1646 */
+#line 3902 "awkgram.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -4128,7 +4126,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1793 "awkgram.y" /* yacc.c:1906 */
+#line 1791 "awkgram.y" /* yacc.c:1906 */
struct token {
@@ -5976,7 +5974,7 @@ retry:
}
}
- if (c != '_' && ! isalpha(c)) {
+ if (c != '_' && ! is_alpha(c)) {
yyerror(_("invalid char '%c' in expression"), c);
return lasttok = LEX_EOF;
}
@@ -8088,20 +8086,20 @@ install_builtins(void)
}
}
-/* is_identchar --- return true if c can be in an identifier */
-
/*
- * 9/2014: This can't be:
- *
- * #define is_identchar(c) (isalnum(c) || (c) == '_')
- *
- * because in non-C locales, character codes outside the set of
- * ASCII letters and digits pass the test. BLEAH.
+ * 9/2014: Gawk cannot use <ctype.h> isalpha or isalnum when
+ * parsing the program since that can let through non-English
+ * letters. So, we supply our own. !@#$%^&*()-ing locales!
*/
-static bool
-is_identchar(int c)
+/* is_alpha --- return true if c is an English letter */
+
+bool
+is_alpha(int c)
{
+#ifdef I_DONT_KNOW_WHAT_IM_DOING
+ return isalpha(c);
+#else /* ! I_DONT_KNOW_WHAT_IM_DOING */
switch (c) {
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
@@ -8113,10 +8111,26 @@ is_identchar(int c)
case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
case 'Y': case 'Z':
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case '_':
return true;
}
return false;
+#endif /* ! I_DONT_KNOW_WHAT_IM_DOING */
+}
+
+/* is_alnum --- return true for alphanumeric, English only letters */
+
+bool
+is_alnum(int c)
+{
+ /* digit test is good for EBCDIC too. so there. */
+ return (is_alpha(c) || ('0' <= c && c <= '9'));
+}
+
+
+/* is_identchar --- return true if c can be in an identifier */
+
+bool
+is_identchar(int c)
+{
+ return (is_alnum(c) || c == '_');
}
diff --git a/awkgram.y b/awkgram.y
index c0155cd5..1218f77b 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -154,8 +154,6 @@ static inline INSTRUCTION *list_merge(INSTRUCTION *l1, INSTRUCTION *l2);
extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
-
-static bool is_identchar(int c);
%}
%token FUNC_CALL NAME REGEXP FILENAME
@@ -3637,7 +3635,7 @@ retry:
}
}
- if (c != '_' && ! isalpha(c)) {
+ if (c != '_' && ! is_alpha(c)) {
yyerror(_("invalid char '%c' in expression"), c);
return lasttok = LEX_EOF;
}
@@ -5749,20 +5747,20 @@ install_builtins(void)
}
}
-/* is_identchar --- return true if c can be in an identifier */
-
/*
- * 9/2014: This can't be:
- *
- * #define is_identchar(c) (isalnum(c) || (c) == '_')
- *
- * because in non-C locales, character codes outside the set of
- * ASCII letters and digits pass the test. BLEAH.
+ * 9/2014: Gawk cannot use <ctype.h> isalpha or isalnum when
+ * parsing the program since that can let through non-English
+ * letters. So, we supply our own. !@#$%^&*()-ing locales!
*/
-static bool
-is_identchar(int c)
+/* is_alpha --- return true if c is an English letter */
+
+bool
+is_alpha(int c)
{
+#ifdef I_DONT_KNOW_WHAT_IM_DOING
+ return isalpha(c);
+#else /* ! I_DONT_KNOW_WHAT_IM_DOING */
switch (c) {
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
@@ -5774,10 +5772,26 @@ is_identchar(int c)
case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
case 'Y': case 'Z':
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case '_':
return true;
}
return false;
+#endif /* ! I_DONT_KNOW_WHAT_IM_DOING */
+}
+
+/* is_alnum --- return true for alphanumeric, English only letters */
+
+bool
+is_alnum(int c)
+{
+ /* digit test is good for EBCDIC too. so there. */
+ return (is_alpha(c) || ('0' <= c && c <= '9'));
+}
+
+
+/* is_identchar --- return true if c can be in an identifier */
+
+bool
+is_identchar(int c)
+{
+ return (is_alnum(c) || c == '_');
}
diff --git a/builtin.c b/builtin.c
index 1c794be7..3d59e359 100644
--- a/builtin.c
+++ b/builtin.c
@@ -1569,7 +1569,7 @@ mpf1:
s0 = s1;
break;
default:
- if (do_lint && isalpha(cs1))
+ if (do_lint && is_alpha(cs1))
lintwarn(_("ignoring unknown format specifier character `%c': no argument converted"), cs1);
break;
}
diff --git a/command.c b/command.c
index 2d4ccf8c..ad0dc372 100644
--- a/command.c
+++ b/command.c
@@ -2863,7 +2863,7 @@ again:
}
while (c != '\0' && c != ' ' && c != '\t') {
- if (! isalpha(c) && ! in_eval) {
+ if (! is_alpha(c) && ! in_eval) {
yyerror(_("invalid character in command"));
return '\n';
}
@@ -3031,12 +3031,12 @@ err:
|| c == ',' || c == '=')
return *lexptr++;
- if (c != '_' && ! isalpha(c)) {
+ if (c != '_' && ! is_alpha(c)) {
yyerror(_("invalid character"));
return '\n';
}
- while (isalnum(c) || c == '_')
+ while (is_identchar(c))
c = *++lexptr;
toklen = lexptr - tokstart;
diff --git a/command.y b/command.y
index 576af159..c67753b7 100644
--- a/command.y
+++ b/command.y
@@ -1112,7 +1112,7 @@ again:
}
while (c != '\0' && c != ' ' && c != '\t') {
- if (! isalpha(c) && ! in_eval) {
+ if (! is_alpha(c) && ! in_eval) {
yyerror(_("invalid character in command"));
return '\n';
}
@@ -1280,12 +1280,12 @@ err:
|| c == ',' || c == '=')
return *lexptr++;
- if (c != '_' && ! isalpha(c)) {
+ if (c != '_' && ! is_alpha(c)) {
yyerror(_("invalid character"));
return '\n';
}
- while (isalnum(c) || c == '_')
+ while (is_identchar(c))
c = *++lexptr;
toklen = lexptr - tokstart;
diff --git a/doc/ChangeLog b/doc/ChangeLog
index f31a09a4..2522ad87 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-15 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Document that identifiers must use the English
+ letters.
+
2014-09-14 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: More edits during review, minor addition.
diff --git a/doc/gawk.info b/doc/gawk.info
index 7c08ae18..07f283ff 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -7432,8 +7432,11 @@ File: gawk.info, Node: Using Variables, Next: Assignment Options, Up: Variabl
Variables let you give names to values and refer to them later.
Variables have already been used in many of the examples. The name of
a variable must be a sequence of letters, digits, or underscores, and
-it may not begin with a digit. Case is significant in variable names;
-`a' and `A' are distinct variables.
+it may not begin with a digit. Here, a "letter" is any one of the 52
+upper- and lowercase English letters. Other characters that may be
+defined as letters in non-English locales are not valid in variable
+names. Case is significant in variable names; `a' and `A' are distinct
+variables.
A variable name is a valid expression by itself; it represents the
variable's current value. Variables are given new values with
@@ -10302,8 +10305,11 @@ Options::), they are not special.
`PROCINFO["identifiers"]'
A subarray, indexed by the names of all identifiers used in
- the text of the AWK program. For each identifier, the value
- of the element is one of the following:
+ the text of the AWK program. An "identifier" is simply the
+ name of a variable (be it scalar or array), built-in
+ function, user-defined function, or extension function. For
+ each identifier, the value of the element is one of the
+ following:
`"array"'
The identifier is an array.
@@ -13318,9 +13324,10 @@ starting to execute any of it.
Here, NAME is the name of the function to define. A valid function
name is like a valid variable name: a sequence of letters, digits, and
-underscores that doesn't start with a digit. Within a single `awk'
-program, any particular name can only be used as a variable, array, or
-function.
+underscores that doesn't start with a digit. Here too, only the 52
+upper- and lowercase English letters may be used in a function name.
+Within a single `awk' program, any particular name can only be used as
+a variable, array, or function.
PARAMETER-LIST is an optional list of the function's arguments and
local variable names, separated by commas. When the function is called,
@@ -31777,7 +31784,7 @@ Index
* common extensions, \x escape sequence: Escape Sequences. (line 61)
* common extensions, BINMODE variable: PC Using. (line 33)
* common extensions, delete to delete entire arrays: Delete. (line 39)
-* common extensions, func keyword: Definition Syntax. (line 92)
+* common extensions, func keyword: Definition Syntax. (line 93)
* common extensions, length() applied to an array: String Functions.
(line 197)
* common extensions, RS as a regexp: gawk split records. (line 6)
@@ -31889,7 +31896,7 @@ Index
(line 46)
* dark corner, FILENAME variable <1>: Auto-set. (line 98)
* dark corner, FILENAME variable: Getline Notes. (line 19)
-* dark corner, FNR/NR variables: Auto-set. (line 313)
+* dark corner, FNR/NR variables: Auto-set. (line 316)
* dark corner, format-control characters: Control Letters. (line 18)
* dark corner, FS as null string: Single Character Fields.
(line 20)
@@ -32113,7 +32120,7 @@ Index
(line 26)
* differences in awk and gawk, RS/RT variables: gawk split records.
(line 58)
-* differences in awk and gawk, RT variable: Auto-set. (line 269)
+* differences in awk and gawk, RT variable: Auto-set. (line 272)
* differences in awk and gawk, single-character fields: Single Character Fields.
(line 6)
* differences in awk and gawk, split() function: String Functions.
@@ -32121,7 +32128,7 @@ Index
* differences in awk and gawk, strings: Scalar Constants. (line 20)
* differences in awk and gawk, strings, storing: gawk split records.
(line 77)
-* differences in awk and gawk, SYMTAB variable: Auto-set. (line 273)
+* differences in awk and gawk, SYMTAB variable: Auto-set. (line 276)
* differences in awk and gawk, TEXTDOMAIN variable: User-modified.
(line 152)
* differences in awk and gawk, trunc-mod operation: Arithmetic Ops.
@@ -32277,7 +32284,7 @@ Index
(line 6)
* extension API version: Extension Versioning.
(line 6)
-* extension API, version number: Auto-set. (line 236)
+* extension API, version number: Auto-set. (line 239)
* extension example: Extension Example. (line 6)
* extension registration: Registration Functions.
(line 6)
@@ -32296,7 +32303,7 @@ Index
* extensions, common, BINMODE variable: PC Using. (line 33)
* extensions, common, delete to delete entire arrays: Delete. (line 39)
* extensions, common, fflush() function: I/O Functions. (line 43)
-* extensions, common, func keyword: Definition Syntax. (line 92)
+* extensions, common, func keyword: Definition Syntax. (line 93)
* extensions, common, length() applied to an array: String Functions.
(line 197)
* extensions, common, RS as a regexp: gawk split records. (line 6)
@@ -32429,7 +32436,7 @@ Index
(line 12)
* FNR variable <1>: Auto-set. (line 107)
* FNR variable: Records. (line 6)
-* FNR variable, changing: Auto-set. (line 313)
+* FNR variable, changing: Auto-set. (line 316)
* for statement: For Statement. (line 6)
* for statement, looping over arrays: Scanning an Array. (line 20)
* fork() extension function: Extension Sample Fork.
@@ -32515,7 +32522,7 @@ Index
(line 6)
* functions, names of <1>: Definition Syntax. (line 23)
* functions, names of: Arrays. (line 18)
-* functions, recursive: Definition Syntax. (line 82)
+* functions, recursive: Definition Syntax. (line 83)
* functions, string-translation: I18N Functions. (line 6)
* functions, undefined: Pass By Value/Reference.
(line 71)
@@ -32530,7 +32537,7 @@ Index
* G-d: Acknowledgments. (line 92)
* Garfinkle, Scott: Contributors. (line 34)
* gawk program, dynamic profiling: Profiling. (line 179)
-* gawk version: Auto-set. (line 211)
+* gawk version: Auto-set. (line 214)
* gawk, ARGIND variable in: Other Arguments. (line 12)
* gawk, awk and <1>: This Manual. (line 14)
* gawk, awk and: Preface. (line 21)
@@ -32607,14 +32614,14 @@ Index
* gawk, regular expressions, operators: GNU Regexp Operators.
(line 6)
* gawk, regular expressions, precedence: Regexp Operators. (line 161)
-* gawk, RT variable in <1>: Auto-set. (line 269)
+* gawk, RT variable in <1>: Auto-set. (line 272)
* gawk, RT variable in <2>: Multiple Line. (line 129)
* gawk, RT variable in: awk split records. (line 124)
* gawk, See Also awk: Preface. (line 34)
* gawk, source code, obtaining: Getting. (line 6)
* gawk, splitting fields and: Constant Size. (line 88)
* gawk, string-translation functions: I18N Functions. (line 6)
-* gawk, SYMTAB array in: Auto-set. (line 273)
+* gawk, SYMTAB array in: Auto-set. (line 276)
* gawk, TEXTDOMAIN variable in: User-modified. (line 152)
* gawk, timestamps: Time Functions. (line 6)
* gawk, uses for: Preface. (line 34)
@@ -32700,7 +32707,7 @@ Index
* Grigera, Juan: Contributors. (line 57)
* group database, reading: Group Functions. (line 6)
* group file: Group Functions. (line 6)
-* group ID of gawk user: Auto-set. (line 184)
+* group ID of gawk user: Auto-set. (line 187)
* groups, information about: Group Functions. (line 6)
* gsub <1>: String Functions. (line 139)
* gsub: Using Constant Regexps.
@@ -32994,7 +33001,7 @@ Index
* mawk utility <3>: Concatenation. (line 36)
* mawk utility <4>: Getline/Pipe. (line 62)
* mawk utility: Escape Sequences. (line 132)
-* maximum precision supported by MPFR library: Auto-set. (line 225)
+* maximum precision supported by MPFR library: Auto-set. (line 228)
* McIlroy, Doug: Glossary. (line 149)
* McPhee, Patrick: Contributors. (line 100)
* message object files: Explaining gettext. (line 42)
@@ -33007,7 +33014,7 @@ Index
* messages from extensions: Printing Messages. (line 6)
* metacharacters in regular expressions: Regexp Operators. (line 6)
* metacharacters, escape sequences for: Escape Sequences. (line 138)
-* minimum precision supported by MPFR library: Auto-set. (line 228)
+* minimum precision supported by MPFR library: Auto-set. (line 231)
* mktime: Time Functions. (line 25)
* modifiers, in format specifiers: Format Modifiers. (line 6)
* monetary information, localization: Explaining gettext. (line 104)
@@ -33069,7 +33076,7 @@ Index
* not Boolean-logic operator: Boolean Ops. (line 6)
* NR variable <1>: Auto-set. (line 132)
* NR variable: Records. (line 6)
-* NR variable, changing: Auto-set. (line 313)
+* NR variable, changing: Auto-set. (line 316)
* null strings <1>: Basic Data Typing. (line 26)
* null strings <2>: Truth Values. (line 6)
* null strings <3>: Regexp Field Splitting.
@@ -33183,7 +33190,7 @@ Index
* p debugger command (alias for print): Viewing And Changing Data.
(line 36)
* Papadopoulos, Panos: Contributors. (line 128)
-* parent process ID of gawk process: Auto-set. (line 193)
+* parent process ID of gawk process: Auto-set. (line 196)
* parentheses (), in a profile: Profiling. (line 146)
* parentheses (), regexp operator: Regexp Operators. (line 81)
* password file: Passwd Functions. (line 16)
@@ -33239,7 +33246,7 @@ Index
(line 65)
* portability, deleting array elements: Delete. (line 56)
* portability, example programs: Library Functions. (line 42)
-* portability, functions, defining: Definition Syntax. (line 108)
+* portability, functions, defining: Definition Syntax. (line 109)
* portability, gawk: New Ports. (line 6)
* portability, gettext library and: Explaining gettext. (line 11)
* portability, internationalization and: I18N Portability. (line 6)
@@ -33285,7 +33292,7 @@ Index
(line 40)
* POSIX awk, field separators and: Fields. (line 6)
* POSIX awk, FS variable and: User-modified. (line 60)
-* POSIX awk, function keyword in: Definition Syntax. (line 92)
+* POSIX awk, function keyword in: Definition Syntax. (line 93)
* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 90)
* POSIX awk, functions and, length(): String Functions. (line 176)
* POSIX awk, GNU long options and: Options. (line 15)
@@ -33346,8 +33353,8 @@ Index
* printing, unduplicated lines of text: Uniq Program. (line 6)
* printing, user information: Id Program. (line 6)
* private variables: Library Names. (line 11)
-* process group idIDof gawk process: Auto-set. (line 187)
-* process ID of gawk process: Auto-set. (line 190)
+* process group idIDof gawk process: Auto-set. (line 190)
+* process ID of gawk process: Auto-set. (line 193)
* processes, two-way communications with: Two-way I/O. (line 6)
* processing data: Basic High Level. (line 6)
* PROCINFO array <1>: Passwd Functions. (line 6)
@@ -33358,7 +33365,7 @@ Index
* PROCINFO array, and user and group ID numbers: Id Program. (line 15)
* PROCINFO array, testing the field splitting: Passwd Functions.
(line 161)
-* PROCINFO array, uses: Auto-set. (line 246)
+* PROCINFO array, uses: Auto-set. (line 249)
* PROCINFO, values of sorted_in: Controlling Scanning.
(line 26)
* profiling awk programs: Profiling. (line 6)
@@ -33374,7 +33381,7 @@ Index
* programming conventions, functions, calling: Calling Built-in.
(line 10)
* programming conventions, functions, writing: Definition Syntax.
- (line 64)
+ (line 65)
* programming conventions, gawk extensions: Internal File Ops.
(line 45)
* programming conventions, private variable names: Library Names.
@@ -33444,7 +33451,7 @@ Index
* records, splitting input into: Records. (line 6)
* records, terminating: awk split records. (line 124)
* records, treating files as: gawk split records. (line 92)
-* recursive functions: Definition Syntax. (line 82)
+* recursive functions: Definition Syntax. (line 83)
* redirect gawk output, in debugger: Debugger Info. (line 72)
* redirection of input: Getline/File. (line 6)
* redirection of output: Redirection. (line 6)
@@ -33522,7 +33529,7 @@ Index
* right shift: Bitwise Functions. (line 52)
* right shift, bitwise: Bitwise Functions. (line 32)
* Ritchie, Dennis: Basic Data Typing. (line 54)
-* RLENGTH variable: Auto-set. (line 256)
+* RLENGTH variable: Auto-set. (line 259)
* RLENGTH variable, match() function and: String Functions. (line 224)
* Robbins, Arnold <1>: Future Extensions. (line 6)
* Robbins, Arnold <2>: Bugs. (line 32)
@@ -33548,9 +33555,9 @@ Index
* RS variable: awk split records. (line 12)
* RS variable, multiline records and: Multiple Line. (line 17)
* rshift: Bitwise Functions. (line 52)
-* RSTART variable: Auto-set. (line 262)
+* RSTART variable: Auto-set. (line 265)
* RSTART variable, match() function and: String Functions. (line 224)
-* RT variable <1>: Auto-set. (line 269)
+* RT variable <1>: Auto-set. (line 272)
* RT variable <2>: Multiple Line. (line 129)
* RT variable: awk split records. (line 124)
* Rubin, Paul <1>: Contributors. (line 15)
@@ -33570,7 +33577,7 @@ Index
* scanning arrays: Scanning an Array. (line 6)
* scanning multidimensional arrays: Multiscanning. (line 11)
* Schorr, Andrew <1>: Contributors. (line 133)
-* Schorr, Andrew <2>: Auto-set. (line 296)
+* Schorr, Andrew <2>: Auto-set. (line 299)
* Schorr, Andrew: Acknowledgments. (line 60)
* Schreiber, Bert: Acknowledgments. (line 38)
* Schreiber, Rita: Acknowledgments. (line 38)
@@ -33614,7 +33621,7 @@ Index
* set directory of message catalogs: I18N Functions. (line 12)
* set watchpoint: Viewing And Changing Data.
(line 67)
-* shadowing of variable values: Definition Syntax. (line 70)
+* shadowing of variable values: Definition Syntax. (line 71)
* shell quoting, rules for: Quoting. (line 6)
* shells, piping commands into: Redirection. (line 142)
* shells, quoting: Using Shell Variables.
@@ -33654,7 +33661,7 @@ Index
(line 118)
* sidebar, Changing FS Does Not Affect the Fields: Field Splitting Summary.
(line 38)
-* sidebar, Changing NR and FNR: Auto-set. (line 311)
+* sidebar, Changing NR and FNR: Auto-set. (line 314)
* sidebar, Controlling Output Buffering with system(): I/O Functions.
(line 138)
* sidebar, Escape Sequences for Metacharacters: Escape Sequences.
@@ -33817,9 +33824,9 @@ Index
* substr: String Functions. (line 479)
* substring: String Functions. (line 479)
* Sumner, Andrew: Other Versions. (line 64)
-* supplementary groups of gawk process: Auto-set. (line 241)
+* supplementary groups of gawk process: Auto-set. (line 244)
* switch statement: Switch Statement. (line 6)
-* SYMTAB array: Auto-set. (line 273)
+* SYMTAB array: Auto-set. (line 276)
* syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops.
(line 148)
* system: I/O Functions. (line 75)
@@ -33972,7 +33979,7 @@ Index
* variables: Other Features. (line 6)
* variables, assigning on command line: Assignment Options. (line 6)
* variables, built-in <1>: Built-in Variables. (line 6)
-* variables, built-in: Using Variables. (line 20)
+* variables, built-in: Using Variables. (line 23)
* variables, built-in, -v option, setting with: Options. (line 40)
* variables, built-in, conveying information: Auto-set. (line 6)
* variables, flag: Boolean Ops. (line 67)
@@ -33985,22 +33992,22 @@ Index
* variables, getline command into, using: Getline/Variable. (line 6)
* variables, global, for library functions: Library Names. (line 11)
* variables, global, printing list of: Options. (line 93)
-* variables, initializing: Using Variables. (line 20)
+* variables, initializing: Using Variables. (line 23)
* variables, local to a function: Variable Scope. (line 6)
* variables, names of: Arrays. (line 18)
* variables, private: Library Names. (line 11)
* variables, setting: Options. (line 32)
-* variables, shadowing: Definition Syntax. (line 70)
+* variables, shadowing: Definition Syntax. (line 71)
* variables, types of: Assignment Ops. (line 40)
* variables, types of, comparison expressions and: Typing and Comparison.
(line 9)
* variables, uninitialized, as array subscripts: Uninitialized Subscripts.
(line 6)
* variables, user-defined: Variables. (line 6)
-* version of gawk: Auto-set. (line 211)
-* version of gawk extension API: Auto-set. (line 236)
-* version of GNU MP library: Auto-set. (line 222)
-* version of GNU MPFR library: Auto-set. (line 218)
+* version of gawk: Auto-set. (line 214)
+* version of gawk extension API: Auto-set. (line 239)
+* version of GNU MP library: Auto-set. (line 225)
+* version of GNU MPFR library: Auto-set. (line 221)
* vertical bar (|): Regexp Operators. (line 70)
* vertical bar (|), | operator (I/O) <1>: Precedence. (line 65)
* vertical bar (|), | operator (I/O): Getline/Pipe. (line 9)
@@ -34229,411 +34236,411 @@ Node: Regexp Constants318616
Node: Using Constant Regexps319141
Node: Variables322213
Node: Using Variables322868
-Node: Assignment Options324592
-Node: Conversion326467
-Node: Strings And Numbers326991
-Ref: Strings And Numbers-Footnote-1330053
-Node: Locale influences conversions330162
-Ref: table-locale-affects332879
-Node: All Operators333467
-Node: Arithmetic Ops334097
-Node: Concatenation336602
-Ref: Concatenation-Footnote-1339421
-Node: Assignment Ops339527
-Ref: table-assign-ops344510
-Node: Increment Ops345813
-Node: Truth Values and Conditions349251
-Node: Truth Values350334
-Node: Typing and Comparison351383
-Node: Variable Typing352176
-Node: Comparison Operators355828
-Ref: table-relational-ops356238
-Node: POSIX String Comparison359788
-Ref: POSIX String Comparison-Footnote-1360872
-Node: Boolean Ops361010
-Ref: Boolean Ops-Footnote-1365349
-Node: Conditional Exp365440
-Node: Function Calls367167
-Node: Precedence371047
-Node: Locales374716
-Node: Expressions Summary376347
-Node: Patterns and Actions378888
-Node: Pattern Overview380004
-Node: Regexp Patterns381681
-Node: Expression Patterns382224
-Node: Ranges386004
-Node: BEGIN/END389110
-Node: Using BEGIN/END389872
-Ref: Using BEGIN/END-Footnote-1392608
-Node: I/O And BEGIN/END392714
-Node: BEGINFILE/ENDFILE394985
-Node: Empty397916
-Node: Using Shell Variables398233
-Node: Action Overview400516
-Node: Statements402843
-Node: If Statement404691
-Node: While Statement406189
-Node: Do Statement408233
-Node: For Statement409389
-Node: Switch Statement412541
-Node: Break Statement414929
-Node: Continue Statement416970
-Node: Next Statement418795
-Node: Nextfile Statement421165
-Node: Exit Statement423822
-Node: Built-in Variables426226
-Node: User-modified427353
-Ref: User-modified-Footnote-1435042
-Node: Auto-set435104
-Ref: Auto-set-Footnote-1448123
-Ref: Auto-set-Footnote-2448328
-Node: ARGC and ARGV448384
-Node: Pattern Action Summary452288
-Node: Arrays454511
-Node: Array Basics456060
-Node: Array Intro456886
-Ref: figure-array-elements458859
-Ref: Array Intro-Footnote-1461383
-Node: Reference to Elements461511
-Node: Assigning Elements463961
-Node: Array Example464452
-Node: Scanning an Array466184
-Node: Controlling Scanning469185
-Ref: Controlling Scanning-Footnote-1474358
-Node: Delete474674
-Ref: Delete-Footnote-1477425
-Node: Numeric Array Subscripts477482
-Node: Uninitialized Subscripts479665
-Node: Multidimensional481292
-Node: Multiscanning484405
-Node: Arrays of Arrays485994
-Node: Arrays Summary490657
-Node: Functions492762
-Node: Built-in493635
-Node: Calling Built-in494713
-Node: Numeric Functions496701
-Ref: Numeric Functions-Footnote-1501537
-Ref: Numeric Functions-Footnote-2501894
-Ref: Numeric Functions-Footnote-3501942
-Node: String Functions502211
-Ref: String Functions-Footnote-1525208
-Ref: String Functions-Footnote-2525337
-Ref: String Functions-Footnote-3525585
-Node: Gory Details525672
-Ref: table-sub-escapes527445
-Ref: table-sub-proposed528965
-Ref: table-posix-sub530329
-Ref: table-gensub-escapes531869
-Ref: Gory Details-Footnote-1533045
-Node: I/O Functions533196
-Ref: I/O Functions-Footnote-1540306
-Node: Time Functions540453
-Ref: Time Functions-Footnote-1550917
-Ref: Time Functions-Footnote-2550985
-Ref: Time Functions-Footnote-3551143
-Ref: Time Functions-Footnote-4551254
-Ref: Time Functions-Footnote-5551366
-Ref: Time Functions-Footnote-6551593
-Node: Bitwise Functions551859
-Ref: table-bitwise-ops552421
-Ref: Bitwise Functions-Footnote-1556666
-Node: Type Functions556850
-Node: I18N Functions557992
-Node: User-defined559637
-Node: Definition Syntax560441
-Ref: Definition Syntax-Footnote-1565754
-Node: Function Example565823
-Ref: Function Example-Footnote-1568463
-Node: Function Caveats568485
-Node: Calling A Function569003
-Node: Variable Scope569958
-Node: Pass By Value/Reference572946
-Node: Return Statement576456
-Node: Dynamic Typing579440
-Node: Indirect Calls580369
-Ref: Indirect Calls-Footnote-1590085
-Node: Functions Summary590213
-Node: Library Functions592863
-Ref: Library Functions-Footnote-1596481
-Ref: Library Functions-Footnote-2596624
-Node: Library Names596795
-Ref: Library Names-Footnote-1600268
-Ref: Library Names-Footnote-2600488
-Node: General Functions600574
-Node: Strtonum Function601602
-Node: Assert Function604504
-Node: Round Function607830
-Node: Cliff Random Function609371
-Node: Ordinal Functions610387
-Ref: Ordinal Functions-Footnote-1613452
-Ref: Ordinal Functions-Footnote-2613704
-Node: Join Function613915
-Ref: Join Function-Footnote-1615686
-Node: Getlocaltime Function615886
-Node: Readfile Function619622
-Node: Data File Management621461
-Node: Filetrans Function622093
-Node: Rewind Function626162
-Node: File Checking627720
-Ref: File Checking-Footnote-1628852
-Node: Empty Files629053
-Node: Ignoring Assigns631032
-Node: Getopt Function632586
-Ref: Getopt Function-Footnote-1643850
-Node: Passwd Functions644053
-Ref: Passwd Functions-Footnote-1653032
-Node: Group Functions653120
-Ref: Group Functions-Footnote-1661051
-Node: Walking Arrays661264
-Node: Library Functions Summary662867
-Node: Library Exercises664255
-Node: Sample Programs665535
-Node: Running Examples666305
-Node: Clones667033
-Node: Cut Program668257
-Node: Egrep Program678115
-Ref: Egrep Program-Footnote-1685702
-Node: Id Program685812
-Node: Split Program689466
-Ref: Split Program-Footnote-1693004
-Node: Tee Program693132
-Node: Uniq Program695919
-Node: Wc Program703342
-Ref: Wc Program-Footnote-1707607
-Node: Miscellaneous Programs707699
-Node: Dupword Program708912
-Node: Alarm Program710943
-Node: Translate Program715747
-Ref: Translate Program-Footnote-1720320
-Ref: Translate Program-Footnote-2720590
-Node: Labels Program720729
-Ref: Labels Program-Footnote-1724090
-Node: Word Sorting724174
-Node: History Sorting728217
-Node: Extract Program730053
-Node: Simple Sed737589
-Node: Igawk Program740651
-Ref: Igawk Program-Footnote-1754955
-Ref: Igawk Program-Footnote-2755156
-Node: Anagram Program755294
-Node: Signature Program758362
-Node: Programs Summary759609
-Node: Programs Exercises760824
-Ref: Programs Exercises-Footnote-1764955
-Node: Advanced Features765046
-Node: Nondecimal Data766994
-Node: Array Sorting768571
-Node: Controlling Array Traversal769268
-Node: Array Sorting Functions777548
-Ref: Array Sorting Functions-Footnote-1781455
-Node: Two-way I/O781649
-Ref: Two-way I/O-Footnote-1786593
-Ref: Two-way I/O-Footnote-2786772
-Node: TCP/IP Networking786854
-Node: Profiling789699
-Node: Advanced Features Summary797250
-Node: Internationalization799114
-Node: I18N and L10N800594
-Node: Explaining gettext801280
-Ref: Explaining gettext-Footnote-1806306
-Ref: Explaining gettext-Footnote-2806490
-Node: Programmer i18n806655
-Ref: Programmer i18n-Footnote-1811449
-Node: Translator i18n811498
-Node: String Extraction812292
-Ref: String Extraction-Footnote-1813425
-Node: Printf Ordering813511
-Ref: Printf Ordering-Footnote-1816293
-Node: I18N Portability816357
-Ref: I18N Portability-Footnote-1818806
-Node: I18N Example818869
-Ref: I18N Example-Footnote-1821575
-Node: Gawk I18N821647
-Node: I18N Summary822285
-Node: Debugger823624
-Node: Debugging824646
-Node: Debugging Concepts825087
-Node: Debugging Terms826943
-Node: Awk Debugging829540
-Node: Sample Debugging Session830432
-Node: Debugger Invocation830952
-Node: Finding The Bug832288
-Node: List of Debugger Commands838767
-Node: Breakpoint Control840099
-Node: Debugger Execution Control843763
-Node: Viewing And Changing Data847123
-Node: Execution Stack850481
-Node: Debugger Info851994
-Node: Miscellaneous Debugger Commands855988
-Node: Readline Support861172
-Node: Limitations862064
-Node: Debugging Summary864337
-Node: Arbitrary Precision Arithmetic865505
-Node: Computer Arithmetic866992
-Ref: Computer Arithmetic-Footnote-1871379
-Node: Math Definitions871436
-Ref: table-ieee-formats874725
-Ref: Math Definitions-Footnote-1875265
-Node: MPFR features875368
-Node: FP Math Caution876985
-Ref: FP Math Caution-Footnote-1878035
-Node: Inexactness of computations878404
-Node: Inexact representation879352
-Node: Comparing FP Values880707
-Node: Errors accumulate881671
-Node: Getting Accuracy883104
-Node: Try To Round885763
-Node: Setting precision886662
-Ref: table-predefined-precision-strings887344
-Node: Setting the rounding mode889137
-Ref: table-gawk-rounding-modes889501
-Ref: Setting the rounding mode-Footnote-1892955
-Node: Arbitrary Precision Integers893134
-Ref: Arbitrary Precision Integers-Footnote-1896907
-Node: POSIX Floating Point Problems897056
-Ref: POSIX Floating Point Problems-Footnote-1900932
-Node: Floating point summary900970
-Node: Dynamic Extensions903174
-Node: Extension Intro904726
-Node: Plugin License905991
-Node: Extension Mechanism Outline906676
-Ref: figure-load-extension907100
-Ref: figure-load-new-function908585
-Ref: figure-call-new-function909587
-Node: Extension API Description911571
-Node: Extension API Functions Introduction913021
-Node: General Data Types917888
-Ref: General Data Types-Footnote-1923581
-Node: Requesting Values923880
-Ref: table-value-types-returned924617
-Node: Memory Allocation Functions925575
-Ref: Memory Allocation Functions-Footnote-1928322
-Node: Constructor Functions928418
-Node: Registration Functions930176
-Node: Extension Functions930861
-Node: Exit Callback Functions933163
-Node: Extension Version String934411
-Node: Input Parsers935061
-Node: Output Wrappers944875
-Node: Two-way processors949391
-Node: Printing Messages951595
-Ref: Printing Messages-Footnote-1952672
-Node: Updating `ERRNO'952824
-Node: Accessing Parameters953563
-Node: Symbol Table Access954793
-Node: Symbol table by name955307
-Node: Symbol table by cookie957283
-Ref: Symbol table by cookie-Footnote-1961416
-Node: Cached values961479
-Ref: Cached values-Footnote-1964983
-Node: Array Manipulation965074
-Ref: Array Manipulation-Footnote-1966172
-Node: Array Data Types966211
-Ref: Array Data Types-Footnote-1968914
-Node: Array Functions969006
-Node: Flattening Arrays972880
-Node: Creating Arrays979732
-Node: Extension API Variables984463
-Node: Extension Versioning985099
-Node: Extension API Informational Variables987000
-Node: Extension API Boilerplate988086
-Node: Finding Extensions991890
-Node: Extension Example992450
-Node: Internal File Description993180
-Node: Internal File Ops997271
-Ref: Internal File Ops-Footnote-11008703
-Node: Using Internal File Ops1008843
-Ref: Using Internal File Ops-Footnote-11011190
-Node: Extension Samples1011458
-Node: Extension Sample File Functions1012982
-Node: Extension Sample Fnmatch1020550
-Node: Extension Sample Fork1022032
-Node: Extension Sample Inplace1023245
-Node: Extension Sample Ord1024920
-Node: Extension Sample Readdir1025756
-Ref: table-readdir-file-types1026612
-Node: Extension Sample Revout1027411
-Node: Extension Sample Rev2way1028002
-Node: Extension Sample Read write array1028743
-Node: Extension Sample Readfile1030622
-Node: Extension Sample API Tests1031722
-Node: Extension Sample Time1032247
-Node: gawkextlib1033562
-Node: Extension summary1036375
-Node: Extension Exercises1040068
-Node: Language History1040790
-Node: V7/SVR3.11042433
-Node: SVR41044753
-Node: POSIX1046195
-Node: BTL1047581
-Node: POSIX/GNU1048315
-Node: Feature History1054091
-Node: Common Extensions1067182
-Node: Ranges and Locales1068494
-Ref: Ranges and Locales-Footnote-11073111
-Ref: Ranges and Locales-Footnote-21073138
-Ref: Ranges and Locales-Footnote-31073372
-Node: Contributors1073593
-Node: History summary1079018
-Node: Installation1080387
-Node: Gawk Distribution1081338
-Node: Getting1081822
-Node: Extracting1082646
-Node: Distribution contents1084288
-Node: Unix Installation1090058
-Node: Quick Installation1090675
-Node: Additional Configuration Options1093117
-Node: Configuration Philosophy1094855
-Node: Non-Unix Installation1097206
-Node: PC Installation1097664
-Node: PC Binary Installation1098975
-Node: PC Compiling1100823
-Ref: PC Compiling-Footnote-11103822
-Node: PC Testing1103927
-Node: PC Using1105103
-Node: Cygwin1109255
-Node: MSYS1110064
-Node: VMS Installation1110578
-Node: VMS Compilation1111374
-Ref: VMS Compilation-Footnote-11112596
-Node: VMS Dynamic Extensions1112654
-Node: VMS Installation Details1114027
-Node: VMS Running1116279
-Node: VMS GNV1119113
-Node: VMS Old Gawk1119836
-Node: Bugs1120306
-Node: Other Versions1124310
-Node: Installation summary1130537
-Node: Notes1131593
-Node: Compatibility Mode1132458
-Node: Additions1133240
-Node: Accessing The Source1134165
-Node: Adding Code1135601
-Node: New Ports1141779
-Node: Derived Files1146260
-Ref: Derived Files-Footnote-11151735
-Ref: Derived Files-Footnote-21151769
-Ref: Derived Files-Footnote-31152365
-Node: Future Extensions1152479
-Node: Implementation Limitations1153085
-Node: Extension Design1154333
-Node: Old Extension Problems1155487
-Ref: Old Extension Problems-Footnote-11157004
-Node: Extension New Mechanism Goals1157061
-Ref: Extension New Mechanism Goals-Footnote-11160421
-Node: Extension Other Design Decisions1160610
-Node: Extension Future Growth1162716
-Node: Old Extension Mechanism1163552
-Node: Notes summary1165314
-Node: Basic Concepts1166500
-Node: Basic High Level1167181
-Ref: figure-general-flow1167453
-Ref: figure-process-flow1168052
-Ref: Basic High Level-Footnote-11171281
-Node: Basic Data Typing1171466
-Node: Glossary1174794
-Node: Copying1199946
-Node: GNU Free Documentation License1237502
-Node: Index1262638
+Node: Assignment Options324774
+Node: Conversion326649
+Node: Strings And Numbers327173
+Ref: Strings And Numbers-Footnote-1330235
+Node: Locale influences conversions330344
+Ref: table-locale-affects333061
+Node: All Operators333649
+Node: Arithmetic Ops334279
+Node: Concatenation336784
+Ref: Concatenation-Footnote-1339603
+Node: Assignment Ops339709
+Ref: table-assign-ops344692
+Node: Increment Ops345995
+Node: Truth Values and Conditions349433
+Node: Truth Values350516
+Node: Typing and Comparison351565
+Node: Variable Typing352358
+Node: Comparison Operators356010
+Ref: table-relational-ops356420
+Node: POSIX String Comparison359970
+Ref: POSIX String Comparison-Footnote-1361054
+Node: Boolean Ops361192
+Ref: Boolean Ops-Footnote-1365531
+Node: Conditional Exp365622
+Node: Function Calls367349
+Node: Precedence371229
+Node: Locales374898
+Node: Expressions Summary376529
+Node: Patterns and Actions379070
+Node: Pattern Overview380186
+Node: Regexp Patterns381863
+Node: Expression Patterns382406
+Node: Ranges386186
+Node: BEGIN/END389292
+Node: Using BEGIN/END390054
+Ref: Using BEGIN/END-Footnote-1392790
+Node: I/O And BEGIN/END392896
+Node: BEGINFILE/ENDFILE395167
+Node: Empty398098
+Node: Using Shell Variables398415
+Node: Action Overview400698
+Node: Statements403025
+Node: If Statement404873
+Node: While Statement406371
+Node: Do Statement408415
+Node: For Statement409571
+Node: Switch Statement412723
+Node: Break Statement415111
+Node: Continue Statement417152
+Node: Next Statement418977
+Node: Nextfile Statement421347
+Node: Exit Statement424004
+Node: Built-in Variables426408
+Node: User-modified427535
+Ref: User-modified-Footnote-1435224
+Node: Auto-set435286
+Ref: Auto-set-Footnote-1448475
+Ref: Auto-set-Footnote-2448680
+Node: ARGC and ARGV448736
+Node: Pattern Action Summary452640
+Node: Arrays454863
+Node: Array Basics456412
+Node: Array Intro457238
+Ref: figure-array-elements459211
+Ref: Array Intro-Footnote-1461735
+Node: Reference to Elements461863
+Node: Assigning Elements464313
+Node: Array Example464804
+Node: Scanning an Array466536
+Node: Controlling Scanning469537
+Ref: Controlling Scanning-Footnote-1474710
+Node: Delete475026
+Ref: Delete-Footnote-1477777
+Node: Numeric Array Subscripts477834
+Node: Uninitialized Subscripts480017
+Node: Multidimensional481644
+Node: Multiscanning484757
+Node: Arrays of Arrays486346
+Node: Arrays Summary491009
+Node: Functions493114
+Node: Built-in493987
+Node: Calling Built-in495065
+Node: Numeric Functions497053
+Ref: Numeric Functions-Footnote-1501889
+Ref: Numeric Functions-Footnote-2502246
+Ref: Numeric Functions-Footnote-3502294
+Node: String Functions502563
+Ref: String Functions-Footnote-1525560
+Ref: String Functions-Footnote-2525689
+Ref: String Functions-Footnote-3525937
+Node: Gory Details526024
+Ref: table-sub-escapes527797
+Ref: table-sub-proposed529317
+Ref: table-posix-sub530681
+Ref: table-gensub-escapes532221
+Ref: Gory Details-Footnote-1533397
+Node: I/O Functions533548
+Ref: I/O Functions-Footnote-1540658
+Node: Time Functions540805
+Ref: Time Functions-Footnote-1551269
+Ref: Time Functions-Footnote-2551337
+Ref: Time Functions-Footnote-3551495
+Ref: Time Functions-Footnote-4551606
+Ref: Time Functions-Footnote-5551718
+Ref: Time Functions-Footnote-6551945
+Node: Bitwise Functions552211
+Ref: table-bitwise-ops552773
+Ref: Bitwise Functions-Footnote-1557018
+Node: Type Functions557202
+Node: I18N Functions558344
+Node: User-defined559989
+Node: Definition Syntax560793
+Ref: Definition Syntax-Footnote-1566197
+Node: Function Example566266
+Ref: Function Example-Footnote-1568906
+Node: Function Caveats568928
+Node: Calling A Function569446
+Node: Variable Scope570401
+Node: Pass By Value/Reference573389
+Node: Return Statement576899
+Node: Dynamic Typing579883
+Node: Indirect Calls580812
+Ref: Indirect Calls-Footnote-1590528
+Node: Functions Summary590656
+Node: Library Functions593306
+Ref: Library Functions-Footnote-1596924
+Ref: Library Functions-Footnote-2597067
+Node: Library Names597238
+Ref: Library Names-Footnote-1600711
+Ref: Library Names-Footnote-2600931
+Node: General Functions601017
+Node: Strtonum Function602045
+Node: Assert Function604947
+Node: Round Function608273
+Node: Cliff Random Function609814
+Node: Ordinal Functions610830
+Ref: Ordinal Functions-Footnote-1613895
+Ref: Ordinal Functions-Footnote-2614147
+Node: Join Function614358
+Ref: Join Function-Footnote-1616129
+Node: Getlocaltime Function616329
+Node: Readfile Function620065
+Node: Data File Management621904
+Node: Filetrans Function622536
+Node: Rewind Function626605
+Node: File Checking628163
+Ref: File Checking-Footnote-1629295
+Node: Empty Files629496
+Node: Ignoring Assigns631475
+Node: Getopt Function633029
+Ref: Getopt Function-Footnote-1644293
+Node: Passwd Functions644496
+Ref: Passwd Functions-Footnote-1653475
+Node: Group Functions653563
+Ref: Group Functions-Footnote-1661494
+Node: Walking Arrays661707
+Node: Library Functions Summary663310
+Node: Library Exercises664698
+Node: Sample Programs665978
+Node: Running Examples666748
+Node: Clones667476
+Node: Cut Program668700
+Node: Egrep Program678558
+Ref: Egrep Program-Footnote-1686145
+Node: Id Program686255
+Node: Split Program689909
+Ref: Split Program-Footnote-1693447
+Node: Tee Program693575
+Node: Uniq Program696362
+Node: Wc Program703785
+Ref: Wc Program-Footnote-1708050
+Node: Miscellaneous Programs708142
+Node: Dupword Program709355
+Node: Alarm Program711386
+Node: Translate Program716190
+Ref: Translate Program-Footnote-1720763
+Ref: Translate Program-Footnote-2721033
+Node: Labels Program721172
+Ref: Labels Program-Footnote-1724533
+Node: Word Sorting724617
+Node: History Sorting728660
+Node: Extract Program730496
+Node: Simple Sed738032
+Node: Igawk Program741094
+Ref: Igawk Program-Footnote-1755398
+Ref: Igawk Program-Footnote-2755599
+Node: Anagram Program755737
+Node: Signature Program758805
+Node: Programs Summary760052
+Node: Programs Exercises761267
+Ref: Programs Exercises-Footnote-1765398
+Node: Advanced Features765489
+Node: Nondecimal Data767437
+Node: Array Sorting769014
+Node: Controlling Array Traversal769711
+Node: Array Sorting Functions777991
+Ref: Array Sorting Functions-Footnote-1781898
+Node: Two-way I/O782092
+Ref: Two-way I/O-Footnote-1787036
+Ref: Two-way I/O-Footnote-2787215
+Node: TCP/IP Networking787297
+Node: Profiling790142
+Node: Advanced Features Summary797693
+Node: Internationalization799557
+Node: I18N and L10N801037
+Node: Explaining gettext801723
+Ref: Explaining gettext-Footnote-1806749
+Ref: Explaining gettext-Footnote-2806933
+Node: Programmer i18n807098
+Ref: Programmer i18n-Footnote-1811892
+Node: Translator i18n811941
+Node: String Extraction812735
+Ref: String Extraction-Footnote-1813868
+Node: Printf Ordering813954
+Ref: Printf Ordering-Footnote-1816736
+Node: I18N Portability816800
+Ref: I18N Portability-Footnote-1819249
+Node: I18N Example819312
+Ref: I18N Example-Footnote-1822018
+Node: Gawk I18N822090
+Node: I18N Summary822728
+Node: Debugger824067
+Node: Debugging825089
+Node: Debugging Concepts825530
+Node: Debugging Terms827386
+Node: Awk Debugging829983
+Node: Sample Debugging Session830875
+Node: Debugger Invocation831395
+Node: Finding The Bug832731
+Node: List of Debugger Commands839210
+Node: Breakpoint Control840542
+Node: Debugger Execution Control844206
+Node: Viewing And Changing Data847566
+Node: Execution Stack850924
+Node: Debugger Info852437
+Node: Miscellaneous Debugger Commands856431
+Node: Readline Support861615
+Node: Limitations862507
+Node: Debugging Summary864780
+Node: Arbitrary Precision Arithmetic865948
+Node: Computer Arithmetic867435
+Ref: Computer Arithmetic-Footnote-1871822
+Node: Math Definitions871879
+Ref: table-ieee-formats875168
+Ref: Math Definitions-Footnote-1875708
+Node: MPFR features875811
+Node: FP Math Caution877428
+Ref: FP Math Caution-Footnote-1878478
+Node: Inexactness of computations878847
+Node: Inexact representation879795
+Node: Comparing FP Values881150
+Node: Errors accumulate882114
+Node: Getting Accuracy883547
+Node: Try To Round886206
+Node: Setting precision887105
+Ref: table-predefined-precision-strings887787
+Node: Setting the rounding mode889580
+Ref: table-gawk-rounding-modes889944
+Ref: Setting the rounding mode-Footnote-1893398
+Node: Arbitrary Precision Integers893577
+Ref: Arbitrary Precision Integers-Footnote-1897350
+Node: POSIX Floating Point Problems897499
+Ref: POSIX Floating Point Problems-Footnote-1901375
+Node: Floating point summary901413
+Node: Dynamic Extensions903617
+Node: Extension Intro905169
+Node: Plugin License906434
+Node: Extension Mechanism Outline907119
+Ref: figure-load-extension907543
+Ref: figure-load-new-function909028
+Ref: figure-call-new-function910030
+Node: Extension API Description912014
+Node: Extension API Functions Introduction913464
+Node: General Data Types918331
+Ref: General Data Types-Footnote-1924024
+Node: Requesting Values924323
+Ref: table-value-types-returned925060
+Node: Memory Allocation Functions926018
+Ref: Memory Allocation Functions-Footnote-1928765
+Node: Constructor Functions928861
+Node: Registration Functions930619
+Node: Extension Functions931304
+Node: Exit Callback Functions933606
+Node: Extension Version String934854
+Node: Input Parsers935504
+Node: Output Wrappers945318
+Node: Two-way processors949834
+Node: Printing Messages952038
+Ref: Printing Messages-Footnote-1953115
+Node: Updating `ERRNO'953267
+Node: Accessing Parameters954006
+Node: Symbol Table Access955236
+Node: Symbol table by name955750
+Node: Symbol table by cookie957726
+Ref: Symbol table by cookie-Footnote-1961859
+Node: Cached values961922
+Ref: Cached values-Footnote-1965426
+Node: Array Manipulation965517
+Ref: Array Manipulation-Footnote-1966615
+Node: Array Data Types966654
+Ref: Array Data Types-Footnote-1969357
+Node: Array Functions969449
+Node: Flattening Arrays973323
+Node: Creating Arrays980175
+Node: Extension API Variables984906
+Node: Extension Versioning985542
+Node: Extension API Informational Variables987443
+Node: Extension API Boilerplate988529
+Node: Finding Extensions992333
+Node: Extension Example992893
+Node: Internal File Description993623
+Node: Internal File Ops997714
+Ref: Internal File Ops-Footnote-11009146
+Node: Using Internal File Ops1009286
+Ref: Using Internal File Ops-Footnote-11011633
+Node: Extension Samples1011901
+Node: Extension Sample File Functions1013425
+Node: Extension Sample Fnmatch1020993
+Node: Extension Sample Fork1022475
+Node: Extension Sample Inplace1023688
+Node: Extension Sample Ord1025363
+Node: Extension Sample Readdir1026199
+Ref: table-readdir-file-types1027055
+Node: Extension Sample Revout1027854
+Node: Extension Sample Rev2way1028445
+Node: Extension Sample Read write array1029186
+Node: Extension Sample Readfile1031065
+Node: Extension Sample API Tests1032165
+Node: Extension Sample Time1032690
+Node: gawkextlib1034005
+Node: Extension summary1036818
+Node: Extension Exercises1040511
+Node: Language History1041233
+Node: V7/SVR3.11042876
+Node: SVR41045196
+Node: POSIX1046638
+Node: BTL1048024
+Node: POSIX/GNU1048758
+Node: Feature History1054534
+Node: Common Extensions1067625
+Node: Ranges and Locales1068937
+Ref: Ranges and Locales-Footnote-11073554
+Ref: Ranges and Locales-Footnote-21073581
+Ref: Ranges and Locales-Footnote-31073815
+Node: Contributors1074036
+Node: History summary1079461
+Node: Installation1080830
+Node: Gawk Distribution1081781
+Node: Getting1082265
+Node: Extracting1083089
+Node: Distribution contents1084731
+Node: Unix Installation1090501
+Node: Quick Installation1091118
+Node: Additional Configuration Options1093560
+Node: Configuration Philosophy1095298
+Node: Non-Unix Installation1097649
+Node: PC Installation1098107
+Node: PC Binary Installation1099418
+Node: PC Compiling1101266
+Ref: PC Compiling-Footnote-11104265
+Node: PC Testing1104370
+Node: PC Using1105546
+Node: Cygwin1109698
+Node: MSYS1110507
+Node: VMS Installation1111021
+Node: VMS Compilation1111817
+Ref: VMS Compilation-Footnote-11113039
+Node: VMS Dynamic Extensions1113097
+Node: VMS Installation Details1114470
+Node: VMS Running1116722
+Node: VMS GNV1119556
+Node: VMS Old Gawk1120279
+Node: Bugs1120749
+Node: Other Versions1124753
+Node: Installation summary1130980
+Node: Notes1132036
+Node: Compatibility Mode1132901
+Node: Additions1133683
+Node: Accessing The Source1134608
+Node: Adding Code1136044
+Node: New Ports1142222
+Node: Derived Files1146703
+Ref: Derived Files-Footnote-11152178
+Ref: Derived Files-Footnote-21152212
+Ref: Derived Files-Footnote-31152808
+Node: Future Extensions1152922
+Node: Implementation Limitations1153528
+Node: Extension Design1154776
+Node: Old Extension Problems1155930
+Ref: Old Extension Problems-Footnote-11157447
+Node: Extension New Mechanism Goals1157504
+Ref: Extension New Mechanism Goals-Footnote-11160864
+Node: Extension Other Design Decisions1161053
+Node: Extension Future Growth1163159
+Node: Old Extension Mechanism1163995
+Node: Notes summary1165757
+Node: Basic Concepts1166943
+Node: Basic High Level1167624
+Ref: figure-general-flow1167896
+Ref: figure-process-flow1168495
+Ref: Basic High Level-Footnote-11171724
+Node: Basic Data Typing1171909
+Node: Glossary1175237
+Node: Copying1200389
+Node: GNU Free Documentation License1237945
+Node: Index1263081

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index ae0d728a..148032aa 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -10711,7 +10711,11 @@ on the @command{awk} command line.
Variables let you give names to values and refer to them later. Variables
have already been used in many of the examples. The name of a variable
must be a sequence of letters, digits, or underscores, and it may not begin
-with a digit. Case is significant in variable names; @code{a} and @code{A}
+with a digit.
+Here, a @dfn{letter} is any one of the 52 upper- and lowercase
+English letters. Other characters that may be defined as letters
+in non-English locales are not valid in variable names.
+Case is significant in variable names; @code{a} and @code{A}
are distinct variables.
A variable name is a valid expression by itself; it represents the
@@ -14773,8 +14777,11 @@ or @code{"FPAT"} if field matching with @code{FPAT} is in effect.
@item PROCINFO["identifiers"]
@cindex program identifiers
-A subarray, indexed by the names of all identifiers used in the
-text of the AWK program. For each identifier, the value of the element is one of the following:
+A subarray, indexed by the names of all identifiers used in the text of
+the AWK program. An @dfn{identifier} is simply the name of a variable
+(be it scalar or array), built-in function, user-defined function, or
+extension function. For each identifier, the value of the element is
+one of the following:
@table @code
@item "array"
@@ -19193,6 +19200,8 @@ The definition of a function named @var{name} looks like this:
Here, @var{name} is the name of the function to define. A valid function
name is like a valid variable name: a sequence of letters, digits, and
underscores that doesn't start with a digit.
+Here too, only the 52 upper- and lowercase English letters may
+be used in a function name.
Within a single @command{awk} program, any particular name can only be
used as a variable, array, or function.
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index f3b7de56..daa4695c 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -10184,7 +10184,11 @@ on the @command{awk} command line.
Variables let you give names to values and refer to them later. Variables
have already been used in many of the examples. The name of a variable
must be a sequence of letters, digits, or underscores, and it may not begin
-with a digit. Case is significant in variable names; @code{a} and @code{A}
+with a digit.
+Here, a @dfn{letter} is any one of the 52 upper- and lowercase
+English letters. Other characters that may be defined as letters
+in non-English locales are not valid in variable names.
+Case is significant in variable names; @code{a} and @code{A}
are distinct variables.
A variable name is a valid expression by itself; it represents the
@@ -14107,8 +14111,11 @@ or @code{"FPAT"} if field matching with @code{FPAT} is in effect.
@item PROCINFO["identifiers"]
@cindex program identifiers
-A subarray, indexed by the names of all identifiers used in the
-text of the AWK program. For each identifier, the value of the element is one of the following:
+A subarray, indexed by the names of all identifiers used in the text of
+the AWK program. An @dfn{identifier} is simply the name of a variable
+(be it scalar or array), built-in function, user-defined function, or
+extension function. For each identifier, the value of the element is
+one of the following:
@table @code
@item "array"
@@ -18320,6 +18327,8 @@ The definition of a function named @var{name} looks like this:
Here, @var{name} is the name of the function to define. A valid function
name is like a valid variable name: a sequence of letters, digits, and
underscores that doesn't start with a digit.
+Here too, only the 52 upper- and lowercase English letters may
+be used in a function name.
Within a single @command{awk} program, any particular name can only be
used as a variable, array, or function.
diff --git a/eval.c b/eval.c
index 5649797f..0d6a07b6 100644
--- a/eval.c
+++ b/eval.c
@@ -216,6 +216,7 @@ load_casetable(void)
return;
#ifndef ZOS_USS
+ /* use of isalpha is ok here (see is_alpha in awkgram.y) */
for (i = 0200; i <= 0377; i++) {
if (isalpha(i) && islower(i) && i != toupper(i))
casetable[i] = toupper(i);
diff --git a/ext.c b/ext.c
index 09e10164..afb8d715 100644
--- a/ext.c
+++ b/ext.c
@@ -46,33 +46,9 @@ extern SRCFILE *srcfiles;
static bool
is_letter(unsigned char c)
{
- switch (c) {
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case '_':
- return true;
- default:
- return false;
- }
+ return (is_alpha(c) || c == '_');
}
-/* is_identifier_char --- return true if a character can be used in an identifier */
-
-static bool
-is_identifier_char(unsigned char c)
-{
- return (is_letter(c) || isdigit(c));
-}
-
-
#define INIT_FUNC "dl_load"
/* load_ext --- load an external library */
@@ -224,7 +200,7 @@ make_builtin(const awk_ext_func_t *funcinfo)
return awk_false;
for (sp++; (c = *sp++) != '\0';) {
- if (! is_identifier_char(c))
+ if (! is_identchar(c))
return awk_false;
}
@@ -279,7 +255,7 @@ make_old_builtin(const char *name, NODE *(*func)(int), int count) /* temporary *
fatal(_("extension: illegal character `%c' in function name `%s'"), *sp, name);
for (sp++; (c = *sp++) != '\0';) {
- if (! is_identifier_char(c))
+ if (! is_identchar(c))
fatal(_("extension: illegal character `%c' in function name `%s'"), c, name);
}
diff --git a/main.c b/main.c
index 3da0703e..41f10a17 100644
--- a/main.c
+++ b/main.c
@@ -1329,11 +1329,11 @@ arg_assign(char *arg, bool initing)
/* first check that the variable name has valid syntax */
badvar = false;
- if (! isalpha((unsigned char) arg[0]) && arg[0] != '_')
+ if (! is_alpha((unsigned char) arg[0]) && arg[0] != '_')
badvar = true;
else
for (cp2 = arg+1; *cp2; cp2++)
- if (! isalnum((unsigned char) *cp2) && *cp2 != '_') {
+ if (! is_identchar((unsigned char) *cp2)) {
badvar = true;
break;
}
diff --git a/node.c b/node.c
index 213b5335..8dd723b4 100644
--- a/node.c
+++ b/node.c
@@ -72,7 +72,7 @@ r_force_number(NODE *n)
* This also allows hexadecimal floating point. Ugh.
*/
if (! do_posix) {
- if (isalpha((unsigned char) *cp)) {
+ if (is_alpha((unsigned char) *cp)) {
return n;
} else if (n->stlen == 4 && is_ieee_magic_val(n->stptr)) {
if ((n->flags & MAYBE_NUM) != 0)
@@ -94,7 +94,7 @@ r_force_number(NODE *n)
if ( cp == cpend /* only spaces, or */
|| (! do_posix /* not POSIXLY paranoid and */
- && (isalpha((unsigned char) *cp) /* letter, or */
+ && (is_alpha((unsigned char) *cp) /* letter, or */
/* CANNOT do non-decimal and saw 0x */
|| (! do_non_decimal_data && cp[0] == '0'
&& (cp[1] == 'x' || cp[1] == 'X'))))) {