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 void yyerror(char *s);
75 extern int yylex(void);
80 /* Line 268 of yacc.c */
83 /* Enabling traces. */
88 /* Enabling verbose error messages. */
89 #ifdef YYERROR_VERBOSE
90 # undef YYERROR_VERBOSE
91 # define YYERROR_VERBOSE 1
93 # define YYERROR_VERBOSE 0
96 /* Enabling the token table. */
98 # define YYTOKEN_TABLE 0
105 /* Put the tokens into the symbol table, so that GDB and other debuggers
171 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
172 typedef union YYSTYPE
175 /* Line 293 of yacc.c */
185 /* Line 293 of yacc.c */
188 # define YYSTYPE_IS_TRIVIAL 1
189 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
190 # define YYSTYPE_IS_DECLARED 1
194 /* Copy the second part of user declarations. */
197 /* Line 343 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)
248 # if defined YYENABLE_NLS && YYENABLE_NLS
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 EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
302 || defined __cplusplus || defined _MSC_VER)
303 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
304 # ifndef EXIT_SUCCESS
305 # define EXIT_SUCCESS 0
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 EXIT_SUCCESS \
329 && ! ((defined YYMALLOC || defined malloc) \
330 && (defined YYFREE || defined free)))
331 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
332 # ifndef EXIT_SUCCESS
333 # define EXIT_SUCCESS 0
337 # define YYMALLOC malloc
338 # if ! defined malloc && ! defined EXIT_SUCCESS && (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 EXIT_SUCCESS && (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. */
361 yytype_int16 yyss_alloc;
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 # define YYCOPY_NEEDED 1
376 /* Relocate STACK from its old location to the new one. The
377 local variables YYSIZE and YYSTACKSIZE give the old and new number of
378 elements in the stack, and YYPTR gives the new location of the
379 stack. Advance YYPTR to a properly aligned location for the next
381 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
384 YYSIZE_T yynewbytes; \
385 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
386 Stack = &yyptr->Stack_alloc; \
387 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
388 yyptr += yynewbytes / sizeof (*yyptr); \
394 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
395 /* Copy COUNT objects from FROM to TO. The source and destination do
398 # if defined __GNUC__ && 1 < __GNUC__
399 # define YYCOPY(To, From, Count) \
400 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
402 # define YYCOPY(To, From, Count) \
406 for (yyi = 0; yyi < (Count); yyi++) \
407 (To)[yyi] = (From)[yyi]; \
412 #endif /* !YYCOPY_NEEDED */
414 /* YYFINAL -- State number of the termination state. */
416 /* YYLAST -- Last index in YYTABLE. */
419 /* YYNTOKENS -- Number of terminals. */
421 /* YYNNTS -- Number of nonterminals. */
423 /* YYNRULES -- Number of rules. */
425 /* YYNRULES -- Number of states. */
428 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
430 #define YYMAXUTOK 285
432 #define YYTRANSLATE(YYX) \
433 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
435 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
436 static const yytype_uint8 yytranslate[] =
438 0, 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, 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, 1, 2, 3, 4,
464 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
465 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
466 25, 26, 27, 28, 29, 30
470 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
472 static const yytype_uint8 yyprhs[] =
474 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
475 19, 21, 23, 24, 26, 29, 31, 34, 37, 41,
476 44, 47, 49, 52, 55, 58, 61, 63, 65, 68,
477 70, 72, 74, 76, 78, 81, 84, 86, 89, 92,
478 94, 97, 100, 102, 105, 108, 110, 112, 115, 117
481 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
482 static const yytype_int8 yyrhs[] =
484 32, 0, -1, 33, -1, 34, -1, 35, -1, 36,
485 -1, 38, -1, 40, -1, 42, -1, 44, -1, 45,
486 -1, 46, -1, -1, 3, -1, 4, 29, -1, 4,
487 -1, 7, 30, -1, 5, 29, -1, 6, 29, 29,
488 -1, 6, 29, -1, 8, 29, -1, 8, -1, 10,
489 29, -1, 11, 29, -1, 9, 27, -1, 9, 28,
490 -1, 13, -1, 14, -1, 18, 29, -1, 18, -1,
491 21, -1, 22, -1, 26, -1, 12, -1, 15, 37,
492 -1, 37, 29, -1, 29, -1, 16, 39, -1, 39,
493 29, -1, 29, -1, 19, 41, -1, 41, 29, -1,
494 29, -1, 20, 43, -1, 43, 29, -1, 29, -1,
495 25, -1, 24, 29, -1, 23, -1, 17, -1
498 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
499 static const yytype_uint8 yyrline[] =
501 0, 65, 65, 66, 67, 68, 69, 70, 71, 72,
502 73, 74, 75, 84, 85, 86, 87, 88, 89, 90,
503 91, 92, 93, 94, 95, 100, 108, 109, 110, 111,
504 112, 113, 114, 118, 122, 126, 127, 131, 135, 136,
505 140, 144, 145, 149, 153, 154, 158, 159, 166, 170
509 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
510 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
511 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
512 static const char *const yytname[] =
514 "$end", "error", "$undefined", "LISTHOST", "LISTDISK", "SETHOST",
515 "SETDISK", "SETDATE", "SETTAPE", "SETMODE", "CD", "CDX", "QUIT", "DHIST",
516 "LS", "ADD", "ADDX", "EXTRACT", "LIST", "DELETE", "DELETEX", "PWD",
517 "CLEAR", "HELP", "LCD", "LPWD", "MODE", "SMB", "TAR", "PATH", "DATE",
518 "$accept", "ucommand", "set_command", "display_command", "quit_command",
519 "add_command", "add_path", "addx_command", "addx_path", "delete_command",
520 "delete_path", "deletex_command", "deletex_path", "local_command",
521 "help_command", "extract_command", 0
526 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
528 static const yytype_uint16 yytoknum[] =
530 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
531 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
532 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
537 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
538 static const yytype_uint8 yyr1[] =
540 0, 31, 32, 32, 32, 32, 32, 32, 32, 32,
541 32, 32, 32, 33, 33, 33, 33, 33, 33, 33,
542 33, 33, 33, 33, 33, 33, 34, 34, 34, 34,
543 34, 34, 34, 35, 36, 37, 37, 38, 39, 39,
544 40, 41, 41, 42, 43, 43, 44, 44, 45, 46
547 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
548 static const yytype_uint8 yyr2[] =
550 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
551 1, 1, 0, 1, 2, 1, 2, 2, 3, 2,
552 2, 1, 2, 2, 2, 2, 1, 1, 2, 1,
553 1, 1, 1, 1, 2, 2, 1, 2, 2, 1,
554 2, 2, 1, 2, 2, 1, 1, 2, 1, 1
557 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
558 Performed when YYTABLE doesn't specify something else to do. Zero
559 means the default is an error. */
560 static const yytype_uint8 yydefact[] =
562 12, 13, 15, 0, 0, 0, 21, 0, 0, 0,
563 33, 26, 27, 0, 0, 49, 29, 0, 0, 30,
564 31, 48, 0, 46, 32, 0, 2, 3, 4, 5,
565 6, 7, 8, 9, 10, 11, 14, 17, 19, 16,
566 20, 24, 25, 22, 23, 36, 34, 39, 37, 28,
567 42, 40, 45, 43, 47, 1, 18, 35, 38, 41,
571 /* YYDEFGOTO[NTERM-NUM]. */
572 static const yytype_int8 yydefgoto[] =
574 -1, 25, 26, 27, 28, 29, 46, 30, 48, 31,
575 51, 32, 53, 33, 34, 35
578 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
580 #define YYPACT_NINF -6
581 static const yytype_int8 yypact[] =
583 -3, -6, -5, -1, 0, 1, 3, -2, 4, 5,
584 -6, -6, -6, 6, 7, -6, 8, 9, 10, -6,
585 -6, -6, 11, -6, -6, 27, -6, -6, -6, -6,
586 -6, -6, -6, -6, -6, -6, -6, -6, 12, -6,
587 -6, -6, -6, -6, -6, -6, 13, -6, 14, -6,
588 -6, 15, -6, 16, -6, -6, -6, -6, -6, -6,
592 /* YYPGOTO[NTERM-NUM]. */
593 static const yytype_int8 yypgoto[] =
595 -6, -6, -6, -6, -6, -6, -6, -6, -6, -6,
596 -6, -6, -6, -6, -6, -6
599 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
600 positive, shift that token. If negative, reduce the rule which
601 number is the opposite. If YYTABLE_NINF, syntax error. */
602 #define YYTABLE_NINF -1
603 static const yytype_uint8 yytable[] =
605 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
606 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
607 21, 22, 23, 24, 36, 41, 42, 55, 37, 38,
608 0, 39, 40, 43, 44, 45, 47, 49, 50, 52,
609 54, 56, 57, 58, 59, 60
612 #define yypact_value_is_default(yystate) \
615 #define yytable_value_is_error(yytable_value) \
618 static const yytype_int8 yycheck[] =
620 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
621 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
622 23, 24, 25, 26, 29, 27, 28, 0, 29, 29,
623 -1, 30, 29, 29, 29, 29, 29, 29, 29, 29,
624 29, 29, 29, 29, 29, 29
627 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
628 symbol of state STATE-NUM. */
629 static const yytype_uint8 yystos[] =
631 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
632 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
633 22, 23, 24, 25, 26, 32, 33, 34, 35, 36,
634 38, 40, 42, 44, 45, 46, 29, 29, 29, 30,
635 29, 27, 28, 29, 29, 29, 37, 29, 39, 29,
636 29, 41, 29, 43, 29, 0, 29, 29, 29, 29,
640 #define yyerrok (yyerrstatus = 0)
641 #define yyclearin (yychar = YYEMPTY)
645 #define YYACCEPT goto yyacceptlab
646 #define YYABORT goto yyabortlab
647 #define YYERROR goto yyerrorlab
650 /* Like YYERROR except do call yyerror. This remains here temporarily
651 to ease the transition to the new meaning of YYERROR, for GCC.
652 Once GCC version 2 has supplanted version 1, this can go. However,
653 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
654 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
657 #define YYFAIL goto yyerrlab
659 /* This is here to suppress warnings from the GCC cpp's
660 -Wunused-macros. Normally we don't worry about that warning, but
661 some users do, and we want to make it easy for users to remove
662 YYFAIL uses, which will produce warnings from Bison 2.5. */
665 #define YYRECOVERING() (!!yyerrstatus)
667 #define YYBACKUP(Token, Value) \
669 if (yychar == YYEMPTY && yylen == 1) \
678 yyerror (YY_("syntax error: cannot back up")); \
685 #define YYERRCODE 256
688 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
689 If N is 0, then set CURRENT to the empty location which ends
690 the previous symbol: RHS[0] (always defined). */
692 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
693 #ifndef YYLLOC_DEFAULT
694 # define YYLLOC_DEFAULT(Current, Rhs, N) \
698 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
699 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
700 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
701 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
705 (Current).first_line = (Current).last_line = \
706 YYRHSLOC (Rhs, 0).last_line; \
707 (Current).first_column = (Current).last_column = \
708 YYRHSLOC (Rhs, 0).last_column; \
714 /* This macro is provided for backward compatibility. */
716 #ifndef YY_LOCATION_PRINT
717 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
721 /* YYLEX -- calling `yylex' with the right arguments. */
724 # define YYLEX yylex (YYLEX_PARAM)
726 # define YYLEX yylex ()
729 /* Enable debugging if requested. */
733 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
734 # define YYFPRINTF fprintf
737 # define YYDPRINTF(Args) \
743 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
747 YYFPRINTF (stderr, "%s ", Title); \
748 yy_symbol_print (stderr, \
750 YYFPRINTF (stderr, "\n"); \
755 /*--------------------------------.
756 | Print this symbol on YYOUTPUT. |
757 `--------------------------------*/
760 #if (defined __STDC__ || defined __C99__FUNC__ \
761 || defined __cplusplus || defined _MSC_VER)
763 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
766 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
769 YYSTYPE const * const yyvaluep;
775 if (yytype < YYNTOKENS)
776 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
788 /*--------------------------------.
789 | Print this symbol on YYOUTPUT. |
790 `--------------------------------*/
792 #if (defined __STDC__ || defined __C99__FUNC__ \
793 || defined __cplusplus || defined _MSC_VER)
795 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
798 yy_symbol_print (yyoutput, yytype, yyvaluep)
801 YYSTYPE const * const yyvaluep;
804 if (yytype < YYNTOKENS)
805 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
807 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
809 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
810 YYFPRINTF (yyoutput, ")");
813 /*------------------------------------------------------------------.
814 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
816 `------------------------------------------------------------------*/
818 #if (defined __STDC__ || defined __C99__FUNC__ \
819 || defined __cplusplus || defined _MSC_VER)
821 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
824 yy_stack_print (yybottom, yytop)
825 yytype_int16 *yybottom;
829 YYFPRINTF (stderr, "Stack now");
830 for (; yybottom <= yytop; yybottom++)
832 int yybot = *yybottom;
833 YYFPRINTF (stderr, " %d", yybot);
835 YYFPRINTF (stderr, "\n");
838 # define YY_STACK_PRINT(Bottom, Top) \
841 yy_stack_print ((Bottom), (Top)); \
845 /*------------------------------------------------.
846 | Report that the YYRULE is going to be reduced. |
847 `------------------------------------------------*/
849 #if (defined __STDC__ || defined __C99__FUNC__ \
850 || defined __cplusplus || defined _MSC_VER)
852 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
855 yy_reduce_print (yyvsp, yyrule)
860 int yynrhs = yyr2[yyrule];
862 unsigned long int yylno = yyrline[yyrule];
863 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
865 /* The symbols being reduced. */
866 for (yyi = 0; yyi < yynrhs; yyi++)
868 YYFPRINTF (stderr, " $%d = ", yyi + 1);
869 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
870 &(yyvsp[(yyi + 1) - (yynrhs)])
872 YYFPRINTF (stderr, "\n");
876 # define YY_REDUCE_PRINT(Rule) \
879 yy_reduce_print (yyvsp, Rule); \
882 /* Nonzero means print parse trace. It is left uninitialized so that
883 multiple parsers can coexist. */
886 # define YYDPRINTF(Args)
887 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
888 # define YY_STACK_PRINT(Bottom, Top)
889 # define YY_REDUCE_PRINT(Rule)
890 #endif /* !YYDEBUG */
893 /* YYINITDEPTH -- initial size of the parser's stacks. */
895 # define YYINITDEPTH 200
898 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
899 if the built-in stack extension method is used).
901 Do not make this value too large; the results are undefined if
902 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
903 evaluated with infinite-precision integer arithmetic. */
906 # define YYMAXDEPTH 10000
913 # if defined __GLIBC__ && defined _STRING_H
914 # define yystrlen strlen
916 /* Return the length of YYSTR. */
917 #if (defined __STDC__ || defined __C99__FUNC__ \
918 || defined __cplusplus || defined _MSC_VER)
920 yystrlen (const char *yystr)
928 for (yylen = 0; yystr[yylen]; yylen++)
936 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
937 # define yystpcpy stpcpy
939 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
941 #if (defined __STDC__ || defined __C99__FUNC__ \
942 || defined __cplusplus || defined _MSC_VER)
944 yystpcpy (char *yydest, const char *yysrc)
947 yystpcpy (yydest, yysrc)
953 const char *yys = yysrc;
955 while ((*yyd++ = *yys++) != '\0')
964 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
965 quotes and backslashes, so that it's suitable for yyerror. The
966 heuristic is that double-quoting is unnecessary unless the string
967 contains an apostrophe, a comma, or backslash (other than
968 backslash-backslash). YYSTR is taken from yytname. If YYRES is
969 null, do not copy; instead, return the length of what the result
972 yytnamerr (char *yyres, const char *yystr)
977 char const *yyp = yystr;
984 goto do_not_strip_quotes;
988 goto do_not_strip_quotes;
1001 do_not_strip_quotes: ;
1005 return yystrlen (yystr);
1007 return yystpcpy (yyres, yystr) - yyres;
1011 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1012 about the unexpected token YYTOKEN for the state stack whose top is
1015 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1016 not large enough to hold the message. In that case, also set
1017 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1018 required number of bytes is too large to store. */
1020 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1021 yytype_int16 *yyssp, int yytoken)
1023 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1024 YYSIZE_T yysize = yysize0;
1026 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1027 /* Internationalized format string. */
1028 const char *yyformat = 0;
1029 /* Arguments of yyformat. */
1030 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1031 /* Number of reported tokens (one for the "unexpected", one per
1035 /* There are many possibilities here to consider:
1036 - Assume YYFAIL is not used. It's too flawed to consider. See
1037 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1038 for details. YYERROR is fine as it does not invoke this
1040 - If this state is a consistent state with a default action, then
1041 the only way this function was invoked is if the default action
1042 is an error action. In that case, don't check for expected
1043 tokens because there are none.
1044 - The only way there can be no lookahead present (in yychar) is if
1045 this state is a consistent state with a default action. Thus,
1046 detecting the absence of a lookahead is sufficient to determine
1047 that there is no unexpected or expected token to report. In that
1048 case, just report a simple "syntax error".
1049 - Don't assume there isn't a lookahead just because this state is a
1050 consistent state with a default action. There might have been a
1051 previous inconsistent state, consistent state with a non-default
1052 action, or user semantic action that manipulated yychar.
1053 - Of course, the expected token list depends on states to have
1054 correct lookahead information, and it depends on the parser not
1055 to perform extra reductions after fetching a lookahead from the
1056 scanner and before detecting a syntax error. Thus, state merging
1057 (from LALR or IELR) and default reductions corrupt the expected
1058 token list. However, the list is correct for canonical LR with
1059 one exception: it will still contain any token that will not be
1060 accepted due to an error action in a later state.
1062 if (yytoken != YYEMPTY)
1064 int yyn = yypact[*yyssp];
1065 yyarg[yycount++] = yytname[yytoken];
1066 if (!yypact_value_is_default (yyn))
1068 /* Start YYX at -YYN if negative to avoid negative indexes in
1069 YYCHECK. In other words, skip the first -YYN actions for
1070 this state because they are default actions. */
1071 int yyxbegin = yyn < 0 ? -yyn : 0;
1072 /* Stay within bounds of both yycheck and yytname. */
1073 int yychecklim = YYLAST - yyn + 1;
1074 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1077 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1078 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1079 && !yytable_value_is_error (yytable[yyx + yyn]))
1081 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1087 yyarg[yycount++] = yytname[yyx];
1088 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1089 if (! (yysize <= yysize1
1090 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1099 # define YYCASE_(N, S) \
1103 YYCASE_(0, YY_("syntax error"));
1104 YYCASE_(1, YY_("syntax error, unexpected %s"));
1105 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1106 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1107 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1108 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1112 yysize1 = yysize + yystrlen (yyformat);
1113 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1117 if (*yymsg_alloc < yysize)
1119 *yymsg_alloc = 2 * yysize;
1120 if (! (yysize <= *yymsg_alloc
1121 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1122 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1126 /* Avoid sprintf, as that infringes on the user's name space.
1127 Don't have undefined behavior even if the translation
1128 produced a string with the wrong number of "%s"s. */
1132 while ((*yyp = *yyformat) != '\0')
1133 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1135 yyp += yytnamerr (yyp, yyarg[yyi++]);
1146 #endif /* YYERROR_VERBOSE */
1148 /*-----------------------------------------------.
1149 | Release the memory associated to this symbol. |
1150 `-----------------------------------------------*/
1153 #if (defined __STDC__ || defined __C99__FUNC__ \
1154 || defined __cplusplus || defined _MSC_VER)
1156 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1159 yydestruct (yymsg, yytype, yyvaluep)
1169 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1180 /* Prevent warnings from -Wmissing-prototypes. */
1181 #ifdef YYPARSE_PARAM
1182 #if defined __STDC__ || defined __cplusplus
1183 int yyparse (void *YYPARSE_PARAM);
1187 #else /* ! YYPARSE_PARAM */
1188 #if defined __STDC__ || defined __cplusplus
1193 #endif /* ! YYPARSE_PARAM */
1196 /* The lookahead symbol. */
1199 /* The semantic value of the lookahead symbol. */
1202 /* Number of syntax errors so far. */
1210 #ifdef YYPARSE_PARAM
1211 #if (defined __STDC__ || defined __C99__FUNC__ \
1212 || defined __cplusplus || defined _MSC_VER)
1214 yyparse (void *YYPARSE_PARAM)
1217 yyparse (YYPARSE_PARAM)
1218 void *YYPARSE_PARAM;
1220 #else /* ! YYPARSE_PARAM */
1221 #if (defined __STDC__ || defined __C99__FUNC__ \
1222 || defined __cplusplus || defined _MSC_VER)
1233 /* Number of tokens to shift before error messages enabled. */
1236 /* The stacks and their tools:
1237 `yyss': related to states.
1238 `yyvs': related to semantic values.
1240 Refer to the stacks thru separate pointers, to allow yyoverflow
1241 to reallocate them elsewhere. */
1243 /* The state stack. */
1244 yytype_int16 yyssa[YYINITDEPTH];
1246 yytype_int16 *yyssp;
1248 /* The semantic value stack. */
1249 YYSTYPE yyvsa[YYINITDEPTH];
1253 YYSIZE_T yystacksize;
1257 /* Lookahead token as an internal (translated) token number. */
1259 /* The variables used to return semantic value and location from the
1264 /* Buffer for error messages, and its allocated size. */
1266 char *yymsg = yymsgbuf;
1267 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1270 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1272 /* The number of symbols on the RHS of the reduced rule.
1273 Keep to zero when no symbol should be popped. */
1279 yystacksize = YYINITDEPTH;
1281 YYDPRINTF ((stderr, "Starting parse\n"));
1286 yychar = YYEMPTY; /* Cause a token to be read. */
1288 /* Initialize stack pointers.
1289 Waste one element of value and location stack
1290 so that they stay on the same level as the state stack.
1291 The wasted elements are never initialized. */
1297 /*------------------------------------------------------------.
1298 | yynewstate -- Push a new state, which is found in yystate. |
1299 `------------------------------------------------------------*/
1301 /* In all cases, when you get here, the value and location stacks
1302 have just been pushed. So pushing a state here evens the stacks. */
1308 if (yyss + yystacksize - 1 <= yyssp)
1310 /* Get the current used size of the three stacks, in elements. */
1311 YYSIZE_T yysize = yyssp - yyss + 1;
1315 /* Give user a chance to reallocate the stack. Use copies of
1316 these so that the &'s don't force the real ones into
1318 YYSTYPE *yyvs1 = yyvs;
1319 yytype_int16 *yyss1 = yyss;
1321 /* Each stack pointer address is followed by the size of the
1322 data in use in that stack, in bytes. This used to be a
1323 conditional around just the two extra args, but that might
1324 be undefined if yyoverflow is a macro. */
1325 yyoverflow (YY_("memory exhausted"),
1326 &yyss1, yysize * sizeof (*yyssp),
1327 &yyvs1, yysize * sizeof (*yyvsp),
1333 #else /* no yyoverflow */
1334 # ifndef YYSTACK_RELOCATE
1335 goto yyexhaustedlab;
1337 /* Extend the stack our own way. */
1338 if (YYMAXDEPTH <= yystacksize)
1339 goto yyexhaustedlab;
1341 if (YYMAXDEPTH < yystacksize)
1342 yystacksize = YYMAXDEPTH;
1345 yytype_int16 *yyss1 = yyss;
1346 union yyalloc *yyptr =
1347 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1349 goto yyexhaustedlab;
1350 YYSTACK_RELOCATE (yyss_alloc, yyss);
1351 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1352 # undef YYSTACK_RELOCATE
1354 YYSTACK_FREE (yyss1);
1357 #endif /* no yyoverflow */
1359 yyssp = yyss + yysize - 1;
1360 yyvsp = yyvs + yysize - 1;
1362 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1363 (unsigned long int) yystacksize));
1365 if (yyss + yystacksize - 1 <= yyssp)
1369 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1371 if (yystate == YYFINAL)
1381 /* Do appropriate processing given the current state. Read a
1382 lookahead token if we need one and don't already have one. */
1384 /* First try to decide what to do without reference to lookahead token. */
1385 yyn = yypact[yystate];
1386 if (yypact_value_is_default (yyn))
1389 /* Not known => get a lookahead token if don't already have one. */
1391 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1392 if (yychar == YYEMPTY)
1394 YYDPRINTF ((stderr, "Reading a token: "));
1398 if (yychar <= YYEOF)
1400 yychar = yytoken = YYEOF;
1401 YYDPRINTF ((stderr, "Now at end of input.\n"));
1405 yytoken = YYTRANSLATE (yychar);
1406 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1409 /* If the proper action on seeing token YYTOKEN is to reduce or to
1410 detect an error, take that action. */
1412 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1417 if (yytable_value_is_error (yyn))
1423 /* Count tokens shifted since error; after three, turn off error
1428 /* Shift the lookahead token. */
1429 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1431 /* Discard the shifted token. */
1440 /*-----------------------------------------------------------.
1441 | yydefault -- do the default action for the current state. |
1442 `-----------------------------------------------------------*/
1444 yyn = yydefact[yystate];
1450 /*-----------------------------.
1451 | yyreduce -- Do a reduction. |
1452 `-----------------------------*/
1454 /* yyn is the number of a rule to reduce with. */
1457 /* If YYLEN is nonzero, implement the default value of the action:
1460 Otherwise, the following line sets YYVAL to garbage.
1461 This behavior is undocumented and Bison
1462 users should not rely upon it. Assigning to YYVAL
1463 unconditionally makes the parser a bit smaller, and it avoids a
1464 GCC warning that YYVAL may be used uninitialized. */
1465 yyval = yyvsp[1-yylen];
1468 YY_REDUCE_PRINT (yyn);
1473 /* Line 1806 of yacc.c */
1476 char * errstr = vstralloc("Invalid command: ", yytext, NULL);
1485 /* Line 1806 of yacc.c */
1492 /* Line 1806 of yacc.c */
1494 { list_disk((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1499 /* Line 1806 of yacc.c */
1501 { list_disk(NULL); }
1506 /* Line 1806 of yacc.c */
1508 { set_date((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1513 /* Line 1806 of yacc.c */
1515 { set_host((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1520 /* Line 1806 of yacc.c */
1522 { set_disk((yyvsp[(2) - (3)].strval), (yyvsp[(3) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(3) - (3)].strval)); }
1527 /* Line 1806 of yacc.c */
1529 { set_disk((yyvsp[(2) - (2)].strval), NULL); amfree((yyvsp[(2) - (2)].strval)); }
1534 /* Line 1806 of yacc.c */
1536 { set_tape((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1541 /* Line 1806 of yacc.c */
1548 /* Line 1806 of yacc.c */
1550 { cd_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1555 /* Line 1806 of yacc.c */
1557 { cd_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1562 /* Line 1806 of yacc.c */
1566 set_mode(SAMBA_SMBCLIENT);
1567 #endif /* SAMBA_CLIENT */
1573 /* Line 1806 of yacc.c */
1574 #line 100 "uparse.y"
1577 set_mode(SAMBA_TAR);
1578 #endif /* SAMBA_CLIENT */
1584 /* Line 1806 of yacc.c */
1585 #line 108 "uparse.y"
1586 { list_disk_history(); }
1591 /* Line 1806 of yacc.c */
1592 #line 109 "uparse.y"
1593 { list_directory(); }
1598 /* Line 1806 of yacc.c */
1599 #line 110 "uparse.y"
1600 { display_extract_list((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1605 /* Line 1806 of yacc.c */
1606 #line 111 "uparse.y"
1607 { display_extract_list(NULL); }
1612 /* Line 1806 of yacc.c */
1613 #line 112 "uparse.y"
1614 { show_directory(); }
1619 /* Line 1806 of yacc.c */
1620 #line 113 "uparse.y"
1621 { clear_extract_list(); }
1626 /* Line 1806 of yacc.c */
1627 #line 114 "uparse.y"
1633 /* Line 1806 of yacc.c */
1634 #line 118 "uparse.y"
1640 /* Line 1806 of yacc.c */
1641 #line 126 "uparse.y"
1642 { add_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1647 /* Line 1806 of yacc.c */
1648 #line 127 "uparse.y"
1649 { add_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
1654 /* Line 1806 of yacc.c */
1655 #line 135 "uparse.y"
1656 { add_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1661 /* Line 1806 of yacc.c */
1662 #line 136 "uparse.y"
1663 { add_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
1668 /* Line 1806 of yacc.c */
1669 #line 144 "uparse.y"
1670 { delete_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1675 /* Line 1806 of yacc.c */
1676 #line 145 "uparse.y"
1677 { delete_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
1682 /* Line 1806 of yacc.c */
1683 #line 153 "uparse.y"
1684 { delete_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
1689 /* Line 1806 of yacc.c */
1690 #line 154 "uparse.y"
1691 { delete_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
1696 /* Line 1806 of yacc.c */
1697 #line 158 "uparse.y"
1698 { char buf[STR_SIZE]; puts(getcwd(buf, sizeof(buf))); }
1703 /* Line 1806 of yacc.c */
1704 #line 159 "uparse.y"
1706 local_cd((yyvsp[(2) - (2)].strval));
1707 amfree((yyvsp[(2) - (2)].strval));
1713 /* Line 1806 of yacc.c */
1714 #line 166 "uparse.y"
1720 /* Line 1806 of yacc.c */
1721 #line 170 "uparse.y"
1722 { extract_files(); }
1727 /* Line 1806 of yacc.c */
1728 #line 1729 "uparse.c"
1731 /* User semantic actions sometimes alter yychar, and that requires
1732 that yytoken be updated with the new translation. We take the
1733 approach of translating immediately before every use of yytoken.
1734 One alternative is translating here after every semantic action,
1735 but that translation would be missed if the semantic action invokes
1736 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1737 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1738 incorrect destructor might then be invoked immediately. In the
1739 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1740 to an incorrect destructor call or verbose syntax error message
1741 before the lookahead is translated. */
1742 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1746 YY_STACK_PRINT (yyss, yyssp);
1750 /* Now `shift' the result of the reduction. Determine what state
1751 that goes to, based on the state we popped back to and the rule
1752 number reduced by. */
1756 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1757 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1758 yystate = yytable[yystate];
1760 yystate = yydefgoto[yyn - YYNTOKENS];
1765 /*------------------------------------.
1766 | yyerrlab -- here on detecting error |
1767 `------------------------------------*/
1769 /* Make sure we have latest lookahead translation. See comments at
1770 user semantic actions for why this is necessary. */
1771 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1773 /* If not already recovering from an error, report this error. */
1777 #if ! YYERROR_VERBOSE
1778 yyerror (YY_("syntax error"));
1780 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1783 char const *yymsgp = YY_("syntax error");
1784 int yysyntax_error_status;
1785 yysyntax_error_status = YYSYNTAX_ERROR;
1786 if (yysyntax_error_status == 0)
1788 else if (yysyntax_error_status == 1)
1790 if (yymsg != yymsgbuf)
1791 YYSTACK_FREE (yymsg);
1792 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1796 yymsg_alloc = sizeof yymsgbuf;
1797 yysyntax_error_status = 2;
1801 yysyntax_error_status = YYSYNTAX_ERROR;
1806 if (yysyntax_error_status == 2)
1807 goto yyexhaustedlab;
1809 # undef YYSYNTAX_ERROR
1815 if (yyerrstatus == 3)
1817 /* If just tried and failed to reuse lookahead token after an
1818 error, discard it. */
1820 if (yychar <= YYEOF)
1822 /* Return failure if at end of input. */
1823 if (yychar == YYEOF)
1828 yydestruct ("Error: discarding",
1834 /* Else will try to reuse lookahead token after shifting the error
1839 /*---------------------------------------------------.
1840 | yyerrorlab -- error raised explicitly by YYERROR. |
1841 `---------------------------------------------------*/
1844 /* Pacify compilers like GCC when the user code never invokes
1845 YYERROR and the label yyerrorlab therefore never appears in user
1847 if (/*CONSTCOND*/ 0)
1850 /* Do not reclaim the symbols of the rule which action triggered
1854 YY_STACK_PRINT (yyss, yyssp);
1859 /*-------------------------------------------------------------.
1860 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1861 `-------------------------------------------------------------*/
1863 yyerrstatus = 3; /* Each real token shifted decrements this. */
1867 yyn = yypact[yystate];
1868 if (!yypact_value_is_default (yyn))
1871 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1879 /* Pop the current state because it cannot handle the error token. */
1884 yydestruct ("Error: popping",
1885 yystos[yystate], yyvsp);
1888 YY_STACK_PRINT (yyss, yyssp);
1894 /* Shift the error token. */
1895 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1901 /*-------------------------------------.
1902 | yyacceptlab -- YYACCEPT comes here. |
1903 `-------------------------------------*/
1908 /*-----------------------------------.
1909 | yyabortlab -- YYABORT comes here. |
1910 `-----------------------------------*/
1915 #if !defined(yyoverflow) || YYERROR_VERBOSE
1916 /*-------------------------------------------------.
1917 | yyexhaustedlab -- memory exhaustion comes here. |
1918 `-------------------------------------------------*/
1920 yyerror (YY_("memory exhausted"));
1926 if (yychar != YYEMPTY)
1928 /* Make sure we have latest lookahead translation. See comments at
1929 user semantic actions for why this is necessary. */
1930 yytoken = YYTRANSLATE (yychar);
1931 yydestruct ("Cleanup: discarding lookahead",
1934 /* Do not reclaim the symbols of the rule which action triggered
1935 this YYABORT or YYACCEPT. */
1937 YY_STACK_PRINT (yyss, yyssp);
1938 while (yyssp != yyss)
1940 yydestruct ("Cleanup: popping",
1941 yystos[*yyssp], yyvsp);
1946 YYSTACK_FREE (yyss);
1949 if (yymsg != yymsgbuf)
1950 YYSTACK_FREE (yymsg);
1952 /* Make sure YYID is used. */
1953 return YYID (yyresult);
1958 /* Line 2067 of yacc.c */
1959 #line 174 "uparse.y"
1966 g_printf("%s\n", s);