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