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