aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog63
-rw-r--r--NEWS4
-rw-r--r--awk.h3
-rw-r--r--awkgram.c771
-rw-r--r--awkgram.y53
-rw-r--r--awklib/eg/lib/strtonum.awk8
-rw-r--r--builtin.c2
-rw-r--r--command.c6
-rw-r--r--command.y6
-rw-r--r--doc/ChangeLog9
-rw-r--r--doc/gawk.info943
-rw-r--r--doc/gawk.texi76
-rw-r--r--doc/gawktexi.in64
-rw-r--r--eval.c1
-rw-r--r--ext.c30
-rw-r--r--main.c4
-rw-r--r--node.c4
-rw-r--r--test/ChangeLog6
18 files changed, 1110 insertions, 943 deletions
diff --git a/ChangeLog b/ChangeLog
index 11b42617..d63dcdd5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,32 @@
+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
+ since use of isalnum() let non-ASCII letters slip through into
+ identifiers.
+
2014-09-13 Stephen Davies <sdavies@sdc.com.au>
- When doing pretty-print (but not profiling), include the original comments in the output.
+
+ When doing pretty-printing (but not profiling), include the original
+ comments in the output.
+
General rules:
- Pretty priting:
+
+ Pretty printing:
- Do NOT indent by a tab
- Do NOT print the header comments ("# BEGIN rules", etc.)
- DO print the comments that are in the program
@@ -11,27 +36,27 @@
- DO print the header comments
- Do NOT print the program's original comments
- *awkgram.y: add variables comment0 and commentf as pointers to program and function comments
- add function get_comment (retrieve consecutive comment lines and empty lines as a unit)
- add function split_comment (iff first block in the program is a function and it is predeeded by comments,
- take the last non-blank line as function comment and any preceeding lines as program comment.)
+ * awkgram.y (comment0, commentf): New varibles that are pointers to program
+ and function comments.
+ (get_comment): New function that retrieves consecutive comment lines and empty
+ lines as a unit).
+ (split_comment): New function: iff first block in the program is a function and
+ it is predeeded by comments, take the last non-blank line as function comment
+ and any preceeding lines as program comment.)
- Following token rules were changed to handle comments:
- pattern, LEX_BEGIN, LEX_END, LEX_BEGINFILE, LEX_ENDFILE, action, function_prologue and statements.
-
- Following functions were changed to handle comments:
- mk_program, mk_function, allow_newline and yylex. (Also fixed typo in case '\\'.)
+ Following token rules were changed to handle comments:
- *profile.c
- added function print_comment to format comment printing.
-
- Following functions were changed to handle comments and the revised indent rules:
- indent, pprint, dump_prog, pp_func.
+ * awkgram.y (pattern, LEX_BEGIN, LEX_END, LEX_BEGINFILE, LEX_ENDFILE,
+ action, function_prologue, statements): Update to handle comments.
+
+ Following functions were changed to handle comments:
- *test/Makefile(.am and .in)
- Change processing of profile4 and profile5 to not delete first two lines (no longer necessary).
+ * awkgram.y (mk_program, mk_function, allow_newline and yylex): Update to
+ handle comments. (Also fixed typo in case '\\'.)
- *profile4.ok and profile5.ok changed to suit new rules and comments.
+ * profile.c (print_comment): New function to format comment printing.
+ (indent, pprint, dump_prog, pp_func): Changed to handle comments and the
+ revised indentation rules.
2014-09-07 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/NEWS b/NEWS
index 4035ebf1..19a5bd59 100644
--- a/NEWS
+++ b/NEWS
@@ -56,6 +56,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 540238e0..c59c4bf9 100644
--- a/awk.h
+++ b/awk.h
@@ -1374,6 +1374,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 3ea5d6c9..fac2070a 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -202,9 +202,7 @@ extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
-#define is_identchar(c) (isalnum(c) || (c) == '_')
-
-#line 208 "awkgram.c" /* yacc.c:339 */
+#line 206 "awkgram.c" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
@@ -358,7 +356,7 @@ int yyparse (void);
/* Copy the second part of user declarations. */
-#line 362 "awkgram.c" /* yacc.c:358 */
+#line 360 "awkgram.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -660,25 +658,25 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 207, 207, 209, 214, 215, 221, 233, 237, 248,
- 254, 259, 267, 275, 277, 282, 290, 292, 298, 305,
- 314, 340, 353, 365, 372, 382, 394, 396, 398, 404,
- 409, 410, 414, 449, 448, 482, 484, 489, 495, 523,
- 528, 529, 533, 535, 537, 544, 634, 676, 718, 831,
- 838, 845, 855, 864, 873, 882, 893, 909, 908, 932,
- 944, 944, 1042, 1042, 1075, 1105, 1111, 1112, 1118, 1119,
- 1126, 1131, 1143, 1157, 1159, 1167, 1172, 1174, 1182, 1184,
- 1193, 1194, 1202, 1207, 1207, 1218, 1222, 1230, 1231, 1234,
- 1236, 1241, 1242, 1251, 1252, 1257, 1262, 1268, 1270, 1272,
- 1279, 1280, 1286, 1287, 1292, 1294, 1299, 1301, 1309, 1314,
- 1323, 1330, 1332, 1334, 1350, 1360, 1367, 1369, 1374, 1376,
- 1378, 1386, 1388, 1393, 1395, 1400, 1402, 1404, 1454, 1456,
- 1458, 1460, 1462, 1464, 1466, 1468, 1482, 1487, 1492, 1517,
- 1523, 1525, 1527, 1529, 1531, 1533, 1538, 1542, 1574, 1576,
- 1582, 1588, 1601, 1602, 1603, 1608, 1613, 1617, 1621, 1636,
- 1649, 1654, 1690, 1708, 1709, 1715, 1716, 1721, 1723, 1730,
- 1747, 1764, 1766, 1773, 1778, 1786, 1796, 1808, 1817, 1821,
- 1825, 1829, 1833, 1837, 1840, 1842, 1846, 1850, 1854
+ 0, 205, 205, 207, 212, 213, 219, 231, 235, 246,
+ 252, 257, 265, 273, 275, 280, 288, 290, 296, 303,
+ 312, 338, 351, 363, 370, 380, 392, 394, 396, 402,
+ 407, 408, 412, 447, 446, 480, 482, 487, 493, 521,
+ 526, 527, 531, 533, 535, 542, 632, 674, 716, 829,
+ 836, 843, 853, 862, 871, 880, 891, 907, 906, 930,
+ 942, 942, 1040, 1040, 1073, 1103, 1109, 1110, 1116, 1117,
+ 1124, 1129, 1141, 1155, 1157, 1165, 1170, 1172, 1180, 1182,
+ 1191, 1192, 1200, 1205, 1205, 1216, 1220, 1228, 1229, 1232,
+ 1234, 1239, 1240, 1249, 1250, 1255, 1260, 1266, 1268, 1270,
+ 1277, 1278, 1284, 1285, 1290, 1292, 1297, 1299, 1307, 1312,
+ 1321, 1328, 1330, 1332, 1348, 1358, 1365, 1367, 1372, 1374,
+ 1376, 1384, 1386, 1391, 1393, 1398, 1400, 1402, 1452, 1454,
+ 1456, 1458, 1460, 1462, 1464, 1466, 1480, 1485, 1490, 1515,
+ 1521, 1523, 1525, 1527, 1529, 1531, 1536, 1540, 1572, 1574,
+ 1580, 1586, 1599, 1600, 1601, 1606, 1611, 1615, 1619, 1634,
+ 1647, 1652, 1688, 1706, 1707, 1713, 1714, 1719, 1721, 1728,
+ 1745, 1762, 1764, 1771, 1776, 1784, 1794, 1806, 1815, 1819,
+ 1823, 1827, 1831, 1835, 1838, 1840, 1844, 1848, 1852
};
#endif
@@ -1851,26 +1849,26 @@ yyreduce:
switch (yyn)
{
case 3:
-#line 210 "awkgram.y" /* yacc.c:1646 */
+#line 208 "awkgram.y" /* yacc.c:1646 */
{
rule = 0;
yyerrok;
}
-#line 1860 "awkgram.c" /* yacc.c:1646 */
+#line 1858 "awkgram.c" /* yacc.c:1646 */
break;
case 5:
-#line 216 "awkgram.y" /* yacc.c:1646 */
+#line 214 "awkgram.y" /* yacc.c:1646 */
{
next_sourcefile();
if (sourcefile == srcfiles)
process_deferred();
}
-#line 1870 "awkgram.c" /* yacc.c:1646 */
+#line 1868 "awkgram.c" /* yacc.c:1646 */
break;
case 6:
-#line 222 "awkgram.y" /* yacc.c:1646 */
+#line 220 "awkgram.y" /* yacc.c:1646 */
{
rule = 0;
/*
@@ -1879,19 +1877,19 @@ yyreduce:
*/
/* yyerrok; */
}
-#line 1883 "awkgram.c" /* yacc.c:1646 */
+#line 1881 "awkgram.c" /* yacc.c:1646 */
break;
case 7:
-#line 234 "awkgram.y" /* yacc.c:1646 */
+#line 232 "awkgram.y" /* yacc.c:1646 */
{
(void) append_rule((yyvsp[-1]), (yyvsp[0]));
}
-#line 1891 "awkgram.c" /* yacc.c:1646 */
+#line 1889 "awkgram.c" /* yacc.c:1646 */
break;
case 8:
-#line 238 "awkgram.y" /* yacc.c:1646 */
+#line 236 "awkgram.y" /* yacc.c:1646 */
{
if (rule != Rule) {
msg(_("%s blocks must have an action part"), ruletab[rule]);
@@ -1902,39 +1900,39 @@ yyreduce:
} else /* pattern rule with non-empty pattern */
(void) append_rule((yyvsp[-1]), NULL);
}
-#line 1906 "awkgram.c" /* yacc.c:1646 */
+#line 1904 "awkgram.c" /* yacc.c:1646 */
break;
case 9:
-#line 249 "awkgram.y" /* yacc.c:1646 */
+#line 247 "awkgram.y" /* yacc.c:1646 */
{
in_function = NULL;
(void) mk_function((yyvsp[-1]), (yyvsp[0]));
yyerrok;
}
-#line 1916 "awkgram.c" /* yacc.c:1646 */
+#line 1914 "awkgram.c" /* yacc.c:1646 */
break;
case 10:
-#line 255 "awkgram.y" /* yacc.c:1646 */
+#line 253 "awkgram.y" /* yacc.c:1646 */
{
want_source = false;
yyerrok;
}
-#line 1925 "awkgram.c" /* yacc.c:1646 */
+#line 1923 "awkgram.c" /* yacc.c:1646 */
break;
case 11:
-#line 260 "awkgram.y" /* yacc.c:1646 */
+#line 258 "awkgram.y" /* yacc.c:1646 */
{
want_source = false;
yyerrok;
}
-#line 1934 "awkgram.c" /* yacc.c:1646 */
+#line 1932 "awkgram.c" /* yacc.c:1646 */
break;
case 12:
-#line 268 "awkgram.y" /* yacc.c:1646 */
+#line 266 "awkgram.y" /* yacc.c:1646 */
{
if (include_source((yyvsp[0])) < 0)
YYABORT;
@@ -1942,23 +1940,23 @@ yyreduce:
bcfree((yyvsp[0]));
(yyval) = NULL;
}
-#line 1946 "awkgram.c" /* yacc.c:1646 */
+#line 1944 "awkgram.c" /* yacc.c:1646 */
break;
case 13:
-#line 276 "awkgram.y" /* yacc.c:1646 */
+#line 274 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1952 "awkgram.c" /* yacc.c:1646 */
+#line 1950 "awkgram.c" /* yacc.c:1646 */
break;
case 14:
-#line 278 "awkgram.y" /* yacc.c:1646 */
+#line 276 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1958 "awkgram.c" /* yacc.c:1646 */
+#line 1956 "awkgram.c" /* yacc.c:1646 */
break;
case 15:
-#line 283 "awkgram.y" /* yacc.c:1646 */
+#line 281 "awkgram.y" /* yacc.c:1646 */
{
if (load_library((yyvsp[0])) < 0)
YYABORT;
@@ -1966,23 +1964,23 @@ yyreduce:
bcfree((yyvsp[0]));
(yyval) = NULL;
}
-#line 1970 "awkgram.c" /* yacc.c:1646 */
+#line 1968 "awkgram.c" /* yacc.c:1646 */
break;
case 16:
-#line 291 "awkgram.y" /* yacc.c:1646 */
+#line 289 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1976 "awkgram.c" /* yacc.c:1646 */
+#line 1974 "awkgram.c" /* yacc.c:1646 */
break;
case 17:
-#line 293 "awkgram.y" /* yacc.c:1646 */
+#line 291 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1982 "awkgram.c" /* yacc.c:1646 */
+#line 1980 "awkgram.c" /* yacc.c:1646 */
break;
case 18:
-#line 298 "awkgram.y" /* yacc.c:1646 */
+#line 296 "awkgram.y" /* yacc.c:1646 */
{ rule = Rule;
if (comment != NULL) {
(yyval) = list_create(comment);
@@ -1990,11 +1988,11 @@ yyreduce:
} else
(yyval) = NULL;
}
-#line 1994 "awkgram.c" /* yacc.c:1646 */
+#line 1992 "awkgram.c" /* yacc.c:1646 */
break;
case 19:
-#line 306 "awkgram.y" /* yacc.c:1646 */
+#line 304 "awkgram.y" /* yacc.c:1646 */
{ rule = Rule;
if (comment != NULL) {
(yyval) = list_prepend((yyvsp[0]), comment);
@@ -2002,11 +2000,11 @@ yyreduce:
} else
(yyval) = (yyvsp[0]);
}
-#line 2006 "awkgram.c" /* yacc.c:1646 */
+#line 2004 "awkgram.c" /* yacc.c:1646 */
break;
case 20:
-#line 315 "awkgram.y" /* yacc.c:1646 */
+#line 313 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *tp;
@@ -2032,11 +2030,11 @@ yyreduce:
(yyval) = list_append(list_merge((yyvsp[-3]), (yyvsp[0])), tp);
rule = Rule;
}
-#line 2036 "awkgram.c" /* yacc.c:1646 */
+#line 2034 "awkgram.c" /* yacc.c:1646 */
break;
case 21:
-#line 341 "awkgram.y" /* yacc.c:1646 */
+#line 339 "awkgram.y" /* yacc.c:1646 */
{
static int begin_seen = 0;
func_first = false;
@@ -2049,11 +2047,11 @@ yyreduce:
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2053 "awkgram.c" /* yacc.c:1646 */
+#line 2051 "awkgram.c" /* yacc.c:1646 */
break;
case 22:
-#line 354 "awkgram.y" /* yacc.c:1646 */
+#line 352 "awkgram.y" /* yacc.c:1646 */
{
static int end_seen = 0;
func_first = false;
@@ -2065,33 +2063,33 @@ yyreduce:
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2069 "awkgram.c" /* yacc.c:1646 */
+#line 2067 "awkgram.c" /* yacc.c:1646 */
break;
case 23:
-#line 366 "awkgram.y" /* yacc.c:1646 */
+#line 364 "awkgram.y" /* yacc.c:1646 */
{
func_first = false;
(yyvsp[0])->in_rule = rule = BEGINFILE;
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2080 "awkgram.c" /* yacc.c:1646 */
+#line 2078 "awkgram.c" /* yacc.c:1646 */
break;
case 24:
-#line 373 "awkgram.y" /* yacc.c:1646 */
+#line 371 "awkgram.y" /* yacc.c:1646 */
{
func_first = false;
(yyvsp[0])->in_rule = rule = ENDFILE;
(yyvsp[0])->source_file = source;
(yyval) = (yyvsp[0]);
}
-#line 2091 "awkgram.c" /* yacc.c:1646 */
+#line 2089 "awkgram.c" /* yacc.c:1646 */
break;
case 25:
-#line 383 "awkgram.y" /* yacc.c:1646 */
+#line 381 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip;
if ((yyvsp[-3]) == NULL)
@@ -2100,39 +2098,39 @@ yyreduce:
ip = (yyvsp[-3]);
(yyval) = ip;
}
-#line 2104 "awkgram.c" /* yacc.c:1646 */
+#line 2102 "awkgram.c" /* yacc.c:1646 */
break;
case 26:
-#line 395 "awkgram.y" /* yacc.c:1646 */
+#line 393 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2110 "awkgram.c" /* yacc.c:1646 */
+#line 2108 "awkgram.c" /* yacc.c:1646 */
break;
case 27:
-#line 397 "awkgram.y" /* yacc.c:1646 */
+#line 395 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2116 "awkgram.c" /* yacc.c:1646 */
+#line 2114 "awkgram.c" /* yacc.c:1646 */
break;
case 28:
-#line 399 "awkgram.y" /* yacc.c:1646 */
+#line 397 "awkgram.y" /* yacc.c:1646 */
{
yyerror(_("`%s' is a built-in function, it cannot be redefined"),
tokstart);
YYABORT;
}
-#line 2126 "awkgram.c" /* yacc.c:1646 */
+#line 2124 "awkgram.c" /* yacc.c:1646 */
break;
case 29:
-#line 405 "awkgram.y" /* yacc.c:1646 */
+#line 403 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2132 "awkgram.c" /* yacc.c:1646 */
+#line 2130 "awkgram.c" /* yacc.c:1646 */
break;
case 32:
-#line 415 "awkgram.y" /* yacc.c:1646 */
+#line 413 "awkgram.y" /* yacc.c:1646 */
{
/*
* treat any comments between BOF and the first function
@@ -2159,17 +2157,17 @@ yyreduce:
/* $4 already free'd in install_function */
(yyval) = (yyvsp[-5]);
}
-#line 2163 "awkgram.c" /* yacc.c:1646 */
+#line 2161 "awkgram.c" /* yacc.c:1646 */
break;
case 33:
-#line 449 "awkgram.y" /* yacc.c:1646 */
+#line 447 "awkgram.y" /* yacc.c:1646 */
{ want_regexp = true; }
-#line 2169 "awkgram.c" /* yacc.c:1646 */
+#line 2167 "awkgram.c" /* yacc.c:1646 */
break;
case 34:
-#line 451 "awkgram.y" /* yacc.c:1646 */
+#line 449 "awkgram.y" /* yacc.c:1646 */
{
NODE *n, *exp;
char *re;
@@ -2198,28 +2196,28 @@ yyreduce:
(yyval)->opcode = Op_match_rec;
(yyval)->memory = n;
}
-#line 2202 "awkgram.c" /* yacc.c:1646 */
+#line 2200 "awkgram.c" /* yacc.c:1646 */
break;
case 35:
-#line 483 "awkgram.y" /* yacc.c:1646 */
+#line 481 "awkgram.y" /* yacc.c:1646 */
{ bcfree((yyvsp[0])); }
-#line 2208 "awkgram.c" /* yacc.c:1646 */
+#line 2206 "awkgram.c" /* yacc.c:1646 */
break;
case 37:
-#line 489 "awkgram.y" /* yacc.c:1646 */
+#line 487 "awkgram.y" /* yacc.c:1646 */
{
if (comment != NULL) {
(yyval) = list_create(comment);
comment = NULL;
} else (yyval) = NULL;
}
-#line 2219 "awkgram.c" /* yacc.c:1646 */
+#line 2217 "awkgram.c" /* yacc.c:1646 */
break;
case 38:
-#line 496 "awkgram.y" /* yacc.c:1646 */
+#line 494 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0]) == NULL) {
if (comment == NULL)
@@ -2247,40 +2245,40 @@ yyreduce:
}
yyerrok;
}
-#line 2251 "awkgram.c" /* yacc.c:1646 */
+#line 2249 "awkgram.c" /* yacc.c:1646 */
break;
case 39:
-#line 524 "awkgram.y" /* yacc.c:1646 */
+#line 522 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2257 "awkgram.c" /* yacc.c:1646 */
+#line 2255 "awkgram.c" /* yacc.c:1646 */
break;
case 42:
-#line 534 "awkgram.y" /* yacc.c:1646 */
+#line 532 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2263 "awkgram.c" /* yacc.c:1646 */
+#line 2261 "awkgram.c" /* yacc.c:1646 */
break;
case 43:
-#line 536 "awkgram.y" /* yacc.c:1646 */
+#line 534 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 2269 "awkgram.c" /* yacc.c:1646 */
+#line 2267 "awkgram.c" /* yacc.c:1646 */
break;
case 44:
-#line 538 "awkgram.y" /* yacc.c:1646 */
+#line 536 "awkgram.y" /* yacc.c:1646 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]), instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2280 "awkgram.c" /* yacc.c:1646 */
+#line 2278 "awkgram.c" /* yacc.c:1646 */
break;
case 45:
-#line 545 "awkgram.y" /* yacc.c:1646 */
+#line 543 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt;
INSTRUCTION *ip, *nextc, *tbreak;
@@ -2370,11 +2368,11 @@ yyreduce:
break_allowed--;
fix_break_continue(ip, tbreak, NULL);
}
-#line 2374 "awkgram.c" /* yacc.c:1646 */
+#line 2372 "awkgram.c" /* yacc.c:1646 */
break;
case 46:
-#line 635 "awkgram.y" /* yacc.c:1646 */
+#line 633 "awkgram.y" /* yacc.c:1646 */
{
/*
* -----------------
@@ -2416,11 +2414,11 @@ yyreduce:
continue_allowed--;
fix_break_continue(ip, tbreak, tcont);
}
-#line 2420 "awkgram.c" /* yacc.c:1646 */
+#line 2418 "awkgram.c" /* yacc.c:1646 */
break;
case 47:
-#line 677 "awkgram.y" /* yacc.c:1646 */
+#line 675 "awkgram.y" /* yacc.c:1646 */
{
/*
* -----------------
@@ -2462,11 +2460,11 @@ yyreduce:
} /* else
$1 and $4 are NULLs */
}
-#line 2466 "awkgram.c" /* yacc.c:1646 */
+#line 2464 "awkgram.c" /* yacc.c:1646 */
break;
case 48:
-#line 719 "awkgram.y" /* yacc.c:1646 */
+#line 717 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip;
char *var_name = (yyvsp[-5])->lextok;
@@ -2579,44 +2577,44 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2583 "awkgram.c" /* yacc.c:1646 */
+#line 2581 "awkgram.c" /* yacc.c:1646 */
break;
case 49:
-#line 832 "awkgram.y" /* yacc.c:1646 */
+#line 830 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_for_loop((yyvsp[-11]), (yyvsp[-9]), (yyvsp[-6]), (yyvsp[-3]), (yyvsp[0]));
break_allowed--;
continue_allowed--;
}
-#line 2594 "awkgram.c" /* yacc.c:1646 */
+#line 2592 "awkgram.c" /* yacc.c:1646 */
break;
case 50:
-#line 839 "awkgram.y" /* yacc.c:1646 */
+#line 837 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_for_loop((yyvsp[-10]), (yyvsp[-8]), (INSTRUCTION *) NULL, (yyvsp[-3]), (yyvsp[0]));
break_allowed--;
continue_allowed--;
}
-#line 2605 "awkgram.c" /* yacc.c:1646 */
+#line 2603 "awkgram.c" /* yacc.c:1646 */
break;
case 51:
-#line 846 "awkgram.y" /* yacc.c:1646 */
+#line 844 "awkgram.y" /* yacc.c:1646 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]), instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2616 "awkgram.c" /* yacc.c:1646 */
+#line 2614 "awkgram.c" /* yacc.c:1646 */
break;
case 52:
-#line 856 "awkgram.y" /* yacc.c:1646 */
+#line 854 "awkgram.y" /* yacc.c:1646 */
{
if (! break_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2625,11 +2623,11 @@ regular_loop:
(yyval) = list_create((yyvsp[-1]));
}
-#line 2629 "awkgram.c" /* yacc.c:1646 */
+#line 2627 "awkgram.c" /* yacc.c:1646 */
break;
case 53:
-#line 865 "awkgram.y" /* yacc.c:1646 */
+#line 863 "awkgram.y" /* yacc.c:1646 */
{
if (! continue_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2638,11 +2636,11 @@ regular_loop:
(yyval) = list_create((yyvsp[-1]));
}
-#line 2642 "awkgram.c" /* yacc.c:1646 */
+#line 2640 "awkgram.c" /* yacc.c:1646 */
break;
case 54:
-#line 874 "awkgram.y" /* yacc.c:1646 */
+#line 872 "awkgram.y" /* yacc.c:1646 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule && rule != Rule)
@@ -2651,11 +2649,11 @@ regular_loop:
(yyvsp[-1])->target_jmp = ip_rec;
(yyval) = list_create((yyvsp[-1]));
}
-#line 2655 "awkgram.c" /* yacc.c:1646 */
+#line 2653 "awkgram.c" /* yacc.c:1646 */
break;
case 55:
-#line 883 "awkgram.y" /* yacc.c:1646 */
+#line 881 "awkgram.y" /* yacc.c:1646 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule == BEGIN || rule == END || rule == ENDFILE)
@@ -2666,11 +2664,11 @@ regular_loop:
(yyvsp[-1])->target_endfile = ip_endfile;
(yyval) = list_create((yyvsp[-1]));
}
-#line 2670 "awkgram.c" /* yacc.c:1646 */
+#line 2668 "awkgram.c" /* yacc.c:1646 */
break;
case 56:
-#line 894 "awkgram.y" /* yacc.c:1646 */
+#line 892 "awkgram.y" /* yacc.c:1646 */
{
/* Initialize the two possible jump targets, the actual target
* is resolved at run-time.
@@ -2685,20 +2683,20 @@ regular_loop:
} else
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
}
-#line 2689 "awkgram.c" /* yacc.c:1646 */
+#line 2687 "awkgram.c" /* yacc.c:1646 */
break;
case 57:
-#line 909 "awkgram.y" /* yacc.c:1646 */
+#line 907 "awkgram.y" /* yacc.c:1646 */
{
if (! in_function)
yyerror(_("`return' used outside function context"));
}
-#line 2698 "awkgram.c" /* yacc.c:1646 */
+#line 2696 "awkgram.c" /* yacc.c:1646 */
break;
case 58:
-#line 912 "awkgram.y" /* yacc.c:1646 */
+#line 910 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-1]) == NULL) {
(yyval) = list_create((yyvsp[-3]));
@@ -2719,17 +2717,17 @@ regular_loop:
(yyval) = list_append((yyvsp[-1]), (yyvsp[-3]));
}
}
-#line 2723 "awkgram.c" /* yacc.c:1646 */
+#line 2721 "awkgram.c" /* yacc.c:1646 */
break;
case 60:
-#line 944 "awkgram.y" /* yacc.c:1646 */
+#line 942 "awkgram.y" /* yacc.c:1646 */
{ in_print = true; in_parens = 0; }
-#line 2729 "awkgram.c" /* yacc.c:1646 */
+#line 2727 "awkgram.c" /* yacc.c:1646 */
break;
case 61:
-#line 945 "awkgram.y" /* yacc.c:1646 */
+#line 943 "awkgram.y" /* yacc.c:1646 */
{
/*
* Optimization: plain `print' has no expression list, so $3 is null.
@@ -2826,17 +2824,17 @@ regular_print:
}
}
}
-#line 2830 "awkgram.c" /* yacc.c:1646 */
+#line 2828 "awkgram.c" /* yacc.c:1646 */
break;
case 62:
-#line 1042 "awkgram.y" /* yacc.c:1646 */
+#line 1040 "awkgram.y" /* yacc.c:1646 */
{ sub_counter = 0; }
-#line 2836 "awkgram.c" /* yacc.c:1646 */
+#line 2834 "awkgram.c" /* yacc.c:1646 */
break;
case 63:
-#line 1043 "awkgram.y" /* yacc.c:1646 */
+#line 1041 "awkgram.y" /* yacc.c:1646 */
{
char *arr = (yyvsp[-2])->lextok;
@@ -2869,11 +2867,11 @@ regular_print:
(yyval) = list_append(list_append((yyvsp[0]), (yyvsp[-2])), (yyvsp[-3]));
}
}
-#line 2873 "awkgram.c" /* yacc.c:1646 */
+#line 2871 "awkgram.c" /* yacc.c:1646 */
break;
case 64:
-#line 1080 "awkgram.y" /* yacc.c:1646 */
+#line 1078 "awkgram.y" /* yacc.c:1646 */
{
static bool warned = false;
char *arr = (yyvsp[-1])->lextok;
@@ -2899,52 +2897,52 @@ regular_print:
fatal(_("`delete' is not allowed with FUNCTAB"));
}
}
-#line 2903 "awkgram.c" /* yacc.c:1646 */
+#line 2901 "awkgram.c" /* yacc.c:1646 */
break;
case 65:
-#line 1106 "awkgram.y" /* yacc.c:1646 */
+#line 1104 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = optimize_assignment((yyvsp[0])); }
-#line 2909 "awkgram.c" /* yacc.c:1646 */
+#line 2907 "awkgram.c" /* yacc.c:1646 */
break;
case 66:
-#line 1111 "awkgram.y" /* yacc.c:1646 */
+#line 1109 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2915 "awkgram.c" /* yacc.c:1646 */
+#line 2913 "awkgram.c" /* yacc.c:1646 */
break;
case 67:
-#line 1113 "awkgram.y" /* yacc.c:1646 */
+#line 1111 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2921 "awkgram.c" /* yacc.c:1646 */
+#line 2919 "awkgram.c" /* yacc.c:1646 */
break;
case 68:
-#line 1118 "awkgram.y" /* yacc.c:1646 */
+#line 1116 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2927 "awkgram.c" /* yacc.c:1646 */
+#line 2925 "awkgram.c" /* yacc.c:1646 */
break;
case 69:
-#line 1120 "awkgram.y" /* yacc.c:1646 */
+#line 1118 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-1]) == NULL)
(yyval) = list_create((yyvsp[0]));
else
(yyval) = list_prepend((yyvsp[-1]), (yyvsp[0]));
}
-#line 2938 "awkgram.c" /* yacc.c:1646 */
+#line 2936 "awkgram.c" /* yacc.c:1646 */
break;
case 70:
-#line 1127 "awkgram.y" /* yacc.c:1646 */
+#line 1125 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2944 "awkgram.c" /* yacc.c:1646 */
+#line 2942 "awkgram.c" /* yacc.c:1646 */
break;
case 71:
-#line 1132 "awkgram.y" /* yacc.c:1646 */
+#line 1130 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -2956,11 +2954,11 @@ regular_print:
bcfree((yyvsp[-2]));
(yyval) = (yyvsp[-4]);
}
-#line 2960 "awkgram.c" /* yacc.c:1646 */
+#line 2958 "awkgram.c" /* yacc.c:1646 */
break;
case 72:
-#line 1144 "awkgram.y" /* yacc.c:1646 */
+#line 1142 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -2971,17 +2969,17 @@ regular_print:
(yyvsp[-3])->case_stmt = casestmt;
(yyval) = (yyvsp[-3]);
}
-#line 2975 "awkgram.c" /* yacc.c:1646 */
+#line 2973 "awkgram.c" /* yacc.c:1646 */
break;
case 73:
-#line 1158 "awkgram.y" /* yacc.c:1646 */
+#line 1156 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2981 "awkgram.c" /* yacc.c:1646 */
+#line 2979 "awkgram.c" /* yacc.c:1646 */
break;
case 74:
-#line 1160 "awkgram.y" /* yacc.c:1646 */
+#line 1158 "awkgram.y" /* yacc.c:1646 */
{
NODE *n = (yyvsp[0])->memory;
(void) force_number(n);
@@ -2989,71 +2987,71 @@ regular_print:
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 2993 "awkgram.c" /* yacc.c:1646 */
+#line 2991 "awkgram.c" /* yacc.c:1646 */
break;
case 75:
-#line 1168 "awkgram.y" /* yacc.c:1646 */
+#line 1166 "awkgram.y" /* yacc.c:1646 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3002 "awkgram.c" /* yacc.c:1646 */
+#line 3000 "awkgram.c" /* yacc.c:1646 */
break;
case 76:
-#line 1173 "awkgram.y" /* yacc.c:1646 */
+#line 1171 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3008 "awkgram.c" /* yacc.c:1646 */
+#line 3006 "awkgram.c" /* yacc.c:1646 */
break;
case 77:
-#line 1175 "awkgram.y" /* yacc.c:1646 */
+#line 1173 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_push_re;
(yyval) = (yyvsp[0]);
}
-#line 3017 "awkgram.c" /* yacc.c:1646 */
+#line 3015 "awkgram.c" /* yacc.c:1646 */
break;
case 78:
-#line 1183 "awkgram.y" /* yacc.c:1646 */
+#line 1181 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3023 "awkgram.c" /* yacc.c:1646 */
+#line 3021 "awkgram.c" /* yacc.c:1646 */
break;
case 79:
-#line 1185 "awkgram.y" /* yacc.c:1646 */
+#line 1183 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3029 "awkgram.c" /* yacc.c:1646 */
+#line 3027 "awkgram.c" /* yacc.c:1646 */
break;
case 81:
-#line 1195 "awkgram.y" /* yacc.c:1646 */
+#line 1193 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-1]);
}
-#line 3037 "awkgram.c" /* yacc.c:1646 */
+#line 3035 "awkgram.c" /* yacc.c:1646 */
break;
case 82:
-#line 1202 "awkgram.y" /* yacc.c:1646 */
+#line 1200 "awkgram.y" /* yacc.c:1646 */
{
in_print = false;
in_parens = 0;
(yyval) = NULL;
}
-#line 3047 "awkgram.c" /* yacc.c:1646 */
+#line 3045 "awkgram.c" /* yacc.c:1646 */
break;
case 83:
-#line 1207 "awkgram.y" /* yacc.c:1646 */
+#line 1205 "awkgram.y" /* yacc.c:1646 */
{ in_print = false; in_parens = 0; }
-#line 3053 "awkgram.c" /* yacc.c:1646 */
+#line 3051 "awkgram.c" /* yacc.c:1646 */
break;
case 84:
-#line 1208 "awkgram.y" /* yacc.c:1646 */
+#line 1206 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-2])->redir_type == redirect_twoway
&& (yyvsp[0])->lasti->opcode == Op_K_getline_redir
@@ -3061,136 +3059,136 @@ regular_print:
yyerror(_("multistage two-way pipelines don't work"));
(yyval) = list_prepend((yyvsp[0]), (yyvsp[-2]));
}
-#line 3065 "awkgram.c" /* yacc.c:1646 */
+#line 3063 "awkgram.c" /* yacc.c:1646 */
break;
case 85:
-#line 1219 "awkgram.y" /* yacc.c:1646 */
+#line 1217 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_condition((yyvsp[-3]), (yyvsp[-5]), (yyvsp[0]), NULL, NULL);
}
-#line 3073 "awkgram.c" /* yacc.c:1646 */
+#line 3071 "awkgram.c" /* yacc.c:1646 */
break;
case 86:
-#line 1224 "awkgram.y" /* yacc.c:1646 */
+#line 1222 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_condition((yyvsp[-6]), (yyvsp[-8]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[0]));
}
-#line 3081 "awkgram.c" /* yacc.c:1646 */
+#line 3079 "awkgram.c" /* yacc.c:1646 */
break;
case 91:
-#line 1241 "awkgram.y" /* yacc.c:1646 */
+#line 1239 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3087 "awkgram.c" /* yacc.c:1646 */
+#line 3085 "awkgram.c" /* yacc.c:1646 */
break;
case 92:
-#line 1243 "awkgram.y" /* yacc.c:1646 */
+#line 1241 "awkgram.y" /* yacc.c:1646 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3096 "awkgram.c" /* yacc.c:1646 */
+#line 3094 "awkgram.c" /* yacc.c:1646 */
break;
case 93:
-#line 1251 "awkgram.y" /* yacc.c:1646 */
+#line 1249 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3102 "awkgram.c" /* yacc.c:1646 */
+#line 3100 "awkgram.c" /* yacc.c:1646 */
break;
case 94:
-#line 1253 "awkgram.y" /* yacc.c:1646 */
+#line 1251 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]) ; }
-#line 3108 "awkgram.c" /* yacc.c:1646 */
+#line 3106 "awkgram.c" /* yacc.c:1646 */
break;
case 95:
-#line 1258 "awkgram.y" /* yacc.c:1646 */
+#line 1256 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->param_count = 0;
(yyval) = list_create((yyvsp[0]));
}
-#line 3117 "awkgram.c" /* yacc.c:1646 */
+#line 3115 "awkgram.c" /* yacc.c:1646 */
break;
case 96:
-#line 1263 "awkgram.y" /* yacc.c:1646 */
+#line 1261 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->param_count = (yyvsp[-2])->lasti->param_count + 1;
(yyval) = list_append((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3127 "awkgram.c" /* yacc.c:1646 */
+#line 3125 "awkgram.c" /* yacc.c:1646 */
break;
case 97:
-#line 1269 "awkgram.y" /* yacc.c:1646 */
+#line 1267 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3133 "awkgram.c" /* yacc.c:1646 */
+#line 3131 "awkgram.c" /* yacc.c:1646 */
break;
case 98:
-#line 1271 "awkgram.y" /* yacc.c:1646 */
+#line 1269 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3139 "awkgram.c" /* yacc.c:1646 */
+#line 3137 "awkgram.c" /* yacc.c:1646 */
break;
case 99:
-#line 1273 "awkgram.y" /* yacc.c:1646 */
+#line 1271 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-2]); }
-#line 3145 "awkgram.c" /* yacc.c:1646 */
+#line 3143 "awkgram.c" /* yacc.c:1646 */
break;
case 100:
-#line 1279 "awkgram.y" /* yacc.c:1646 */
+#line 1277 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3151 "awkgram.c" /* yacc.c:1646 */
+#line 3149 "awkgram.c" /* yacc.c:1646 */
break;
case 101:
-#line 1281 "awkgram.y" /* yacc.c:1646 */
+#line 1279 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3157 "awkgram.c" /* yacc.c:1646 */
+#line 3155 "awkgram.c" /* yacc.c:1646 */
break;
case 102:
-#line 1286 "awkgram.y" /* yacc.c:1646 */
+#line 1284 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3163 "awkgram.c" /* yacc.c:1646 */
+#line 3161 "awkgram.c" /* yacc.c:1646 */
break;
case 103:
-#line 1288 "awkgram.y" /* yacc.c:1646 */
+#line 1286 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3169 "awkgram.c" /* yacc.c:1646 */
+#line 3167 "awkgram.c" /* yacc.c:1646 */
break;
case 104:
-#line 1293 "awkgram.y" /* yacc.c:1646 */
+#line 1291 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_expression_list(NULL, (yyvsp[0])); }
-#line 3175 "awkgram.c" /* yacc.c:1646 */
+#line 3173 "awkgram.c" /* yacc.c:1646 */
break;
case 105:
-#line 1295 "awkgram.y" /* yacc.c:1646 */
+#line 1293 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3184 "awkgram.c" /* yacc.c:1646 */
+#line 3182 "awkgram.c" /* yacc.c:1646 */
break;
case 106:
-#line 1300 "awkgram.y" /* yacc.c:1646 */
+#line 1298 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3190 "awkgram.c" /* yacc.c:1646 */
+#line 3188 "awkgram.c" /* yacc.c:1646 */
break;
case 107:
-#line 1302 "awkgram.y" /* yacc.c:1646 */
+#line 1300 "awkgram.y" /* yacc.c:1646 */
{
/*
* Returning the expression list instead of NULL lets
@@ -3198,52 +3196,52 @@ regular_print:
*/
(yyval) = (yyvsp[-1]);
}
-#line 3202 "awkgram.c" /* yacc.c:1646 */
+#line 3200 "awkgram.c" /* yacc.c:1646 */
break;
case 108:
-#line 1310 "awkgram.y" /* yacc.c:1646 */
+#line 1308 "awkgram.y" /* yacc.c:1646 */
{
/* Ditto */
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
}
-#line 3211 "awkgram.c" /* yacc.c:1646 */
+#line 3209 "awkgram.c" /* yacc.c:1646 */
break;
case 109:
-#line 1315 "awkgram.y" /* yacc.c:1646 */
+#line 1313 "awkgram.y" /* yacc.c:1646 */
{
/* Ditto */
(yyval) = (yyvsp[-2]);
}
-#line 3220 "awkgram.c" /* yacc.c:1646 */
+#line 3218 "awkgram.c" /* yacc.c:1646 */
break;
case 110:
-#line 1324 "awkgram.y" /* yacc.c:1646 */
+#line 1322 "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 3231 "awkgram.c" /* yacc.c:1646 */
+#line 3229 "awkgram.c" /* yacc.c:1646 */
break;
case 111:
-#line 1331 "awkgram.y" /* yacc.c:1646 */
+#line 1329 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3237 "awkgram.c" /* yacc.c:1646 */
+#line 3235 "awkgram.c" /* yacc.c:1646 */
break;
case 112:
-#line 1333 "awkgram.y" /* yacc.c:1646 */
+#line 1331 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3243 "awkgram.c" /* yacc.c:1646 */
+#line 3241 "awkgram.c" /* yacc.c:1646 */
break;
case 113:
-#line 1335 "awkgram.y" /* yacc.c:1646 */
+#line 1333 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-2])->lasti->opcode == Op_match_rec)
warning_ln((yyvsp[-1])->source_line,
@@ -3259,11 +3257,11 @@ regular_print:
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1]));
}
}
-#line 3263 "awkgram.c" /* yacc.c:1646 */
+#line 3261 "awkgram.c" /* yacc.c:1646 */
break;
case 114:
-#line 1351 "awkgram.y" /* yacc.c:1646 */
+#line 1349 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint_old)
warning_ln((yyvsp[-1])->source_line,
@@ -3273,91 +3271,91 @@ regular_print:
(yyvsp[-1])->expr_count = 1;
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1]));
}
-#line 3277 "awkgram.c" /* yacc.c:1646 */
+#line 3275 "awkgram.c" /* yacc.c:1646 */
break;
case 115:
-#line 1361 "awkgram.y" /* yacc.c:1646 */
+#line 1359 "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 3288 "awkgram.c" /* yacc.c:1646 */
+#line 3286 "awkgram.c" /* yacc.c:1646 */
break;
case 116:
-#line 1368 "awkgram.y" /* yacc.c:1646 */
+#line 1366 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_condition((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])); }
-#line 3294 "awkgram.c" /* yacc.c:1646 */
+#line 3292 "awkgram.c" /* yacc.c:1646 */
break;
case 117:
-#line 1370 "awkgram.y" /* yacc.c:1646 */
+#line 1368 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3300 "awkgram.c" /* yacc.c:1646 */
+#line 3298 "awkgram.c" /* yacc.c:1646 */
break;
case 118:
-#line 1375 "awkgram.y" /* yacc.c:1646 */
+#line 1373 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3306 "awkgram.c" /* yacc.c:1646 */
+#line 3304 "awkgram.c" /* yacc.c:1646 */
break;
case 119:
-#line 1377 "awkgram.y" /* yacc.c:1646 */
+#line 1375 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3312 "awkgram.c" /* yacc.c:1646 */
+#line 3310 "awkgram.c" /* yacc.c:1646 */
break;
case 120:
-#line 1379 "awkgram.y" /* yacc.c:1646 */
+#line 1377 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_assign_quotient;
(yyval) = (yyvsp[0]);
}
-#line 3321 "awkgram.c" /* yacc.c:1646 */
+#line 3319 "awkgram.c" /* yacc.c:1646 */
break;
case 121:
-#line 1387 "awkgram.y" /* yacc.c:1646 */
+#line 1385 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3327 "awkgram.c" /* yacc.c:1646 */
+#line 3325 "awkgram.c" /* yacc.c:1646 */
break;
case 122:
-#line 1389 "awkgram.y" /* yacc.c:1646 */
+#line 1387 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3333 "awkgram.c" /* yacc.c:1646 */
+#line 3331 "awkgram.c" /* yacc.c:1646 */
break;
case 123:
-#line 1394 "awkgram.y" /* yacc.c:1646 */
+#line 1392 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3339 "awkgram.c" /* yacc.c:1646 */
+#line 3337 "awkgram.c" /* yacc.c:1646 */
break;
case 124:
-#line 1396 "awkgram.y" /* yacc.c:1646 */
+#line 1394 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3345 "awkgram.c" /* yacc.c:1646 */
+#line 3343 "awkgram.c" /* yacc.c:1646 */
break;
case 125:
-#line 1401 "awkgram.y" /* yacc.c:1646 */
+#line 1399 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3351 "awkgram.c" /* yacc.c:1646 */
+#line 3349 "awkgram.c" /* yacc.c:1646 */
break;
case 126:
-#line 1403 "awkgram.y" /* yacc.c:1646 */
+#line 1401 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3357 "awkgram.c" /* yacc.c:1646 */
+#line 3355 "awkgram.c" /* yacc.c:1646 */
break;
case 127:
-#line 1405 "awkgram.y" /* yacc.c:1646 */
+#line 1403 "awkgram.y" /* yacc.c:1646 */
{
int count = 2;
bool is_simple_var = false;
@@ -3404,47 +3402,47 @@ regular_print:
max_args = count;
}
}
-#line 3408 "awkgram.c" /* yacc.c:1646 */
+#line 3406 "awkgram.c" /* yacc.c:1646 */
break;
case 129:
-#line 1457 "awkgram.y" /* yacc.c:1646 */
+#line 1455 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3414 "awkgram.c" /* yacc.c:1646 */
+#line 3412 "awkgram.c" /* yacc.c:1646 */
break;
case 130:
-#line 1459 "awkgram.y" /* yacc.c:1646 */
+#line 1457 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3420 "awkgram.c" /* yacc.c:1646 */
+#line 3418 "awkgram.c" /* yacc.c:1646 */
break;
case 131:
-#line 1461 "awkgram.y" /* yacc.c:1646 */
+#line 1459 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3426 "awkgram.c" /* yacc.c:1646 */
+#line 3424 "awkgram.c" /* yacc.c:1646 */
break;
case 132:
-#line 1463 "awkgram.y" /* yacc.c:1646 */
+#line 1461 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3432 "awkgram.c" /* yacc.c:1646 */
+#line 3430 "awkgram.c" /* yacc.c:1646 */
break;
case 133:
-#line 1465 "awkgram.y" /* yacc.c:1646 */
+#line 1463 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3438 "awkgram.c" /* yacc.c:1646 */
+#line 3436 "awkgram.c" /* yacc.c:1646 */
break;
case 134:
-#line 1467 "awkgram.y" /* yacc.c:1646 */
+#line 1465 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3444 "awkgram.c" /* yacc.c:1646 */
+#line 3442 "awkgram.c" /* yacc.c:1646 */
break;
case 135:
-#line 1469 "awkgram.y" /* yacc.c:1646 */
+#line 1467 "awkgram.y" /* yacc.c:1646 */
{
/*
* In BEGINFILE/ENDFILE, allow `getline [var] < file'
@@ -3458,29 +3456,29 @@ regular_print:
_("non-redirected `getline' undefined inside END action"));
(yyval) = mk_getline((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), redirect_input);
}
-#line 3462 "awkgram.c" /* yacc.c:1646 */
+#line 3460 "awkgram.c" /* yacc.c:1646 */
break;
case 136:
-#line 1483 "awkgram.y" /* yacc.c:1646 */
+#line 1481 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postincrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3471 "awkgram.c" /* yacc.c:1646 */
+#line 3469 "awkgram.c" /* yacc.c:1646 */
break;
case 137:
-#line 1488 "awkgram.y" /* yacc.c:1646 */
+#line 1486 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postdecrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3480 "awkgram.c" /* yacc.c:1646 */
+#line 3478 "awkgram.c" /* yacc.c:1646 */
break;
case 138:
-#line 1493 "awkgram.y" /* yacc.c:1646 */
+#line 1491 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint_old) {
warning_ln((yyvsp[-1])->source_line,
@@ -3500,64 +3498,64 @@ regular_print:
(yyval) = list_append(list_merge(t, (yyvsp[0])), (yyvsp[-1]));
}
}
-#line 3504 "awkgram.c" /* yacc.c:1646 */
+#line 3502 "awkgram.c" /* yacc.c:1646 */
break;
case 139:
-#line 1518 "awkgram.y" /* yacc.c:1646 */
+#line 1516 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_getline((yyvsp[-1]), (yyvsp[0]), (yyvsp[-3]), (yyvsp[-2])->redir_type);
bcfree((yyvsp[-2]));
}
-#line 3513 "awkgram.c" /* yacc.c:1646 */
+#line 3511 "awkgram.c" /* yacc.c:1646 */
break;
case 140:
-#line 1524 "awkgram.y" /* yacc.c:1646 */
+#line 1522 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3519 "awkgram.c" /* yacc.c:1646 */
+#line 3517 "awkgram.c" /* yacc.c:1646 */
break;
case 141:
-#line 1526 "awkgram.y" /* yacc.c:1646 */
+#line 1524 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3525 "awkgram.c" /* yacc.c:1646 */
+#line 3523 "awkgram.c" /* yacc.c:1646 */
break;
case 142:
-#line 1528 "awkgram.y" /* yacc.c:1646 */
+#line 1526 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3531 "awkgram.c" /* yacc.c:1646 */
+#line 3529 "awkgram.c" /* yacc.c:1646 */
break;
case 143:
-#line 1530 "awkgram.y" /* yacc.c:1646 */
+#line 1528 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3537 "awkgram.c" /* yacc.c:1646 */
+#line 3535 "awkgram.c" /* yacc.c:1646 */
break;
case 144:
-#line 1532 "awkgram.y" /* yacc.c:1646 */
+#line 1530 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3543 "awkgram.c" /* yacc.c:1646 */
+#line 3541 "awkgram.c" /* yacc.c:1646 */
break;
case 145:
-#line 1534 "awkgram.y" /* yacc.c:1646 */
+#line 1532 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3549 "awkgram.c" /* yacc.c:1646 */
+#line 3547 "awkgram.c" /* yacc.c:1646 */
break;
case 146:
-#line 1539 "awkgram.y" /* yacc.c:1646 */
+#line 1537 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3557 "awkgram.c" /* yacc.c:1646 */
+#line 3555 "awkgram.c" /* yacc.c:1646 */
break;
case 147:
-#line 1543 "awkgram.y" /* yacc.c:1646 */
+#line 1541 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0])->opcode == Op_match_rec) {
(yyvsp[0])->opcode = Op_nomatch;
@@ -3589,37 +3587,37 @@ regular_print:
}
}
}
-#line 3593 "awkgram.c" /* yacc.c:1646 */
+#line 3591 "awkgram.c" /* yacc.c:1646 */
break;
case 148:
-#line 1575 "awkgram.y" /* yacc.c:1646 */
+#line 1573 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3599 "awkgram.c" /* yacc.c:1646 */
+#line 3597 "awkgram.c" /* yacc.c:1646 */
break;
case 149:
-#line 1577 "awkgram.y" /* yacc.c:1646 */
+#line 1575 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 3609 "awkgram.c" /* yacc.c:1646 */
+#line 3607 "awkgram.c" /* yacc.c:1646 */
break;
case 150:
-#line 1583 "awkgram.y" /* yacc.c:1646 */
+#line 1581 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 3619 "awkgram.c" /* yacc.c:1646 */
+#line 3617 "awkgram.c" /* yacc.c:1646 */
break;
case 151:
-#line 1589 "awkgram.y" /* yacc.c:1646 */
+#line 1587 "awkgram.y" /* yacc.c:1646 */
{
static bool warned = false;
@@ -3632,45 +3630,45 @@ regular_print:
if ((yyval) == NULL)
YYABORT;
}
-#line 3636 "awkgram.c" /* yacc.c:1646 */
+#line 3634 "awkgram.c" /* yacc.c:1646 */
break;
case 154:
-#line 1604 "awkgram.y" /* yacc.c:1646 */
+#line 1602 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-1])->opcode = Op_preincrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 3645 "awkgram.c" /* yacc.c:1646 */
+#line 3643 "awkgram.c" /* yacc.c:1646 */
break;
case 155:
-#line 1609 "awkgram.y" /* yacc.c:1646 */
+#line 1607 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-1])->opcode = Op_predecrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 3654 "awkgram.c" /* yacc.c:1646 */
+#line 3652 "awkgram.c" /* yacc.c:1646 */
break;
case 156:
-#line 1614 "awkgram.y" /* yacc.c:1646 */
+#line 1612 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3662 "awkgram.c" /* yacc.c:1646 */
+#line 3660 "awkgram.c" /* yacc.c:1646 */
break;
case 157:
-#line 1618 "awkgram.y" /* yacc.c:1646 */
+#line 1616 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3670 "awkgram.c" /* yacc.c:1646 */
+#line 3668 "awkgram.c" /* yacc.c:1646 */
break;
case 158:
-#line 1622 "awkgram.y" /* yacc.c:1646 */
+#line 1620 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0])->lasti->opcode == Op_push_i
&& ((yyvsp[0])->lasti->memory->flags & (STRCUR|STRING)) == 0
@@ -3685,11 +3683,11 @@ regular_print:
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
}
-#line 3689 "awkgram.c" /* yacc.c:1646 */
+#line 3687 "awkgram.c" /* yacc.c:1646 */
break;
case 159:
-#line 1637 "awkgram.y" /* yacc.c:1646 */
+#line 1635 "awkgram.y" /* yacc.c:1646 */
{
/*
* was: $$ = $2
@@ -3699,20 +3697,20 @@ regular_print:
(yyvsp[-1])->memory = make_number(0.0);
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
-#line 3703 "awkgram.c" /* yacc.c:1646 */
+#line 3701 "awkgram.c" /* yacc.c:1646 */
break;
case 160:
-#line 1650 "awkgram.y" /* yacc.c:1646 */
+#line 1648 "awkgram.y" /* yacc.c:1646 */
{
func_use((yyvsp[0])->lasti->func_name, FUNC_USE);
(yyval) = (yyvsp[0]);
}
-#line 3712 "awkgram.c" /* yacc.c:1646 */
+#line 3710 "awkgram.c" /* yacc.c:1646 */
break;
case 161:
-#line 1655 "awkgram.y" /* yacc.c:1646 */
+#line 1653 "awkgram.y" /* yacc.c:1646 */
{
/* indirect function call */
INSTRUCTION *f, *t;
@@ -3745,11 +3743,11 @@ regular_print:
(yyval) = list_prepend((yyvsp[0]), t);
}
-#line 3749 "awkgram.c" /* yacc.c:1646 */
+#line 3747 "awkgram.c" /* yacc.c:1646 */
break;
case 162:
-#line 1691 "awkgram.y" /* yacc.c:1646 */
+#line 1689 "awkgram.y" /* yacc.c:1646 */
{
param_sanity((yyvsp[-1]));
(yyvsp[-3])->opcode = Op_func_call;
@@ -3763,49 +3761,49 @@ regular_print:
(yyval) = list_append(t, (yyvsp[-3]));
}
}
-#line 3767 "awkgram.c" /* yacc.c:1646 */
+#line 3765 "awkgram.c" /* yacc.c:1646 */
break;
case 163:
-#line 1708 "awkgram.y" /* yacc.c:1646 */
+#line 1706 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3773 "awkgram.c" /* yacc.c:1646 */
+#line 3771 "awkgram.c" /* yacc.c:1646 */
break;
case 164:
-#line 1710 "awkgram.y" /* yacc.c:1646 */
+#line 1708 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3779 "awkgram.c" /* yacc.c:1646 */
+#line 3777 "awkgram.c" /* yacc.c:1646 */
break;
case 165:
-#line 1715 "awkgram.y" /* yacc.c:1646 */
+#line 1713 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3785 "awkgram.c" /* yacc.c:1646 */
+#line 3783 "awkgram.c" /* yacc.c:1646 */
break;
case 166:
-#line 1717 "awkgram.y" /* yacc.c:1646 */
+#line 1715 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3791 "awkgram.c" /* yacc.c:1646 */
+#line 3789 "awkgram.c" /* yacc.c:1646 */
break;
case 167:
-#line 1722 "awkgram.y" /* yacc.c:1646 */
+#line 1720 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3797 "awkgram.c" /* yacc.c:1646 */
+#line 3795 "awkgram.c" /* yacc.c:1646 */
break;
case 168:
-#line 1724 "awkgram.y" /* yacc.c:1646 */
+#line 1722 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 3805 "awkgram.c" /* yacc.c:1646 */
+#line 3803 "awkgram.c" /* yacc.c:1646 */
break;
case 169:
-#line 1731 "awkgram.y" /* yacc.c:1646 */
+#line 1729 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip = (yyvsp[0])->lasti;
int count = ip->sub_count; /* # of SUBSEP-seperated expressions */
@@ -3819,11 +3817,11 @@ regular_print:
sub_counter++; /* count # of dimensions */
(yyval) = (yyvsp[0]);
}
-#line 3823 "awkgram.c" /* yacc.c:1646 */
+#line 3821 "awkgram.c" /* yacc.c:1646 */
break;
case 170:
-#line 1748 "awkgram.y" /* yacc.c:1646 */
+#line 1746 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *t = (yyvsp[-1]);
if ((yyvsp[-1]) == NULL) {
@@ -3837,31 +3835,31 @@ regular_print:
(yyvsp[0])->sub_count = count_expressions(&t, false);
(yyval) = list_append(t, (yyvsp[0]));
}
-#line 3841 "awkgram.c" /* yacc.c:1646 */
+#line 3839 "awkgram.c" /* yacc.c:1646 */
break;
case 171:
-#line 1765 "awkgram.y" /* yacc.c:1646 */
+#line 1763 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3847 "awkgram.c" /* yacc.c:1646 */
+#line 3845 "awkgram.c" /* yacc.c:1646 */
break;
case 172:
-#line 1767 "awkgram.y" /* yacc.c:1646 */
+#line 1765 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 3855 "awkgram.c" /* yacc.c:1646 */
+#line 3853 "awkgram.c" /* yacc.c:1646 */
break;
case 173:
-#line 1774 "awkgram.y" /* yacc.c:1646 */
+#line 1772 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3861 "awkgram.c" /* yacc.c:1646 */
+#line 3859 "awkgram.c" /* yacc.c:1646 */
break;
case 174:
-#line 1779 "awkgram.y" /* yacc.c:1646 */
+#line 1777 "awkgram.y" /* yacc.c:1646 */
{
char *var_name = (yyvsp[0])->lextok;
@@ -3869,22 +3867,22 @@ regular_print:
(yyvsp[0])->memory = variable((yyvsp[0])->source_line, var_name, Node_var_new);
(yyval) = list_create((yyvsp[0]));
}
-#line 3873 "awkgram.c" /* yacc.c:1646 */
+#line 3871 "awkgram.c" /* yacc.c:1646 */
break;
case 175:
-#line 1787 "awkgram.y" /* yacc.c:1646 */
+#line 1785 "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 3884 "awkgram.c" /* yacc.c:1646 */
+#line 3882 "awkgram.c" /* yacc.c:1646 */
break;
case 176:
-#line 1797 "awkgram.y" /* yacc.c:1646 */
+#line 1795 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip = (yyvsp[0])->nexti;
if (ip->opcode == Op_push
@@ -3896,73 +3894,73 @@ regular_print:
} else
(yyval) = (yyvsp[0]);
}
-#line 3900 "awkgram.c" /* yacc.c:1646 */
+#line 3898 "awkgram.c" /* yacc.c:1646 */
break;
case 177:
-#line 1809 "awkgram.y" /* yacc.c:1646 */
+#line 1807 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
if ((yyvsp[0]) != NULL)
mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3910 "awkgram.c" /* yacc.c:1646 */
+#line 3908 "awkgram.c" /* yacc.c:1646 */
break;
case 178:
-#line 1818 "awkgram.y" /* yacc.c:1646 */
+#line 1816 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postincrement;
}
-#line 3918 "awkgram.c" /* yacc.c:1646 */
+#line 3916 "awkgram.c" /* yacc.c:1646 */
break;
case 179:
-#line 1822 "awkgram.y" /* yacc.c:1646 */
+#line 1820 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postdecrement;
}
-#line 3926 "awkgram.c" /* yacc.c:1646 */
+#line 3924 "awkgram.c" /* yacc.c:1646 */
break;
case 180:
-#line 1825 "awkgram.y" /* yacc.c:1646 */
+#line 1823 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3932 "awkgram.c" /* yacc.c:1646 */
+#line 3930 "awkgram.c" /* yacc.c:1646 */
break;
case 182:
-#line 1833 "awkgram.y" /* yacc.c:1646 */
+#line 1831 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3938 "awkgram.c" /* yacc.c:1646 */
+#line 3936 "awkgram.c" /* yacc.c:1646 */
break;
case 183:
-#line 1837 "awkgram.y" /* yacc.c:1646 */
+#line 1835 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3944 "awkgram.c" /* yacc.c:1646 */
+#line 3942 "awkgram.c" /* yacc.c:1646 */
break;
case 186:
-#line 1846 "awkgram.y" /* yacc.c:1646 */
+#line 1844 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3950 "awkgram.c" /* yacc.c:1646 */
+#line 3948 "awkgram.c" /* yacc.c:1646 */
break;
case 187:
-#line 1850 "awkgram.y" /* yacc.c:1646 */
+#line 1848 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); yyerrok; }
-#line 3956 "awkgram.c" /* yacc.c:1646 */
+#line 3954 "awkgram.c" /* yacc.c:1646 */
break;
case 188:
-#line 1854 "awkgram.y" /* yacc.c:1646 */
+#line 1852 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3962 "awkgram.c" /* yacc.c:1646 */
+#line 3960 "awkgram.c" /* yacc.c:1646 */
break;
-#line 3966 "awkgram.c" /* yacc.c:1646 */
+#line 3964 "awkgram.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -4190,7 +4188,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1856 "awkgram.y" /* yacc.c:1906 */
+#line 1854 "awkgram.y" /* yacc.c:1906 */
struct token {
@@ -6136,7 +6134,7 @@ retry:
}
}
- if (c != '_' && ! isalpha(c)) {
+ if (c != '_' && ! is_alpha(c)) {
yyerror(_("invalid char '%c' in expression"), c);
return lasttok = LEX_EOF;
}
@@ -8254,3 +8252,52 @@ install_builtins(void)
}
}
}
+
+/*
+ * 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!
+ */
+
+/* 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':
+ 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':
+ 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 041f70bb..c58d35ac 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -161,8 +161,6 @@ static inline INSTRUCTION *list_merge(INSTRUCTION *l1, INSTRUCTION *l2);
extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
-
-#define is_identchar(c) (isalnum(c) || (c) == '_')
%}
%token FUNC_CALL NAME REGEXP FILENAME
@@ -3798,7 +3796,7 @@ retry:
}
}
- if (c != '_' && ! isalpha(c)) {
+ if (c != '_' && ! is_alpha(c)) {
yyerror(_("invalid char '%c' in expression"), c);
return lasttok = LEX_EOF;
}
@@ -5916,3 +5914,52 @@ install_builtins(void)
}
}
}
+
+/*
+ * 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!
+ */
+
+/* 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':
+ 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':
+ 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/awklib/eg/lib/strtonum.awk b/awklib/eg/lib/strtonum.awk
index 5e20626b..f82c89c5 100644
--- a/awklib/eg/lib/strtonum.awk
+++ b/awklib/eg/lib/strtonum.awk
@@ -13,8 +13,8 @@ function mystrtonum(str, ret, n, i, k, c)
ret = 0
for (i = 1; i <= n; i++) {
c = substr(str, i, 1)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("1234567", c)
ret = ret * 8 + k
@@ -27,8 +27,8 @@ function mystrtonum(str, ret, n, i, k, c)
for (i = 1; i <= n; i++) {
c = substr(str, i, 1)
c = tolower(c)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("123456789abcdef", c)
ret = ret * 16 + k
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 ab2b26c7..2522ad87 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
2014-09-08 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Remove text that won't get used.
diff --git a/doc/gawk.info b/doc/gawk.info
index 2b8c0e0b..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
@@ -9822,9 +9825,8 @@ complicating the rest of the program, write a "weed out" rule near the
beginning, in the following manner:
NF != 4 {
- err = sprintf("%s:%d: skipped: NF != 4\n", FILENAME, FNR)
- print err > "/dev/stderr"
- next
+ printf("%s:%d: skipped: NF != 4\n", FILENAME, FNR) > "/dev/stderr"
+ next
}
Because of the `next' statement, the program's subsequent rules won't
@@ -10303,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.
@@ -13319,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,
@@ -14431,8 +14437,8 @@ versions of `awk':
ret = 0
for (i = 1; i <= n; i++) {
c = substr(str, i, 1)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("1234567", c)
ret = ret * 8 + k
@@ -14445,8 +14451,8 @@ versions of `awk':
for (i = 1; i <= n; i++) {
c = substr(str, i, 1)
c = tolower(c)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("123456789abcdef", c)
ret = ret * 16 + k
@@ -28543,8 +28549,8 @@ the derived files, because that keeps the repository less cluttered,
and it is easier to see the substantive changes when comparing versions
and trying to understand what changed between commits.
- However, there are two reasons why the `gawk' maintainer likes to
-have everything in the repository.
+ However, there are several reasons why the `gawk' maintainer likes
+to have everything in the repository.
First, because it is then easy to reproduce any given version
completely, without relying upon the availability of (older, likely
@@ -28597,6 +28603,13 @@ maintainer is no different than Jane User who wants to try to build
Thus, the maintainer thinks that it's not just important, but
critical, that for any given branch, the above incantation _just works_.
+ A third reason to have all the files is that without them, using `git
+bisect' to try to find the commit that introduced a bug is exceedingly
+difficult. The maintainer tried to do that on another project that
+requires running bootstrapping scripts just to create `configure' and
+so on; it was really painful. When the repository is self-contained,
+using `git bisect' in it is very easy.
+
What are some of the consequences and/or actions to take?
1. We don't mind that there are differing files in the different
@@ -31561,7 +31574,7 @@ Index
* BEGIN pattern, getline and: Getline Notes. (line 19)
* BEGIN pattern, headings, adding: Print Examples. (line 43)
* BEGIN pattern, next/nextfile statements and <1>: Next Statement.
- (line 45)
+ (line 44)
* BEGIN pattern, next/nextfile statements and: I/O And BEGIN/END.
(line 36)
* BEGIN pattern, OFS/ORS variables, assigning values to: Output Separators.
@@ -31771,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)
@@ -31883,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)
@@ -32107,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.
@@ -32115,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.
@@ -32187,7 +32200,7 @@ Index
* END pattern, Boolean patterns and: Expression Patterns. (line 70)
* END pattern, exit statement and: Exit Statement. (line 12)
* END pattern, next/nextfile statements and <1>: Next Statement.
- (line 45)
+ (line 44)
* END pattern, next/nextfile statements and: I/O And BEGIN/END.
(line 36)
* END pattern, operators and: Using BEGIN/END. (line 17)
@@ -32271,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)
@@ -32290,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)
@@ -32423,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.
@@ -32509,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)
@@ -32520,11 +32533,11 @@ Index
* functions, user-defined, next/nextfile statements and <1>: Nextfile Statement.
(line 47)
* functions, user-defined, next/nextfile statements and: Next Statement.
- (line 45)
+ (line 44)
* 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)
@@ -32601,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)
@@ -32694,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.
@@ -32988,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)
@@ -33001,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)
@@ -33042,7 +33055,7 @@ Index
* next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 36)
* next statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE.
(line 49)
-* next statement, user-defined functions and: Next Statement. (line 45)
+* next statement, user-defined functions and: Next Statement. (line 44)
* nextfile statement: Nextfile Statement. (line 6)
* nextfile statement, BEGIN/END patterns and: I/O And BEGIN/END.
(line 36)
@@ -33063,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.
@@ -33177,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)
@@ -33233,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)
@@ -33279,12 +33292,12 @@ 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)
* POSIX awk, interval expressions in: Regexp Operators. (line 135)
-* POSIX awk, next/nextfile statements and: Next Statement. (line 45)
+* POSIX awk, next/nextfile statements and: Next Statement. (line 44)
* POSIX awk, numeric strings and: Variable Typing. (line 6)
* POSIX awk, OFMT variable and <1>: Strings And Numbers. (line 57)
* POSIX awk, OFMT variable and: OFMT. (line 27)
@@ -33340,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)
@@ -33352,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)
@@ -33368,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.
@@ -33438,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)
@@ -33516,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)
@@ -33542,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)
@@ -33564,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)
@@ -33608,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.
@@ -33648,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.
@@ -33811,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)
@@ -33966,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)
@@ -33979,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)
@@ -34223,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 Statement421185
-Node: Exit Statement423842
-Node: Built-in Variables426246
-Node: User-modified427373
-Ref: User-modified-Footnote-1435062
-Node: Auto-set435124
-Ref: Auto-set-Footnote-1448143
-Ref: Auto-set-Footnote-2448348
-Node: ARGC and ARGV448404
-Node: Pattern Action Summary452308
-Node: Arrays454531
-Node: Array Basics456080
-Node: Array Intro456906
-Ref: figure-array-elements458879
-Ref: Array Intro-Footnote-1461403
-Node: Reference to Elements461531
-Node: Assigning Elements463981
-Node: Array Example464472
-Node: Scanning an Array466204
-Node: Controlling Scanning469205
-Ref: Controlling Scanning-Footnote-1474378
-Node: Delete474694
-Ref: Delete-Footnote-1477445
-Node: Numeric Array Subscripts477502
-Node: Uninitialized Subscripts479685
-Node: Multidimensional481312
-Node: Multiscanning484425
-Node: Arrays of Arrays486014
-Node: Arrays Summary490677
-Node: Functions492782
-Node: Built-in493655
-Node: Calling Built-in494733
-Node: Numeric Functions496721
-Ref: Numeric Functions-Footnote-1501557
-Ref: Numeric Functions-Footnote-2501914
-Ref: Numeric Functions-Footnote-3501962
-Node: String Functions502231
-Ref: String Functions-Footnote-1525228
-Ref: String Functions-Footnote-2525357
-Ref: String Functions-Footnote-3525605
-Node: Gory Details525692
-Ref: table-sub-escapes527465
-Ref: table-sub-proposed528985
-Ref: table-posix-sub530349
-Ref: table-gensub-escapes531889
-Ref: Gory Details-Footnote-1533065
-Node: I/O Functions533216
-Ref: I/O Functions-Footnote-1540326
-Node: Time Functions540473
-Ref: Time Functions-Footnote-1550937
-Ref: Time Functions-Footnote-2551005
-Ref: Time Functions-Footnote-3551163
-Ref: Time Functions-Footnote-4551274
-Ref: Time Functions-Footnote-5551386
-Ref: Time Functions-Footnote-6551613
-Node: Bitwise Functions551879
-Ref: table-bitwise-ops552441
-Ref: Bitwise Functions-Footnote-1556686
-Node: Type Functions556870
-Node: I18N Functions558012
-Node: User-defined559657
-Node: Definition Syntax560461
-Ref: Definition Syntax-Footnote-1565774
-Node: Function Example565843
-Ref: Function Example-Footnote-1568483
-Node: Function Caveats568505
-Node: Calling A Function569023
-Node: Variable Scope569978
-Node: Pass By Value/Reference572966
-Node: Return Statement576476
-Node: Dynamic Typing579460
-Node: Indirect Calls580389
-Ref: Indirect Calls-Footnote-1590105
-Node: Functions Summary590233
-Node: Library Functions592883
-Ref: Library Functions-Footnote-1596501
-Ref: Library Functions-Footnote-2596644
-Node: Library Names596815
-Ref: Library Names-Footnote-1600288
-Ref: Library Names-Footnote-2600508
-Node: General Functions600594
-Node: Strtonum Function601622
-Node: Assert Function604496
-Node: Round Function607822
-Node: Cliff Random Function609363
-Node: Ordinal Functions610379
-Ref: Ordinal Functions-Footnote-1613444
-Ref: Ordinal Functions-Footnote-2613696
-Node: Join Function613907
-Ref: Join Function-Footnote-1615678
-Node: Getlocaltime Function615878
-Node: Readfile Function619614
-Node: Data File Management621453
-Node: Filetrans Function622085
-Node: Rewind Function626154
-Node: File Checking627712
-Ref: File Checking-Footnote-1628844
-Node: Empty Files629045
-Node: Ignoring Assigns631024
-Node: Getopt Function632578
-Ref: Getopt Function-Footnote-1643842
-Node: Passwd Functions644045
-Ref: Passwd Functions-Footnote-1653024
-Node: Group Functions653112
-Ref: Group Functions-Footnote-1661043
-Node: Walking Arrays661256
-Node: Library Functions Summary662859
-Node: Library Exercises664247
-Node: Sample Programs665527
-Node: Running Examples666297
-Node: Clones667025
-Node: Cut Program668249
-Node: Egrep Program678107
-Ref: Egrep Program-Footnote-1685694
-Node: Id Program685804
-Node: Split Program689458
-Ref: Split Program-Footnote-1692996
-Node: Tee Program693124
-Node: Uniq Program695911
-Node: Wc Program703334
-Ref: Wc Program-Footnote-1707599
-Node: Miscellaneous Programs707691
-Node: Dupword Program708904
-Node: Alarm Program710935
-Node: Translate Program715739
-Ref: Translate Program-Footnote-1720312
-Ref: Translate Program-Footnote-2720582
-Node: Labels Program720721
-Ref: Labels Program-Footnote-1724082
-Node: Word Sorting724166
-Node: History Sorting728209
-Node: Extract Program730045
-Node: Simple Sed737581
-Node: Igawk Program740643
-Ref: Igawk Program-Footnote-1754947
-Ref: Igawk Program-Footnote-2755148
-Node: Anagram Program755286
-Node: Signature Program758354
-Node: Programs Summary759601
-Node: Programs Exercises760816
-Ref: Programs Exercises-Footnote-1764947
-Node: Advanced Features765038
-Node: Nondecimal Data766986
-Node: Array Sorting768563
-Node: Controlling Array Traversal769260
-Node: Array Sorting Functions777540
-Ref: Array Sorting Functions-Footnote-1781447
-Node: Two-way I/O781641
-Ref: Two-way I/O-Footnote-1786585
-Ref: Two-way I/O-Footnote-2786764
-Node: TCP/IP Networking786846
-Node: Profiling789691
-Node: Advanced Features Summary797242
-Node: Internationalization799106
-Node: I18N and L10N800586
-Node: Explaining gettext801272
-Ref: Explaining gettext-Footnote-1806298
-Ref: Explaining gettext-Footnote-2806482
-Node: Programmer i18n806647
-Ref: Programmer i18n-Footnote-1811441
-Node: Translator i18n811490
-Node: String Extraction812284
-Ref: String Extraction-Footnote-1813417
-Node: Printf Ordering813503
-Ref: Printf Ordering-Footnote-1816285
-Node: I18N Portability816349
-Ref: I18N Portability-Footnote-1818798
-Node: I18N Example818861
-Ref: I18N Example-Footnote-1821567
-Node: Gawk I18N821639
-Node: I18N Summary822277
-Node: Debugger823616
-Node: Debugging824638
-Node: Debugging Concepts825079
-Node: Debugging Terms826935
-Node: Awk Debugging829532
-Node: Sample Debugging Session830424
-Node: Debugger Invocation830944
-Node: Finding The Bug832280
-Node: List of Debugger Commands838759
-Node: Breakpoint Control840091
-Node: Debugger Execution Control843755
-Node: Viewing And Changing Data847115
-Node: Execution Stack850473
-Node: Debugger Info851986
-Node: Miscellaneous Debugger Commands855980
-Node: Readline Support861164
-Node: Limitations862056
-Node: Debugging Summary864329
-Node: Arbitrary Precision Arithmetic865497
-Node: Computer Arithmetic866984
-Ref: Computer Arithmetic-Footnote-1871371
-Node: Math Definitions871428
-Ref: table-ieee-formats874717
-Ref: Math Definitions-Footnote-1875257
-Node: MPFR features875360
-Node: FP Math Caution876977
-Ref: FP Math Caution-Footnote-1878027
-Node: Inexactness of computations878396
-Node: Inexact representation879344
-Node: Comparing FP Values880699
-Node: Errors accumulate881663
-Node: Getting Accuracy883096
-Node: Try To Round885755
-Node: Setting precision886654
-Ref: table-predefined-precision-strings887336
-Node: Setting the rounding mode889129
-Ref: table-gawk-rounding-modes889493
-Ref: Setting the rounding mode-Footnote-1892947
-Node: Arbitrary Precision Integers893126
-Ref: Arbitrary Precision Integers-Footnote-1896899
-Node: POSIX Floating Point Problems897048
-Ref: POSIX Floating Point Problems-Footnote-1900924
-Node: Floating point summary900962
-Node: Dynamic Extensions903166
-Node: Extension Intro904718
-Node: Plugin License905983
-Node: Extension Mechanism Outline906668
-Ref: figure-load-extension907092
-Ref: figure-load-new-function908577
-Ref: figure-call-new-function909579
-Node: Extension API Description911563
-Node: Extension API Functions Introduction913013
-Node: General Data Types917880
-Ref: General Data Types-Footnote-1923573
-Node: Requesting Values923872
-Ref: table-value-types-returned924609
-Node: Memory Allocation Functions925567
-Ref: Memory Allocation Functions-Footnote-1928314
-Node: Constructor Functions928410
-Node: Registration Functions930168
-Node: Extension Functions930853
-Node: Exit Callback Functions933155
-Node: Extension Version String934403
-Node: Input Parsers935053
-Node: Output Wrappers944867
-Node: Two-way processors949383
-Node: Printing Messages951587
-Ref: Printing Messages-Footnote-1952664
-Node: Updating `ERRNO'952816
-Node: Accessing Parameters953555
-Node: Symbol Table Access954785
-Node: Symbol table by name955299
-Node: Symbol table by cookie957275
-Ref: Symbol table by cookie-Footnote-1961408
-Node: Cached values961471
-Ref: Cached values-Footnote-1964975
-Node: Array Manipulation965066
-Ref: Array Manipulation-Footnote-1966164
-Node: Array Data Types966203
-Ref: Array Data Types-Footnote-1968906
-Node: Array Functions968998
-Node: Flattening Arrays972872
-Node: Creating Arrays979724
-Node: Extension API Variables984455
-Node: Extension Versioning985091
-Node: Extension API Informational Variables986992
-Node: Extension API Boilerplate988078
-Node: Finding Extensions991882
-Node: Extension Example992442
-Node: Internal File Description993172
-Node: Internal File Ops997263
-Ref: Internal File Ops-Footnote-11008695
-Node: Using Internal File Ops1008835
-Ref: Using Internal File Ops-Footnote-11011182
-Node: Extension Samples1011450
-Node: Extension Sample File Functions1012974
-Node: Extension Sample Fnmatch1020542
-Node: Extension Sample Fork1022024
-Node: Extension Sample Inplace1023237
-Node: Extension Sample Ord1024912
-Node: Extension Sample Readdir1025748
-Ref: table-readdir-file-types1026604
-Node: Extension Sample Revout1027403
-Node: Extension Sample Rev2way1027994
-Node: Extension Sample Read write array1028735
-Node: Extension Sample Readfile1030614
-Node: Extension Sample API Tests1031714
-Node: Extension Sample Time1032239
-Node: gawkextlib1033554
-Node: Extension summary1036367
-Node: Extension Exercises1040060
-Node: Language History1040782
-Node: V7/SVR3.11042425
-Node: SVR41044745
-Node: POSIX1046187
-Node: BTL1047573
-Node: POSIX/GNU1048307
-Node: Feature History1054083
-Node: Common Extensions1067174
-Node: Ranges and Locales1068486
-Ref: Ranges and Locales-Footnote-11073103
-Ref: Ranges and Locales-Footnote-21073130
-Ref: Ranges and Locales-Footnote-31073364
-Node: Contributors1073585
-Node: History summary1079010
-Node: Installation1080379
-Node: Gawk Distribution1081330
-Node: Getting1081814
-Node: Extracting1082638
-Node: Distribution contents1084280
-Node: Unix Installation1090050
-Node: Quick Installation1090667
-Node: Additional Configuration Options1093109
-Node: Configuration Philosophy1094847
-Node: Non-Unix Installation1097198
-Node: PC Installation1097656
-Node: PC Binary Installation1098967
-Node: PC Compiling1100815
-Ref: PC Compiling-Footnote-11103814
-Node: PC Testing1103919
-Node: PC Using1105095
-Node: Cygwin1109247
-Node: MSYS1110056
-Node: VMS Installation1110570
-Node: VMS Compilation1111366
-Ref: VMS Compilation-Footnote-11112588
-Node: VMS Dynamic Extensions1112646
-Node: VMS Installation Details1114019
-Node: VMS Running1116271
-Node: VMS GNV1119105
-Node: VMS Old Gawk1119828
-Node: Bugs1120298
-Node: Other Versions1124302
-Node: Installation summary1130529
-Node: Notes1131585
-Node: Compatibility Mode1132450
-Node: Additions1133232
-Node: Accessing The Source1134157
-Node: Adding Code1135593
-Node: New Ports1141771
-Node: Derived Files1146252
-Ref: Derived Files-Footnote-11151333
-Ref: Derived Files-Footnote-21151367
-Ref: Derived Files-Footnote-31151963
-Node: Future Extensions1152077
-Node: Implementation Limitations1152683
-Node: Extension Design1153931
-Node: Old Extension Problems1155085
-Ref: Old Extension Problems-Footnote-11156602
-Node: Extension New Mechanism Goals1156659
-Ref: Extension New Mechanism Goals-Footnote-11160019
-Node: Extension Other Design Decisions1160208
-Node: Extension Future Growth1162314
-Node: Old Extension Mechanism1163150
-Node: Notes summary1164912
-Node: Basic Concepts1166098
-Node: Basic High Level1166779
-Ref: figure-general-flow1167051
-Ref: figure-process-flow1167650
-Ref: Basic High Level-Footnote-11170879
-Node: Basic Data Typing1171064
-Node: Glossary1174392
-Node: Copying1199544
-Node: GNU Free Documentation License1237100
-Node: Index1262236
+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 a809bd0d..148032aa 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -37,11 +37,13 @@
@ifnotdocbook
@set BULLET @bullet{}
@set MINUS @minus{}
+@set NUL @sc{nul}
@end ifnotdocbook
@ifdocbook
@set BULLET
@set MINUS
+@set NUL NUL
@end ifdocbook
@set xref-automatic-section-title
@@ -5277,10 +5279,10 @@ with @samp{A}.
@cindex POSIX @command{awk}, period (@code{.})@comma{} using
In strict POSIX mode (@pxref{Options}),
-@samp{.} does not match the @sc{nul}
+@samp{.} does not match the @value{NUL}
character, which is a character with all bits equal to zero.
-Otherwise, @sc{nul} is just another character. Other versions of @command{awk}
-may not be able to match the @sc{nul} character.
+Otherwise, @value{NUL} is just another character. Other versions of @command{awk}
+may not be able to match the @value{NUL} character.
@cindex @code{[]} (square brackets), regexp operator
@cindex square brackets (@code{[]}), regexp operator
@@ -6429,7 +6431,7 @@ a value that you know doesn't occur in the input file. This is hard
to do in a general way, such that a program always works for arbitrary
input files.
-You might think that for text files, the @sc{nul} character, which
+You might think that for text files, the @value{NUL} character, which
consists of a character with all bits equal to zero, is a good
value to use for @code{RS} in this case:
@@ -6438,23 +6440,23 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@end example
@cindex differences in @command{awk} and @command{gawk}, strings, storing
-@command{gawk} in fact accepts this, and uses the @sc{nul}
+@command{gawk} in fact accepts this, and uses the @value{NUL}
character for the record separator.
This works for certain special files, such as @file{/proc/environ} on
-GNU/Linux systems, where the @sc{nul} character is in fact the record separator.
+GNU/Linux systems, where the @value{NUL} character is in fact the record separator.
However, this usage is @emph{not} portable
to most other @command{awk} implementations.
@cindex dark corner, strings, storing
Almost all other @command{awk} implementations@footnote{At least that we know
about.} store strings internally as C-style strings. C strings use the
-@sc{nul} character as the string terminator. In effect, this means that
+@value{NUL} character as the string terminator. In effect, this means that
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
-It happens that recent versions of @command{mawk} can use the @sc{nul}
+It happens that recent versions of @command{mawk} can use the @value{NUL}
character as a record separator. However, this is a special case:
-@command{mawk} does not allow embedded @sc{nul} characters in strings.
+@command{mawk} does not allow embedded @value{NUL} characters in strings.
@cindex records, treating files as
@cindex treating files, as single records
@@ -6479,7 +6481,7 @@ a value that you know doesn't occur in the input file. This is hard
to do in a general way, such that a program always works for arbitrary
input files.
-You might think that for text files, the @sc{nul} character, which
+You might think that for text files, the @value{NUL} character, which
consists of a character with all bits equal to zero, is a good
value to use for @code{RS} in this case:
@@ -6488,23 +6490,23 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@end example
@cindex differences in @command{awk} and @command{gawk}, strings, storing
-@command{gawk} in fact accepts this, and uses the @sc{nul}
+@command{gawk} in fact accepts this, and uses the @value{NUL}
character for the record separator.
This works for certain special files, such as @file{/proc/environ} on
-GNU/Linux systems, where the @sc{nul} character is in fact the record separator.
+GNU/Linux systems, where the @value{NUL} character is in fact the record separator.
However, this usage is @emph{not} portable
to most other @command{awk} implementations.
@cindex dark corner, strings, storing
Almost all other @command{awk} implementations@footnote{At least that we know
about.} store strings internally as C-style strings. C strings use the
-@sc{nul} character as the string terminator. In effect, this means that
+@value{NUL} character as the string terminator. In effect, this means that
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
-It happens that recent versions of @command{mawk} can use the @sc{nul}
+It happens that recent versions of @command{mawk} can use the @value{NUL}
character as a record separator. However, this is a special case:
-@command{mawk} does not allow embedded @sc{nul} characters in strings.
+@command{mawk} does not allow embedded @value{NUL} characters in strings.
@cindex records, treating files as
@cindex treating files, as single records
@@ -10425,7 +10427,7 @@ double-quotation marks. For example:
@cindex strings, length limitations
represents the string whose contents are @samp{parrot}. Strings in
@command{gawk} can be of any length, and they can contain any of the possible
-eight-bit ASCII characters including ASCII @sc{nul} (character code zero).
+eight-bit ASCII characters including ASCII @value{NUL} (character code zero).
Other @command{awk}
implementations may have difficulty with some character codes.
@@ -10709,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
@@ -14128,9 +14134,8 @@ the beginning, in the following manner:
@example
NF != 4 @{
- err = sprintf("%s:%d: skipped: NF != 4\n", FILENAME, FNR)
- print err > "/dev/stderr"
- next
+ printf("%s:%d: skipped: NF != 4\n", FILENAME, FNR) > "/dev/stderr"
+ next
@}
@end example
@@ -14772,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"
@@ -19192,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.
@@ -20532,8 +20542,8 @@ function mystrtonum(str, ret, n, i, k, c)
ret = 0
for (i = 1; i <= n; i++) @{
c = substr(str, i, 1)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("1234567", c)
ret = ret * 8 + k
@@ -20546,8 +20556,8 @@ function mystrtonum(str, ret, n, i, k, c)
for (i = 1; i <= n; i++) @{
c = substr(str, i, 1)
c = tolower(c)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("123456789abcdef", c)
ret = ret * 16 + k
@@ -31300,7 +31310,7 @@ and is managed by @command{gawk} from then on.
The API defines several simple @code{struct}s that map values as seen
from @command{awk}. A value can be a @code{double}, a string, or an
array (as in multidimensional arrays, or when creating a new array).
-String values maintain both pointer and length since embedded @sc{nul}
+String values maintain both pointer and length since embedded @value{NUL}
characters are allowed.
@quotation NOTE
@@ -31432,7 +31442,7 @@ Scalar values in @command{awk} are either numbers or strings. The
indicates what is in the @code{union}.
Representing numbers is easy---the API uses a C @code{double}. Strings
-require more work. Since @command{gawk} allows embedded @sc{nul} bytes
+require more work. Since @command{gawk} allows embedded @value{NUL} bytes
in string values, a string must be represented as a pair containing a
data-pointer and length. This is the @code{awk_string_t} type.
@@ -38678,7 +38688,7 @@ the derived files, because that keeps the repository less cluttered,
and it is easier to see the substantive changes when comparing versions
and trying to understand what changed between commits.
-However, there are two reasons why the @command{gawk} maintainer
+However, there are several reasons why the @command{gawk} maintainer
likes to have everything in the repository.
First, because it is then easy to reproduce any given version completely,
@@ -38747,6 +38757,14 @@ the maintainer is no different than Jane User who wants to try to build
Thus, the maintainer thinks that it's not just important, but critical,
that for any given branch, the above incantation @emph{just works}.
+@c Added 9/2014:
+A third reason to have all the files is that without them, using @samp{git
+bisect} to try to find the commit that introduced a bug is exceedingly
+difficult. The maintainer tried to do that on another project that
+requires running bootstrapping scripts just to create @command{configure}
+and so on; it was really painful. When the repository is self-contained,
+using @command{git bisect} in it is very easy.
+
@c So - that's my reasoning and philosophy.
What are some of the consequences and/or actions to take?
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 679073bf..daa4695c 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -32,11 +32,13 @@
@ifnotdocbook
@set BULLET @bullet{}
@set MINUS @minus{}
+@set NUL @sc{nul}
@end ifnotdocbook
@ifdocbook
@set BULLET
@set MINUS
+@set NUL NUL
@end ifdocbook
@set xref-automatic-section-title
@@ -5105,10 +5107,10 @@ with @samp{A}.
@cindex POSIX @command{awk}, period (@code{.})@comma{} using
In strict POSIX mode (@pxref{Options}),
-@samp{.} does not match the @sc{nul}
+@samp{.} does not match the @value{NUL}
character, which is a character with all bits equal to zero.
-Otherwise, @sc{nul} is just another character. Other versions of @command{awk}
-may not be able to match the @sc{nul} character.
+Otherwise, @value{NUL} is just another character. Other versions of @command{awk}
+may not be able to match the @value{NUL} character.
@cindex @code{[]} (square brackets), regexp operator
@cindex square brackets (@code{[]}), regexp operator
@@ -6208,7 +6210,7 @@ a value that you know doesn't occur in the input file. This is hard
to do in a general way, such that a program always works for arbitrary
input files.
-You might think that for text files, the @sc{nul} character, which
+You might think that for text files, the @value{NUL} character, which
consists of a character with all bits equal to zero, is a good
value to use for @code{RS} in this case:
@@ -6217,23 +6219,23 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@end example
@cindex differences in @command{awk} and @command{gawk}, strings, storing
-@command{gawk} in fact accepts this, and uses the @sc{nul}
+@command{gawk} in fact accepts this, and uses the @value{NUL}
character for the record separator.
This works for certain special files, such as @file{/proc/environ} on
-GNU/Linux systems, where the @sc{nul} character is in fact the record separator.
+GNU/Linux systems, where the @value{NUL} character is in fact the record separator.
However, this usage is @emph{not} portable
to most other @command{awk} implementations.
@cindex dark corner, strings, storing
Almost all other @command{awk} implementations@footnote{At least that we know
about.} store strings internally as C-style strings. C strings use the
-@sc{nul} character as the string terminator. In effect, this means that
+@value{NUL} character as the string terminator. In effect, this means that
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
-It happens that recent versions of @command{mawk} can use the @sc{nul}
+It happens that recent versions of @command{mawk} can use the @value{NUL}
character as a record separator. However, this is a special case:
-@command{mawk} does not allow embedded @sc{nul} characters in strings.
+@command{mawk} does not allow embedded @value{NUL} characters in strings.
@cindex records, treating files as
@cindex treating files, as single records
@@ -9927,7 +9929,7 @@ double-quotation marks. For example:
@cindex strings, length limitations
represents the string whose contents are @samp{parrot}. Strings in
@command{gawk} can be of any length, and they can contain any of the possible
-eight-bit ASCII characters including ASCII @sc{nul} (character code zero).
+eight-bit ASCII characters including ASCII @value{NUL} (character code zero).
Other @command{awk}
implementations may have difficulty with some character codes.
@@ -10182,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
@@ -13462,9 +13468,8 @@ the beginning, in the following manner:
@example
NF != 4 @{
- err = sprintf("%s:%d: skipped: NF != 4\n", FILENAME, FNR)
- print err > "/dev/stderr"
- next
+ printf("%s:%d: skipped: NF != 4\n", FILENAME, FNR) > "/dev/stderr"
+ next
@}
@end example
@@ -14106,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"
@@ -18319,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.
@@ -19659,8 +19669,8 @@ function mystrtonum(str, ret, n, i, k, c)
ret = 0
for (i = 1; i <= n; i++) @{
c = substr(str, i, 1)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("1234567", c)
ret = ret * 8 + k
@@ -19673,8 +19683,8 @@ function mystrtonum(str, ret, n, i, k, c)
for (i = 1; i <= n; i++) @{
c = substr(str, i, 1)
c = tolower(c)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("123456789abcdef", c)
ret = ret * 16 + k
@@ -30398,7 +30408,7 @@ and is managed by @command{gawk} from then on.
The API defines several simple @code{struct}s that map values as seen
from @command{awk}. A value can be a @code{double}, a string, or an
array (as in multidimensional arrays, or when creating a new array).
-String values maintain both pointer and length since embedded @sc{nul}
+String values maintain both pointer and length since embedded @value{NUL}
characters are allowed.
@quotation NOTE
@@ -30530,7 +30540,7 @@ Scalar values in @command{awk} are either numbers or strings. The
indicates what is in the @code{union}.
Representing numbers is easy---the API uses a C @code{double}. Strings
-require more work. Since @command{gawk} allows embedded @sc{nul} bytes
+require more work. Since @command{gawk} allows embedded @value{NUL} bytes
in string values, a string must be represented as a pair containing a
data-pointer and length. This is the @code{awk_string_t} type.
@@ -37776,7 +37786,7 @@ the derived files, because that keeps the repository less cluttered,
and it is easier to see the substantive changes when comparing versions
and trying to understand what changed between commits.
-However, there are two reasons why the @command{gawk} maintainer
+However, there are several reasons why the @command{gawk} maintainer
likes to have everything in the repository.
First, because it is then easy to reproduce any given version completely,
@@ -37845,6 +37855,14 @@ the maintainer is no different than Jane User who wants to try to build
Thus, the maintainer thinks that it's not just important, but critical,
that for any given branch, the above incantation @emph{just works}.
+@c Added 9/2014:
+A third reason to have all the files is that without them, using @samp{git
+bisect} to try to find the commit that introduced a bug is exceedingly
+difficult. The maintainer tried to do that on another project that
+requires running bootstrapping scripts just to create @command{configure}
+and so on; it was really painful. When the repository is self-contained,
+using @command{git bisect} in it is very easy.
+
@c So - that's my reasoning and philosophy.
What are some of the consequences and/or actions to take?
diff --git a/eval.c b/eval.c
index f4e1db64..a9ff3b52 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'))))) {
diff --git a/test/ChangeLog b/test/ChangeLog
index 0cd7e5f3..cfe2e9b6 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-13 Stephen Davies <sdavies@sdc.com.au>
+
+ * Makefile.am (profile4, profile5): Changes processing to not delete the
+ first two lines. This is no longer needed.
+ * profile4.ok, profile5.ok: Changed to suit new rules and comments.
+
2014-09-10 Arnold D. Robbins <arnold@skeeve.com>
* profile2.ok, profile4.ok, profile5.ok: Update for new code.