1 /* A Bison parser, made by GNU Bison 2.5. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.5"
50 #define YYSKELETON_NAME "yacc.c"
61 /* Using locations. */
62 #define YYLSP_NEEDED 0
66 /* Copy the first part of user declarations. */
68 /* Line 268 of yacc.c */
72 #include "amrecover.h"
74 #define DATE_ALLOC_SIZE sizeof("YYYY-MM-DD-HH-MM-SS") /* includes null */
76 void yyerror(char *s);
77 extern int yylex(void);
81 /* Line 268 of yacc.c */
84 /* Enabling traces. */
89 /* Enabling verbose error messages. */
90 #ifdef YYERROR_VERBOSE
91 # undef YYERROR_VERBOSE
92 # define YYERROR_VERBOSE 1
94 # define YYERROR_VERBOSE 0
97 /* Enabling the token table. */
99 # define YYTOKEN_TABLE 0
106 /* Put the tokens into the symbol table, so that GDB and other debuggers
149 #define LISTPROPERTY 260
155 #define SETDEVICE 266
156 #define SETPROPERTY 267
179 #define SETTRANSLATE 290
186 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
187 typedef union YYSTYPE
190 /* Line 293 of yacc.c */
200 /* Line 293 of yacc.c */
203 # define YYSTYPE_IS_TRIVIAL 1
204 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
205 # define YYSTYPE_IS_DECLARED 1
209 /* Copy the second part of user declarations. */
212 /* Line 343 of yacc.c */
220 typedef YYTYPE_UINT8 yytype_uint8;
222 typedef unsigned char yytype_uint8;
226 typedef YYTYPE_INT8 yytype_int8;
227 #elif (defined __STDC__ || defined __C99__FUNC__ \
228 || defined __cplusplus || defined _MSC_VER)
229 typedef signed char yytype_int8;
231 typedef short int yytype_int8;
235 typedef YYTYPE_UINT16 yytype_uint16;
237 typedef unsigned short int yytype_uint16;
241 typedef YYTYPE_INT16 yytype_int16;
243 typedef short int yytype_int16;
247 # ifdef __SIZE_TYPE__
248 # define YYSIZE_T __SIZE_TYPE__
249 # elif defined size_t
250 # define YYSIZE_T size_t
251 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
252 || defined __cplusplus || defined _MSC_VER)
253 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
254 # define YYSIZE_T size_t
256 # define YYSIZE_T unsigned int
260 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
263 # if defined YYENABLE_NLS && YYENABLE_NLS
265 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
266 # define YY_(msgid) dgettext ("bison-runtime", msgid)
270 # define YY_(msgid) msgid
274 /* Suppress unused-variable warnings by "using" E. */
275 #if ! defined lint || defined __GNUC__
276 # define YYUSE(e) ((void) (e))
278 # define YYUSE(e) /* empty */
281 /* Identity function, used to suppress warnings about constant conditions. */
285 #if (defined __STDC__ || defined __C99__FUNC__ \
286 || defined __cplusplus || defined _MSC_VER)
299 #if ! defined yyoverflow || YYERROR_VERBOSE
301 /* The parser invokes alloca or malloc; define the necessary symbols. */
303 # ifdef YYSTACK_USE_ALLOCA
304 # if YYSTACK_USE_ALLOCA
306 # define YYSTACK_ALLOC __builtin_alloca
307 # elif defined __BUILTIN_VA_ARG_INCR
308 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
310 # define YYSTACK_ALLOC __alloca
311 # elif defined _MSC_VER
312 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
313 # define alloca _alloca
315 # define YYSTACK_ALLOC alloca
316 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
317 || defined __cplusplus || defined _MSC_VER)
318 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
319 # ifndef EXIT_SUCCESS
320 # define EXIT_SUCCESS 0
327 # ifdef YYSTACK_ALLOC
328 /* Pacify GCC's `empty if-body' warning. */
329 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
330 # ifndef YYSTACK_ALLOC_MAXIMUM
331 /* The OS might guarantee only one guard page at the bottom of the stack,
332 and a page size can be as small as 4096 bytes. So we cannot safely
333 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
334 to allow for a few compiler-allocated temporary stack slots. */
335 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
338 # define YYSTACK_ALLOC YYMALLOC
339 # define YYSTACK_FREE YYFREE
340 # ifndef YYSTACK_ALLOC_MAXIMUM
341 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
343 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
344 && ! ((defined YYMALLOC || defined malloc) \
345 && (defined YYFREE || defined free)))
346 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
347 # ifndef EXIT_SUCCESS
348 # define EXIT_SUCCESS 0
352 # define YYMALLOC malloc
353 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
354 || defined __cplusplus || defined _MSC_VER)
355 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
360 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
361 || defined __cplusplus || defined _MSC_VER)
362 void free (void *); /* INFRINGES ON USER NAME SPACE */
366 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
369 #if (! defined yyoverflow \
370 && (! defined __cplusplus \
371 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
373 /* A type that is properly aligned for any stack member. */
376 yytype_int16 yyss_alloc;
380 /* The size of the maximum gap between one aligned stack and the next. */
381 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
383 /* The size of an array large to enough to hold all stacks, each with
385 # define YYSTACK_BYTES(N) \
386 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
387 + YYSTACK_GAP_MAXIMUM)
389 # define YYCOPY_NEEDED 1
391 /* Relocate STACK from its old location to the new one. The
392 local variables YYSIZE and YYSTACKSIZE give the old and new number of
393 elements in the stack, and YYPTR gives the new location of the
394 stack. Advance YYPTR to a properly aligned location for the next
396 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
399 YYSIZE_T yynewbytes; \
400 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
401 Stack = &yyptr->Stack_alloc; \
402 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
403 yyptr += yynewbytes / sizeof (*yyptr); \
409 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
410 /* Copy COUNT objects from FROM to TO. The source and destination do
413 # if defined __GNUC__ && 1 < __GNUC__
414 # define YYCOPY(To, From, Count) \
415 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
417 # define YYCOPY(To, From, Count) \
421 for (yyi = 0; yyi < (Count); yyi++) \
422 (To)[yyi] = (From)[yyi]; \
427 #endif /* !YYCOPY_NEEDED */
429 /* YYFINAL -- State number of the termination state. */
431 /* YYLAST -- Last index in YYTABLE. */
434 /* YYNTOKENS -- Number of terminals. */
436 /* YYNNTS -- Number of nonterminals. */
438 /* YYNRULES -- Number of rules. */
440 /* YYNRULES -- Number of states. */
441 #define YYNSTATES 166
443 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
445 #define YYMAXUTOK 292
447 #define YYTRANSLATE(YYX) \
448 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
450 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
451 static const yytype_uint8 yytranslate[] =
453 0, 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, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
479 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
480 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
481 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
486 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
488 static const yytype_uint16 yyprhs[] =
490 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
491 19, 21, 23, 25, 27, 30, 33, 37, 40, 44,
492 47, 50, 53, 58, 62, 66, 70, 73, 78, 82,
493 87, 89, 93, 96, 100, 104, 110, 113, 117, 122,
494 128, 132, 137, 142, 148, 151, 155, 159, 164, 168,
495 172, 175, 179, 183, 186, 190, 194, 198, 202, 205,
496 208, 212, 215, 219, 222, 225, 228, 231, 235, 238,
497 242, 245, 248, 251, 254, 257, 260, 263, 266, 270,
498 273, 275, 279, 282, 284, 288, 291, 293, 297, 300,
499 302, 305, 308, 312, 316, 319, 322, 325, 328, 331,
500 334, 337, 339, 342, 345
503 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
504 static const yytype_int8 yyrhs[] =
506 39, 0, -1, 40, -1, 41, -1, 42, -1, 43,
507 -1, 44, -1, 46, -1, 48, -1, 50, -1, 52,
508 -1, 53, -1, 54, -1, 55, -1, 3, 36, -1,
509 3, 57, -1, 4, 37, 36, -1, 4, 36, -1,
510 4, 37, 57, -1, 5, 36, -1, 5, 57, -1,
511 35, 36, -1, 35, 37, 57, 36, -1, 35, 37,
512 36, -1, 6, 37, 36, -1, 6, 37, 57, -1,
513 6, 36, -1, 7, 37, 37, 36, -1, 7, 37,
514 36, -1, 7, 37, 37, 57, -1, 7, -1, 9,
515 37, 36, -1, 9, 36, -1, 9, 37, 57, -1,
516 11, 37, 36, -1, 11, 21, 37, 37, 36, -1,
517 11, 36, -1, 11, 37, 57, -1, 11, 21, 37,
518 36, -1, 11, 21, 37, 37, 57, -1, 12, 37,
519 56, -1, 12, 33, 37, 56, -1, 12, 34, 37,
520 56, -1, 12, 33, 34, 37, 56, -1, 12, 36,
521 -1, 12, 33, 36, -1, 12, 34, 36, -1, 12,
522 33, 34, 36, -1, 13, 37, 36, -1, 13, 37,
523 57, -1, 13, 36, -1, 14, 37, 36, -1, 14,
524 37, 57, -1, 14, 36, -1, 10, 31, 36, -1,
525 10, 32, 36, -1, 10, 31, 57, -1, 10, 32,
526 57, -1, 10, 57, -1, 10, 36, -1, 8, 37,
527 36, -1, 8, 36, -1, 8, 37, 57, -1, 16,
528 36, -1, 16, 57, -1, 17, 36, -1, 17, 57,
529 -1, 22, 37, 36, -1, 22, 36, -1, 22, 37,
530 57, -1, 25, 36, -1, 25, 57, -1, 26, 36,
531 -1, 26, 57, -1, 30, 36, -1, 30, 57, -1,
532 15, 36, -1, 15, 57, -1, 18, 45, 36, -1,
533 45, 37, -1, 37, -1, 19, 47, 36, -1, 47,
534 37, -1, 37, -1, 23, 49, 36, -1, 49, 37,
535 -1, 37, -1, 24, 51, 36, -1, 51, 37, -1,
536 37, -1, 29, 36, -1, 29, 57, -1, 28, 37,
537 36, -1, 28, 37, 57, -1, 28, 36, -1, 27,
538 36, -1, 27, 57, -1, 20, 36, -1, 20, 57,
539 -1, 37, 58, -1, 37, 56, -1, 36, -1, 37,
540 58, -1, 37, 58, -1, 36, -1
543 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
544 static const yytype_uint16 yyrline[] =
546 0, 68, 68, 69, 70, 71, 72, 73, 74, 75,
547 76, 77, 78, 79, 83, 84, 85, 86, 87, 88,
548 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
549 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
550 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
551 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
552 132, 178, 179, 183, 184, 185, 186, 187, 188, 189,
553 190, 191, 192, 193, 194, 195, 199, 200, 204, 208,
554 209, 213, 217, 218, 222, 226, 227, 231, 235, 236,
555 240, 241, 242, 246, 247, 251, 252, 256, 257, 261,
556 270, 271, 275, 279, 280
560 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
561 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
562 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
563 static const char *const yytname[] =
565 "$end", "error", "$undefined", "LISTHOST", "LISTDISK", "LISTPROPERTY",
566 "SETHOST", "SETDISK", "SETDATE", "SETTAPE", "SETMODE", "SETDEVICE",
567 "SETPROPERTY", "CD", "CDX", "QUIT", "DHIST", "LS", "ADD", "ADDX",
568 "EXTRACT", "DASH_H", "LIST", "DELETE", "DELETEX", "PWD", "CLEAR", "HELP",
569 "LCD", "LPWD", "MODE", "SMB", "TAR", "APPEND", "PRIORITY",
570 "SETTRANSLATE", "NL", "STRING", "$accept", "ucommand", "set_command",
571 "setdate_command", "display_command", "quit_command", "add_command",
572 "add_path", "addx_command", "addx_path", "delete_command", "delete_path",
573 "deletex_command", "deletex_path", "local_command", "help_command",
574 "extract_command", "invalid_command", "property_value", "invalid_string",
580 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
582 static const yytype_uint16 yytoknum[] =
584 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
585 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
586 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
587 285, 286, 287, 288, 289, 290, 291, 292
591 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
592 static const yytype_uint8 yyr1[] =
594 0, 38, 39, 39, 39, 39, 39, 39, 39, 39,
595 39, 39, 39, 39, 40, 40, 40, 40, 40, 40,
596 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
597 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
598 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
599 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
600 41, 41, 41, 42, 42, 42, 42, 42, 42, 42,
601 42, 42, 42, 42, 42, 42, 43, 43, 44, 45,
602 45, 46, 47, 47, 48, 49, 49, 50, 51, 51,
603 52, 52, 52, 52, 52, 53, 53, 54, 54, 55,
607 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
608 static const yytype_uint8 yyr2[] =
610 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
611 1, 1, 1, 1, 2, 2, 3, 2, 3, 2,
612 2, 2, 4, 3, 3, 3, 2, 4, 3, 4,
613 1, 3, 2, 3, 3, 5, 2, 3, 4, 5,
614 3, 4, 4, 5, 2, 3, 3, 4, 3, 3,
615 2, 3, 3, 2, 3, 3, 3, 3, 2, 2,
616 3, 2, 3, 2, 2, 2, 2, 3, 2, 3,
617 2, 2, 2, 2, 2, 2, 2, 2, 3, 2,
618 1, 3, 2, 1, 3, 2, 1, 3, 2, 1,
619 2, 2, 3, 3, 2, 2, 2, 2, 2, 2,
623 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
624 Performed when YYTABLE doesn't specify something else to do. Zero
625 means the default is an error. */
626 static const yytype_uint8 yydefact[] =
628 0, 0, 0, 0, 0, 30, 0, 0, 0, 0,
629 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
630 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
631 0, 2, 3, 4, 5, 6, 7, 8, 9, 10,
632 11, 12, 13, 14, 0, 15, 17, 0, 19, 20,
633 26, 0, 0, 61, 0, 32, 0, 0, 0, 59,
634 58, 0, 36, 0, 0, 0, 44, 0, 50, 0,
635 53, 0, 76, 77, 63, 64, 65, 66, 80, 0,
636 83, 0, 97, 98, 68, 0, 86, 0, 89, 0,
637 70, 71, 72, 73, 95, 96, 94, 0, 90, 91,
638 74, 75, 21, 0, 104, 0, 99, 1, 102, 16,
639 18, 24, 25, 28, 0, 60, 62, 31, 33, 54,
640 56, 55, 57, 0, 34, 37, 0, 45, 0, 46,
641 0, 101, 0, 40, 48, 49, 51, 52, 78, 79,
642 81, 82, 67, 69, 84, 85, 87, 88, 92, 93,
643 23, 0, 103, 27, 29, 38, 0, 47, 0, 41,
644 42, 100, 22, 35, 39, 43
647 /* YYDEFGOTO[NTERM-NUM]. */
648 static const yytype_int16 yydefgoto[] =
650 -1, 30, 31, 32, 33, 34, 35, 79, 36, 81,
651 37, 87, 38, 89, 39, 40, 41, 42, 133, 45,
655 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
657 #define YYPACT_NINF -127
658 static const yytype_int16 yypact[] =
660 109, -29, 2, 4, 6, -34, 9, 13, -6, -8,
661 0, 20, 22, 27, 33, 35, -28, -19, 37, 39,
662 -15, -10, 41, 43, 47, 49, 51, 53, 55, 59,
663 52, -127, -127, -127, -127, -127, -127, -127, -127, -127,
664 -127, -127, -127, -127, 59, -127, -127, 61, -127, -127,
665 -127, 65, 67, -127, 69, -127, 71, 73, 104, -127,
666 -127, -2, -127, 106, -20, 111, -127, 113, -127, 115,
667 -127, 118, -127, -127, -127, -127, -127, -127, -127, 120,
668 -127, 122, -127, -127, -127, 124, -127, 126, -127, 128,
669 -127, -127, -127, -127, -127, -127, -127, 130, -127, -127,
670 -127, -127, -127, 132, -127, 59, -127, -127, -127, -127,
671 -127, -127, -127, -127, 134, -127, -127, -127, -127, -127,
672 -127, -127, -127, 136, -127, -127, 138, -127, 113, -127,
673 113, -127, 113, -127, -127, -127, -127, -127, -127, -127,
674 -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
675 -127, 11, -127, -127, -127, -127, 140, -127, 113, -127,
676 -127, -127, -127, -127, -127, -127
679 /* YYPGOTO[NTERM-NUM]. */
680 static const yytype_int8 yypgoto[] =
682 -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
683 -127, -127, -127, -127, -127, -127, -127, -127, -126, -3,
687 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
688 positive, shift that token. If negative, reduce the rule which
689 number is the opposite. If YYTABLE_NINF, syntax error. */
690 #define YYTABLE_NINF -1
691 static const yytype_uint8 yytable[] =
693 49, 108, 159, 52, 160, 60, 161, 43, 44, 78,
694 73, 75, 77, 61, 126, 83, 127, 128, 80, 91,
695 93, 95, 86, 99, 101, 57, 58, 88, 62, 63,
696 59, 44, 165, 64, 65, 123, 66, 67, 46, 47,
697 48, 44, 50, 51, 110, 53, 54, 162, 112, 55,
698 56, 116, 107, 118, 120, 122, 68, 69, 70, 71,
699 125, 0, 152, 72, 44, 0, 135, 0, 137, 74,
700 44, 76, 44, 82, 44, 84, 85, 90, 44, 92,
701 44, 0, 143, 94, 44, 96, 97, 98, 44, 100,
702 44, 102, 103, 0, 149, 104, 105, 109, 44, 0,
703 151, 111, 44, 113, 114, 115, 44, 117, 44, 119,
704 44, 154, 1, 2, 3, 4, 5, 6, 7, 8,
705 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
706 0, 19, 20, 21, 22, 23, 24, 25, 26, 27,
707 121, 44, 124, 44, 28, 0, 29, 129, 130, 131,
708 132, 134, 44, 164, 136, 44, 138, 139, 140, 141,
709 142, 44, 144, 145, 146, 147, 148, 44, 150, 44,
710 153, 44, 155, 156, 157, 158, 163, 44
713 #define yypact_value_is_default(yystate) \
714 ((yystate) == (-127))
716 #define yytable_value_is_error(yytable_value) \
719 static const yytype_int16 yycheck[] =
721 3, 44, 128, 37, 130, 8, 132, 36, 37, 37,
722 13, 14, 15, 21, 34, 18, 36, 37, 37, 22,
723 23, 24, 37, 26, 27, 31, 32, 37, 36, 37,
724 36, 37, 158, 33, 34, 37, 36, 37, 36, 37,
725 36, 37, 36, 37, 47, 36, 37, 36, 51, 36,
726 37, 54, 0, 56, 57, 58, 36, 37, 36, 37,
727 63, -1, 105, 36, 37, -1, 69, -1, 71, 36,
728 37, 36, 37, 36, 37, 36, 37, 36, 37, 36,
729 37, -1, 85, 36, 37, 36, 37, 36, 37, 36,
730 37, 36, 37, -1, 97, 36, 37, 36, 37, -1,
731 103, 36, 37, 36, 37, 36, 37, 36, 37, 36,
732 37, 114, 3, 4, 5, 6, 7, 8, 9, 10,
733 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
734 -1, 22, 23, 24, 25, 26, 27, 28, 29, 30,
735 36, 37, 36, 37, 35, -1, 37, 36, 37, 36,
736 37, 36, 37, 156, 36, 37, 36, 37, 36, 37,
737 36, 37, 36, 37, 36, 37, 36, 37, 36, 37,
738 36, 37, 36, 37, 36, 37, 36, 37
741 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
742 symbol of state STATE-NUM. */
743 static const yytype_uint8 yystos[] =
745 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
746 12, 13, 14, 15, 16, 17, 18, 19, 20, 22,
747 23, 24, 25, 26, 27, 28, 29, 30, 35, 37,
748 39, 40, 41, 42, 43, 44, 46, 48, 50, 52,
749 53, 54, 55, 36, 37, 57, 36, 37, 36, 57,
750 36, 37, 37, 36, 37, 36, 37, 31, 32, 36,
751 57, 21, 36, 37, 33, 34, 36, 37, 36, 37,
752 36, 37, 36, 57, 36, 57, 36, 57, 37, 45,
753 37, 47, 36, 57, 36, 37, 37, 49, 37, 51,
754 36, 57, 36, 57, 36, 57, 36, 37, 36, 57,
755 36, 57, 36, 37, 36, 37, 58, 0, 58, 36,
756 57, 36, 57, 36, 37, 36, 57, 36, 57, 36,
757 57, 36, 57, 37, 36, 57, 34, 36, 37, 36,
758 37, 36, 37, 56, 36, 57, 36, 57, 36, 37,
759 36, 37, 36, 57, 36, 37, 36, 37, 36, 57,
760 36, 57, 58, 36, 57, 36, 37, 36, 37, 56,
761 56, 56, 36, 36, 57, 56
764 #define yyerrok (yyerrstatus = 0)
765 #define yyclearin (yychar = YYEMPTY)
769 #define YYACCEPT goto yyacceptlab
770 #define YYABORT goto yyabortlab
771 #define YYERROR goto yyerrorlab
774 /* Like YYERROR except do call yyerror. This remains here temporarily
775 to ease the transition to the new meaning of YYERROR, for GCC.
776 Once GCC version 2 has supplanted version 1, this can go. However,
777 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
778 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
781 #define YYFAIL goto yyerrlab
783 /* This is here to suppress warnings from the GCC cpp's
784 -Wunused-macros. Normally we don't worry about that warning, but
785 some users do, and we want to make it easy for users to remove
786 YYFAIL uses, which will produce warnings from Bison 2.5. */
789 #define YYRECOVERING() (!!yyerrstatus)
791 #define YYBACKUP(Token, Value) \
793 if (yychar == YYEMPTY && yylen == 1) \
802 yyerror (YY_("syntax error: cannot back up")); \
809 #define YYERRCODE 256
812 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
813 If N is 0, then set CURRENT to the empty location which ends
814 the previous symbol: RHS[0] (always defined). */
816 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
817 #ifndef YYLLOC_DEFAULT
818 # define YYLLOC_DEFAULT(Current, Rhs, N) \
822 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
823 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
824 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
825 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
829 (Current).first_line = (Current).last_line = \
830 YYRHSLOC (Rhs, 0).last_line; \
831 (Current).first_column = (Current).last_column = \
832 YYRHSLOC (Rhs, 0).last_column; \
838 /* This macro is provided for backward compatibility. */
840 #ifndef YY_LOCATION_PRINT
841 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
845 /* YYLEX -- calling `yylex' with the right arguments. */
848 # define YYLEX yylex (YYLEX_PARAM)
850 # define YYLEX yylex ()
853 /* Enable debugging if requested. */
857 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
858 # define YYFPRINTF fprintf
861 # define YYDPRINTF(Args) \
867 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
871 YYFPRINTF (stderr, "%s ", Title); \
872 yy_symbol_print (stderr, \
874 YYFPRINTF (stderr, "\n"); \
879 /*--------------------------------.
880 | Print this symbol on YYOUTPUT. |
881 `--------------------------------*/
884 #if (defined __STDC__ || defined __C99__FUNC__ \
885 || defined __cplusplus || defined _MSC_VER)
887 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
890 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
893 YYSTYPE const * const yyvaluep;
899 if (yytype < YYNTOKENS)
900 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
912 /*--------------------------------.
913 | Print this symbol on YYOUTPUT. |
914 `--------------------------------*/
916 #if (defined __STDC__ || defined __C99__FUNC__ \
917 || defined __cplusplus || defined _MSC_VER)
919 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
922 yy_symbol_print (yyoutput, yytype, yyvaluep)
925 YYSTYPE const * const yyvaluep;
928 if (yytype < YYNTOKENS)
929 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
931 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
933 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
934 YYFPRINTF (yyoutput, ")");
937 /*------------------------------------------------------------------.
938 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
940 `------------------------------------------------------------------*/
942 #if (defined __STDC__ || defined __C99__FUNC__ \
943 || defined __cplusplus || defined _MSC_VER)
945 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
948 yy_stack_print (yybottom, yytop)
949 yytype_int16 *yybottom;
953 YYFPRINTF (stderr, "Stack now");
954 for (; yybottom <= yytop; yybottom++)
956 int yybot = *yybottom;
957 YYFPRINTF (stderr, " %d", yybot);
959 YYFPRINTF (stderr, "\n");
962 # define YY_STACK_PRINT(Bottom, Top) \
965 yy_stack_print ((Bottom), (Top)); \
969 /*------------------------------------------------.
970 | Report that the YYRULE is going to be reduced. |
971 `------------------------------------------------*/
973 #if (defined __STDC__ || defined __C99__FUNC__ \
974 || defined __cplusplus || defined _MSC_VER)
976 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
979 yy_reduce_print (yyvsp, yyrule)
984 int yynrhs = yyr2[yyrule];
986 unsigned long int yylno = yyrline[yyrule];
987 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
989 /* The symbols being reduced. */
990 for (yyi = 0; yyi < yynrhs; yyi++)
992 YYFPRINTF (stderr, " $%d = ", yyi + 1);
993 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
994 &(yyvsp[(yyi + 1) - (yynrhs)])
996 YYFPRINTF (stderr, "\n");
1000 # define YY_REDUCE_PRINT(Rule) \
1003 yy_reduce_print (yyvsp, Rule); \
1006 /* Nonzero means print parse trace. It is left uninitialized so that
1007 multiple parsers can coexist. */
1009 #else /* !YYDEBUG */
1010 # define YYDPRINTF(Args)
1011 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1012 # define YY_STACK_PRINT(Bottom, Top)
1013 # define YY_REDUCE_PRINT(Rule)
1014 #endif /* !YYDEBUG */
1017 /* YYINITDEPTH -- initial size of the parser's stacks. */
1019 # define YYINITDEPTH 200
1022 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1023 if the built-in stack extension method is used).
1025 Do not make this value too large; the results are undefined if
1026 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1027 evaluated with infinite-precision integer arithmetic. */
1030 # define YYMAXDEPTH 10000
1037 # if defined __GLIBC__ && defined _STRING_H
1038 # define yystrlen strlen
1040 /* Return the length of YYSTR. */
1041 #if (defined __STDC__ || defined __C99__FUNC__ \
1042 || defined __cplusplus || defined _MSC_VER)
1044 yystrlen (const char *yystr)
1052 for (yylen = 0; yystr[yylen]; yylen++)
1060 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1061 # define yystpcpy stpcpy
1063 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1065 #if (defined __STDC__ || defined __C99__FUNC__ \
1066 || defined __cplusplus || defined _MSC_VER)
1068 yystpcpy (char *yydest, const char *yysrc)
1071 yystpcpy (yydest, yysrc)
1077 const char *yys = yysrc;
1079 while ((*yyd++ = *yys++) != '\0')
1088 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1089 quotes and backslashes, so that it's suitable for yyerror. The
1090 heuristic is that double-quoting is unnecessary unless the string
1091 contains an apostrophe, a comma, or backslash (other than
1092 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1093 null, do not copy; instead, return the length of what the result
1096 yytnamerr (char *yyres, const char *yystr)
1101 char const *yyp = yystr;
1108 goto do_not_strip_quotes;
1112 goto do_not_strip_quotes;
1125 do_not_strip_quotes: ;
1129 return yystrlen (yystr);
1131 return yystpcpy (yyres, yystr) - yyres;
1135 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1136 about the unexpected token YYTOKEN for the state stack whose top is
1139 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1140 not large enough to hold the message. In that case, also set
1141 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1142 required number of bytes is too large to store. */
1144 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1145 yytype_int16 *yyssp, int yytoken)
1147 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1148 YYSIZE_T yysize = yysize0;
1150 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1151 /* Internationalized format string. */
1152 const char *yyformat = 0;
1153 /* Arguments of yyformat. */
1154 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1155 /* Number of reported tokens (one for the "unexpected", one per
1159 /* There are many possibilities here to consider:
1160 - Assume YYFAIL is not used. It's too flawed to consider. See
1161 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1162 for details. YYERROR is fine as it does not invoke this
1164 - If this state is a consistent state with a default action, then
1165 the only way this function was invoked is if the default action
1166 is an error action. In that case, don't check for expected
1167 tokens because there are none.
1168 - The only way there can be no lookahead present (in yychar) is if
1169 this state is a consistent state with a default action. Thus,
1170 detecting the absence of a lookahead is sufficient to determine
1171 that there is no unexpected or expected token to report. In that
1172 case, just report a simple "syntax error".
1173 - Don't assume there isn't a lookahead just because this state is a
1174 consistent state with a default action. There might have been a
1175 previous inconsistent state, consistent state with a non-default
1176 action, or user semantic action that manipulated yychar.
1177 - Of course, the expected token list depends on states to have
1178 correct lookahead information, and it depends on the parser not
1179 to perform extra reductions after fetching a lookahead from the
1180 scanner and before detecting a syntax error. Thus, state merging
1181 (from LALR or IELR) and default reductions corrupt the expected
1182 token list. However, the list is correct for canonical LR with
1183 one exception: it will still contain any token that will not be
1184 accepted due to an error action in a later state.
1186 if (yytoken != YYEMPTY)
1188 int yyn = yypact[*yyssp];
1189 yyarg[yycount++] = yytname[yytoken];
1190 if (!yypact_value_is_default (yyn))
1192 /* Start YYX at -YYN if negative to avoid negative indexes in
1193 YYCHECK. In other words, skip the first -YYN actions for
1194 this state because they are default actions. */
1195 int yyxbegin = yyn < 0 ? -yyn : 0;
1196 /* Stay within bounds of both yycheck and yytname. */
1197 int yychecklim = YYLAST - yyn + 1;
1198 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1201 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1202 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1203 && !yytable_value_is_error (yytable[yyx + yyn]))
1205 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1211 yyarg[yycount++] = yytname[yyx];
1212 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1213 if (! (yysize <= yysize1
1214 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1223 # define YYCASE_(N, S) \
1227 YYCASE_(0, YY_("syntax error"));
1228 YYCASE_(1, YY_("syntax error, unexpected %s"));
1229 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1230 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1231 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1232 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1236 yysize1 = yysize + yystrlen (yyformat);
1237 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1241 if (*yymsg_alloc < yysize)
1243 *yymsg_alloc = 2 * yysize;
1244 if (! (yysize <= *yymsg_alloc
1245 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1246 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1250 /* Avoid sprintf, as that infringes on the user's name space.
1251 Don't have undefined behavior even if the translation
1252 produced a string with the wrong number of "%s"s. */
1256 while ((*yyp = *yyformat) != '\0')
1257 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1259 yyp += yytnamerr (yyp, yyarg[yyi++]);
1270 #endif /* YYERROR_VERBOSE */
1272 /*-----------------------------------------------.
1273 | Release the memory associated to this symbol. |
1274 `-----------------------------------------------*/
1277 #if (defined __STDC__ || defined __C99__FUNC__ \
1278 || defined __cplusplus || defined _MSC_VER)
1280 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1283 yydestruct (yymsg, yytype, yyvaluep)
1293 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1304 /* Prevent warnings from -Wmissing-prototypes. */
1305 #ifdef YYPARSE_PARAM
1306 #if defined __STDC__ || defined __cplusplus
1307 int yyparse (void *YYPARSE_PARAM);
1311 #else /* ! YYPARSE_PARAM */
1312 #if defined __STDC__ || defined __cplusplus
1317 #endif /* ! YYPARSE_PARAM */
1320 /* The lookahead symbol. */
1323 /* The semantic value of the lookahead symbol. */
1326 /* Number of syntax errors so far. */
1334 #ifdef YYPARSE_PARAM
1335 #if (defined __STDC__ || defined __C99__FUNC__ \
1336 || defined __cplusplus || defined _MSC_VER)
1338 yyparse (void *YYPARSE_PARAM)
1341 yyparse (YYPARSE_PARAM)
1342 void *YYPARSE_PARAM;
1344 #else /* ! YYPARSE_PARAM */
1345 #if (defined __STDC__ || defined __C99__FUNC__ \
1346 || defined __cplusplus || defined _MSC_VER)
1357 /* Number of tokens to shift before error messages enabled. */
1360 /* The stacks and their tools:
1361 `yyss': related to states.
1362 `yyvs': related to semantic values.
1364 Refer to the stacks thru separate pointers, to allow yyoverflow
1365 to reallocate them elsewhere. */
1367 /* The state stack. */
1368 yytype_int16 yyssa[YYINITDEPTH];
1370 yytype_int16 *yyssp;
1372 /* The semantic value stack. */
1373 YYSTYPE yyvsa[YYINITDEPTH];
1377 YYSIZE_T yystacksize;
1381 /* Lookahead token as an internal (translated) token number. */
1383 /* The variables used to return semantic value and location from the
1388 /* Buffer for error messages, and its allocated size. */
1390 char *yymsg = yymsgbuf;
1391 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1394 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1396 /* The number of symbols on the RHS of the reduced rule.
1397 Keep to zero when no symbol should be popped. */
1403 yystacksize = YYINITDEPTH;
1405 YYDPRINTF ((stderr, "Starting parse\n"));
1410 yychar = YYEMPTY; /* Cause a token to be read. */
1412 /* Initialize stack pointers.
1413 Waste one element of value and location stack
1414 so that they stay on the same level as the state stack.
1415 The wasted elements are never initialized. */
1421 /*------------------------------------------------------------.
1422 | yynewstate -- Push a new state, which is found in yystate. |
1423 `------------------------------------------------------------*/
1425 /* In all cases, when you get here, the value and location stacks
1426 have just been pushed. So pushing a state here evens the stacks. */
1432 if (yyss + yystacksize - 1 <= yyssp)
1434 /* Get the current used size of the three stacks, in elements. */
1435 YYSIZE_T yysize = yyssp - yyss + 1;
1439 /* Give user a chance to reallocate the stack. Use copies of
1440 these so that the &'s don't force the real ones into
1442 YYSTYPE *yyvs1 = yyvs;
1443 yytype_int16 *yyss1 = yyss;
1445 /* Each stack pointer address is followed by the size of the
1446 data in use in that stack, in bytes. This used to be a
1447 conditional around just the two extra args, but that might
1448 be undefined if yyoverflow is a macro. */
1449 yyoverflow (YY_("memory exhausted"),
1450 &yyss1, yysize * sizeof (*yyssp),
1451 &yyvs1, yysize * sizeof (*yyvsp),
1457 #else /* no yyoverflow */
1458 # ifndef YYSTACK_RELOCATE
1459 goto yyexhaustedlab;
1461 /* Extend the stack our own way. */
1462 if (YYMAXDEPTH <= yystacksize)
1463 goto yyexhaustedlab;
1465 if (YYMAXDEPTH < yystacksize)
1466 yystacksize = YYMAXDEPTH;
1469 yytype_int16 *yyss1 = yyss;
1470 union yyalloc *yyptr =
1471 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1473 goto yyexhaustedlab;
1474 YYSTACK_RELOCATE (yyss_alloc, yyss);
1475 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1476 # undef YYSTACK_RELOCATE
1478 YYSTACK_FREE (yyss1);
1481 #endif /* no yyoverflow */
1483 yyssp = yyss + yysize - 1;
1484 yyvsp = yyvs + yysize - 1;
1486 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1487 (unsigned long int) yystacksize));
1489 if (yyss + yystacksize - 1 <= yyssp)
1493 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1495 if (yystate == YYFINAL)
1505 /* Do appropriate processing given the current state. Read a
1506 lookahead token if we need one and don't already have one. */
1508 /* First try to decide what to do without reference to lookahead token. */
1509 yyn = yypact[yystate];
1510 if (yypact_value_is_default (yyn))
1513 /* Not known => get a lookahead token if don't already have one. */
1515 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1516 if (yychar == YYEMPTY)
1518 YYDPRINTF ((stderr, "Reading a token: "));
1522 if (yychar <= YYEOF)
1524 yychar = yytoken = YYEOF;
1525 YYDPRINTF ((stderr, "Now at end of input.\n"));
1529 yytoken = YYTRANSLATE (yychar);
1530 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1533 /* If the proper action on seeing token YYTOKEN is to reduce or to
1534 detect an error, take that action. */
1536 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1541 if (yytable_value_is_error (yyn))
1547 /* Count tokens shifted since error; after three, turn off error
1552 /* Shift the lookahead token. */
1553 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1555 /* Discard the shifted token. */
1564 /*-----------------------------------------------------------.
1565 | yydefault -- do the default action for the current state. |
1566 `-----------------------------------------------------------*/
1568 yyn = yydefact[yystate];
1574 /*-----------------------------.
1575 | yyreduce -- Do a reduction. |
1576 `-----------------------------*/
1578 /* yyn is the number of a rule to reduce with. */
1581 /* If YYLEN is nonzero, implement the default value of the action:
1584 Otherwise, the following line sets YYVAL to garbage.
1585 This behavior is undocumented and Bison
1586 users should not rely upon it. Assigning to YYVAL
1587 unconditionally makes the parser a bit smaller, and it avoids a
1588 GCC warning that YYVAL may be used uninitialized. */
1589 yyval = yyvsp[1-yylen];
1592 YY_REDUCE_PRINT (yyn);
1597 /* Line 1806 of yacc.c */
1604 /* Line 1806 of yacc.c */
1606 { yyerror("Invalid argument"); }
1611 /* Line 1806 of yacc.c */
1613 { list_disk((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
1618 /* Line 1806 of yacc.c */
1620 { list_disk(NULL); }
1625 /* Line 1806 of yacc.c */
1627 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
1632 /* Line 1806 of yacc.c */
1634 { list_property(); }
1639 /* Line 1806 of yacc.c */
1641 { yyerror("Invalid argument"); }
1646 /* Line 1806 of yacc.c */
1648 { set_translate(NULL); }
1653 /* Line 1806 of yacc.c */
1655 { yyerror("Invalid argument"); }
1660 /* Line 1806 of yacc.c */
1662 { set_translate((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
1667 /* Line 1806 of yacc.c */
1669 { set_host((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
1674 /* Line 1806 of yacc.c */
1676 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
1681 /* Line 1806 of yacc.c */
1683 { yyerror("Argument required"); }
1688 /* Line 1806 of yacc.c */
1690 { set_disk((yyvsp[(2) - (4)].strval), (yyvsp[(3) - (4)].strval)); amfree((yyvsp[(2) - (4)].strval)); amfree((yyvsp[(3) - (4)].strval)); }
1695 /* Line 1806 of yacc.c */
1697 { set_disk((yyvsp[(2) - (3)].strval), NULL); amfree((yyvsp[(2) - (3)].strval)); }
1702 /* Line 1806 of yacc.c */
1704 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (4)].strval)); amfree((yyvsp[(3) - (4)].strval)); }
1709 /* Line 1806 of yacc.c */
1711 { yyerror("Argument required"); }
1716 /* Line 1806 of yacc.c */
1717 #line 100 "uparse.y"
1718 { set_tape((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
1723 /* Line 1806 of yacc.c */
1724 #line 101 "uparse.y"
1725 { set_tape("default"); }
1730 /* Line 1806 of yacc.c */
1731 #line 102 "uparse.y"
1732 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
1737 /* Line 1806 of yacc.c */
1738 #line 103 "uparse.y"
1739 { set_device(NULL, (yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
1744 /* Line 1806 of yacc.c */
1745 #line 104 "uparse.y"
1746 { set_device((yyvsp[(3) - (5)].strval), (yyvsp[(4) - (5)].strval)); amfree((yyvsp[(3) - (5)].strval)); amfree((yyvsp[(4) - (5)].strval)); }
1751 /* Line 1806 of yacc.c */
1752 #line 105 "uparse.y"
1753 { set_device(NULL, NULL); }
1758 /* Line 1806 of yacc.c */
1759 #line 106 "uparse.y"
1760 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
1765 /* Line 1806 of yacc.c */
1766 #line 107 "uparse.y"
1767 { yyerror("Invalid argument"); amfree((yyvsp[(3) - (4)].strval)); }
1772 /* Line 1806 of yacc.c */
1773 #line 108 "uparse.y"
1774 { yyerror("Invalid argument"); amfree((yyvsp[(3) - (5)].strval)); amfree((yyvsp[(4) - (5)].strval)); }
1779 /* Line 1806 of yacc.c */
1780 #line 109 "uparse.y"
1781 { set_property_name((yyvsp[(2) - (3)].strval), 0); amfree((yyvsp[(2) - (3)].strval)); }
1786 /* Line 1806 of yacc.c */
1787 #line 110 "uparse.y"
1788 { set_property_name((yyvsp[(3) - (4)].strval), 1); amfree((yyvsp[(3) - (4)].strval)); }
1793 /* Line 1806 of yacc.c */
1794 #line 111 "uparse.y"
1795 { set_property_name((yyvsp[(3) - (4)].strval), 0); amfree((yyvsp[(3) - (4)].strval)); }
1800 /* Line 1806 of yacc.c */
1801 #line 112 "uparse.y"
1802 { set_property_name((yyvsp[(4) - (5)].strval), 1); amfree((yyvsp[(4) - (5)].strval)); }
1807 /* Line 1806 of yacc.c */
1808 #line 113 "uparse.y"
1809 { yyerror("Invalid argument"); }
1814 /* Line 1806 of yacc.c */
1815 #line 114 "uparse.y"
1816 { yyerror("Invalid argument"); }
1821 /* Line 1806 of yacc.c */
1822 #line 115 "uparse.y"
1823 { yyerror("Invalid argument"); }
1828 /* Line 1806 of yacc.c */
1829 #line 116 "uparse.y"
1830 { yyerror("Invalid argument"); }
1835 /* Line 1806 of yacc.c */
1836 #line 117 "uparse.y"
1837 { cd_glob((yyvsp[(2) - (3)].strval), 1); amfree((yyvsp[(2) - (3)].strval)); }
1842 /* Line 1806 of yacc.c */
1843 #line 118 "uparse.y"
1844 { yyerror("Invalid argument"); }
1849 /* Line 1806 of yacc.c */
1850 #line 119 "uparse.y"
1851 { yyerror("Argument required"); }
1856 /* Line 1806 of yacc.c */
1857 #line 120 "uparse.y"
1858 { cd_regex((yyvsp[(2) - (3)].strval), 1); amfree((yyvsp[(2) - (3)].strval)); }
1863 /* Line 1806 of yacc.c */
1864 #line 121 "uparse.y"
1865 { yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
1870 /* Line 1806 of yacc.c */
1871 #line 122 "uparse.y"
1872 { yyerror("Argument required"); }
1877 /* Line 1806 of yacc.c */
1878 #line 123 "uparse.y"
1879 { set_mode(SAMBA_SMBCLIENT); }
1884 /* Line 1806 of yacc.c */
1885 #line 124 "uparse.y"
1886 { set_mode(SAMBA_TAR); }
1891 /* Line 1806 of yacc.c */
1892 #line 125 "uparse.y"
1893 { yyerror("Invalid argument"); }
1898 /* Line 1806 of yacc.c */
1899 #line 126 "uparse.y"
1900 { yyerror("Invalid argument"); }
1905 /* Line 1806 of yacc.c */
1906 #line 127 "uparse.y"
1907 { yyerror("Invalid argument"); }
1912 /* Line 1806 of yacc.c */
1913 #line 128 "uparse.y"
1914 { yyerror("Argument required"); }
1919 /* Line 1806 of yacc.c */
1920 #line 132 "uparse.y"
1924 int y=2000, m=0, d=1, h=0, mi=0, s=0;
1926 char *mydate = (yyvsp[(2) - (3)].strval);
1928 now = time((time_t *)NULL);
1929 t = localtime(&now);
1931 y = 1900+t->tm_year;
1935 if (sscanf(mydate, "---%d", &d) == 1 ||
1936 sscanf(mydate, "--%d-%d", &m, &d) == 2 ||
1937 sscanf(mydate, "%d-%d-%d-%d-%d-%d", &y, &m, &d, &h, &mi, &s) >= 3) {
1940 } else if (y < 100) {
1943 if(y < 1000 || y > 9999) {
1944 printf("invalid year");
1945 } else if(m < 1 || m > 12) {
1946 printf("invalid month");
1947 } else if(d < 1 || d > 31) {
1948 printf("invalid day");
1949 } else if(h < 0 || h > 24) {
1950 printf("invalid hour");
1951 } else if(mi < 0 || mi > 59) {
1952 printf("invalid minute");
1953 } else if(s < 0 || s > 59) {
1954 printf("invalid second");
1956 char result[DATE_ALLOC_SIZE];
1957 if (h == 0 && mi == 0 && s == 0)
1958 g_snprintf(result, DATE_ALLOC_SIZE, "%04d-%02d-%02d", y, m, d);
1960 g_snprintf(result, DATE_ALLOC_SIZE, "%04d-%02d-%02d-%02d-%02d-%02d", y, m, d, h, mi, s);
1964 printf("Invalid date: %s\n", mydate);
1971 /* Line 1806 of yacc.c */
1972 #line 178 "uparse.y"
1973 { yyerror("Argument required"); }
1978 /* Line 1806 of yacc.c */
1979 #line 179 "uparse.y"
1980 { yyerror("Invalid argument"); }
1985 /* Line 1806 of yacc.c */
1986 #line 183 "uparse.y"
1987 { list_disk_history(); }
1992 /* Line 1806 of yacc.c */
1993 #line 184 "uparse.y"
1994 { yyerror("Invalid argument"); }
1999 /* Line 1806 of yacc.c */
2000 #line 185 "uparse.y"
2001 { list_directory(); }
2006 /* Line 1806 of yacc.c */
2007 #line 186 "uparse.y"
2008 { yyerror("Invalid argument"); }
2013 /* Line 1806 of yacc.c */
2014 #line 187 "uparse.y"
2015 { display_extract_list((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
2020 /* Line 1806 of yacc.c */
2021 #line 188 "uparse.y"
2022 { display_extract_list(NULL); }
2027 /* Line 1806 of yacc.c */
2028 #line 189 "uparse.y"
2029 { yyerror("Invalid argument"); }
2034 /* Line 1806 of yacc.c */
2035 #line 190 "uparse.y"
2036 { show_directory(); }
2041 /* Line 1806 of yacc.c */
2042 #line 191 "uparse.y"
2043 { yyerror("Invalid argument"); }
2048 /* Line 1806 of yacc.c */
2049 #line 192 "uparse.y"
2050 { clear_extract_list(); }
2055 /* Line 1806 of yacc.c */
2056 #line 193 "uparse.y"
2057 { yyerror("Invalid argument"); }
2062 /* Line 1806 of yacc.c */
2063 #line 194 "uparse.y"
2069 /* Line 1806 of yacc.c */
2070 #line 195 "uparse.y"
2071 { yyerror("Invalid argument"); }
2076 /* Line 1806 of yacc.c */
2077 #line 199 "uparse.y"
2083 /* Line 1806 of yacc.c */
2084 #line 200 "uparse.y"
2085 { yyerror("Invalid argument"); }
2090 /* Line 1806 of yacc.c */
2091 #line 208 "uparse.y"
2092 { add_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
2097 /* Line 1806 of yacc.c */
2098 #line 209 "uparse.y"
2099 { add_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
2104 /* Line 1806 of yacc.c */
2105 #line 217 "uparse.y"
2106 { add_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
2111 /* Line 1806 of yacc.c */
2112 #line 218 "uparse.y"
2113 { add_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
2118 /* Line 1806 of yacc.c */
2119 #line 226 "uparse.y"
2120 { delete_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
2125 /* Line 1806 of yacc.c */
2126 #line 227 "uparse.y"
2127 { delete_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
2132 /* Line 1806 of yacc.c */
2133 #line 235 "uparse.y"
2134 { delete_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
2139 /* Line 1806 of yacc.c */
2140 #line 236 "uparse.y"
2141 { delete_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
2146 /* Line 1806 of yacc.c */
2147 #line 240 "uparse.y"
2148 { char * buf= g_get_current_dir(); puts(buf); free(buf); }
2153 /* Line 1806 of yacc.c */
2154 #line 241 "uparse.y"
2155 { yyerror("Invalid argument"); }
2160 /* Line 1806 of yacc.c */
2161 #line 242 "uparse.y"
2163 local_cd((yyvsp[(2) - (3)].strval));
2164 amfree((yyvsp[(2) - (3)].strval));
2170 /* Line 1806 of yacc.c */
2171 #line 246 "uparse.y"
2172 { yyerror("Invalid argument"); }
2177 /* Line 1806 of yacc.c */
2178 #line 247 "uparse.y"
2179 { yyerror("Argument required"); }
2184 /* Line 1806 of yacc.c */
2185 #line 251 "uparse.y"
2191 /* Line 1806 of yacc.c */
2192 #line 252 "uparse.y"
2193 { yyerror("Invalid argument"); }
2198 /* Line 1806 of yacc.c */
2199 #line 256 "uparse.y"
2200 { extract_files(); }
2205 /* Line 1806 of yacc.c */
2206 #line 257 "uparse.y"
2207 { yyerror("Invalid argument"); }
2212 /* Line 1806 of yacc.c */
2213 #line 261 "uparse.y"
2215 char * errstr = vstralloc("Invalid command: ", (yyvsp[(1) - (2)].strval), NULL);
2224 /* Line 1806 of yacc.c */
2225 #line 270 "uparse.y"
2226 { add_property_value((yyvsp[(1) - (2)].strval)); amfree( (yyvsp[(1) - (2)].strval)); }
2231 /* Line 1806 of yacc.c */
2232 #line 271 "uparse.y"
2238 /* Line 1806 of yacc.c */
2239 #line 275 "uparse.y"
2240 { amfree((yyvsp[(1) - (2)].strval)); }
2245 /* Line 1806 of yacc.c */
2246 #line 279 "uparse.y"
2247 { amfree((yyvsp[(1) - (2)].strval)); }
2252 /* Line 1806 of yacc.c */
2253 #line 280 "uparse.y"
2259 /* Line 1806 of yacc.c */
2260 #line 2261 "uparse.c"
2263 /* User semantic actions sometimes alter yychar, and that requires
2264 that yytoken be updated with the new translation. We take the
2265 approach of translating immediately before every use of yytoken.
2266 One alternative is translating here after every semantic action,
2267 but that translation would be missed if the semantic action invokes
2268 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2269 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2270 incorrect destructor might then be invoked immediately. In the
2271 case of YYERROR or YYBACKUP, subsequent parser actions might lead
2272 to an incorrect destructor call or verbose syntax error message
2273 before the lookahead is translated. */
2274 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2278 YY_STACK_PRINT (yyss, yyssp);
2282 /* Now `shift' the result of the reduction. Determine what state
2283 that goes to, based on the state we popped back to and the rule
2284 number reduced by. */
2288 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2289 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2290 yystate = yytable[yystate];
2292 yystate = yydefgoto[yyn - YYNTOKENS];
2297 /*------------------------------------.
2298 | yyerrlab -- here on detecting error |
2299 `------------------------------------*/
2301 /* Make sure we have latest lookahead translation. See comments at
2302 user semantic actions for why this is necessary. */
2303 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2305 /* If not already recovering from an error, report this error. */
2309 #if ! YYERROR_VERBOSE
2310 yyerror (YY_("syntax error"));
2312 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2315 char const *yymsgp = YY_("syntax error");
2316 int yysyntax_error_status;
2317 yysyntax_error_status = YYSYNTAX_ERROR;
2318 if (yysyntax_error_status == 0)
2320 else if (yysyntax_error_status == 1)
2322 if (yymsg != yymsgbuf)
2323 YYSTACK_FREE (yymsg);
2324 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2328 yymsg_alloc = sizeof yymsgbuf;
2329 yysyntax_error_status = 2;
2333 yysyntax_error_status = YYSYNTAX_ERROR;
2338 if (yysyntax_error_status == 2)
2339 goto yyexhaustedlab;
2341 # undef YYSYNTAX_ERROR
2347 if (yyerrstatus == 3)
2349 /* If just tried and failed to reuse lookahead token after an
2350 error, discard it. */
2352 if (yychar <= YYEOF)
2354 /* Return failure if at end of input. */
2355 if (yychar == YYEOF)
2360 yydestruct ("Error: discarding",
2366 /* Else will try to reuse lookahead token after shifting the error
2371 /*---------------------------------------------------.
2372 | yyerrorlab -- error raised explicitly by YYERROR. |
2373 `---------------------------------------------------*/
2376 /* Pacify compilers like GCC when the user code never invokes
2377 YYERROR and the label yyerrorlab therefore never appears in user
2379 if (/*CONSTCOND*/ 0)
2382 /* Do not reclaim the symbols of the rule which action triggered
2386 YY_STACK_PRINT (yyss, yyssp);
2391 /*-------------------------------------------------------------.
2392 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2393 `-------------------------------------------------------------*/
2395 yyerrstatus = 3; /* Each real token shifted decrements this. */
2399 yyn = yypact[yystate];
2400 if (!yypact_value_is_default (yyn))
2403 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2411 /* Pop the current state because it cannot handle the error token. */
2416 yydestruct ("Error: popping",
2417 yystos[yystate], yyvsp);
2420 YY_STACK_PRINT (yyss, yyssp);
2426 /* Shift the error token. */
2427 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2433 /*-------------------------------------.
2434 | yyacceptlab -- YYACCEPT comes here. |
2435 `-------------------------------------*/
2440 /*-----------------------------------.
2441 | yyabortlab -- YYABORT comes here. |
2442 `-----------------------------------*/
2447 #if !defined(yyoverflow) || YYERROR_VERBOSE
2448 /*-------------------------------------------------.
2449 | yyexhaustedlab -- memory exhaustion comes here. |
2450 `-------------------------------------------------*/
2452 yyerror (YY_("memory exhausted"));
2458 if (yychar != YYEMPTY)
2460 /* Make sure we have latest lookahead translation. See comments at
2461 user semantic actions for why this is necessary. */
2462 yytoken = YYTRANSLATE (yychar);
2463 yydestruct ("Cleanup: discarding lookahead",
2466 /* Do not reclaim the symbols of the rule which action triggered
2467 this YYABORT or YYACCEPT. */
2469 YY_STACK_PRINT (yyss, yyssp);
2470 while (yyssp != yyss)
2472 yydestruct ("Cleanup: popping",
2473 yystos[*yyssp], yyvsp);
2478 YYSTACK_FREE (yyss);
2481 if (yymsg != yymsgbuf)
2482 YYSTACK_FREE (yymsg);
2484 /* Make sure YYID is used. */
2485 return YYID (yyresult);
2490 /* Line 2067 of yacc.c */
2491 #line 283 "uparse.y"
2498 g_printf("%s\n", s);