c618a6340b2d563a92e81f7db091f01f8bdde32b
[debian/amanda] / recover-src / uparse.c
1 /* A Bison parser, made by GNU Bison 2.1.  */
2
3 /* Skeleton parser for Yacc-like parsing with Bison,
4    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2, or (at your option)
9    any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 51 Franklin Street, Fifth Floor,
19    Boston, MA 02110-1301, USA.  */
20
21 /* As a special exception, when this file is copied by Bison into a
22    Bison output file, you may use that output file without restriction.
23    This special exception was added by the Free Software Foundation
24    in version 1.24 of Bison.  */
25
26 /* Written by Richard Stallman by simplifying the original so called
27    ``semantic'' parser.  */
28
29 /* All symbols defined below should begin with yy or YY, to avoid
30    infringing on user name space.  This should be done even for local
31    variables, as they might otherwise be expanded by user macros.
32    There are some unavoidable exceptions within include files to
33    define necessary library symbols; they are noted "INFRINGES ON
34    USER NAME SPACE" below.  */
35
36 /* Identify Bison output.  */
37 #define YYBISON 1
38
39 /* Bison version.  */
40 #define YYBISON_VERSION "2.1"
41
42 /* Skeleton name.  */
43 #define YYSKELETON_NAME "yacc.c"
44
45 /* Pure parsers.  */
46 #define YYPURE 0
47
48 /* Using locations.  */
49 #define YYLSP_NEEDED 0
50
51
52
53 /* Tokens.  */
54 #ifndef YYTOKENTYPE
55 # define YYTOKENTYPE
56    /* Put the tokens into the symbol table, so that GDB and other debuggers
57       know about them.  */
58    enum yytokentype {
59      LISTDISK = 258,
60      SETHOST = 259,
61      SETDISK = 260,
62      SETDATE = 261,
63      SETTAPE = 262,
64      SETMODE = 263,
65      CD = 264,
66      CDX = 265,
67      QUIT = 266,
68      DHIST = 267,
69      LS = 268,
70      ADD = 269,
71      ADDX = 270,
72      EXTRACT = 271,
73      LIST = 272,
74      DELETE = 273,
75      DELETEX = 274,
76      PWD = 275,
77      CLEAR = 276,
78      HELP = 277,
79      LCD = 278,
80      LPWD = 279,
81      MODE = 280,
82      SMB = 281,
83      TAR = 282,
84      PATH = 283,
85      DATE = 284
86    };
87 #endif
88 /* Tokens.  */
89 #define LISTDISK 258
90 #define SETHOST 259
91 #define SETDISK 260
92 #define SETDATE 261
93 #define SETTAPE 262
94 #define SETMODE 263
95 #define CD 264
96 #define CDX 265
97 #define QUIT 266
98 #define DHIST 267
99 #define LS 268
100 #define ADD 269
101 #define ADDX 270
102 #define EXTRACT 271
103 #define LIST 272
104 #define DELETE 273
105 #define DELETEX 274
106 #define PWD 275
107 #define CLEAR 276
108 #define HELP 277
109 #define LCD 278
110 #define LPWD 279
111 #define MODE 280
112 #define SMB 281
113 #define TAR 282
114 #define PATH 283
115 #define DATE 284
116
117
118
119
120 /* Copy the first part of user declarations.  */
121 #line 31 "uparse.y"
122
123 #include "amanda.h"
124 #include "amrecover.h"
125
126 void yyerror P((char *s));
127 extern int yylex P((void));
128
129
130 /* Enabling traces.  */
131 #ifndef YYDEBUG
132 # define YYDEBUG 0
133 #endif
134
135 /* Enabling verbose error messages.  */
136 #ifdef YYERROR_VERBOSE
137 # undef YYERROR_VERBOSE
138 # define YYERROR_VERBOSE 1
139 #else
140 # define YYERROR_VERBOSE 0
141 #endif
142
143 /* Enabling the token table.  */
144 #ifndef YYTOKEN_TABLE
145 # define YYTOKEN_TABLE 0
146 #endif
147
148 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
149 #line 40 "uparse.y"
150 typedef union YYSTYPE {
151   int intval;
152   double floatval;
153   char *strval;
154   int subtok;
155 } YYSTYPE;
156 /* Line 196 of yacc.c.  */
157 #line 158 "uparse.c"
158 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
159 # define YYSTYPE_IS_DECLARED 1
160 # define YYSTYPE_IS_TRIVIAL 1
161 #endif
162
163
164
165 /* Copy the second part of user declarations.  */
166
167
168 /* Line 219 of yacc.c.  */
169 #line 170 "uparse.c"
170
171 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
172 # define YYSIZE_T __SIZE_TYPE__
173 #endif
174 #if ! defined (YYSIZE_T) && defined (size_t)
175 # define YYSIZE_T size_t
176 #endif
177 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
178 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
179 # define YYSIZE_T size_t
180 #endif
181 #if ! defined (YYSIZE_T)
182 # define YYSIZE_T unsigned int
183 #endif
184
185 #ifndef YY_
186 # if YYENABLE_NLS
187 #  if ENABLE_NLS
188 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
189 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
190 #  endif
191 # endif
192 # ifndef YY_
193 #  define YY_(msgid) msgid
194 # endif
195 #endif
196
197 #if ! defined (yyoverflow) || YYERROR_VERBOSE
198
199 /* The parser invokes alloca or malloc; define the necessary symbols.  */
200
201 # ifdef YYSTACK_USE_ALLOCA
202 #  if YYSTACK_USE_ALLOCA
203 #   ifdef __GNUC__
204 #    define YYSTACK_ALLOC __builtin_alloca
205 #   else
206 #    define YYSTACK_ALLOC alloca
207 #    if defined (__STDC__) || defined (__cplusplus)
208 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
209 #     define YYINCLUDED_STDLIB_H
210 #    endif
211 #   endif
212 #  endif
213 # endif
214
215 # ifdef YYSTACK_ALLOC
216    /* Pacify GCC's `empty if-body' warning. */
217 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
218 #  ifndef YYSTACK_ALLOC_MAXIMUM
219     /* The OS might guarantee only one guard page at the bottom of the stack,
220        and a page size can be as small as 4096 bytes.  So we cannot safely
221        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
222        to allow for a few compiler-allocated temporary stack slots.  */
223 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
224 #  endif
225 # else
226 #  define YYSTACK_ALLOC YYMALLOC
227 #  define YYSTACK_FREE YYFREE
228 #  ifndef YYSTACK_ALLOC_MAXIMUM
229 #   define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
230 #  endif
231 #  ifdef __cplusplus
232 extern "C" {
233 #  endif
234 #  ifndef YYMALLOC
235 #   define YYMALLOC malloc
236 #   if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
237         && (defined (__STDC__) || defined (__cplusplus)))
238 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
239 #   endif
240 #  endif
241 #  ifndef YYFREE
242 #   define YYFREE free
243 #   if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
244         && (defined (__STDC__) || defined (__cplusplus)))
245 void free (void *); /* INFRINGES ON USER NAME SPACE */
246 #   endif
247 #  endif
248 #  ifdef __cplusplus
249 }
250 #  endif
251 # endif
252 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
253
254
255 #if (! defined (yyoverflow) \
256      && (! defined (__cplusplus) \
257          || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
258
259 /* A type that is properly aligned for any stack member.  */
260 union yyalloc
261 {
262   short int yyss;
263   YYSTYPE yyvs;
264   };
265
266 /* The size of the maximum gap between one aligned stack and the next.  */
267 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
268
269 /* The size of an array large to enough to hold all stacks, each with
270    N elements.  */
271 # define YYSTACK_BYTES(N) \
272      ((N) * (sizeof (short int) + sizeof (YYSTYPE))                     \
273       + YYSTACK_GAP_MAXIMUM)
274
275 /* Copy COUNT objects from FROM to TO.  The source and destination do
276    not overlap.  */
277 # ifndef YYCOPY
278 #  if defined (__GNUC__) && 1 < __GNUC__
279 #   define YYCOPY(To, From, Count) \
280       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
281 #  else
282 #   define YYCOPY(To, From, Count)              \
283       do                                        \
284         {                                       \
285           YYSIZE_T yyi;                         \
286           for (yyi = 0; yyi < (Count); yyi++)   \
287             (To)[yyi] = (From)[yyi];            \
288         }                                       \
289       while (0)
290 #  endif
291 # endif
292
293 /* Relocate STACK from its old location to the new one.  The
294    local variables YYSIZE and YYSTACKSIZE give the old and new number of
295    elements in the stack, and YYPTR gives the new location of the
296    stack.  Advance YYPTR to a properly aligned location for the next
297    stack.  */
298 # define YYSTACK_RELOCATE(Stack)                                        \
299     do                                                                  \
300       {                                                                 \
301         YYSIZE_T yynewbytes;                                            \
302         YYCOPY (&yyptr->Stack, Stack, yysize);                          \
303         Stack = &yyptr->Stack;                                          \
304         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
305         yyptr += yynewbytes / sizeof (*yyptr);                          \
306       }                                                                 \
307     while (0)
308
309 #endif
310
311 #if defined (__STDC__) || defined (__cplusplus)
312    typedef signed char yysigned_char;
313 #else
314    typedef short int yysigned_char;
315 #endif
316
317 /* YYFINAL -- State number of the termination state. */
318 #define YYFINAL  54
319 /* YYLAST -- Last index in YYTABLE.  */
320 #define YYLAST   44
321
322 /* YYNTOKENS -- Number of terminals. */
323 #define YYNTOKENS  30
324 /* YYNNTS -- Number of nonterminals. */
325 #define YYNNTS  16
326 /* YYNRULES -- Number of rules. */
327 #define YYNRULES  47
328 /* YYNRULES -- Number of states. */
329 #define YYNSTATES  60
330
331 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
332 #define YYUNDEFTOK  2
333 #define YYMAXUTOK   284
334
335 #define YYTRANSLATE(YYX)                                                \
336   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
337
338 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
339 static const unsigned char yytranslate[] =
340 {
341        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
342        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
343        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
344        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
345        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
346        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
347        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
348        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
349        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
350        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
351        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
352        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
353        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
354        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
355        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
356        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
357        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
358        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
359        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
360        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
361        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
362        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
363        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
364        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
365        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
366        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
367        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
368       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
369       25,    26,    27,    28,    29
370 };
371
372 #if YYDEBUG
373 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
374    YYRHS.  */
375 static const unsigned char yyprhs[] =
376 {
377        0,     0,     3,     5,     7,     9,    11,    13,    15,    17,
378       19,    21,    23,    26,    28,    31,    34,    38,    41,    44,
379       46,    49,    52,    55,    58,    60,    62,    65,    67,    69,
380       71,    73,    75,    78,    81,    83,    86,    89,    91,    94,
381       97,    99,   102,   105,   107,   109,   112,   114
382 };
383
384 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
385 static const yysigned_char yyrhs[] =
386 {
387       31,     0,    -1,    32,    -1,    33,    -1,    34,    -1,    35,
388       -1,    37,    -1,    39,    -1,    41,    -1,    43,    -1,    44,
389       -1,    45,    -1,     3,    28,    -1,     3,    -1,     6,    29,
390       -1,     4,    28,    -1,     5,    28,    28,    -1,     5,    28,
391       -1,     7,    28,    -1,     7,    -1,     9,    28,    -1,    10,
392       28,    -1,     8,    26,    -1,     8,    27,    -1,    12,    -1,
393       13,    -1,    17,    28,    -1,    17,    -1,    20,    -1,    21,
394       -1,    25,    -1,    11,    -1,    14,    36,    -1,    36,    28,
395       -1,    28,    -1,    15,    38,    -1,    38,    28,    -1,    28,
396       -1,    18,    40,    -1,    40,    28,    -1,    28,    -1,    19,
397       42,    -1,    42,    28,    -1,    28,    -1,    24,    -1,    23,
398       28,    -1,    22,    -1,    16,    -1
399 };
400
401 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
402 static const unsigned char yyrline[] =
403 {
404        0,    63,    63,    64,    65,    66,    67,    68,    69,    70,
405       71,    72,    76,    77,    78,    79,    80,    81,    82,    83,
406       84,    85,    86,    91,    99,   100,   101,   102,   103,   104,
407      105,   109,   113,   117,   118,   122,   126,   127,   131,   135,
408      136,   140,   144,   145,   149,   150,   159,   163
409 };
410 #endif
411
412 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
413 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
414    First, the terminals, then, starting at YYNTOKENS, nonterminals. */
415 static const char *const yytname[] =
416 {
417   "$end", "error", "$undefined", "LISTDISK", "SETHOST", "SETDISK",
418   "SETDATE", "SETTAPE", "SETMODE", "CD", "CDX", "QUIT", "DHIST", "LS",
419   "ADD", "ADDX", "EXTRACT", "LIST", "DELETE", "DELETEX", "PWD", "CLEAR",
420   "HELP", "LCD", "LPWD", "MODE", "SMB", "TAR", "PATH", "DATE", "$accept",
421   "ucommand", "set_command", "display_command", "quit_command",
422   "add_command", "add_path", "addx_command", "addx_path", "delete_command",
423   "delete_path", "deletex_command", "deletex_path", "local_command",
424   "help_command", "extract_command", 0
425 };
426 #endif
427
428 # ifdef YYPRINT
429 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
430    token YYLEX-NUM.  */
431 static const unsigned short int yytoknum[] =
432 {
433        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
434      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
435      275,   276,   277,   278,   279,   280,   281,   282,   283,   284
436 };
437 # endif
438
439 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
440 static const unsigned char yyr1[] =
441 {
442        0,    30,    31,    31,    31,    31,    31,    31,    31,    31,
443       31,    31,    32,    32,    32,    32,    32,    32,    32,    32,
444       32,    32,    32,    32,    33,    33,    33,    33,    33,    33,
445       33,    34,    35,    36,    36,    37,    38,    38,    39,    40,
446       40,    41,    42,    42,    43,    43,    44,    45
447 };
448
449 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
450 static const unsigned char yyr2[] =
451 {
452        0,     2,     1,     1,     1,     1,     1,     1,     1,     1,
453        1,     1,     2,     1,     2,     2,     3,     2,     2,     1,
454        2,     2,     2,     2,     1,     1,     2,     1,     1,     1,
455        1,     1,     2,     2,     1,     2,     2,     1,     2,     2,
456        1,     2,     2,     1,     1,     2,     1,     1
457 };
458
459 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
460    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
461    means the default is an error.  */
462 static const unsigned char yydefact[] =
463 {
464        0,    13,     0,     0,     0,    19,     0,     0,     0,    31,
465       24,    25,     0,     0,    47,    27,     0,     0,    28,    29,
466       46,     0,    44,    30,     0,     2,     3,     4,     5,     6,
467        7,     8,     9,    10,    11,    12,    15,    17,    14,    18,
468       22,    23,    20,    21,    34,    32,    37,    35,    26,    40,
469       38,    43,    41,    45,     1,    16,    33,    36,    39,    42
470 };
471
472 /* YYDEFGOTO[NTERM-NUM]. */
473 static const yysigned_char yydefgoto[] =
474 {
475       -1,    24,    25,    26,    27,    28,    45,    29,    47,    30,
476       50,    31,    52,    32,    33,    34
477 };
478
479 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
480    STATE-NUM.  */
481 #define YYPACT_NINF -6
482 static const yysigned_char yypact[] =
483 {
484       -3,    -5,    -1,     0,     1,     3,    -2,     4,     5,    -6,
485       -6,    -6,     6,     7,    -6,     8,     9,    10,    -6,    -6,
486       -6,    11,    -6,    -6,    26,    -6,    -6,    -6,    -6,    -6,
487       -6,    -6,    -6,    -6,    -6,    -6,    -6,    12,    -6,    -6,
488       -6,    -6,    -6,    -6,    -6,    13,    -6,    14,    -6,    -6,
489       15,    -6,    16,    -6,    -6,    -6,    -6,    -6,    -6,    -6
490 };
491
492 /* YYPGOTO[NTERM-NUM].  */
493 static const yysigned_char yypgoto[] =
494 {
495       -6,    -6,    -6,    -6,    -6,    -6,    -6,    -6,    -6,    -6,
496       -6,    -6,    -6,    -6,    -6,    -6
497 };
498
499 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
500    positive, shift that token.  If negative, reduce the rule which
501    number is the opposite.  If zero, do what YYDEFACT says.
502    If YYTABLE_NINF, syntax error.  */
503 #define YYTABLE_NINF -1
504 static const unsigned char yytable[] =
505 {
506        1,     2,     3,     4,     5,     6,     7,     8,     9,    10,
507       11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
508       21,    22,    23,    35,    40,    41,    54,    36,    37,     0,
509       38,    39,    42,    43,    44,    46,    48,    49,    51,    53,
510       55,    56,    57,    58,    59
511 };
512
513 static const yysigned_char yycheck[] =
514 {
515        3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
516       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
517       23,    24,    25,    28,    26,    27,     0,    28,    28,    -1,
518       29,    28,    28,    28,    28,    28,    28,    28,    28,    28,
519       28,    28,    28,    28,    28
520 };
521
522 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
523    symbol of state STATE-NUM.  */
524 static const unsigned char yystos[] =
525 {
526        0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
527       12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
528       22,    23,    24,    25,    31,    32,    33,    34,    35,    37,
529       39,    41,    43,    44,    45,    28,    28,    28,    29,    28,
530       26,    27,    28,    28,    28,    36,    28,    38,    28,    28,
531       40,    28,    42,    28,     0,    28,    28,    28,    28,    28
532 };
533
534 #define yyerrok         (yyerrstatus = 0)
535 #define yyclearin       (yychar = YYEMPTY)
536 #define YYEMPTY         (-2)
537 #define YYEOF           0
538
539 #define YYACCEPT        goto yyacceptlab
540 #define YYABORT         goto yyabortlab
541 #define YYERROR         goto yyerrorlab
542
543
544 /* Like YYERROR except do call yyerror.  This remains here temporarily
545    to ease the transition to the new meaning of YYERROR, for GCC.
546    Once GCC version 2 has supplanted version 1, this can go.  */
547
548 #define YYFAIL          goto yyerrlab
549
550 #define YYRECOVERING()  (!!yyerrstatus)
551
552 #define YYBACKUP(Token, Value)                                  \
553 do                                                              \
554   if (yychar == YYEMPTY && yylen == 1)                          \
555     {                                                           \
556       yychar = (Token);                                         \
557       yylval = (Value);                                         \
558       yytoken = YYTRANSLATE (yychar);                           \
559       YYPOPSTACK;                                               \
560       goto yybackup;                                            \
561     }                                                           \
562   else                                                          \
563     {                                                           \
564       yyerror (YY_("syntax error: cannot back up")); \
565       YYERROR;                                                  \
566     }                                                           \
567 while (0)
568
569
570 #define YYTERROR        1
571 #define YYERRCODE       256
572
573
574 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
575    If N is 0, then set CURRENT to the empty location which ends
576    the previous symbol: RHS[0] (always defined).  */
577
578 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
579 #ifndef YYLLOC_DEFAULT
580 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
581     do                                                                  \
582       if (N)                                                            \
583         {                                                               \
584           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
585           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
586           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
587           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
588         }                                                               \
589       else                                                              \
590         {                                                               \
591           (Current).first_line   = (Current).last_line   =              \
592             YYRHSLOC (Rhs, 0).last_line;                                \
593           (Current).first_column = (Current).last_column =              \
594             YYRHSLOC (Rhs, 0).last_column;                              \
595         }                                                               \
596     while (0)
597 #endif
598
599
600 /* YY_LOCATION_PRINT -- Print the location on the stream.
601    This macro was not mandated originally: define only if we know
602    we won't break user code: when these are the locations we know.  */
603
604 #ifndef YY_LOCATION_PRINT
605 # if YYLTYPE_IS_TRIVIAL
606 #  define YY_LOCATION_PRINT(File, Loc)                  \
607      fprintf (File, "%d.%d-%d.%d",                      \
608               (Loc).first_line, (Loc).first_column,     \
609               (Loc).last_line,  (Loc).last_column)
610 # else
611 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
612 # endif
613 #endif
614
615
616 /* YYLEX -- calling `yylex' with the right arguments.  */
617
618 #ifdef YYLEX_PARAM
619 # define YYLEX yylex (YYLEX_PARAM)
620 #else
621 # define YYLEX yylex ()
622 #endif
623
624 /* Enable debugging if requested.  */
625 #if YYDEBUG
626
627 # ifndef YYFPRINTF
628 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
629 #  define YYFPRINTF fprintf
630 # endif
631
632 # define YYDPRINTF(Args)                        \
633 do {                                            \
634   if (yydebug)                                  \
635     YYFPRINTF Args;                             \
636 } while (0)
637
638 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)          \
639 do {                                                            \
640   if (yydebug)                                                  \
641     {                                                           \
642       YYFPRINTF (stderr, "%s ", Title);                         \
643       yysymprint (stderr,                                       \
644                   Type, Value); \
645       YYFPRINTF (stderr, "\n");                                 \
646     }                                                           \
647 } while (0)
648
649 /*------------------------------------------------------------------.
650 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
651 | TOP (included).                                                   |
652 `------------------------------------------------------------------*/
653
654 #if defined (__STDC__) || defined (__cplusplus)
655 static void
656 yy_stack_print (short int *bottom, short int *top)
657 #else
658 static void
659 yy_stack_print (bottom, top)
660     short int *bottom;
661     short int *top;
662 #endif
663 {
664   YYFPRINTF (stderr, "Stack now");
665   for (/* Nothing. */; bottom <= top; ++bottom)
666     YYFPRINTF (stderr, " %d", *bottom);
667   YYFPRINTF (stderr, "\n");
668 }
669
670 # define YY_STACK_PRINT(Bottom, Top)                            \
671 do {                                                            \
672   if (yydebug)                                                  \
673     yy_stack_print ((Bottom), (Top));                           \
674 } while (0)
675
676
677 /*------------------------------------------------.
678 | Report that the YYRULE is going to be reduced.  |
679 `------------------------------------------------*/
680
681 #if defined (__STDC__) || defined (__cplusplus)
682 static void
683 yy_reduce_print (int yyrule)
684 #else
685 static void
686 yy_reduce_print (yyrule)
687     int yyrule;
688 #endif
689 {
690   int yyi;
691   unsigned long int yylno = yyrline[yyrule];
692   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
693              yyrule - 1, yylno);
694   /* Print the symbols being reduced, and their result.  */
695   for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
696     YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
697   YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
698 }
699
700 # define YY_REDUCE_PRINT(Rule)          \
701 do {                                    \
702   if (yydebug)                          \
703     yy_reduce_print (Rule);             \
704 } while (0)
705
706 /* Nonzero means print parse trace.  It is left uninitialized so that
707    multiple parsers can coexist.  */
708 int yydebug;
709 #else /* !YYDEBUG */
710 # define YYDPRINTF(Args)
711 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
712 # define YY_STACK_PRINT(Bottom, Top)
713 # define YY_REDUCE_PRINT(Rule)
714 #endif /* !YYDEBUG */
715
716
717 /* YYINITDEPTH -- initial size of the parser's stacks.  */
718 #ifndef YYINITDEPTH
719 # define YYINITDEPTH 200
720 #endif
721
722 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
723    if the built-in stack extension method is used).
724
725    Do not make this value too large; the results are undefined if
726    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
727    evaluated with infinite-precision integer arithmetic.  */
728
729 #ifndef YYMAXDEPTH
730 # define YYMAXDEPTH 10000
731 #endif
732
733 \f
734
735 #if YYERROR_VERBOSE
736
737 # ifndef yystrlen
738 #  if defined (__GLIBC__) && defined (_STRING_H)
739 #   define yystrlen strlen
740 #  else
741 /* Return the length of YYSTR.  */
742 static YYSIZE_T
743 #   if defined (__STDC__) || defined (__cplusplus)
744 yystrlen (const char *yystr)
745 #   else
746 yystrlen (yystr)
747      const char *yystr;
748 #   endif
749 {
750   const char *yys = yystr;
751
752   while (*yys++ != '\0')
753     continue;
754
755   return yys - yystr - 1;
756 }
757 #  endif
758 # endif
759
760 # ifndef yystpcpy
761 #  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
762 #   define yystpcpy stpcpy
763 #  else
764 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
765    YYDEST.  */
766 static char *
767 #   if defined (__STDC__) || defined (__cplusplus)
768 yystpcpy (char *yydest, const char *yysrc)
769 #   else
770 yystpcpy (yydest, yysrc)
771      char *yydest;
772      const char *yysrc;
773 #   endif
774 {
775   char *yyd = yydest;
776   const char *yys = yysrc;
777
778   while ((*yyd++ = *yys++) != '\0')
779     continue;
780
781   return yyd - 1;
782 }
783 #  endif
784 # endif
785
786 # ifndef yytnamerr
787 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
788    quotes and backslashes, so that it's suitable for yyerror.  The
789    heuristic is that double-quoting is unnecessary unless the string
790    contains an apostrophe, a comma, or backslash (other than
791    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
792    null, do not copy; instead, return the length of what the result
793    would have been.  */
794 static YYSIZE_T
795 yytnamerr (char *yyres, const char *yystr)
796 {
797   if (*yystr == '"')
798     {
799       size_t yyn = 0;
800       char const *yyp = yystr;
801
802       for (;;)
803         switch (*++yyp)
804           {
805           case '\'':
806           case ',':
807             goto do_not_strip_quotes;
808
809           case '\\':
810             if (*++yyp != '\\')
811               goto do_not_strip_quotes;
812             /* Fall through.  */
813           default:
814             if (yyres)
815               yyres[yyn] = *yyp;
816             yyn++;
817             break;
818
819           case '"':
820             if (yyres)
821               yyres[yyn] = '\0';
822             return yyn;
823           }
824     do_not_strip_quotes: ;
825     }
826
827   if (! yyres)
828     return yystrlen (yystr);
829
830   return yystpcpy (yyres, yystr) - yyres;
831 }
832 # endif
833
834 #endif /* YYERROR_VERBOSE */
835
836 \f
837
838 #if YYDEBUG
839 /*--------------------------------.
840 | Print this symbol on YYOUTPUT.  |
841 `--------------------------------*/
842
843 #if defined (__STDC__) || defined (__cplusplus)
844 static void
845 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
846 #else
847 static void
848 yysymprint (yyoutput, yytype, yyvaluep)
849     FILE *yyoutput;
850     int yytype;
851     YYSTYPE *yyvaluep;
852 #endif
853 {
854   /* Pacify ``unused variable'' warnings.  */
855   (void) yyvaluep;
856
857   if (yytype < YYNTOKENS)
858     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
859   else
860     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
861
862
863 # ifdef YYPRINT
864   if (yytype < YYNTOKENS)
865     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
866 # endif
867   switch (yytype)
868     {
869       default:
870         break;
871     }
872   YYFPRINTF (yyoutput, ")");
873 }
874
875 #endif /* ! YYDEBUG */
876 /*-----------------------------------------------.
877 | Release the memory associated to this symbol.  |
878 `-----------------------------------------------*/
879
880 #if defined (__STDC__) || defined (__cplusplus)
881 static void
882 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
883 #else
884 static void
885 yydestruct (yymsg, yytype, yyvaluep)
886     const char *yymsg;
887     int yytype;
888     YYSTYPE *yyvaluep;
889 #endif
890 {
891   /* Pacify ``unused variable'' warnings.  */
892   (void) yyvaluep;
893
894   if (!yymsg)
895     yymsg = "Deleting";
896   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
897
898   switch (yytype)
899     {
900
901       default:
902         break;
903     }
904 }
905 \f
906
907 /* Prevent warnings from -Wmissing-prototypes.  */
908
909 #ifdef YYPARSE_PARAM
910 # if defined (__STDC__) || defined (__cplusplus)
911 int yyparse (void *YYPARSE_PARAM);
912 # else
913 int yyparse ();
914 # endif
915 #else /* ! YYPARSE_PARAM */
916 #if defined (__STDC__) || defined (__cplusplus)
917 int yyparse (void);
918 #else
919 int yyparse ();
920 #endif
921 #endif /* ! YYPARSE_PARAM */
922
923
924
925 /* The look-ahead symbol.  */
926 int yychar;
927
928 /* The semantic value of the look-ahead symbol.  */
929 YYSTYPE yylval;
930
931 /* Number of syntax errors so far.  */
932 int yynerrs;
933
934
935
936 /*----------.
937 | yyparse.  |
938 `----------*/
939
940 #ifdef YYPARSE_PARAM
941 # if defined (__STDC__) || defined (__cplusplus)
942 int yyparse (void *YYPARSE_PARAM)
943 # else
944 int yyparse (YYPARSE_PARAM)
945   void *YYPARSE_PARAM;
946 # endif
947 #else /* ! YYPARSE_PARAM */
948 #if defined (__STDC__) || defined (__cplusplus)
949 int
950 yyparse (void)
951 #else
952 int
953 yyparse ()
954
955 #endif
956 #endif
957 {
958   
959   int yystate;
960   int yyn;
961   int yyresult;
962   /* Number of tokens to shift before error messages enabled.  */
963   int yyerrstatus;
964   /* Look-ahead token as an internal (translated) token number.  */
965   int yytoken = 0;
966
967   /* Three stacks and their tools:
968      `yyss': related to states,
969      `yyvs': related to semantic values,
970      `yyls': related to locations.
971
972      Refer to the stacks thru separate pointers, to allow yyoverflow
973      to reallocate them elsewhere.  */
974
975   /* The state stack.  */
976   short int yyssa[YYINITDEPTH];
977   short int *yyss = yyssa;
978   short int *yyssp;
979
980   /* The semantic value stack.  */
981   YYSTYPE yyvsa[YYINITDEPTH];
982   YYSTYPE *yyvs = yyvsa;
983   YYSTYPE *yyvsp;
984
985
986
987 #define YYPOPSTACK   (yyvsp--, yyssp--)
988
989   YYSIZE_T yystacksize = YYINITDEPTH;
990
991   /* The variables used to return semantic value and location from the
992      action routines.  */
993   YYSTYPE yyval;
994
995
996   /* When reducing, the number of symbols on the RHS of the reduced
997      rule.  */
998   int yylen;
999
1000   YYDPRINTF ((stderr, "Starting parse\n"));
1001
1002   yystate = 0;
1003   yyerrstatus = 0;
1004   yynerrs = 0;
1005   yychar = YYEMPTY;             /* Cause a token to be read.  */
1006
1007   /* Initialize stack pointers.
1008      Waste one element of value and location stack
1009      so that they stay on the same level as the state stack.
1010      The wasted elements are never initialized.  */
1011
1012   yyssp = yyss;
1013   yyvsp = yyvs;
1014
1015   goto yysetstate;
1016
1017 /*------------------------------------------------------------.
1018 | yynewstate -- Push a new state, which is found in yystate.  |
1019 `------------------------------------------------------------*/
1020  yynewstate:
1021   /* In all cases, when you get here, the value and location stacks
1022      have just been pushed. so pushing a state here evens the stacks.
1023      */
1024   yyssp++;
1025
1026  yysetstate:
1027   *yyssp = yystate;
1028
1029   if (yyss + yystacksize - 1 <= yyssp)
1030     {
1031       /* Get the current used size of the three stacks, in elements.  */
1032       YYSIZE_T yysize = yyssp - yyss + 1;
1033
1034 #ifdef yyoverflow
1035       {
1036         /* Give user a chance to reallocate the stack. Use copies of
1037            these so that the &'s don't force the real ones into
1038            memory.  */
1039         YYSTYPE *yyvs1 = yyvs;
1040         short int *yyss1 = yyss;
1041
1042
1043         /* Each stack pointer address is followed by the size of the
1044            data in use in that stack, in bytes.  This used to be a
1045            conditional around just the two extra args, but that might
1046            be undefined if yyoverflow is a macro.  */
1047         yyoverflow (YY_("memory exhausted"),
1048                     &yyss1, yysize * sizeof (*yyssp),
1049                     &yyvs1, yysize * sizeof (*yyvsp),
1050
1051                     &yystacksize);
1052
1053         yyss = yyss1;
1054         yyvs = yyvs1;
1055       }
1056 #else /* no yyoverflow */
1057 # ifndef YYSTACK_RELOCATE
1058       goto yyexhaustedlab;
1059 # else
1060       /* Extend the stack our own way.  */
1061       if (YYMAXDEPTH <= yystacksize)
1062         goto yyexhaustedlab;
1063       yystacksize *= 2;
1064       if (YYMAXDEPTH < yystacksize)
1065         yystacksize = YYMAXDEPTH;
1066
1067       {
1068         short int *yyss1 = yyss;
1069         union yyalloc *yyptr =
1070           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1071         if (! yyptr)
1072           goto yyexhaustedlab;
1073         YYSTACK_RELOCATE (yyss);
1074         YYSTACK_RELOCATE (yyvs);
1075
1076 #  undef YYSTACK_RELOCATE
1077         if (yyss1 != yyssa)
1078           YYSTACK_FREE (yyss1);
1079       }
1080 # endif
1081 #endif /* no yyoverflow */
1082
1083       yyssp = yyss + yysize - 1;
1084       yyvsp = yyvs + yysize - 1;
1085
1086
1087       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1088                   (unsigned long int) yystacksize));
1089
1090       if (yyss + yystacksize - 1 <= yyssp)
1091         YYABORT;
1092     }
1093
1094   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1095
1096   goto yybackup;
1097
1098 /*-----------.
1099 | yybackup.  |
1100 `-----------*/
1101 yybackup:
1102
1103 /* Do appropriate processing given the current state.  */
1104 /* Read a look-ahead token if we need one and don't already have one.  */
1105 /* yyresume: */
1106
1107   /* First try to decide what to do without reference to look-ahead token.  */
1108
1109   yyn = yypact[yystate];
1110   if (yyn == YYPACT_NINF)
1111     goto yydefault;
1112
1113   /* Not known => get a look-ahead token if don't already have one.  */
1114
1115   /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
1116   if (yychar == YYEMPTY)
1117     {
1118       YYDPRINTF ((stderr, "Reading a token: "));
1119       yychar = YYLEX;
1120     }
1121
1122   if (yychar <= YYEOF)
1123     {
1124       yychar = yytoken = YYEOF;
1125       YYDPRINTF ((stderr, "Now at end of input.\n"));
1126     }
1127   else
1128     {
1129       yytoken = YYTRANSLATE (yychar);
1130       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1131     }
1132
1133   /* If the proper action on seeing token YYTOKEN is to reduce or to
1134      detect an error, take that action.  */
1135   yyn += yytoken;
1136   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1137     goto yydefault;
1138   yyn = yytable[yyn];
1139   if (yyn <= 0)
1140     {
1141       if (yyn == 0 || yyn == YYTABLE_NINF)
1142         goto yyerrlab;
1143       yyn = -yyn;
1144       goto yyreduce;
1145     }
1146
1147   if (yyn == YYFINAL)
1148     YYACCEPT;
1149
1150   /* Shift the look-ahead token.  */
1151   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1152
1153   /* Discard the token being shifted unless it is eof.  */
1154   if (yychar != YYEOF)
1155     yychar = YYEMPTY;
1156
1157   *++yyvsp = yylval;
1158
1159
1160   /* Count tokens shifted since error; after three, turn off error
1161      status.  */
1162   if (yyerrstatus)
1163     yyerrstatus--;
1164
1165   yystate = yyn;
1166   goto yynewstate;
1167
1168
1169 /*-----------------------------------------------------------.
1170 | yydefault -- do the default action for the current state.  |
1171 `-----------------------------------------------------------*/
1172 yydefault:
1173   yyn = yydefact[yystate];
1174   if (yyn == 0)
1175     goto yyerrlab;
1176   goto yyreduce;
1177
1178
1179 /*-----------------------------.
1180 | yyreduce -- Do a reduction.  |
1181 `-----------------------------*/
1182 yyreduce:
1183   /* yyn is the number of a rule to reduce with.  */
1184   yylen = yyr2[yyn];
1185
1186   /* If YYLEN is nonzero, implement the default value of the action:
1187      `$$ = $1'.
1188
1189      Otherwise, the following line sets YYVAL to garbage.
1190      This behavior is undocumented and Bison
1191      users should not rely upon it.  Assigning to YYVAL
1192      unconditionally makes the parser a bit smaller, and it avoids a
1193      GCC warning that YYVAL may be used uninitialized.  */
1194   yyval = yyvsp[1-yylen];
1195
1196
1197   YY_REDUCE_PRINT (yyn);
1198   switch (yyn)
1199     {
1200         case 12:
1201 #line 76 "uparse.y"
1202     { list_disk((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1203     break;
1204
1205   case 13:
1206 #line 77 "uparse.y"
1207     { list_disk(NULL); }
1208     break;
1209
1210   case 14:
1211 #line 78 "uparse.y"
1212     { set_date((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1213     break;
1214
1215   case 15:
1216 #line 79 "uparse.y"
1217     { set_host((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1218     break;
1219
1220   case 16:
1221 #line 80 "uparse.y"
1222     { set_disk((yyvsp[-1].strval), (yyvsp[0].strval)); amfree((yyvsp[-1].strval)); amfree((yyvsp[0].strval)); }
1223     break;
1224
1225   case 17:
1226 #line 81 "uparse.y"
1227     { set_disk((yyvsp[0].strval), NULL); amfree((yyvsp[0].strval)); }
1228     break;
1229
1230   case 18:
1231 #line 82 "uparse.y"
1232     { set_tape((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1233     break;
1234
1235   case 19:
1236 #line 83 "uparse.y"
1237     { set_tape(""); }
1238     break;
1239
1240   case 20:
1241 #line 84 "uparse.y"
1242     { cd_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1243     break;
1244
1245   case 21:
1246 #line 85 "uparse.y"
1247     { cd_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1248     break;
1249
1250   case 22:
1251 #line 86 "uparse.y"
1252     {
1253 #ifdef SAMBA_CLIENT
1254                          set_mode(SAMBA_SMBCLIENT);
1255 #endif /* SAMBA_CLIENT */
1256                     }
1257     break;
1258
1259   case 23:
1260 #line 91 "uparse.y"
1261     {
1262 #ifdef SAMBA_CLIENT
1263                          set_mode(SAMBA_TAR);
1264 #endif /* SAMBA_CLIENT */
1265                     }
1266     break;
1267
1268   case 24:
1269 #line 99 "uparse.y"
1270     { list_disk_history(); }
1271     break;
1272
1273   case 25:
1274 #line 100 "uparse.y"
1275     { list_directory(); }
1276     break;
1277
1278   case 26:
1279 #line 101 "uparse.y"
1280     { display_extract_list((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1281     break;
1282
1283   case 27:
1284 #line 102 "uparse.y"
1285     { display_extract_list(NULL); }
1286     break;
1287
1288   case 28:
1289 #line 103 "uparse.y"
1290     { show_directory(); }
1291     break;
1292
1293   case 29:
1294 #line 104 "uparse.y"
1295     { clear_extract_list(); }
1296     break;
1297
1298   case 30:
1299 #line 105 "uparse.y"
1300     { show_mode (); }
1301     break;
1302
1303   case 31:
1304 #line 109 "uparse.y"
1305     { quit(); }
1306     break;
1307
1308   case 33:
1309 #line 117 "uparse.y"
1310     { add_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1311     break;
1312
1313   case 34:
1314 #line 118 "uparse.y"
1315     { add_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1316     break;
1317
1318   case 36:
1319 #line 126 "uparse.y"
1320     { add_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1321     break;
1322
1323   case 37:
1324 #line 127 "uparse.y"
1325     { add_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1326     break;
1327
1328   case 39:
1329 #line 135 "uparse.y"
1330     { delete_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1331     break;
1332
1333   case 40:
1334 #line 136 "uparse.y"
1335     { delete_glob((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1336     break;
1337
1338   case 42:
1339 #line 144 "uparse.y"
1340     { delete_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1341     break;
1342
1343   case 43:
1344 #line 145 "uparse.y"
1345     { delete_regex((yyvsp[0].strval)); amfree((yyvsp[0].strval)); }
1346     break;
1347
1348   case 44:
1349 #line 149 "uparse.y"
1350     { char buf[STR_SIZE]; puts(getcwd(buf, sizeof(buf))); }
1351     break;
1352
1353   case 45:
1354 #line 150 "uparse.y"
1355     {
1356                 if (chdir((yyvsp[0].strval)) == -1) {
1357                         perror((yyvsp[0].strval));
1358                 }
1359                 amfree((yyvsp[0].strval));
1360         }
1361     break;
1362
1363   case 46:
1364 #line 159 "uparse.y"
1365     { help_list(); }
1366     break;
1367
1368   case 47:
1369 #line 163 "uparse.y"
1370     { extract_files(); }
1371     break;
1372
1373
1374       default: break;
1375     }
1376
1377 /* Line 1126 of yacc.c.  */
1378 #line 1379 "uparse.c"
1379 \f
1380   yyvsp -= yylen;
1381   yyssp -= yylen;
1382
1383
1384   YY_STACK_PRINT (yyss, yyssp);
1385
1386   *++yyvsp = yyval;
1387
1388
1389   /* Now `shift' the result of the reduction.  Determine what state
1390      that goes to, based on the state we popped back to and the rule
1391      number reduced by.  */
1392
1393   yyn = yyr1[yyn];
1394
1395   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1396   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1397     yystate = yytable[yystate];
1398   else
1399     yystate = yydefgoto[yyn - YYNTOKENS];
1400
1401   goto yynewstate;
1402
1403
1404 /*------------------------------------.
1405 | yyerrlab -- here on detecting error |
1406 `------------------------------------*/
1407 yyerrlab:
1408   /* If not already recovering from an error, report this error.  */
1409   if (!yyerrstatus)
1410     {
1411       ++yynerrs;
1412 #if YYERROR_VERBOSE
1413       yyn = yypact[yystate];
1414
1415       if (YYPACT_NINF < yyn && yyn < YYLAST)
1416         {
1417           int yytype = YYTRANSLATE (yychar);
1418           YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1419           YYSIZE_T yysize = yysize0;
1420           YYSIZE_T yysize1;
1421           int yysize_overflow = 0;
1422           char *yymsg = 0;
1423 #         define YYERROR_VERBOSE_ARGS_MAXIMUM 5
1424           char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1425           int yyx;
1426
1427 #if 0
1428           /* This is so xgettext sees the translatable formats that are
1429              constructed on the fly.  */
1430           YY_("syntax error, unexpected %s");
1431           YY_("syntax error, unexpected %s, expecting %s");
1432           YY_("syntax error, unexpected %s, expecting %s or %s");
1433           YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1434           YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1435 #endif
1436           char *yyfmt;
1437           char const *yyf;
1438           static char const yyunexpected[] = "syntax error, unexpected %s";
1439           static char const yyexpecting[] = ", expecting %s";
1440           static char const yyor[] = " or %s";
1441           char yyformat[sizeof yyunexpected
1442                         + sizeof yyexpecting - 1
1443                         + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1444                            * (sizeof yyor - 1))];
1445           char const *yyprefix = yyexpecting;
1446
1447           /* Start YYX at -YYN if negative to avoid negative indexes in
1448              YYCHECK.  */
1449           int yyxbegin = yyn < 0 ? -yyn : 0;
1450
1451           /* Stay within bounds of both yycheck and yytname.  */
1452           int yychecklim = YYLAST - yyn;
1453           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1454           int yycount = 1;
1455
1456           yyarg[0] = yytname[yytype];
1457           yyfmt = yystpcpy (yyformat, yyunexpected);
1458
1459           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1460             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1461               {
1462                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1463                   {
1464                     yycount = 1;
1465                     yysize = yysize0;
1466                     yyformat[sizeof yyunexpected - 1] = '\0';
1467                     break;
1468                   }
1469                 yyarg[yycount++] = yytname[yyx];
1470                 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1471                 yysize_overflow |= yysize1 < yysize;
1472                 yysize = yysize1;
1473                 yyfmt = yystpcpy (yyfmt, yyprefix);
1474                 yyprefix = yyor;
1475               }
1476
1477           yyf = YY_(yyformat);
1478           yysize1 = yysize + yystrlen (yyf);
1479           yysize_overflow |= yysize1 < yysize;
1480           yysize = yysize1;
1481
1482           if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
1483             yymsg = (char *) YYSTACK_ALLOC (yysize);
1484           if (yymsg)
1485             {
1486               /* Avoid sprintf, as that infringes on the user's name space.
1487                  Don't have undefined behavior even if the translation
1488                  produced a string with the wrong number of "%s"s.  */
1489               char *yyp = yymsg;
1490               int yyi = 0;
1491               while ((*yyp = *yyf))
1492                 {
1493                   if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1494                     {
1495                       yyp += yytnamerr (yyp, yyarg[yyi++]);
1496                       yyf += 2;
1497                     }
1498                   else
1499                     {
1500                       yyp++;
1501                       yyf++;
1502                     }
1503                 }
1504               yyerror (yymsg);
1505               YYSTACK_FREE (yymsg);
1506             }
1507           else
1508             {
1509               yyerror (YY_("syntax error"));
1510               goto yyexhaustedlab;
1511             }
1512         }
1513       else
1514 #endif /* YYERROR_VERBOSE */
1515         yyerror (YY_("syntax error"));
1516     }
1517
1518
1519
1520   if (yyerrstatus == 3)
1521     {
1522       /* If just tried and failed to reuse look-ahead token after an
1523          error, discard it.  */
1524
1525       if (yychar <= YYEOF)
1526         {
1527           /* Return failure if at end of input.  */
1528           if (yychar == YYEOF)
1529             YYABORT;
1530         }
1531       else
1532         {
1533           yydestruct ("Error: discarding", yytoken, &yylval);
1534           yychar = YYEMPTY;
1535         }
1536     }
1537
1538   /* Else will try to reuse look-ahead token after shifting the error
1539      token.  */
1540   goto yyerrlab1;
1541
1542
1543 /*---------------------------------------------------.
1544 | yyerrorlab -- error raised explicitly by YYERROR.  |
1545 `---------------------------------------------------*/
1546 yyerrorlab:
1547
1548   /* Pacify compilers like GCC when the user code never invokes
1549      YYERROR and the label yyerrorlab therefore never appears in user
1550      code.  */
1551   if (0)
1552      goto yyerrorlab;
1553
1554 yyvsp -= yylen;
1555   yyssp -= yylen;
1556   yystate = *yyssp;
1557   goto yyerrlab1;
1558
1559
1560 /*-------------------------------------------------------------.
1561 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1562 `-------------------------------------------------------------*/
1563 yyerrlab1:
1564   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1565
1566   for (;;)
1567     {
1568       yyn = yypact[yystate];
1569       if (yyn != YYPACT_NINF)
1570         {
1571           yyn += YYTERROR;
1572           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1573             {
1574               yyn = yytable[yyn];
1575               if (0 < yyn)
1576                 break;
1577             }
1578         }
1579
1580       /* Pop the current state because it cannot handle the error token.  */
1581       if (yyssp == yyss)
1582         YYABORT;
1583
1584
1585       yydestruct ("Error: popping", yystos[yystate], yyvsp);
1586       YYPOPSTACK;
1587       yystate = *yyssp;
1588       YY_STACK_PRINT (yyss, yyssp);
1589     }
1590
1591   if (yyn == YYFINAL)
1592     YYACCEPT;
1593
1594   *++yyvsp = yylval;
1595
1596
1597   /* Shift the error token. */
1598   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1599
1600   yystate = yyn;
1601   goto yynewstate;
1602
1603
1604 /*-------------------------------------.
1605 | yyacceptlab -- YYACCEPT comes here.  |
1606 `-------------------------------------*/
1607 yyacceptlab:
1608   yyresult = 0;
1609   goto yyreturn;
1610
1611 /*-----------------------------------.
1612 | yyabortlab -- YYABORT comes here.  |
1613 `-----------------------------------*/
1614 yyabortlab:
1615   yyresult = 1;
1616   goto yyreturn;
1617
1618 #ifndef yyoverflow
1619 /*-------------------------------------------------.
1620 | yyexhaustedlab -- memory exhaustion comes here.  |
1621 `-------------------------------------------------*/
1622 yyexhaustedlab:
1623   yyerror (YY_("memory exhausted"));
1624   yyresult = 2;
1625   /* Fall through.  */
1626 #endif
1627
1628 yyreturn:
1629   if (yychar != YYEOF && yychar != YYEMPTY)
1630      yydestruct ("Cleanup: discarding lookahead",
1631                  yytoken, &yylval);
1632   while (yyssp != yyss)
1633     {
1634       yydestruct ("Cleanup: popping",
1635                   yystos[*yyssp], yyvsp);
1636       YYPOPSTACK;
1637     }
1638 #ifndef yyoverflow
1639   if (yyss != yyssa)
1640     YYSTACK_FREE (yyss);
1641 #endif
1642   return yyresult;
1643 }
1644
1645
1646 #line 167 "uparse.y"
1647
1648
1649 void yyerror(s)
1650 char *s;
1651 {
1652   printf("Invalid command - %s\n", s);
1653 }
1654
1655
1656