summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-10-28 11:26:15 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-10-28 11:26:15 +0200
commit67dd635c4d3c72c2c3e6ca62482e7ef9c232f3a7 (patch)
tree26e5383fe689b199355ded6e0d553da25505ef54 /command.c
parent38769b3a29111cc309f6ef3ac05f4e5ed4456007 (diff)
parent0d49bc78aa0f761383e4b669dcd83932e2e60dd8 (diff)
downloadgawk-67dd635c4d3c72c2c3e6ca62482e7ef9c232f3a7.tar.gz
Merge branch 'gawk-4.0-stable'.
Diffstat (limited to 'command.c')
-rw-r--r--command.c205
1 files changed, 108 insertions, 97 deletions
diff --git a/command.c b/command.c
index 5334978d..f04eead8 100644
--- a/command.c
+++ b/command.c
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 2.6.2. */
+/* A Bison parser, made by GNU Bison 2.6.4. */
/* Bison implementation for Yacc-like parsers in C
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.6.2"
+#define YYBISON_VERSION "2.6.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -69,7 +69,7 @@
#define yynerrs zznerrs
/* Copy the first part of user declarations. */
-/* Line 336 of yacc.c */
+/* Line 358 of yacc.c */
#line 26 "command.y"
#include "awk.h"
@@ -137,7 +137,7 @@ static void append_cmdarg(CMDARG *arg);
static int find_argument(CMDARG *arg);
#define YYSTYPE CMDARG *
-/* Line 336 of yacc.c */
+/* Line 358 of yacc.c */
#line 142 "command.c"
# ifndef YY_NULL
@@ -156,10 +156,7 @@ static int find_argument(CMDARG *arg);
# define YYERROR_VERBOSE 0
#endif
-/* In a future release of Bison, this section will be replaced
- by #include "". */
-#ifndef ZZ_
-# define ZZ_
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -295,12 +292,12 @@ int zzparse ();
#endif
#endif /* ! YYPARSE_PARAM */
-#endif /* !ZZ_ */
+
/* Copy the second part of user declarations. */
-/* Line 353 of yacc.c */
-#line 304 "command.c"
+/* Line 377 of yacc.c */
+#line 301 "command.c"
#ifdef short
# undef short
@@ -353,24 +350,24 @@ typedef short int yytype_int16;
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
# endif
# endif
# ifndef YY_
-# define YY_(msgid) msgid
+# define YY_(Msgid) Msgid
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
#else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
#endif
/* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint
-# define YYID(n) (n)
+# define YYID(N) (N)
#else
#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
static int
@@ -851,10 +848,10 @@ static const yytype_int16 yytable[] =
0, 0, 0, 45
};
-#define yypact_value_is_default(yystate) \
- ((yystate) == (-151))
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-151)))
-#define yytable_value_is_error(yytable_value) \
+#define yytable_value_is_error(Yytable_value) \
YYID (0)
static const yytype_int16 yycheck[] =
@@ -1451,6 +1448,15 @@ yydestruct (yymsg, yytype, yyvaluep)
/* The lookahead symbol. */
int yychar;
+
+#ifndef YYLVAL_INITIALIZE
+# define YYLVAL_INITIALIZE()
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
@@ -1508,7 +1514,7 @@ yyparse ()
int yyn;
int yyresult;
/* Lookahead token as an internal (translated) token number. */
- int yytoken;
+ int yytoken = 0;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
@@ -1526,7 +1532,6 @@ yyparse ()
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
yyss = yyssa;
yyvs = yyvsa;
yystacksize = YYINITDEPTH;
@@ -1544,6 +1549,8 @@ yyparse ()
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
+
+ YYLVAL_INITIALIZE ();
goto yysetstate;
/*------------------------------------------------------------.
@@ -1684,7 +1691,9 @@ yybackup:
yychar = YYEMPTY;
yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
goto yynewstate;
@@ -1721,7 +1730,7 @@ yyreduce:
switch (yyn)
{
case 3:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 109 "command.y"
{
cmd_idx = -1;
@@ -1740,7 +1749,7 @@ yyreduce:
break;
case 5:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 128 "command.y"
{
if (errcount == 0 && cmd_idx >= 0) {
@@ -1794,7 +1803,7 @@ yyreduce:
break;
case 6:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 178 "command.y"
{
yyerrok;
@@ -1802,13 +1811,13 @@ yyreduce:
break;
case 22:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 212 "command.y"
{ want_nodeval = true; }
break;
case 23:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 217 "command.y"
{
if (errcount == 0) {
@@ -1828,7 +1837,7 @@ yyreduce:
break;
case 24:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 236 "command.y"
{
(yyval) = append_statement(arg_list, (char *) start_EVAL);
@@ -1840,13 +1849,13 @@ yyreduce:
break;
case 25:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 243 "command.y"
{ (yyval) = append_statement((yyvsp[(1) - (2)]), lexptr_begin); }
break;
case 26:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 244 "command.y"
{
(yyval) = (yyvsp[(3) - (4)]);
@@ -1854,7 +1863,7 @@ yyreduce:
break;
case 27:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 251 "command.y"
{
arg_list = append_statement((yyvsp[(2) - (3)]), (char *) end_EVAL);
@@ -1874,7 +1883,7 @@ yyreduce:
break;
case 28:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 267 "command.y"
{
NODE *n;
@@ -1889,7 +1898,7 @@ yyreduce:
break;
case 34:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 286 "command.y"
{
if (cmdtab[cmd_idx].class == D_FRAME
@@ -1899,7 +1908,7 @@ yyreduce:
break;
case 35:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 292 "command.y"
{
int idx = find_argument((yyvsp[(2) - (2)]));
@@ -1915,43 +1924,43 @@ yyreduce:
break;
case 38:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 305 "command.y"
{ want_nodeval = true; }
break;
case 40:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 306 "command.y"
{ want_nodeval = true; }
break;
case 46:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 311 "command.y"
{ want_nodeval = true; }
break;
case 49:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 313 "command.y"
{ want_nodeval = true; }
break;
case 51:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 314 "command.y"
{ want_nodeval = true; }
break;
case 53:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 315 "command.y"
{ want_nodeval = true; }
break;
case 57:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 319 "command.y"
{
if (in_cmd_src((yyvsp[(2) - (2)])->a_string))
@@ -1960,7 +1969,7 @@ yyreduce:
break;
case 58:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 324 "command.y"
{
if (! input_from_tty)
@@ -1969,7 +1978,7 @@ yyreduce:
break;
case 59:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 329 "command.y"
{
int type = 0;
@@ -1999,7 +2008,7 @@ yyreduce:
break;
case 60:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 355 "command.y"
{
if (! in_commands)
@@ -2013,7 +2022,7 @@ yyreduce:
break;
case 61:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 365 "command.y"
{
if (! in_commands)
@@ -2022,7 +2031,7 @@ yyreduce:
break;
case 62:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 370 "command.y"
{
int idx = find_argument((yyvsp[(2) - (2)]));
@@ -2038,13 +2047,13 @@ yyreduce:
break;
case 63:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 381 "command.y"
{ want_nodeval = true; }
break;
case 64:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 382 "command.y"
{
int type;
@@ -2056,7 +2065,7 @@ yyreduce:
break;
case 65:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 390 "command.y"
{
if (in_commands) {
@@ -2071,7 +2080,7 @@ yyreduce:
break;
case 66:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 404 "command.y"
{
if ((yyvsp[(1) - (1)]) != NULL) {
@@ -2085,37 +2094,37 @@ yyreduce:
break;
case 68:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 418 "command.y"
{ (yyval) = NULL; }
break;
case 69:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 423 "command.y"
{ (yyval) = NULL; }
break;
case 74:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 432 "command.y"
{ (yyval) = NULL; }
break;
case 75:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 437 "command.y"
{ (yyval) = NULL; }
break;
case 77:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 440 "command.y"
{ (yyval) = NULL; }
break;
case 78:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 445 "command.y"
{
NODE *n;
@@ -2126,13 +2135,13 @@ yyreduce:
break;
case 79:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 455 "command.y"
{ (yyval) = NULL; }
break;
case 80:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 457 "command.y"
{
if (find_option((yyvsp[(1) - (1)])->a_string) < 0)
@@ -2141,7 +2150,7 @@ yyreduce:
break;
case 81:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 462 "command.y"
{
if (find_option((yyvsp[(1) - (3)])->a_string) < 0)
@@ -2150,7 +2159,7 @@ yyreduce:
break;
case 82:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 470 "command.y"
{
NODE *n;
@@ -2167,49 +2176,49 @@ yyreduce:
break;
case 83:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 486 "command.y"
{ (yyval) = NULL; }
break;
case 88:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 495 "command.y"
{ (yyval) = NULL; }
break;
case 89:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 496 "command.y"
{ want_nodeval = true; }
break;
case 92:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 498 "command.y"
{ want_nodeval = true; }
break;
case 95:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 504 "command.y"
{ (yyval) = NULL; }
break;
case 97:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 510 "command.y"
{ (yyval) = NULL; }
break;
case 99:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 516 "command.y"
{ (yyval) = NULL; }
break;
case 104:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 528 "command.y"
{
int idx = find_argument((yyvsp[(1) - (2)]));
@@ -2225,7 +2234,7 @@ yyreduce:
break;
case 106:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 544 "command.y"
{
(yyvsp[(2) - (2)])->type = D_array; /* dump all items */
@@ -2234,7 +2243,7 @@ yyreduce:
break;
case 107:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 549 "command.y"
{
(yyvsp[(2) - (3)])->type = D_array;
@@ -2243,19 +2252,19 @@ yyreduce:
break;
case 117:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 575 "command.y"
{ (yyval) = NULL; }
break;
case 118:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 577 "command.y"
{ (yyval) = NULL; }
break;
case 119:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 579 "command.y"
{
CMDARG *a;
@@ -2266,7 +2275,7 @@ yyreduce:
break;
case 126:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 595 "command.y"
{
if ((yyvsp[(1) - (3)])->a_int > (yyvsp[(3) - (3)])->a_int)
@@ -2279,25 +2288,25 @@ yyreduce:
break;
case 127:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 607 "command.y"
{ (yyval) = NULL; }
break;
case 134:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 621 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 135:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 623 "command.y"
{ (yyval) = (yyvsp[(1) - (3)]); }
break;
case 137:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 629 "command.y"
{
CMDARG *a;
@@ -2316,19 +2325,19 @@ yyreduce:
break;
case 139:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 648 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); num_dim = 1; }
break;
case 140:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 650 "command.y"
{ (yyval) = (yyvsp[(1) - (2)]); num_dim++; }
break;
case 142:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 656 "command.y"
{
NODE *n = (yyvsp[(2) - (2)])->a_node;
@@ -2341,7 +2350,7 @@ yyreduce:
break;
case 143:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 665 "command.y"
{
/* a_string is array name, a_count is dimension count */
@@ -2352,13 +2361,13 @@ yyreduce:
break;
case 144:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 675 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 145:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 677 "command.y"
{
NODE *n = (yyvsp[(2) - (2)])->a_node;
@@ -2369,7 +2378,7 @@ yyreduce:
break;
case 146:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 684 "command.y"
{
NODE *n = (yyvsp[(2) - (2)])->a_node;
@@ -2382,31 +2391,31 @@ yyreduce:
break;
case 147:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 696 "command.y"
{ (yyval) = NULL; }
break;
case 148:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 698 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 149:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 703 "command.y"
{ (yyval) = NULL; }
break;
case 150:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 705 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 151:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 710 "command.y"
{
if ((yyvsp[(1) - (1)])->a_int == 0)
@@ -2416,7 +2425,7 @@ yyreduce:
break;
case 152:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 716 "command.y"
{
if ((yyvsp[(2) - (2)])->a_int == 0)
@@ -2426,19 +2435,19 @@ yyreduce:
break;
case 153:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 725 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 154:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 727 "command.y"
{ (yyval) = (yyvsp[(2) - (2)]); }
break;
case 155:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 729 "command.y"
{
(yyvsp[(2) - (2)])->a_int = - (yyvsp[(2) - (2)])->a_int;
@@ -2447,7 +2456,7 @@ yyreduce:
break;
case 156:
-/* Line 1787 of yacc.c */
+/* Line 1813 of yacc.c */
#line 737 "command.y"
{
if (lexptr_begin != NULL) {
@@ -2460,8 +2469,8 @@ yyreduce:
break;
-/* Line 1787 of yacc.c */
-#line 2477 "command.c"
+/* Line 1813 of yacc.c */
+#line 2486 "command.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2624,7 +2633,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */
@@ -2690,7 +2701,7 @@ yyreturn:
}
-/* Line 2048 of yacc.c */
+/* Line 2076 of yacc.c */
#line 747 "command.y"