-/* A Bison parser, made by GNU Bison 2.0. */
+/* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
/* Identify Bison output. */
#define YYBISON 1
+/* Bison version. */
+#define YYBISON_VERSION "2.1"
+
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
- LISTDISK = 258,
- SETHOST = 259,
- SETDISK = 260,
- SETDATE = 261,
- SETTAPE = 262,
- SETMODE = 263,
- CD = 264,
- CDX = 265,
- QUIT = 266,
- DHIST = 267,
- LS = 268,
- ADD = 269,
- ADDX = 270,
- EXTRACT = 271,
- LIST = 272,
- DELETE = 273,
- DELETEX = 274,
- PWD = 275,
- CLEAR = 276,
- HELP = 277,
- LCD = 278,
- LPWD = 279,
- MODE = 280,
- SMB = 281,
- TAR = 282,
- PATH = 283,
- DATE = 284
+ LISTHOST = 258,
+ LISTDISK = 259,
+ SETHOST = 260,
+ SETDISK = 261,
+ SETDATE = 262,
+ SETTAPE = 263,
+ SETMODE = 264,
+ CD = 265,
+ CDX = 266,
+ QUIT = 267,
+ DHIST = 268,
+ LS = 269,
+ ADD = 270,
+ ADDX = 271,
+ EXTRACT = 272,
+ LIST = 273,
+ DELETE = 274,
+ DELETEX = 275,
+ PWD = 276,
+ CLEAR = 277,
+ HELP = 278,
+ LCD = 279,
+ LPWD = 280,
+ MODE = 281,
+ SMB = 282,
+ TAR = 283,
+ PATH = 284,
+ DATE = 285
};
#endif
-#define LISTDISK 258
-#define SETHOST 259
-#define SETDISK 260
-#define SETDATE 261
-#define SETTAPE 262
-#define SETMODE 263
-#define CD 264
-#define CDX 265
-#define QUIT 266
-#define DHIST 267
-#define LS 268
-#define ADD 269
-#define ADDX 270
-#define EXTRACT 271
-#define LIST 272
-#define DELETE 273
-#define DELETEX 274
-#define PWD 275
-#define CLEAR 276
-#define HELP 277
-#define LCD 278
-#define LPWD 279
-#define MODE 280
-#define SMB 281
-#define TAR 282
-#define PATH 283
-#define DATE 284
+/* Tokens. */
+#define LISTHOST 258
+#define LISTDISK 259
+#define SETHOST 260
+#define SETDISK 261
+#define SETDATE 262
+#define SETTAPE 263
+#define SETMODE 264
+#define CD 265
+#define CDX 266
+#define QUIT 267
+#define DHIST 268
+#define LS 269
+#define ADD 270
+#define ADDX 271
+#define EXTRACT 272
+#define LIST 273
+#define DELETE 274
+#define DELETEX 275
+#define PWD 276
+#define CLEAR 277
+#define HELP 278
+#define LCD 279
+#define LPWD 280
+#define MODE 281
+#define SMB 282
+#define TAR 283
+#define PATH 284
+#define DATE 285
#include "amanda.h"
#include "amrecover.h"
-void yyerror P((char *s));
-extern int yylex P((void));
+void yyerror(char *s);
+extern int yylex(void);
+extern char * yytext;
+
/* Enabling traces. */
# define YYERROR_VERBOSE 0
#endif
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 40 "uparse.y"
+#line 42 "uparse.y"
typedef union YYSTYPE {
- int intval;
- double floatval;
- char *strval;
- int subtok;
+ int intval;
+ double floatval;
+ char * strval;
+ int subtok;
} YYSTYPE;
-/* Line 190 of yacc.c. */
-#line 149 "uparse.c"
+/* Line 196 of yacc.c. */
+#line 162 "uparse.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
/* Copy the second part of user declarations. */
-/* Line 213 of yacc.c. */
-#line 161 "uparse.c"
+/* Line 219 of yacc.c. */
+#line 174 "uparse.c"
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
-# ifndef YYFREE
-# define YYFREE free
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
+# ifndef YY_
+# define YY_(msgid) msgid
# endif
+#endif
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
# define YYSTACK_ALLOC __builtin_alloca
# else
# define YYSTACK_ALLOC alloca
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYINCLUDED_STDLIB_H
+# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# else
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
# endif
+# else
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
+# endif
+# ifdef __cplusplus
+extern "C" {
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifdef __cplusplus
+}
+# endif
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 54
+#define YYFINAL 55
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 44
+#define YYLAST 45
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 30
+#define YYNTOKENS 31
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 16
/* YYNRULES -- Number of rules. */
-#define YYNRULES 47
+#define YYNRULES 49
/* YYNRULES -- Number of states. */
-#define YYNSTATES 60
+#define YYNSTATES 61
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 284
+#define YYMAXUTOK 285
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29
+ 25, 26, 27, 28, 29, 30
};
#if YYDEBUG
static const unsigned char yyprhs[] =
{
0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
- 19, 21, 23, 26, 28, 31, 34, 38, 41, 44,
- 46, 49, 52, 55, 58, 60, 62, 65, 67, 69,
- 71, 73, 75, 78, 81, 83, 86, 89, 91, 94,
- 97, 99, 102, 105, 107, 109, 112, 114
+ 19, 21, 23, 24, 26, 29, 31, 34, 37, 41,
+ 44, 47, 49, 52, 55, 58, 61, 63, 65, 68,
+ 70, 72, 74, 76, 78, 81, 84, 86, 89, 92,
+ 94, 97, 100, 102, 105, 108, 110, 112, 115, 117
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yysigned_char yyrhs[] =
{
- 31, 0, -1, 32, -1, 33, -1, 34, -1, 35,
- -1, 37, -1, 39, -1, 41, -1, 43, -1, 44,
- -1, 45, -1, 3, 28, -1, 3, -1, 6, 29,
- -1, 4, 28, -1, 5, 28, 28, -1, 5, 28,
- -1, 7, 28, -1, 7, -1, 9, 28, -1, 10,
- 28, -1, 8, 26, -1, 8, 27, -1, 12, -1,
- 13, -1, 17, 28, -1, 17, -1, 20, -1, 21,
- -1, 25, -1, 11, -1, 14, 36, -1, 36, 28,
- -1, 28, -1, 15, 38, -1, 38, 28, -1, 28,
- -1, 18, 40, -1, 40, 28, -1, 28, -1, 19,
- 42, -1, 42, 28, -1, 28, -1, 24, -1, 23,
- 28, -1, 22, -1, 16, -1
+ 32, 0, -1, 33, -1, 34, -1, 35, -1, 36,
+ -1, 38, -1, 40, -1, 42, -1, 44, -1, 45,
+ -1, 46, -1, -1, 3, -1, 4, 29, -1, 4,
+ -1, 7, 30, -1, 5, 29, -1, 6, 29, 29,
+ -1, 6, 29, -1, 8, 29, -1, 8, -1, 10,
+ 29, -1, 11, 29, -1, 9, 27, -1, 9, 28,
+ -1, 13, -1, 14, -1, 18, 29, -1, 18, -1,
+ 21, -1, 22, -1, 26, -1, 12, -1, 15, 37,
+ -1, 37, 29, -1, 29, -1, 16, 39, -1, 39,
+ 29, -1, 29, -1, 19, 41, -1, 41, 29, -1,
+ 29, -1, 20, 43, -1, 43, 29, -1, 29, -1,
+ 25, -1, 24, 29, -1, 23, -1, 17, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned char yyrline[] =
{
- 0, 63, 63, 64, 65, 66, 67, 68, 69, 70,
- 71, 72, 76, 77, 78, 79, 80, 81, 82, 83,
- 84, 85, 86, 91, 99, 100, 101, 102, 103, 104,
- 105, 109, 113, 117, 118, 122, 126, 127, 131, 135,
- 136, 140, 144, 145, 149, 150, 159, 163
+ 0, 65, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 100, 108, 109, 110, 111,
+ 112, 113, 114, 118, 122, 126, 127, 131, 135, 136,
+ 140, 144, 145, 149, 153, 154, 158, 159, 168, 172
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "LISTDISK", "SETHOST", "SETDISK",
- "SETDATE", "SETTAPE", "SETMODE", "CD", "CDX", "QUIT", "DHIST", "LS",
- "ADD", "ADDX", "EXTRACT", "LIST", "DELETE", "DELETEX", "PWD", "CLEAR",
- "HELP", "LCD", "LPWD", "MODE", "SMB", "TAR", "PATH", "DATE", "$accept",
- "ucommand", "set_command", "display_command", "quit_command",
+ "$end", "error", "$undefined", "LISTHOST", "LISTDISK", "SETHOST",
+ "SETDISK", "SETDATE", "SETTAPE", "SETMODE", "CD", "CDX", "QUIT", "DHIST",
+ "LS", "ADD", "ADDX", "EXTRACT", "LIST", "DELETE", "DELETEX", "PWD",
+ "CLEAR", "HELP", "LCD", "LPWD", "MODE", "SMB", "TAR", "PATH", "DATE",
+ "$accept", "ucommand", "set_command", "display_command", "quit_command",
"add_command", "add_path", "addx_command", "addx_path", "delete_command",
"delete_path", "deletex_command", "deletex_path", "local_command",
"help_command", "extract_command", 0
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278, 279, 280, 281, 282, 283, 284
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const unsigned char yyr1[] =
{
- 0, 30, 31, 31, 31, 31, 31, 31, 31, 31,
- 31, 31, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 33, 33, 33, 33, 33, 33,
- 33, 34, 35, 36, 36, 37, 38, 38, 39, 40,
- 40, 41, 42, 42, 43, 43, 44, 45
+ 0, 31, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 34, 34, 34, 34,
+ 34, 34, 34, 35, 36, 37, 37, 38, 39, 39,
+ 40, 41, 41, 42, 43, 43, 44, 44, 45, 46
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const unsigned char yyr2[] =
{
0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 1, 2, 2, 3, 2, 2, 1,
- 2, 2, 2, 2, 1, 1, 2, 1, 1, 1,
- 1, 1, 2, 2, 1, 2, 2, 1, 2, 2,
- 1, 2, 2, 1, 1, 2, 1, 1
+ 1, 1, 0, 1, 2, 1, 2, 2, 3, 2,
+ 2, 1, 2, 2, 2, 2, 1, 1, 2, 1,
+ 1, 1, 1, 1, 2, 2, 1, 2, 2, 1,
+ 2, 2, 1, 2, 2, 1, 1, 2, 1, 1
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
means the default is an error. */
static const unsigned char yydefact[] =
{
- 0, 13, 0, 0, 0, 19, 0, 0, 0, 31,
- 24, 25, 0, 0, 47, 27, 0, 0, 28, 29,
- 46, 0, 44, 30, 0, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 15, 17, 14, 18,
- 22, 23, 20, 21, 34, 32, 37, 35, 26, 40,
- 38, 43, 41, 45, 1, 16, 33, 36, 39, 42
+ 12, 13, 15, 0, 0, 0, 21, 0, 0, 0,
+ 33, 26, 27, 0, 0, 49, 29, 0, 0, 30,
+ 31, 48, 0, 46, 32, 0, 2, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 14, 17, 19, 16,
+ 20, 24, 25, 22, 23, 36, 34, 39, 37, 28,
+ 42, 40, 45, 43, 47, 1, 18, 35, 38, 41,
+ 44
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yysigned_char yydefgoto[] =
{
- -1, 24, 25, 26, 27, 28, 45, 29, 47, 30,
- 50, 31, 52, 32, 33, 34
+ -1, 25, 26, 27, 28, 29, 46, 30, 48, 31,
+ 51, 32, 53, 33, 34, 35
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
#define YYPACT_NINF -6
static const yysigned_char yypact[] =
{
- -3, -5, -1, 0, 1, 3, -2, 4, 5, -6,
- -6, -6, 6, 7, -6, 8, 9, 10, -6, -6,
- -6, 11, -6, -6, 26, -6, -6, -6, -6, -6,
- -6, -6, -6, -6, -6, -6, -6, 12, -6, -6,
- -6, -6, -6, -6, -6, 13, -6, 14, -6, -6,
- 15, -6, 16, -6, -6, -6, -6, -6, -6, -6
+ -3, -6, -5, -1, 0, 1, 3, -2, 4, 5,
+ -6, -6, -6, 6, 7, -6, 8, 9, 10, -6,
+ -6, -6, 11, -6, -6, 27, -6, -6, -6, -6,
+ -6, -6, -6, -6, -6, -6, -6, -6, 12, -6,
+ -6, -6, -6, -6, -6, -6, 13, -6, 14, -6,
+ -6, 15, -6, 16, -6, -6, -6, -6, -6, -6,
+ -6
};
/* YYPGOTO[NTERM-NUM]. */
{
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 35, 40, 41, 54, 36, 37, 0,
- 38, 39, 42, 43, 44, 46, 48, 49, 51, 53,
- 55, 56, 57, 58, 59
+ 21, 22, 23, 24, 36, 41, 42, 55, 37, 38,
+ 0, 39, 40, 43, 44, 45, 47, 49, 50, 52,
+ 54, 56, 57, 58, 59, 60
};
static const yysigned_char yycheck[] =
{
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 28, 26, 27, 0, 28, 28, -1,
- 29, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28
+ 23, 24, 25, 26, 29, 27, 28, 0, 29, 29,
+ -1, 30, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
{
0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 31, 32, 33, 34, 35, 37,
- 39, 41, 43, 44, 45, 28, 28, 28, 29, 28,
- 26, 27, 28, 28, 28, 36, 28, 38, 28, 28,
- 40, 28, 42, 28, 0, 28, 28, 28, 28, 28
+ 22, 23, 24, 25, 26, 32, 33, 34, 35, 36,
+ 38, 40, 42, 44, 45, 46, 29, 29, 29, 30,
+ 29, 27, 28, 29, 29, 29, 37, 29, 39, 29,
+ 29, 41, 29, 43, 29, 0, 29, 29, 29, 29,
+ 29
};
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
goto yybackup; \
} \
else \
- { \
- yyerror ("syntax error: cannot back up");\
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
- yysymprint (stderr, \
+ yysymprint (stderr, \
Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
#endif
{
int yyi;
- unsigned int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
yyrule - 1, yylno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
}
# define YY_REDUCE_PRINT(Rule) \
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#ifndef YYMAXDEPTH
const char *yystr;
# endif
{
- register const char *yys = yystr;
+ const char *yys = yystr;
while (*yys++ != '\0')
continue;
const char *yysrc;
# endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
# endif
# endif
-#endif /* !YYERROR_VERBOSE */
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ size_t yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+#endif /* YYERROR_VERBOSE */
\f
#endif
{
- register int yystate;
- register int yyn;
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The state stack. */
short int yyssa[YYINITDEPTH];
short int *yyss = yyssa;
- register short int *yyssp;
+ short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
yyssp = yyss;
yyvsp = yyvs;
-
- yyvsp[0] = yylval;
-
goto yysetstate;
/*------------------------------------------------------------.
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
- yyoverflow ("parser stack overflow",
+ yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
switch (yyn)
{
case 12:
-#line 76 "uparse.y"
- { list_disk((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
+#line 75 "uparse.y"
+ {
+ char * errstr = vstralloc("Invalid command: ", yytext, NULL);
+ yyerror(errstr);
+ amfree(errstr);
+ YYERROR;
+ }
break;
case 13:
-#line 77 "uparse.y"
- { list_disk(NULL); }
+#line 84 "uparse.y"
+ { list_host(); }
break;
case 14:
-#line 78 "uparse.y"
- { set_date((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
+#line 85 "uparse.y"
+ { list_disk((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
case 15:
-#line 79 "uparse.y"
- { set_host((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
+#line 86 "uparse.y"
+ { list_disk(NULL); }
break;
case 16:
-#line 80 "uparse.y"
- { set_disk((yyvsp[-1].strval), (yyvsp[0].strval)); amfree((yyvsp[-1].strval)); amfree((yyvsp[0].strval)); }
+#line 87 "uparse.y"
+ { set_date((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
case 17:
-#line 81 "uparse.y"
- { set_disk((yyvsp[0].strval), NULL); amfree((yyvsp[0].strval)); }
+#line 88 "uparse.y"
+ { set_host((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
case 18:
-#line 82 "uparse.y"
- { set_tape((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
+#line 89 "uparse.y"
+ { set_disk((yyvsp[-1].strval), (yyvsp[0].strval)); amfree((yyvsp[-1].strval)); amfree((yyvsp[0].strval)); }
break;
case 19:
-#line 83 "uparse.y"
- { set_tape(""); }
+#line 90 "uparse.y"
+ { set_disk((yyvsp[0].strval), NULL); amfree((yyvsp[0].strval)); }
break;
case 20:
-#line 84 "uparse.y"
- { cd_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
+#line 91 "uparse.y"
+ { set_tape((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
case 21:
-#line 85 "uparse.y"
- { cd_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
+#line 92 "uparse.y"
+ { set_tape(""); }
break;
case 22:
-#line 86 "uparse.y"
+#line 93 "uparse.y"
+ { cd_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
+ break;
+
+ case 23:
+#line 94 "uparse.y"
+ { cd_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
+ break;
+
+ case 24:
+#line 95 "uparse.y"
{
#ifdef SAMBA_CLIENT
set_mode(SAMBA_SMBCLIENT);
}
break;
- case 23:
-#line 91 "uparse.y"
+ case 25:
+#line 100 "uparse.y"
{
#ifdef SAMBA_CLIENT
set_mode(SAMBA_TAR);
}
break;
- case 24:
-#line 99 "uparse.y"
+ case 26:
+#line 108 "uparse.y"
{ list_disk_history(); }
break;
- case 25:
-#line 100 "uparse.y"
+ case 27:
+#line 109 "uparse.y"
{ list_directory(); }
break;
- case 26:
-#line 101 "uparse.y"
+ case 28:
+#line 110 "uparse.y"
{ display_extract_list((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
- case 27:
-#line 102 "uparse.y"
+ case 29:
+#line 111 "uparse.y"
{ display_extract_list(NULL); }
break;
- case 28:
-#line 103 "uparse.y"
+ case 30:
+#line 112 "uparse.y"
{ show_directory(); }
break;
- case 29:
-#line 104 "uparse.y"
+ case 31:
+#line 113 "uparse.y"
{ clear_extract_list(); }
break;
- case 30:
-#line 105 "uparse.y"
+ case 32:
+#line 114 "uparse.y"
{ show_mode (); }
break;
- case 31:
-#line 109 "uparse.y"
+ case 33:
+#line 118 "uparse.y"
{ quit(); }
break;
- case 33:
-#line 117 "uparse.y"
+ case 35:
+#line 126 "uparse.y"
{ add_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
- case 34:
-#line 118 "uparse.y"
+ case 36:
+#line 127 "uparse.y"
{ add_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
- case 36:
-#line 126 "uparse.y"
+ case 38:
+#line 135 "uparse.y"
{ add_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
- case 37:
-#line 127 "uparse.y"
+ case 39:
+#line 136 "uparse.y"
{ add_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
- case 39:
-#line 135 "uparse.y"
+ case 41:
+#line 144 "uparse.y"
{ delete_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
- case 40:
-#line 136 "uparse.y"
+ case 42:
+#line 145 "uparse.y"
{ delete_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
- case 42:
-#line 144 "uparse.y"
+ case 44:
+#line 153 "uparse.y"
{ delete_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
- case 43:
-#line 145 "uparse.y"
+ case 45:
+#line 154 "uparse.y"
{ delete_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
break;
- case 44:
-#line 149 "uparse.y"
+ case 46:
+#line 158 "uparse.y"
{ char buf[STR_SIZE]; puts(getcwd(buf, sizeof(buf))); }
break;
- case 45:
-#line 150 "uparse.y"
+ case 47:
+#line 159 "uparse.y"
{
if (chdir((yyvsp[0].strval)) == -1) {
perror((yyvsp[0].strval));
}
break;
- case 46:
-#line 159 "uparse.y"
+ case 48:
+#line 168 "uparse.y"
{ help_list(); }
break;
- case 47:
-#line 163 "uparse.y"
+ case 49:
+#line 172 "uparse.y"
{ extract_files(); }
break;
+ default: break;
}
-/* Line 1037 of yacc.c. */
-#line 1291 "uparse.c"
+/* Line 1126 of yacc.c. */
+#line 1402 "uparse.c"
\f
yyvsp -= yylen;
yyssp -= yylen;
if (YYPACT_NINF < yyn && yyn < YYLAST)
{
- YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar);
- const char* yyprefix;
- char *yymsg;
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ char *yymsg = 0;
+# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyx;
+#if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+#endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 0;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
- yyprefix = ", expecting ";
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
- yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
- yycount += 1;
- if (yycount == 5)
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
- yysize = 0;
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
break;
}
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
}
- yysize += (sizeof ("syntax error, unexpected ")
- + yystrlen (yytname[yytype]));
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg != 0)
- {
- char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
- yyp = yystpcpy (yyp, yytname[yytype]);
- if (yycount < 5)
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+
+ if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyf))
{
- yyprefix = ", expecting ";
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- yyp = yystpcpy (yyp, yyprefix);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yyprefix = " or ";
- }
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
- yyerror ("syntax error; also virtual memory exhausted");
+ {
+ yyerror (YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
}
else
#endif /* YYERROR_VERBOSE */
- yyerror ("syntax error");
+ yyerror (YY_("syntax error"));
}
if (yychar <= YYEOF)
{
- /* If at end of input, pop the error token,
- then the rest of the stack, then return failure. */
+ /* Return failure if at end of input. */
if (yychar == YYEOF)
- for (;;)
- {
-
- YYPOPSTACK;
- if (yyssp == yyss)
- YYABORT;
- yydestruct ("Error: popping",
- yystos[*yyssp], yyvsp);
- }
+ YYABORT;
}
else
{
`---------------------------------------------------*/
yyerrorlab:
-#ifdef __GNUC__
- /* Pacify GCC when the user code never invokes YYERROR and the label
- yyerrorlab therefore never appears in user code. */
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
if (0)
goto yyerrorlab;
-#endif
yyvsp -= yylen;
yyssp -= yylen;
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
- yydestruct ("Error: discarding lookahead",
- yytoken, &yylval);
- yychar = YYEMPTY;
yyresult = 1;
goto yyreturn;
#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here. |
-`----------------------------------------------*/
-yyoverflowlab:
- yyerror ("parser stack overflow");
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
}
-#line 167 "uparse.y"
+#line 176 "uparse.y"
-void yyerror(s)
-char *s;
+void
+yyerror(
+ char * s)
{
- printf("Invalid command - %s\n", s);
+ printf("%s\n", s);
}
-
-