summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-11-10 21:59:20 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-11-10 21:59:20 +0200
commit93b30fe5b9042edc85acde68befaa7c82a4aac95 (patch)
treede3b0b70c5d663cf70717168bf578a42b3de0704 /command.c
parentf8998c45dffcbbd874038f7e19515a504834f3cd (diff)
downloadgawk-93b30fe5b9042edc85acde68befaa7c82a4aac95.tar.gz
Update to bison 2.6.5.
Diffstat (limited to 'command.c')
-rw-r--r--command.c214
1 files changed, 88 insertions, 126 deletions
diff --git a/command.c b/command.c
index a41fafe8..4476273f 100644
--- a/command.c
+++ b/command.c
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 2.6.4. */
+/* A Bison parser, made by GNU Bison 2.6.5. */
/* Bison implementation for Yacc-like parsers in C
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.6.4"
+#define YYBISON_VERSION "2.6.5"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -69,7 +69,7 @@
#define yynerrs zznerrs
/* Copy the first part of user declarations. */
-/* Line 358 of yacc.c */
+/* Line 360 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 358 of yacc.c */
+/* Line 360 of yacc.c */
#line 142 "command.c"
# ifndef YY_NULL
@@ -296,7 +296,7 @@ int zzparse ();
/* Copy the second part of user declarations. */
-/* Line 377 of yacc.c */
+/* Line 379 of yacc.c */
#line 301 "command.c"
#ifdef short
@@ -950,47 +950,18 @@ do \
} \
while (YYID (0))
-
+/* Error token number */
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-
-
/* This macro is provided for backward compatibility. */
-
#ifndef YY_LOCATION_PRINT
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
-
#ifdef YYLEX_PARAM
# define YYLEX yylex (YYLEX_PARAM)
#else
@@ -1449,16 +1420,16 @@ yydestruct (yymsg, yytype, yyvaluep)
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
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
+YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
/* Number of syntax errors so far. */
int yynerrs;
@@ -1532,8 +1503,8 @@ yyparse ()
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yyss = yyssa;
- yyvs = yyvsa;
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1542,15 +1513,6 @@ yyparse ()
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
- yyssp = yyss;
- yyvsp = yyvs;
-
- YYLVAL_INITIALIZE ();
goto yysetstate;
/*------------------------------------------------------------.
@@ -1730,7 +1692,7 @@ yyreduce:
switch (yyn)
{
case 3:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 109 "command.y"
{
cmd_idx = -1;
@@ -1749,7 +1711,7 @@ yyreduce:
break;
case 5:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 128 "command.y"
{
if (errcount == 0 && cmd_idx >= 0) {
@@ -1803,7 +1765,7 @@ yyreduce:
break;
case 6:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 178 "command.y"
{
yyerrok;
@@ -1811,13 +1773,13 @@ yyreduce:
break;
case 22:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 212 "command.y"
{ want_nodeval = TRUE; }
break;
case 23:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 217 "command.y"
{
if (errcount == 0) {
@@ -1837,7 +1799,7 @@ yyreduce:
break;
case 24:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 236 "command.y"
{
(yyval) = append_statement(arg_list, (char *) start_EVAL);
@@ -1849,13 +1811,13 @@ yyreduce:
break;
case 25:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 243 "command.y"
{ (yyval) = append_statement((yyvsp[(1) - (2)]), lexptr_begin); }
break;
case 26:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 244 "command.y"
{
(yyval) = (yyvsp[(3) - (4)]);
@@ -1863,7 +1825,7 @@ yyreduce:
break;
case 27:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 251 "command.y"
{
arg_list = append_statement((yyvsp[(2) - (3)]), (char *) end_EVAL);
@@ -1883,7 +1845,7 @@ yyreduce:
break;
case 28:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 267 "command.y"
{
NODE *n;
@@ -1898,7 +1860,7 @@ yyreduce:
break;
case 34:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 286 "command.y"
{
if (cmdtab[cmd_idx].class == D_FRAME
@@ -1908,7 +1870,7 @@ yyreduce:
break;
case 35:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 292 "command.y"
{
int idx = find_argument((yyvsp[(2) - (2)]));
@@ -1924,43 +1886,43 @@ yyreduce:
break;
case 38:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 305 "command.y"
{ want_nodeval = TRUE; }
break;
case 40:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 306 "command.y"
{ want_nodeval = TRUE; }
break;
case 46:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 311 "command.y"
{ want_nodeval = TRUE; }
break;
case 49:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 313 "command.y"
{ want_nodeval = TRUE; }
break;
case 51:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 314 "command.y"
{ want_nodeval = TRUE; }
break;
case 53:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 315 "command.y"
{ want_nodeval = TRUE; }
break;
case 57:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 319 "command.y"
{
if (in_cmd_src((yyvsp[(2) - (2)])->a_string))
@@ -1969,7 +1931,7 @@ yyreduce:
break;
case 58:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 324 "command.y"
{
if (! input_from_tty)
@@ -1978,7 +1940,7 @@ yyreduce:
break;
case 59:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 329 "command.y"
{
int type = 0;
@@ -2008,7 +1970,7 @@ yyreduce:
break;
case 60:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 355 "command.y"
{
if (! in_commands)
@@ -2022,7 +1984,7 @@ yyreduce:
break;
case 61:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 365 "command.y"
{
if (! in_commands)
@@ -2031,7 +1993,7 @@ yyreduce:
break;
case 62:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 370 "command.y"
{
int idx = find_argument((yyvsp[(2) - (2)]));
@@ -2047,13 +2009,13 @@ yyreduce:
break;
case 63:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 381 "command.y"
{ want_nodeval = TRUE; }
break;
case 64:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 382 "command.y"
{
int type;
@@ -2065,7 +2027,7 @@ yyreduce:
break;
case 65:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 390 "command.y"
{
if (in_commands) {
@@ -2080,7 +2042,7 @@ yyreduce:
break;
case 66:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 404 "command.y"
{
if ((yyvsp[(1) - (1)]) != NULL) {
@@ -2094,37 +2056,37 @@ yyreduce:
break;
case 68:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 418 "command.y"
{ (yyval) = NULL; }
break;
case 69:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 423 "command.y"
{ (yyval) = NULL; }
break;
case 74:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 432 "command.y"
{ (yyval) = NULL; }
break;
case 75:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 437 "command.y"
{ (yyval) = NULL; }
break;
case 77:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 440 "command.y"
{ (yyval) = NULL; }
break;
case 78:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 445 "command.y"
{
NODE *n;
@@ -2135,13 +2097,13 @@ yyreduce:
break;
case 79:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 455 "command.y"
{ (yyval) = NULL; }
break;
case 80:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 457 "command.y"
{
if (find_option((yyvsp[(1) - (1)])->a_string) < 0)
@@ -2150,7 +2112,7 @@ yyreduce:
break;
case 81:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 462 "command.y"
{
if (find_option((yyvsp[(1) - (3)])->a_string) < 0)
@@ -2159,7 +2121,7 @@ yyreduce:
break;
case 82:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 470 "command.y"
{
NODE *n;
@@ -2176,49 +2138,49 @@ yyreduce:
break;
case 83:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 486 "command.y"
{ (yyval) = NULL; }
break;
case 88:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 495 "command.y"
{ (yyval) = NULL; }
break;
case 89:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 496 "command.y"
{ want_nodeval = TRUE; }
break;
case 92:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 498 "command.y"
{ want_nodeval = TRUE; }
break;
case 95:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 504 "command.y"
{ (yyval) = NULL; }
break;
case 97:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 510 "command.y"
{ (yyval) = NULL; }
break;
case 99:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 516 "command.y"
{ (yyval) = NULL; }
break;
case 104:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 528 "command.y"
{
int idx = find_argument((yyvsp[(1) - (2)]));
@@ -2234,7 +2196,7 @@ yyreduce:
break;
case 106:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 544 "command.y"
{
(yyvsp[(2) - (2)])->type = D_array; /* dump all items */
@@ -2243,7 +2205,7 @@ yyreduce:
break;
case 107:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 549 "command.y"
{
(yyvsp[(2) - (3)])->type = D_array;
@@ -2252,19 +2214,19 @@ yyreduce:
break;
case 117:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 575 "command.y"
{ (yyval) = NULL; }
break;
case 118:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 577 "command.y"
{ (yyval) = NULL; }
break;
case 119:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 579 "command.y"
{
CMDARG *a;
@@ -2275,7 +2237,7 @@ yyreduce:
break;
case 126:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 595 "command.y"
{
if ((yyvsp[(1) - (3)])->a_int > (yyvsp[(3) - (3)])->a_int)
@@ -2288,25 +2250,25 @@ yyreduce:
break;
case 127:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 607 "command.y"
{ (yyval) = NULL; }
break;
case 134:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 621 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 135:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 623 "command.y"
{ (yyval) = (yyvsp[(1) - (3)]); }
break;
case 137:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 629 "command.y"
{
CMDARG *a;
@@ -2325,19 +2287,19 @@ yyreduce:
break;
case 139:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 648 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); num_dim = 1; }
break;
case 140:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 650 "command.y"
{ (yyval) = (yyvsp[(1) - (2)]); num_dim++; }
break;
case 142:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 656 "command.y"
{
NODE *n = (yyvsp[(2) - (2)])->a_node;
@@ -2350,7 +2312,7 @@ yyreduce:
break;
case 143:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 665 "command.y"
{
/* a_string is array name, a_count is dimension count */
@@ -2361,13 +2323,13 @@ yyreduce:
break;
case 144:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 675 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 145:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 677 "command.y"
{
NODE *n = (yyvsp[(2) - (2)])->a_node;
@@ -2378,7 +2340,7 @@ yyreduce:
break;
case 146:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 684 "command.y"
{
NODE *n = (yyvsp[(2) - (2)])->a_node;
@@ -2391,31 +2353,31 @@ yyreduce:
break;
case 147:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 696 "command.y"
{ (yyval) = NULL; }
break;
case 148:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 698 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 149:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 703 "command.y"
{ (yyval) = NULL; }
break;
case 150:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 705 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 151:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 710 "command.y"
{
if ((yyvsp[(1) - (1)])->a_int == 0)
@@ -2425,7 +2387,7 @@ yyreduce:
break;
case 152:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 716 "command.y"
{
if ((yyvsp[(2) - (2)])->a_int == 0)
@@ -2435,19 +2397,19 @@ yyreduce:
break;
case 153:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 725 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 154:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 727 "command.y"
{ (yyval) = (yyvsp[(2) - (2)]); }
break;
case 155:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 729 "command.y"
{
(yyvsp[(2) - (2)])->a_int = - (yyvsp[(2) - (2)])->a_int;
@@ -2456,7 +2418,7 @@ yyreduce:
break;
case 156:
-/* Line 1813 of yacc.c */
+/* Line 1778 of yacc.c */
#line 737 "command.y"
{
if (lexptr_begin != NULL) {
@@ -2469,8 +2431,8 @@ yyreduce:
break;
-/* Line 1813 of yacc.c */
-#line 2486 "command.c"
+/* Line 1778 of yacc.c */
+#line 2448 "command.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2701,7 +2663,7 @@ yyreturn:
}
-/* Line 2076 of yacc.c */
+/* Line 2041 of yacc.c */
#line 747 "command.y"