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