1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
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)
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.
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. */
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.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
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. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
66 /* Put the tokens into the symbol table, so that GDB and other debuggers
108 #define LISTPROPERTY 260
114 #define SETDEVICE 266
115 #define SETPROPERTY 267
144 /* Copy the first part of user declarations. */
148 #include "amrecover.h"
150 #define DATE_ALLOC_SIZE sizeof("YYYY-MM-DD-HH-MM-SS") /* includes null */
152 void yyerror(char *s);
153 extern int yylex(void);
154 extern char * yytext;
157 /* Enabling traces. */
162 /* Enabling verbose error messages. */
163 #ifdef YYERROR_VERBOSE
164 # undef YYERROR_VERBOSE
165 # define YYERROR_VERBOSE 1
167 # define YYERROR_VERBOSE 0
170 /* Enabling the token table. */
171 #ifndef YYTOKEN_TABLE
172 # define YYTOKEN_TABLE 0
175 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
176 typedef union YYSTYPE
184 /* Line 187 of yacc.c. */
187 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
188 # define YYSTYPE_IS_DECLARED 1
189 # define YYSTYPE_IS_TRIVIAL 1
194 /* Copy the second part of user declarations. */
197 /* Line 216 of yacc.c. */
205 typedef YYTYPE_UINT8 yytype_uint8;
207 typedef unsigned char yytype_uint8;
211 typedef YYTYPE_INT8 yytype_int8;
212 #elif (defined __STDC__ || defined __C99__FUNC__ \
213 || defined __cplusplus || defined _MSC_VER)
214 typedef signed char yytype_int8;
216 typedef short int yytype_int8;
220 typedef YYTYPE_UINT16 yytype_uint16;
222 typedef unsigned short int yytype_uint16;
226 typedef YYTYPE_INT16 yytype_int16;
228 typedef short int yytype_int16;
232 # ifdef __SIZE_TYPE__
233 # define YYSIZE_T __SIZE_TYPE__
234 # elif defined size_t
235 # define YYSIZE_T size_t
236 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
237 || defined __cplusplus || defined _MSC_VER)
238 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
239 # define YYSIZE_T size_t
241 # define YYSIZE_T unsigned int
245 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
250 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
251 # define YY_(msgid) dgettext ("bison-runtime", msgid)
255 # define YY_(msgid) msgid
259 /* Suppress unused-variable warnings by "using" E. */
260 #if ! defined lint || defined __GNUC__
261 # define YYUSE(e) ((void) (e))
263 # define YYUSE(e) /* empty */
266 /* Identity function, used to suppress warnings about constant conditions. */
270 #if (defined __STDC__ || defined __C99__FUNC__ \
271 || defined __cplusplus || defined _MSC_VER)
284 #if ! defined yyoverflow || YYERROR_VERBOSE
286 /* The parser invokes alloca or malloc; define the necessary symbols. */
288 # ifdef YYSTACK_USE_ALLOCA
289 # if YYSTACK_USE_ALLOCA
291 # define YYSTACK_ALLOC __builtin_alloca
292 # elif defined __BUILTIN_VA_ARG_INCR
293 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
295 # define YYSTACK_ALLOC __alloca
296 # elif defined _MSC_VER
297 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
298 # define alloca _alloca
300 # define YYSTACK_ALLOC alloca
301 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
302 || defined __cplusplus || defined _MSC_VER)
303 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
312 # ifdef YYSTACK_ALLOC
313 /* Pacify GCC's `empty if-body' warning. */
314 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
315 # ifndef YYSTACK_ALLOC_MAXIMUM
316 /* The OS might guarantee only one guard page at the bottom of the stack,
317 and a page size can be as small as 4096 bytes. So we cannot safely
318 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
319 to allow for a few compiler-allocated temporary stack slots. */
320 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
323 # define YYSTACK_ALLOC YYMALLOC
324 # define YYSTACK_FREE YYFREE
325 # ifndef YYSTACK_ALLOC_MAXIMUM
326 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
328 # if (defined __cplusplus && ! defined _STDLIB_H \
329 && ! ((defined YYMALLOC || defined malloc) \
330 && (defined YYFREE || defined free)))
331 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
337 # define YYMALLOC malloc
338 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
339 || defined __cplusplus || defined _MSC_VER)
340 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
345 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
346 || defined __cplusplus || defined _MSC_VER)
347 void free (void *); /* INFRINGES ON USER NAME SPACE */
351 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
354 #if (! defined yyoverflow \
355 && (! defined __cplusplus \
356 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
358 /* A type that is properly aligned for any stack member. */
365 /* The size of the maximum gap between one aligned stack and the next. */
366 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
368 /* The size of an array large to enough to hold all stacks, each with
370 # define YYSTACK_BYTES(N) \
371 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
372 + YYSTACK_GAP_MAXIMUM)
374 /* Copy COUNT objects from FROM to TO. The source and destination do
377 # if defined __GNUC__ && 1 < __GNUC__
378 # define YYCOPY(To, From, Count) \
379 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
381 # define YYCOPY(To, From, Count) \
385 for (yyi = 0; yyi < (Count); yyi++) \
386 (To)[yyi] = (From)[yyi]; \
392 /* Relocate STACK from its old location to the new one. The
393 local variables YYSIZE and YYSTACKSIZE give the old and new number of
394 elements in the stack, and YYPTR gives the new location of the
395 stack. Advance YYPTR to a properly aligned location for the next
397 # define YYSTACK_RELOCATE(Stack) \
400 YYSIZE_T yynewbytes; \
401 YYCOPY (&yyptr->Stack, Stack, yysize); \
402 Stack = &yyptr->Stack; \
403 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
404 yyptr += yynewbytes / sizeof (*yyptr); \
410 /* YYFINAL -- State number of the termination state. */
412 /* YYLAST -- Last index in YYTABLE. */
415 /* YYNTOKENS -- Number of terminals. */
417 /* YYNNTS -- Number of nonterminals. */
419 /* YYNRULES -- Number of rules. */
421 /* YYNRULES -- Number of states. */
422 #define YYNSTATES 160
424 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
426 #define YYMAXUTOK 291
428 #define YYTRANSLATE(YYX) \
429 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
431 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
432 static const yytype_uint8 yytranslate[] =
434 0, 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, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
460 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
461 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
462 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
467 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
469 static const yytype_uint16 yyprhs[] =
471 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
472 19, 21, 23, 25, 27, 30, 33, 37, 40, 44,
473 47, 50, 54, 58, 61, 66, 70, 75, 77, 81,
474 84, 88, 92, 98, 101, 105, 110, 116, 120, 125,
475 130, 136, 139, 143, 147, 152, 156, 160, 163, 167,
476 171, 174, 178, 182, 186, 190, 193, 196, 200, 203,
477 207, 210, 213, 216, 219, 223, 226, 230, 233, 236,
478 239, 242, 245, 248, 251, 254, 258, 261, 263, 267,
479 270, 272, 276, 279, 281, 285, 288, 290, 293, 296,
480 300, 304, 307, 310, 313, 316, 319, 322, 325, 327,
484 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
485 static const yytype_int8 yyrhs[] =
487 38, 0, -1, 39, -1, 40, -1, 41, -1, 42,
488 -1, 43, -1, 45, -1, 47, -1, 49, -1, 51,
489 -1, 52, -1, 53, -1, 54, -1, 3, 35, -1,
490 3, 56, -1, 4, 36, 35, -1, 4, 35, -1,
491 4, 36, 56, -1, 5, 35, -1, 5, 56, -1,
492 6, 36, 35, -1, 6, 36, 56, -1, 6, 35,
493 -1, 7, 36, 36, 35, -1, 7, 36, 35, -1,
494 7, 36, 36, 56, -1, 7, -1, 9, 36, 35,
495 -1, 9, 35, -1, 9, 36, 56, -1, 11, 36,
496 35, -1, 11, 21, 36, 36, 35, -1, 11, 35,
497 -1, 11, 36, 56, -1, 11, 21, 36, 35, -1,
498 11, 21, 36, 36, 56, -1, 12, 36, 55, -1,
499 12, 33, 36, 55, -1, 12, 34, 36, 55, -1,
500 12, 33, 34, 36, 55, -1, 12, 35, -1, 12,
501 33, 35, -1, 12, 34, 35, -1, 12, 33, 34,
502 35, -1, 13, 36, 35, -1, 13, 36, 56, -1,
503 13, 35, -1, 14, 36, 35, -1, 14, 36, 56,
504 -1, 14, 35, -1, 10, 31, 35, -1, 10, 32,
505 35, -1, 10, 31, 56, -1, 10, 32, 56, -1,
506 10, 56, -1, 10, 35, -1, 8, 36, 35, -1,
507 8, 35, -1, 8, 36, 56, -1, 16, 35, -1,
508 16, 56, -1, 17, 35, -1, 17, 56, -1, 22,
509 36, 35, -1, 22, 35, -1, 22, 36, 56, -1,
510 25, 35, -1, 25, 56, -1, 26, 35, -1, 26,
511 56, -1, 30, 35, -1, 30, 56, -1, 15, 35,
512 -1, 15, 56, -1, 18, 44, 35, -1, 44, 36,
513 -1, 36, -1, 19, 46, 35, -1, 46, 36, -1,
514 36, -1, 23, 48, 35, -1, 48, 36, -1, 36,
515 -1, 24, 50, 35, -1, 50, 36, -1, 36, -1,
516 29, 35, -1, 29, 56, -1, 28, 36, 35, -1,
517 28, 36, 56, -1, 28, 35, -1, 27, 35, -1,
518 27, 56, -1, 20, 35, -1, 20, 56, -1, 36,
519 57, -1, 36, 55, -1, 35, -1, 36, 57, -1,
523 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
524 static const yytype_uint16 yyrline[] =
526 0, 68, 68, 69, 70, 71, 72, 73, 74, 75,
527 76, 77, 78, 79, 83, 84, 85, 86, 87, 88,
528 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
529 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
530 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
531 119, 120, 121, 122, 123, 124, 125, 129, 175, 176,
532 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
533 190, 191, 192, 196, 197, 201, 205, 206, 210, 214,
534 215, 219, 223, 224, 228, 232, 233, 237, 238, 239,
535 243, 244, 248, 249, 253, 254, 258, 267, 268, 272,
540 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
541 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
542 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
543 static const char *const yytname[] =
545 "$end", "error", "$undefined", "LISTHOST", "LISTDISK", "LISTPROPERTY",
546 "SETHOST", "SETDISK", "SETDATE", "SETTAPE", "SETMODE", "SETDEVICE",
547 "SETPROPERTY", "CD", "CDX", "QUIT", "DHIST", "LS", "ADD", "ADDX",
548 "EXTRACT", "DASH_H", "LIST", "DELETE", "DELETEX", "PWD", "CLEAR", "HELP",
549 "LCD", "LPWD", "MODE", "SMB", "TAR", "APPEND", "PRIORITY", "NL",
550 "STRING", "$accept", "ucommand", "set_command", "setdate_command",
551 "display_command", "quit_command", "add_command", "add_path",
552 "addx_command", "addx_path", "delete_command", "delete_path",
553 "deletex_command", "deletex_path", "local_command", "help_command",
554 "extract_command", "invalid_command", "property_value", "invalid_string",
560 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
562 static const yytype_uint16 yytoknum[] =
564 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
565 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
566 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
567 285, 286, 287, 288, 289, 290, 291
571 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
572 static const yytype_uint8 yyr1[] =
574 0, 37, 38, 38, 38, 38, 38, 38, 38, 38,
575 38, 38, 38, 38, 39, 39, 39, 39, 39, 39,
576 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
577 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
578 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
579 39, 39, 39, 39, 39, 39, 39, 40, 40, 40,
580 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
581 41, 41, 41, 42, 42, 43, 44, 44, 45, 46,
582 46, 47, 48, 48, 49, 50, 50, 51, 51, 51,
583 51, 51, 52, 52, 53, 53, 54, 55, 55, 56,
587 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
588 static const yytype_uint8 yyr2[] =
590 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
591 1, 1, 1, 1, 2, 2, 3, 2, 3, 2,
592 2, 3, 3, 2, 4, 3, 4, 1, 3, 2,
593 3, 3, 5, 2, 3, 4, 5, 3, 4, 4,
594 5, 2, 3, 3, 4, 3, 3, 2, 3, 3,
595 2, 3, 3, 3, 3, 2, 2, 3, 2, 3,
596 2, 2, 2, 2, 3, 2, 3, 2, 2, 2,
597 2, 2, 2, 2, 2, 3, 2, 1, 3, 2,
598 1, 3, 2, 1, 3, 2, 1, 2, 2, 3,
599 3, 2, 2, 2, 2, 2, 2, 2, 1, 2,
603 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
604 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
605 means the default is an error. */
606 static const yytype_uint8 yydefact[] =
608 0, 0, 0, 0, 0, 27, 0, 0, 0, 0,
609 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
611 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
612 12, 13, 14, 0, 15, 17, 0, 19, 20, 23,
613 0, 0, 58, 0, 29, 0, 0, 0, 56, 55,
614 0, 33, 0, 0, 0, 41, 0, 47, 0, 50,
615 0, 73, 74, 60, 61, 62, 63, 77, 0, 80,
616 0, 94, 95, 65, 0, 83, 0, 86, 0, 67,
617 68, 69, 70, 92, 93, 91, 0, 87, 88, 71,
618 72, 101, 0, 96, 1, 99, 16, 18, 21, 22,
619 25, 0, 57, 59, 28, 30, 51, 53, 52, 54,
620 0, 31, 34, 0, 42, 0, 43, 0, 98, 0,
621 37, 45, 46, 48, 49, 75, 76, 78, 79, 64,
622 66, 81, 82, 84, 85, 89, 90, 100, 24, 26,
623 35, 0, 44, 0, 38, 39, 97, 32, 36, 40
626 /* YYDEFGOTO[NTERM-NUM]. */
627 static const yytype_int16 yydefgoto[] =
629 -1, 29, 30, 31, 32, 33, 34, 78, 35, 80,
630 36, 86, 37, 88, 38, 39, 40, 41, 130, 44,
634 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
636 #define YYPACT_NINF -124
637 static const yytype_int16 yypact[] =
639 106, -22, -10, 2, 4, -20, 6, 9, -4, -18,
640 0, 13, 20, 22, 26, 28, -14, -7, 33, 35,
641 10, 15, 37, 39, 41, 43, 47, 49, 51, 66,
642 -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
643 -124, -124, -124, 51, -124, -124, 53, -124, -124, -124,
644 55, 59, -124, 61, -124, 63, 65, 67, -124, -124,
645 44, -124, 69, -27, 71, -124, 102, -124, 104, -124,
646 108, -124, -124, -124, -124, -124, -124, -124, 110, -124,
647 114, -124, -124, -124, 116, -124, 118, -124, 120, -124,
648 -124, -124, -124, -124, -124, -124, 122, -124, -124, -124,
649 -124, -124, 51, -124, -124, -124, -124, -124, -124, -124,
650 -124, 124, -124, -124, -124, -124, -124, -124, -124, -124,
651 126, -124, -124, 128, -124, 102, -124, 102, -124, 102,
652 -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
653 -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
654 -124, 130, -124, 102, -124, -124, -124, -124, -124, -124
657 /* YYPGOTO[NTERM-NUM]. */
658 static const yytype_int8 yypgoto[] =
660 -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
661 -124, -124, -124, -124, -124, -124, -124, -124, -123, -3,
665 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
666 positive, shift that token. If negative, reduce the rule which
667 number is the opposite. If zero, do what YYDEFACT says.
668 If YYTABLE_NINF, syntax error. */
669 #define YYTABLE_NINF -1
670 static const yytype_uint8 yytable[] =
672 48, 105, 154, 60, 155, 59, 156, 123, 124, 125,
673 72, 74, 76, 42, 43, 82, 51, 61, 62, 90,
674 92, 94, 77, 98, 100, 45, 46, 56, 57, 79,
675 159, 58, 43, 63, 64, 65, 66, 47, 43, 49,
676 50, 52, 53, 107, 54, 55, 85, 109, 67, 68,
677 113, 87, 115, 117, 119, 69, 70, 71, 43, 122,
678 147, 73, 43, 75, 43, 132, 104, 134, 81, 43,
679 83, 84, 89, 43, 91, 43, 93, 43, 95, 96,
680 120, 140, 97, 43, 99, 43, 101, 102, 106, 43,
681 108, 43, 0, 146, 110, 111, 112, 43, 114, 43,
682 116, 43, 118, 43, 121, 43, 126, 127, 149, 1,
683 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
684 12, 13, 14, 15, 16, 17, 18, 0, 19, 20,
685 21, 22, 23, 24, 25, 26, 27, 128, 129, 131,
686 43, 0, 28, 133, 43, 135, 136, 0, 158, 137,
687 138, 139, 43, 141, 142, 143, 144, 145, 43, 148,
688 43, 150, 151, 152, 153, 157, 43
691 static const yytype_int16 yycheck[] =
693 3, 43, 125, 21, 127, 8, 129, 34, 35, 36,
694 13, 14, 15, 35, 36, 18, 36, 35, 36, 22,
695 23, 24, 36, 26, 27, 35, 36, 31, 32, 36,
696 153, 35, 36, 33, 34, 35, 36, 35, 36, 35,
697 36, 35, 36, 46, 35, 36, 36, 50, 35, 36,
698 53, 36, 55, 56, 57, 35, 36, 35, 36, 62,
699 102, 35, 36, 35, 36, 68, 0, 70, 35, 36,
700 35, 36, 35, 36, 35, 36, 35, 36, 35, 36,
701 36, 84, 35, 36, 35, 36, 35, 36, 35, 36,
702 35, 36, -1, 96, 35, 36, 35, 36, 35, 36,
703 35, 36, 35, 36, 35, 36, 35, 36, 111, 3,
704 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
705 14, 15, 16, 17, 18, 19, 20, -1, 22, 23,
706 24, 25, 26, 27, 28, 29, 30, 35, 36, 35,
707 36, -1, 36, 35, 36, 35, 36, -1, 151, 35,
708 36, 35, 36, 35, 36, 35, 36, 35, 36, 35,
709 36, 35, 36, 35, 36, 35, 36
712 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
713 symbol of state STATE-NUM. */
714 static const yytype_uint8 yystos[] =
716 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
717 12, 13, 14, 15, 16, 17, 18, 19, 20, 22,
718 23, 24, 25, 26, 27, 28, 29, 30, 36, 38,
719 39, 40, 41, 42, 43, 45, 47, 49, 51, 52,
720 53, 54, 35, 36, 56, 35, 36, 35, 56, 35,
721 36, 36, 35, 36, 35, 36, 31, 32, 35, 56,
722 21, 35, 36, 33, 34, 35, 36, 35, 36, 35,
723 36, 35, 56, 35, 56, 35, 56, 36, 44, 36,
724 46, 35, 56, 35, 36, 36, 48, 36, 50, 35,
725 56, 35, 56, 35, 56, 35, 36, 35, 56, 35,
726 56, 35, 36, 57, 0, 57, 35, 56, 35, 56,
727 35, 36, 35, 56, 35, 56, 35, 56, 35, 56,
728 36, 35, 56, 34, 35, 36, 35, 36, 35, 36,
729 55, 35, 56, 35, 56, 35, 36, 35, 36, 35,
730 56, 35, 36, 35, 36, 35, 56, 57, 35, 56,
731 35, 36, 35, 36, 55, 55, 55, 35, 56, 55
734 #define yyerrok (yyerrstatus = 0)
735 #define yyclearin (yychar = YYEMPTY)
739 #define YYACCEPT goto yyacceptlab
740 #define YYABORT goto yyabortlab
741 #define YYERROR goto yyerrorlab
744 /* Like YYERROR except do call yyerror. This remains here temporarily
745 to ease the transition to the new meaning of YYERROR, for GCC.
746 Once GCC version 2 has supplanted version 1, this can go. */
748 #define YYFAIL goto yyerrlab
750 #define YYRECOVERING() (!!yyerrstatus)
752 #define YYBACKUP(Token, Value) \
754 if (yychar == YYEMPTY && yylen == 1) \
758 yytoken = YYTRANSLATE (yychar); \
764 yyerror (YY_("syntax error: cannot back up")); \
771 #define YYERRCODE 256
774 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
775 If N is 0, then set CURRENT to the empty location which ends
776 the previous symbol: RHS[0] (always defined). */
778 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
779 #ifndef YYLLOC_DEFAULT
780 # define YYLLOC_DEFAULT(Current, Rhs, N) \
784 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
785 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
786 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
787 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
791 (Current).first_line = (Current).last_line = \
792 YYRHSLOC (Rhs, 0).last_line; \
793 (Current).first_column = (Current).last_column = \
794 YYRHSLOC (Rhs, 0).last_column; \
800 /* YY_LOCATION_PRINT -- Print the location on the stream.
801 This macro was not mandated originally: define only if we know
802 we won't break user code: when these are the locations we know. */
804 #ifndef YY_LOCATION_PRINT
805 # if YYLTYPE_IS_TRIVIAL
806 # define YY_LOCATION_PRINT(File, Loc) \
807 fprintf (File, "%d.%d-%d.%d", \
808 (Loc).first_line, (Loc).first_column, \
809 (Loc).last_line, (Loc).last_column)
811 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
816 /* YYLEX -- calling `yylex' with the right arguments. */
819 # define YYLEX yylex (YYLEX_PARAM)
821 # define YYLEX yylex ()
824 /* Enable debugging if requested. */
828 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
829 # define YYFPRINTF fprintf
832 # define YYDPRINTF(Args) \
838 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
842 YYFPRINTF (stderr, "%s ", Title); \
843 yy_symbol_print (stderr, \
845 YYFPRINTF (stderr, "\n"); \
850 /*--------------------------------.
851 | Print this symbol on YYOUTPUT. |
852 `--------------------------------*/
855 #if (defined __STDC__ || defined __C99__FUNC__ \
856 || defined __cplusplus || defined _MSC_VER)
858 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
861 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
864 YYSTYPE const * const yyvaluep;
870 if (yytype < YYNTOKENS)
871 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
883 /*--------------------------------.
884 | Print this symbol on YYOUTPUT. |
885 `--------------------------------*/
887 #if (defined __STDC__ || defined __C99__FUNC__ \
888 || defined __cplusplus || defined _MSC_VER)
890 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
893 yy_symbol_print (yyoutput, yytype, yyvaluep)
896 YYSTYPE const * const yyvaluep;
899 if (yytype < YYNTOKENS)
900 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
902 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
904 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
905 YYFPRINTF (yyoutput, ")");
908 /*------------------------------------------------------------------.
909 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
911 `------------------------------------------------------------------*/
913 #if (defined __STDC__ || defined __C99__FUNC__ \
914 || defined __cplusplus || defined _MSC_VER)
916 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
919 yy_stack_print (bottom, top)
920 yytype_int16 *bottom;
924 YYFPRINTF (stderr, "Stack now");
925 for (; bottom <= top; ++bottom)
926 YYFPRINTF (stderr, " %d", *bottom);
927 YYFPRINTF (stderr, "\n");
930 # define YY_STACK_PRINT(Bottom, Top) \
933 yy_stack_print ((Bottom), (Top)); \
937 /*------------------------------------------------.
938 | Report that the YYRULE is going to be reduced. |
939 `------------------------------------------------*/
941 #if (defined __STDC__ || defined __C99__FUNC__ \
942 || defined __cplusplus || defined _MSC_VER)
944 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
947 yy_reduce_print (yyvsp, yyrule)
952 int yynrhs = yyr2[yyrule];
954 unsigned long int yylno = yyrline[yyrule];
955 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
957 /* The symbols being reduced. */
958 for (yyi = 0; yyi < yynrhs; yyi++)
960 fprintf (stderr, " $%d = ", yyi + 1);
961 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
962 &(yyvsp[(yyi + 1) - (yynrhs)])
964 fprintf (stderr, "\n");
968 # define YY_REDUCE_PRINT(Rule) \
971 yy_reduce_print (yyvsp, Rule); \
974 /* Nonzero means print parse trace. It is left uninitialized so that
975 multiple parsers can coexist. */
978 # define YYDPRINTF(Args)
979 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
980 # define YY_STACK_PRINT(Bottom, Top)
981 # define YY_REDUCE_PRINT(Rule)
982 #endif /* !YYDEBUG */
985 /* YYINITDEPTH -- initial size of the parser's stacks. */
987 # define YYINITDEPTH 200
990 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
991 if the built-in stack extension method is used).
993 Do not make this value too large; the results are undefined if
994 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
995 evaluated with infinite-precision integer arithmetic. */
998 # define YYMAXDEPTH 10000
1006 # if defined __GLIBC__ && defined _STRING_H
1007 # define yystrlen strlen
1009 /* Return the length of YYSTR. */
1010 #if (defined __STDC__ || defined __C99__FUNC__ \
1011 || defined __cplusplus || defined _MSC_VER)
1013 yystrlen (const char *yystr)
1021 for (yylen = 0; yystr[yylen]; yylen++)
1029 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1030 # define yystpcpy stpcpy
1032 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1034 #if (defined __STDC__ || defined __C99__FUNC__ \
1035 || defined __cplusplus || defined _MSC_VER)
1037 yystpcpy (char *yydest, const char *yysrc)
1040 yystpcpy (yydest, yysrc)
1046 const char *yys = yysrc;
1048 while ((*yyd++ = *yys++) != '\0')
1057 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1058 quotes and backslashes, so that it's suitable for yyerror. The
1059 heuristic is that double-quoting is unnecessary unless the string
1060 contains an apostrophe, a comma, or backslash (other than
1061 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1062 null, do not copy; instead, return the length of what the result
1065 yytnamerr (char *yyres, const char *yystr)
1070 char const *yyp = yystr;
1077 goto do_not_strip_quotes;
1081 goto do_not_strip_quotes;
1094 do_not_strip_quotes: ;
1098 return yystrlen (yystr);
1100 return yystpcpy (yyres, yystr) - yyres;
1104 /* Copy into YYRESULT an error message about the unexpected token
1105 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1106 including the terminating null byte. If YYRESULT is null, do not
1107 copy anything; just return the number of bytes that would be
1108 copied. As a special case, return 0 if an ordinary "syntax error"
1109 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1110 size calculation. */
1112 yysyntax_error (char *yyresult, int yystate, int yychar)
1114 int yyn = yypact[yystate];
1116 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1120 int yytype = YYTRANSLATE (yychar);
1121 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1122 YYSIZE_T yysize = yysize0;
1124 int yysize_overflow = 0;
1125 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1126 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1130 /* This is so xgettext sees the translatable formats that are
1131 constructed on the fly. */
1132 YY_("syntax error, unexpected %s");
1133 YY_("syntax error, unexpected %s, expecting %s");
1134 YY_("syntax error, unexpected %s, expecting %s or %s");
1135 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1136 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1140 static char const yyunexpected[] = "syntax error, unexpected %s";
1141 static char const yyexpecting[] = ", expecting %s";
1142 static char const yyor[] = " or %s";
1143 char yyformat[sizeof yyunexpected
1144 + sizeof yyexpecting - 1
1145 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1146 * (sizeof yyor - 1))];
1147 char const *yyprefix = yyexpecting;
1149 /* Start YYX at -YYN if negative to avoid negative indexes in
1151 int yyxbegin = yyn < 0 ? -yyn : 0;
1153 /* Stay within bounds of both yycheck and yytname. */
1154 int yychecklim = YYLAST - yyn + 1;
1155 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1158 yyarg[0] = yytname[yytype];
1159 yyfmt = yystpcpy (yyformat, yyunexpected);
1161 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1162 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1164 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1168 yyformat[sizeof yyunexpected - 1] = '\0';
1171 yyarg[yycount++] = yytname[yyx];
1172 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1173 yysize_overflow |= (yysize1 < yysize);
1175 yyfmt = yystpcpy (yyfmt, yyprefix);
1179 yyf = YY_(yyformat);
1180 yysize1 = yysize + yystrlen (yyf);
1181 yysize_overflow |= (yysize1 < yysize);
1184 if (yysize_overflow)
1185 return YYSIZE_MAXIMUM;
1189 /* Avoid sprintf, as that infringes on the user's name space.
1190 Don't have undefined behavior even if the translation
1191 produced a string with the wrong number of "%s"s. */
1192 char *yyp = yyresult;
1194 while ((*yyp = *yyf) != '\0')
1196 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1198 yyp += yytnamerr (yyp, yyarg[yyi++]);
1211 #endif /* YYERROR_VERBOSE */
1214 /*-----------------------------------------------.
1215 | Release the memory associated to this symbol. |
1216 `-----------------------------------------------*/
1219 #if (defined __STDC__ || defined __C99__FUNC__ \
1220 || defined __cplusplus || defined _MSC_VER)
1222 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1225 yydestruct (yymsg, yytype, yyvaluep)
1235 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1246 /* Prevent warnings from -Wmissing-prototypes. */
1248 #ifdef YYPARSE_PARAM
1249 #if defined __STDC__ || defined __cplusplus
1250 int yyparse (void *YYPARSE_PARAM);
1254 #else /* ! YYPARSE_PARAM */
1255 #if defined __STDC__ || defined __cplusplus
1260 #endif /* ! YYPARSE_PARAM */
1264 /* The look-ahead symbol. */
1267 /* The semantic value of the look-ahead symbol. */
1270 /* Number of syntax errors so far. */
1279 #ifdef YYPARSE_PARAM
1280 #if (defined __STDC__ || defined __C99__FUNC__ \
1281 || defined __cplusplus || defined _MSC_VER)
1283 yyparse (void *YYPARSE_PARAM)
1286 yyparse (YYPARSE_PARAM)
1287 void *YYPARSE_PARAM;
1289 #else /* ! YYPARSE_PARAM */
1290 #if (defined __STDC__ || defined __C99__FUNC__ \
1291 || defined __cplusplus || defined _MSC_VER)
1305 /* Number of tokens to shift before error messages enabled. */
1307 /* Look-ahead token as an internal (translated) token number. */
1310 /* Buffer for error messages, and its allocated size. */
1312 char *yymsg = yymsgbuf;
1313 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1316 /* Three stacks and their tools:
1317 `yyss': related to states,
1318 `yyvs': related to semantic values,
1319 `yyls': related to locations.
1321 Refer to the stacks thru separate pointers, to allow yyoverflow
1322 to reallocate them elsewhere. */
1324 /* The state stack. */
1325 yytype_int16 yyssa[YYINITDEPTH];
1326 yytype_int16 *yyss = yyssa;
1327 yytype_int16 *yyssp;
1329 /* The semantic value stack. */
1330 YYSTYPE yyvsa[YYINITDEPTH];
1331 YYSTYPE *yyvs = yyvsa;
1336 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1338 YYSIZE_T yystacksize = YYINITDEPTH;
1340 /* The variables used to return semantic value and location from the
1345 /* The number of symbols on the RHS of the reduced rule.
1346 Keep to zero when no symbol should be popped. */
1349 YYDPRINTF ((stderr, "Starting parse\n"));
1354 yychar = YYEMPTY; /* Cause a token to be read. */
1356 /* Initialize stack pointers.
1357 Waste one element of value and location stack
1358 so that they stay on the same level as the state stack.
1359 The wasted elements are never initialized. */
1366 /*------------------------------------------------------------.
1367 | yynewstate -- Push a new state, which is found in yystate. |
1368 `------------------------------------------------------------*/
1370 /* In all cases, when you get here, the value and location stacks
1371 have just been pushed. So pushing a state here evens the stacks. */
1377 if (yyss + yystacksize - 1 <= yyssp)
1379 /* Get the current used size of the three stacks, in elements. */
1380 YYSIZE_T yysize = yyssp - yyss + 1;
1384 /* Give user a chance to reallocate the stack. Use copies of
1385 these so that the &'s don't force the real ones into
1387 YYSTYPE *yyvs1 = yyvs;
1388 yytype_int16 *yyss1 = yyss;
1391 /* Each stack pointer address is followed by the size of the
1392 data in use in that stack, in bytes. This used to be a
1393 conditional around just the two extra args, but that might
1394 be undefined if yyoverflow is a macro. */
1395 yyoverflow (YY_("memory exhausted"),
1396 &yyss1, yysize * sizeof (*yyssp),
1397 &yyvs1, yysize * sizeof (*yyvsp),
1404 #else /* no yyoverflow */
1405 # ifndef YYSTACK_RELOCATE
1406 goto yyexhaustedlab;
1408 /* Extend the stack our own way. */
1409 if (YYMAXDEPTH <= yystacksize)
1410 goto yyexhaustedlab;
1412 if (YYMAXDEPTH < yystacksize)
1413 yystacksize = YYMAXDEPTH;
1416 yytype_int16 *yyss1 = yyss;
1417 union yyalloc *yyptr =
1418 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1420 goto yyexhaustedlab;
1421 YYSTACK_RELOCATE (yyss);
1422 YYSTACK_RELOCATE (yyvs);
1424 # undef YYSTACK_RELOCATE
1426 YYSTACK_FREE (yyss1);
1429 #endif /* no yyoverflow */
1431 yyssp = yyss + yysize - 1;
1432 yyvsp = yyvs + yysize - 1;
1435 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1436 (unsigned long int) yystacksize));
1438 if (yyss + yystacksize - 1 <= yyssp)
1442 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1451 /* Do appropriate processing given the current state. Read a
1452 look-ahead token if we need one and don't already have one. */
1454 /* First try to decide what to do without reference to look-ahead token. */
1455 yyn = yypact[yystate];
1456 if (yyn == YYPACT_NINF)
1459 /* Not known => get a look-ahead token if don't already have one. */
1461 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1462 if (yychar == YYEMPTY)
1464 YYDPRINTF ((stderr, "Reading a token: "));
1468 if (yychar <= YYEOF)
1470 yychar = yytoken = YYEOF;
1471 YYDPRINTF ((stderr, "Now at end of input.\n"));
1475 yytoken = YYTRANSLATE (yychar);
1476 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1479 /* If the proper action on seeing token YYTOKEN is to reduce or to
1480 detect an error, take that action. */
1482 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1487 if (yyn == 0 || yyn == YYTABLE_NINF)
1496 /* Count tokens shifted since error; after three, turn off error
1501 /* Shift the look-ahead token. */
1502 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1504 /* Discard the shifted token unless it is eof. */
1505 if (yychar != YYEOF)
1514 /*-----------------------------------------------------------.
1515 | yydefault -- do the default action for the current state. |
1516 `-----------------------------------------------------------*/
1518 yyn = yydefact[yystate];
1524 /*-----------------------------.
1525 | yyreduce -- Do a reduction. |
1526 `-----------------------------*/
1528 /* yyn is the number of a rule to reduce with. */
1531 /* If YYLEN is nonzero, implement the default value of the action:
1534 Otherwise, the following line sets YYVAL to garbage.
1535 This behavior is undocumented and Bison
1536 users should not rely upon it. Assigning to YYVAL
1537 unconditionally makes the parser a bit smaller, and it avoids a
1538 GCC warning that YYVAL may be used uninitialized. */
1539 yyval = yyvsp[1-yylen];
1542 YY_REDUCE_PRINT (yyn);
1552 { yyerror("Invalid argument"); }
1557 { list_disk((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
1562 { list_disk(NULL); }
1567 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
1572 { list_property(); }
1577 { yyerror("Invalid argument"); }
1582 { set_host((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
1587 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
1592 { yyerror("Argument required"); }
1597 { set_disk((yyvsp[(2) - (4)].strval), (yyvsp[(3) - (4)].strval)); amfree((yyvsp[(2) - (4)].strval)); amfree((yyvsp[(3) - (4)].strval)); }
1602 { set_disk((yyvsp[(2) - (3)].strval), NULL); amfree((yyvsp[(2) - (3)].strval)); }
1607 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (4)].strval)); amfree((yyvsp[(3) - (4)].strval)); }
1612 { yyerror("Argument required"); }
1617 { set_tape((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
1622 { set_tape("default"); }
1627 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
1631 #line 100 "uparse.y"
1632 { set_device(NULL, (yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
1636 #line 101 "uparse.y"
1637 { set_device((yyvsp[(3) - (5)].strval), (yyvsp[(4) - (5)].strval)); amfree((yyvsp[(3) - (5)].strval)); amfree((yyvsp[(4) - (5)].strval)); }
1641 #line 102 "uparse.y"
1642 { set_device(NULL, NULL); }
1646 #line 103 "uparse.y"
1647 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
1651 #line 104 "uparse.y"
1652 { yyerror("Invalid argument"); amfree((yyvsp[(3) - (4)].strval)); }
1656 #line 105 "uparse.y"
1657 { yyerror("Invalid argument"); amfree((yyvsp[(3) - (5)].strval)); amfree((yyvsp[(4) - (5)].strval)); }
1661 #line 106 "uparse.y"
1662 { set_property_name((yyvsp[(2) - (3)].strval), 0); amfree((yyvsp[(2) - (3)].strval)); }
1666 #line 107 "uparse.y"
1667 { set_property_name((yyvsp[(3) - (4)].strval), 1); amfree((yyvsp[(3) - (4)].strval)); }
1671 #line 108 "uparse.y"
1672 { set_property_name((yyvsp[(3) - (4)].strval), 0); amfree((yyvsp[(3) - (4)].strval)); }
1676 #line 109 "uparse.y"
1677 { set_property_name((yyvsp[(4) - (5)].strval), 1); amfree((yyvsp[(4) - (5)].strval)); }
1681 #line 110 "uparse.y"
1682 { yyerror("Invalid argument"); }
1686 #line 111 "uparse.y"
1687 { yyerror("Invalid argument"); }
1691 #line 112 "uparse.y"
1692 { yyerror("Invalid argument"); }
1696 #line 113 "uparse.y"
1697 { yyerror("Invalid argument"); }
1701 #line 114 "uparse.y"
1702 { cd_glob((yyvsp[(2) - (3)].strval), 1); amfree((yyvsp[(2) - (3)].strval)); }
1706 #line 115 "uparse.y"
1707 { yyerror("Invalid argument"); }
1711 #line 116 "uparse.y"
1712 { yyerror("Argument required"); }
1716 #line 117 "uparse.y"
1717 { cd_regex((yyvsp[(2) - (3)].strval), 1); amfree((yyvsp[(2) - (3)].strval)); }
1721 #line 118 "uparse.y"
1722 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
1726 #line 119 "uparse.y"
1727 { yyerror("Argument required"); }
1731 #line 120 "uparse.y"
1732 { set_mode(SAMBA_SMBCLIENT); }
1736 #line 121 "uparse.y"
1737 { set_mode(SAMBA_TAR); }
1741 #line 122 "uparse.y"
1742 { yyerror("Invalid argument"); }
1746 #line 123 "uparse.y"
1747 { yyerror("Invalid argument"); }
1751 #line 124 "uparse.y"
1752 { yyerror("Invalid argument"); }
1756 #line 125 "uparse.y"
1757 { yyerror("Argument required"); }
1761 #line 129 "uparse.y"
1765 int y=2000, m=0, d=1, h=0, mi=0, s=0;
1767 char *mydate = (yyvsp[(2) - (3)].strval);
1769 now = time((time_t *)NULL);
1770 t = localtime(&now);
1772 y = 1900+t->tm_year;
1776 if (sscanf(mydate, "---%d", &d) == 1 ||
1777 sscanf(mydate, "--%d-%d", &m, &d) == 2 ||
1778 sscanf(mydate, "%d-%d-%d-%d-%d-%d", &y, &m, &d, &h, &mi, &s) >= 3) {
1781 } else if (y < 100) {
1784 if(y < 1000 || y > 9999) {
1785 printf("invalid year");
1786 } else if(m < 1 || m > 12) {
1787 printf("invalid month");
1788 } else if(d < 1 || d > 31) {
1789 printf("invalid day");
1790 } else if(h < 0 || h > 24) {
1791 printf("invalid hour");
1792 } else if(mi < 0 || mi > 59) {
1793 printf("invalid minute");
1794 } else if(s < 0 || s > 59) {
1795 printf("invalid second");
1797 char result[DATE_ALLOC_SIZE];
1798 if (h == 0 && mi == 0 && s == 0)
1799 g_snprintf(result, DATE_ALLOC_SIZE, "%04d-%02d-%02d", y, m, d);
1801 g_snprintf(result, DATE_ALLOC_SIZE, "%04d-%02d-%02d-%02d-%02d-%02d", y, m, d, h, mi, s);
1805 printf("Invalid date: %s\n", mydate);
1811 #line 175 "uparse.y"
1812 { yyerror("Argument required"); }
1816 #line 176 "uparse.y"
1817 { yyerror("Invalid argument"); }
1821 #line 180 "uparse.y"
1822 { list_disk_history(); }
1826 #line 181 "uparse.y"
1827 { yyerror("Invalid argument"); }
1831 #line 182 "uparse.y"
1832 { list_directory(); }
1836 #line 183 "uparse.y"
1837 { yyerror("Invalid argument"); }
1841 #line 184 "uparse.y"
1842 { display_extract_list((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
1846 #line 185 "uparse.y"
1847 { display_extract_list(NULL); }
1851 #line 186 "uparse.y"
1852 { yyerror("Invalid argument"); }
1856 #line 187 "uparse.y"
1857 { show_directory(); }
1861 #line 188 "uparse.y"
1862 { yyerror("Invalid argument"); }
1866 #line 189 "uparse.y"
1867 { clear_extract_list(); }
1871 #line 190 "uparse.y"
1872 { yyerror("Invalid argument"); }
1876 #line 191 "uparse.y"
1881 #line 192 "uparse.y"
1882 { yyerror("Invalid argument"); }
1886 #line 196 "uparse.y"
1891 #line 197 "uparse.y"
1892 { yyerror("Invalid argument"); }
1896 #line 205 "uparse.y"
1897 { add_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1901 #line 206 "uparse.y"
1902 { add_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
1906 #line 214 "uparse.y"
1907 { add_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1911 #line 215 "uparse.y"
1912 { add_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
1916 #line 223 "uparse.y"
1917 { delete_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1921 #line 224 "uparse.y"
1922 { delete_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
1926 #line 232 "uparse.y"
1927 { delete_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1931 #line 233 "uparse.y"
1932 { delete_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
1936 #line 237 "uparse.y"
1937 { char * buf= g_get_current_dir(); puts(buf); free(buf); }
1941 #line 238 "uparse.y"
1942 { yyerror("Invalid argument"); }
1946 #line 239 "uparse.y"
1948 local_cd((yyvsp[(2) - (3)].strval));
1949 amfree((yyvsp[(2) - (3)].strval));
1954 #line 243 "uparse.y"
1955 { yyerror("Invalid argument"); }
1959 #line 244 "uparse.y"
1960 { yyerror("Argument required"); }
1964 #line 248 "uparse.y"
1969 #line 249 "uparse.y"
1970 { yyerror("Invalid argument"); }
1974 #line 253 "uparse.y"
1975 { extract_files(); }
1979 #line 254 "uparse.y"
1980 { yyerror("Invalid argument"); }
1984 #line 258 "uparse.y"
1986 char * errstr = vstralloc("Invalid command: ", (yyvsp[(1) - (2)].strval), NULL);
1994 #line 267 "uparse.y"
1995 { add_property_value((yyvsp[(1) - (2)].strval)); amfree( (yyvsp[(1) - (2)].strval)); }
1999 #line 268 "uparse.y"
2004 #line 272 "uparse.y"
2005 { amfree((yyvsp[(1) - (2)].strval)); }
2009 #line 276 "uparse.y"
2010 { amfree((yyvsp[(1) - (2)].strval)); }
2014 #line 277 "uparse.y"
2019 /* Line 1267 of yacc.c. */
2020 #line 2021 "uparse.c"
2023 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2027 YY_STACK_PRINT (yyss, yyssp);
2032 /* Now `shift' the result of the reduction. Determine what state
2033 that goes to, based on the state we popped back to and the rule
2034 number reduced by. */
2038 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2039 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2040 yystate = yytable[yystate];
2042 yystate = yydefgoto[yyn - YYNTOKENS];
2047 /*------------------------------------.
2048 | yyerrlab -- here on detecting error |
2049 `------------------------------------*/
2051 /* If not already recovering from an error, report this error. */
2055 #if ! YYERROR_VERBOSE
2056 yyerror (YY_("syntax error"));
2059 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2060 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2062 YYSIZE_T yyalloc = 2 * yysize;
2063 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2064 yyalloc = YYSTACK_ALLOC_MAXIMUM;
2065 if (yymsg != yymsgbuf)
2066 YYSTACK_FREE (yymsg);
2067 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2069 yymsg_alloc = yyalloc;
2073 yymsg_alloc = sizeof yymsgbuf;
2077 if (0 < yysize && yysize <= yymsg_alloc)
2079 (void) yysyntax_error (yymsg, yystate, yychar);
2084 yyerror (YY_("syntax error"));
2086 goto yyexhaustedlab;
2094 if (yyerrstatus == 3)
2096 /* If just tried and failed to reuse look-ahead token after an
2097 error, discard it. */
2099 if (yychar <= YYEOF)
2101 /* Return failure if at end of input. */
2102 if (yychar == YYEOF)
2107 yydestruct ("Error: discarding",
2113 /* Else will try to reuse look-ahead token after shifting the error
2118 /*---------------------------------------------------.
2119 | yyerrorlab -- error raised explicitly by YYERROR. |
2120 `---------------------------------------------------*/
2123 /* Pacify compilers like GCC when the user code never invokes
2124 YYERROR and the label yyerrorlab therefore never appears in user
2126 if (/*CONSTCOND*/ 0)
2129 /* Do not reclaim the symbols of the rule which action triggered
2133 YY_STACK_PRINT (yyss, yyssp);
2138 /*-------------------------------------------------------------.
2139 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2140 `-------------------------------------------------------------*/
2142 yyerrstatus = 3; /* Each real token shifted decrements this. */
2146 yyn = yypact[yystate];
2147 if (yyn != YYPACT_NINF)
2150 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2158 /* Pop the current state because it cannot handle the error token. */
2163 yydestruct ("Error: popping",
2164 yystos[yystate], yyvsp);
2167 YY_STACK_PRINT (yyss, yyssp);
2176 /* Shift the error token. */
2177 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2183 /*-------------------------------------.
2184 | yyacceptlab -- YYACCEPT comes here. |
2185 `-------------------------------------*/
2190 /*-----------------------------------.
2191 | yyabortlab -- YYABORT comes here. |
2192 `-----------------------------------*/
2198 /*-------------------------------------------------.
2199 | yyexhaustedlab -- memory exhaustion comes here. |
2200 `-------------------------------------------------*/
2202 yyerror (YY_("memory exhausted"));
2208 if (yychar != YYEOF && yychar != YYEMPTY)
2209 yydestruct ("Cleanup: discarding lookahead",
2211 /* Do not reclaim the symbols of the rule which action triggered
2212 this YYABORT or YYACCEPT. */
2214 YY_STACK_PRINT (yyss, yyssp);
2215 while (yyssp != yyss)
2217 yydestruct ("Cleanup: popping",
2218 yystos[*yyssp], yyvsp);
2223 YYSTACK_FREE (yyss);
2226 if (yymsg != yymsgbuf)
2227 YYSTACK_FREE (yymsg);
2229 /* Make sure YYID is used. */
2230 return YYID (yyresult);
2234 #line 280 "uparse.y"
2241 g_printf("%s\n", s);