PageRenderTime 104ms CodeModel.GetById 25ms app.highlight 63ms RepoModel.GetById 2ms app.codeStats 1ms

/crypto/heimdal/appl/ftp/ftpd/ftpcmd.c

https://bitbucket.org/freebsd/freebsd-head/
C | 3532 lines | 2815 code | 414 blank | 303 comment | 494 complexity | 26c4001a2a6f5dabfde2e8157f4c1009 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/* A Bison parser, made by GNU Bison 2.3.  */
   2
   3/* Skeleton implementation for Bison's Yacc-like parsers in C
   4
   5   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
   6   Free Software Foundation, Inc.
   7
   8   This program is free software; you can redistribute it and/or modify
   9   it under the terms of the GNU General Public License as published by
  10   the Free Software Foundation; either version 2, or (at your option)
  11   any later version.
  12
  13   This program is distributed in the hope that it will be useful,
  14   but WITHOUT ANY WARRANTY; without even the implied warranty of
  15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16   GNU General Public License for more details.
  17
  18   You should have received a copy of the GNU General Public License
  19   along with this program; if not, write to the Free Software
  20   Foundation, Inc., 51 Franklin Street, Fifth Floor,
  21   Boston, MA 02110-1301, USA.  */
  22
  23/* As a special exception, you may create a larger work that contains
  24   part or all of the Bison parser skeleton and distribute that work
  25   under terms of your choice, so long as that work isn't itself a
  26   parser generator using the skeleton or a modified version thereof
  27   as a parser skeleton.  Alternatively, if you modify or redistribute
  28   the parser skeleton itself, you may (at your option) remove this
  29   special exception, which will cause the skeleton and the resulting
  30   Bison output files to be licensed under the GNU General Public
  31   License without this special exception.
  32
  33   This special exception was added by the Free Software Foundation in
  34   version 2.2 of Bison.  */
  35
  36/* C LALR(1) parser skeleton written by Richard Stallman, by
  37   simplifying the original so-called "semantic" parser.  */
  38
  39/* All symbols defined below should begin with yy or YY, to avoid
  40   infringing on user name space.  This should be done even for local
  41   variables, as they might otherwise be expanded by user macros.
  42   There are some unavoidable exceptions within include files to
  43   define necessary library symbols; they are noted "INFRINGES ON
  44   USER NAME SPACE" below.  */
  45
  46/* Identify Bison output.  */
  47#define YYBISON 1
  48
  49/* Bison version.  */
  50#define YYBISON_VERSION "2.3"
  51
  52/* Skeleton name.  */
  53#define YYSKELETON_NAME "yacc.c"
  54
  55/* Pure parsers.  */
  56#define YYPURE 0
  57
  58/* Using locations.  */
  59#define YYLSP_NEEDED 0
  60
  61
  62
  63/* Tokens.  */
  64#ifndef YYTOKENTYPE
  65# define YYTOKENTYPE
  66   /* Put the tokens into the symbol table, so that GDB and other debuggers
  67      know about them.  */
  68   enum yytokentype {
  69     A = 258,
  70     B = 259,
  71     C = 260,
  72     E = 261,
  73     F = 262,
  74     I = 263,
  75     L = 264,
  76     N = 265,
  77     P = 266,
  78     R = 267,
  79     S = 268,
  80     T = 269,
  81     SP = 270,
  82     CRLF = 271,
  83     COMMA = 272,
  84     USER = 273,
  85     PASS = 274,
  86     ACCT = 275,
  87     REIN = 276,
  88     QUIT = 277,
  89     PORT = 278,
  90     PASV = 279,
  91     TYPE = 280,
  92     STRU = 281,
  93     MODE = 282,
  94     RETR = 283,
  95     STOR = 284,
  96     APPE = 285,
  97     MLFL = 286,
  98     MAIL = 287,
  99     MSND = 288,
 100     MSOM = 289,
 101     MSAM = 290,
 102     MRSQ = 291,
 103     MRCP = 292,
 104     ALLO = 293,
 105     REST = 294,
 106     RNFR = 295,
 107     RNTO = 296,
 108     ABOR = 297,
 109     DELE = 298,
 110     CWD = 299,
 111     LIST = 300,
 112     NLST = 301,
 113     SITE = 302,
 114     sTAT = 303,
 115     HELP = 304,
 116     NOOP = 305,
 117     MKD = 306,
 118     RMD = 307,
 119     PWD = 308,
 120     CDUP = 309,
 121     STOU = 310,
 122     SMNT = 311,
 123     SYST = 312,
 124     SIZE = 313,
 125     MDTM = 314,
 126     EPRT = 315,
 127     EPSV = 316,
 128     UMASK = 317,
 129     IDLE = 318,
 130     CHMOD = 319,
 131     AUTH = 320,
 132     ADAT = 321,
 133     PROT = 322,
 134     PBSZ = 323,
 135     CCC = 324,
 136     MIC = 325,
 137     CONF = 326,
 138     ENC = 327,
 139     KAUTH = 328,
 140     KLIST = 329,
 141     KDESTROY = 330,
 142     KRBTKFILE = 331,
 143     AFSLOG = 332,
 144     LOCATE = 333,
 145     URL = 334,
 146     FEAT = 335,
 147     OPTS = 336,
 148     LEXERR = 337,
 149     STRING = 338,
 150     NUMBER = 339
 151   };
 152#endif
 153/* Tokens.  */
 154#define A 258
 155#define B 259
 156#define C 260
 157#define E 261
 158#define F 262
 159#define I 263
 160#define L 264
 161#define N 265
 162#define P 266
 163#define R 267
 164#define S 268
 165#define T 269
 166#define SP 270
 167#define CRLF 271
 168#define COMMA 272
 169#define USER 273
 170#define PASS 274
 171#define ACCT 275
 172#define REIN 276
 173#define QUIT 277
 174#define PORT 278
 175#define PASV 279
 176#define TYPE 280
 177#define STRU 281
 178#define MODE 282
 179#define RETR 283
 180#define STOR 284
 181#define APPE 285
 182#define MLFL 286
 183#define MAIL 287
 184#define MSND 288
 185#define MSOM 289
 186#define MSAM 290
 187#define MRSQ 291
 188#define MRCP 292
 189#define ALLO 293
 190#define REST 294
 191#define RNFR 295
 192#define RNTO 296
 193#define ABOR 297
 194#define DELE 298
 195#define CWD 299
 196#define LIST 300
 197#define NLST 301
 198#define SITE 302
 199#define sTAT 303
 200#define HELP 304
 201#define NOOP 305
 202#define MKD 306
 203#define RMD 307
 204#define PWD 308
 205#define CDUP 309
 206#define STOU 310
 207#define SMNT 311
 208#define SYST 312
 209#define SIZE 313
 210#define MDTM 314
 211#define EPRT 315
 212#define EPSV 316
 213#define UMASK 317
 214#define IDLE 318
 215#define CHMOD 319
 216#define AUTH 320
 217#define ADAT 321
 218#define PROT 322
 219#define PBSZ 323
 220#define CCC 324
 221#define MIC 325
 222#define CONF 326
 223#define ENC 327
 224#define KAUTH 328
 225#define KLIST 329
 226#define KDESTROY 330
 227#define KRBTKFILE 331
 228#define AFSLOG 332
 229#define LOCATE 333
 230#define URL 334
 231#define FEAT 335
 232#define OPTS 336
 233#define LEXERR 337
 234#define STRING 338
 235#define NUMBER 339
 236
 237
 238
 239
 240/* Copy the first part of user declarations.  */
 241#line 43 "ftpcmd.y"
 242
 243
 244#include "ftpd_locl.h"
 245RCSID("$Id$");
 246
 247off_t	restart_point;
 248
 249static	int hasyyerrored;
 250
 251
 252static	int cmd_type;
 253static	int cmd_form;
 254static	int cmd_bytesz;
 255char	cbuf[64*1024];
 256char	*fromname;
 257
 258struct tab {
 259	char	*name;
 260	short	token;
 261	short	state;
 262	short	implemented;	/* 1 if command is implemented */
 263	char	*help;
 264};
 265
 266extern struct tab cmdtab[];
 267extern struct tab sitetab[];
 268
 269static char		*copy (char *);
 270static void		 help (struct tab *, char *);
 271static struct tab *
 272			 lookup (struct tab *, char *);
 273static void		 sizecmd (char *);
 274static RETSIGTYPE	 toolong (int);
 275static int		 yylex (void);
 276
 277/* This is for bison */
 278
 279#if !defined(alloca) && !defined(HAVE_ALLOCA)
 280#define alloca(x) malloc(x)
 281#endif
 282
 283
 284
 285/* Enabling traces.  */
 286#ifndef YYDEBUG
 287# define YYDEBUG 0
 288#endif
 289
 290/* Enabling verbose error messages.  */
 291#ifdef YYERROR_VERBOSE
 292# undef YYERROR_VERBOSE
 293# define YYERROR_VERBOSE 1
 294#else
 295# define YYERROR_VERBOSE 0
 296#endif
 297
 298/* Enabling the token table.  */
 299#ifndef YYTOKEN_TABLE
 300# define YYTOKEN_TABLE 0
 301#endif
 302
 303#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 304typedef union YYSTYPE
 305#line 86 "ftpcmd.y"
 306{
 307	int	i;
 308	char   *s;
 309}
 310/* Line 193 of yacc.c.  */
 311#line 312 "ftpcmd.c"
 312	YYSTYPE;
 313# define yystype YYSTYPE /* obsolescent; will be withdrawn */
 314# define YYSTYPE_IS_DECLARED 1
 315# define YYSTYPE_IS_TRIVIAL 1
 316#endif
 317
 318
 319
 320/* Copy the second part of user declarations.  */
 321
 322
 323/* Line 216 of yacc.c.  */
 324#line 325 "ftpcmd.c"
 325
 326#ifdef short
 327# undef short
 328#endif
 329
 330#ifdef YYTYPE_UINT8
 331typedef YYTYPE_UINT8 yytype_uint8;
 332#else
 333typedef unsigned char yytype_uint8;
 334#endif
 335
 336#ifdef YYTYPE_INT8
 337typedef YYTYPE_INT8 yytype_int8;
 338#elif (defined __STDC__ || defined __C99__FUNC__ \
 339     || defined __cplusplus || defined _MSC_VER)
 340typedef signed char yytype_int8;
 341#else
 342typedef short int yytype_int8;
 343#endif
 344
 345#ifdef YYTYPE_UINT16
 346typedef YYTYPE_UINT16 yytype_uint16;
 347#else
 348typedef unsigned short int yytype_uint16;
 349#endif
 350
 351#ifdef YYTYPE_INT16
 352typedef YYTYPE_INT16 yytype_int16;
 353#else
 354typedef short int yytype_int16;
 355#endif
 356
 357#ifndef YYSIZE_T
 358# ifdef __SIZE_TYPE__
 359#  define YYSIZE_T __SIZE_TYPE__
 360# elif defined size_t
 361#  define YYSIZE_T size_t
 362# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
 363     || defined __cplusplus || defined _MSC_VER)
 364#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
 365#  define YYSIZE_T size_t
 366# else
 367#  define YYSIZE_T unsigned int
 368# endif
 369#endif
 370
 371#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 372
 373#ifndef YY_
 374# if defined YYENABLE_NLS && YYENABLE_NLS
 375#  if ENABLE_NLS
 376#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 377#   define YY_(msgid) dgettext ("bison-runtime", msgid)
 378#  endif
 379# endif
 380# ifndef YY_
 381#  define YY_(msgid) msgid
 382# endif
 383#endif
 384
 385/* Suppress unused-variable warnings by "using" E.  */
 386#if ! defined lint || defined __GNUC__
 387# define YYUSE(e) ((void) (e))
 388#else
 389# define YYUSE(e) /* empty */
 390#endif
 391
 392/* Identity function, used to suppress warnings about constant conditions.  */
 393#ifndef lint
 394# define YYID(n) (n)
 395#else
 396#if (defined __STDC__ || defined __C99__FUNC__ \
 397     || defined __cplusplus || defined _MSC_VER)
 398static int
 399YYID (int i)
 400#else
 401static int
 402YYID (i)
 403    int i;
 404#endif
 405{
 406  return i;
 407}
 408#endif
 409
 410#if ! defined yyoverflow || YYERROR_VERBOSE
 411
 412/* The parser invokes alloca or malloc; define the necessary symbols.  */
 413
 414# ifdef YYSTACK_USE_ALLOCA
 415#  if YYSTACK_USE_ALLOCA
 416#   ifdef __GNUC__
 417#    define YYSTACK_ALLOC __builtin_alloca
 418#   elif defined __BUILTIN_VA_ARG_INCR
 419#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
 420#   elif defined _AIX
 421#    define YYSTACK_ALLOC __alloca
 422#   elif defined _MSC_VER
 423#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
 424#    define alloca _alloca
 425#   else
 426#    define YYSTACK_ALLOC alloca
 427#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 428     || defined __cplusplus || defined _MSC_VER)
 429#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 430#     ifndef _STDLIB_H
 431#      define _STDLIB_H 1
 432#     endif
 433#    endif
 434#   endif
 435#  endif
 436# endif
 437
 438# ifdef YYSTACK_ALLOC
 439   /* Pacify GCC's `empty if-body' warning.  */
 440#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
 441#  ifndef YYSTACK_ALLOC_MAXIMUM
 442    /* The OS might guarantee only one guard page at the bottom of the stack,
 443       and a page size can be as small as 4096 bytes.  So we cannot safely
 444       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
 445       to allow for a few compiler-allocated temporary stack slots.  */
 446#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
 447#  endif
 448# else
 449#  define YYSTACK_ALLOC YYMALLOC
 450#  define YYSTACK_FREE YYFREE
 451#  ifndef YYSTACK_ALLOC_MAXIMUM
 452#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 453#  endif
 454#  if (defined __cplusplus && ! defined _STDLIB_H \
 455       && ! ((defined YYMALLOC || defined malloc) \
 456	     && (defined YYFREE || defined free)))
 457#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 458#   ifndef _STDLIB_H
 459#    define _STDLIB_H 1
 460#   endif
 461#  endif
 462#  ifndef YYMALLOC
 463#   define YYMALLOC malloc
 464#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 465     || defined __cplusplus || defined _MSC_VER)
 466void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 467#   endif
 468#  endif
 469#  ifndef YYFREE
 470#   define YYFREE free
 471#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 472     || defined __cplusplus || defined _MSC_VER)
 473void free (void *); /* INFRINGES ON USER NAME SPACE */
 474#   endif
 475#  endif
 476# endif
 477#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
 478
 479
 480#if (! defined yyoverflow \
 481     && (! defined __cplusplus \
 482	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
 483
 484/* A type that is properly aligned for any stack member.  */
 485union yyalloc
 486{
 487  yytype_int16 yyss;
 488  YYSTYPE yyvs;
 489  };
 490
 491/* The size of the maximum gap between one aligned stack and the next.  */
 492# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
 493
 494/* The size of an array large to enough to hold all stacks, each with
 495   N elements.  */
 496# define YYSTACK_BYTES(N) \
 497     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
 498      + YYSTACK_GAP_MAXIMUM)
 499
 500/* Copy COUNT objects from FROM to TO.  The source and destination do
 501   not overlap.  */
 502# ifndef YYCOPY
 503#  if defined __GNUC__ && 1 < __GNUC__
 504#   define YYCOPY(To, From, Count) \
 505      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
 506#  else
 507#   define YYCOPY(To, From, Count)		\
 508      do					\
 509	{					\
 510	  YYSIZE_T yyi;				\
 511	  for (yyi = 0; yyi < (Count); yyi++)	\
 512	    (To)[yyi] = (From)[yyi];		\
 513	}					\
 514      while (YYID (0))
 515#  endif
 516# endif
 517
 518/* Relocate STACK from its old location to the new one.  The
 519   local variables YYSIZE and YYSTACKSIZE give the old and new number of
 520   elements in the stack, and YYPTR gives the new location of the
 521   stack.  Advance YYPTR to a properly aligned location for the next
 522   stack.  */
 523# define YYSTACK_RELOCATE(Stack)					\
 524    do									\
 525      {									\
 526	YYSIZE_T yynewbytes;						\
 527	YYCOPY (&yyptr->Stack, Stack, yysize);				\
 528	Stack = &yyptr->Stack;						\
 529	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 530	yyptr += yynewbytes / sizeof (*yyptr);				\
 531      }									\
 532    while (YYID (0))
 533
 534#endif
 535
 536/* YYFINAL -- State number of the termination state.  */
 537#define YYFINAL  2
 538/* YYLAST -- Last index in YYTABLE.  */
 539#define YYLAST   327
 540
 541/* YYNTOKENS -- Number of terminals.  */
 542#define YYNTOKENS  85
 543/* YYNNTS -- Number of nonterminals.  */
 544#define YYNNTS  18
 545/* YYNRULES -- Number of rules.  */
 546#define YYNRULES  98
 547/* YYNRULES -- Number of states.  */
 548#define YYNSTATES  317
 549
 550/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 551#define YYUNDEFTOK  2
 552#define YYMAXUTOK   339
 553
 554#define YYTRANSLATE(YYX)						\
 555  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 556
 557/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
 558static const yytype_uint8 yytranslate[] =
 559{
 560       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 561       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 562       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 563       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 564       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 565       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 566       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 567       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 568       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 569       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 570       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 571       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 572       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 573       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 574       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 575       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 576       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 577       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 578       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 579       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 580       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 581       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 582       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 583       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 584       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 585       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
 586       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
 587      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
 588      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
 589      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
 590      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
 591      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
 592      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
 593      75,    76,    77,    78,    79,    80,    81,    82,    83,    84
 594};
 595
 596#if YYDEBUG
 597/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
 598   YYRHS.  */
 599static const yytype_uint16 yyprhs[] =
 600{
 601       0,     0,     3,     4,     7,    10,    16,    22,    28,    34,
 602      38,    42,    48,    54,    60,    66,    72,    82,    88,    94,
 603     100,   104,   110,   114,   120,   126,   130,   136,   142,   146,
 604     150,   156,   160,   166,   170,   176,   182,   186,   190,   194,
 605     200,   206,   214,   220,   228,   238,   244,   252,   260,   266,
 606     272,   280,   286,   294,   302,   308,   314,   318,   324,   330,
 607     334,   337,   343,   349,   354,   359,   365,   371,   375,   380,
 608     385,   390,   392,   393,   395,   397,   409,   411,   413,   415,
 609     417,   421,   423,   427,   429,   431,   435,   438,   440,   442,
 610     444,   446,   448,   450,   452,   454,   456,   458,   460
 611};
 612
 613/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 614static const yytype_int8 yyrhs[] =
 615{
 616      86,     0,    -1,    -1,    86,    87,    -1,    86,    88,    -1,
 617      18,    15,    89,    16,   102,    -1,    19,    15,    90,    16,
 618     102,    -1,    23,    15,    92,    16,   102,    -1,    60,    15,
 619      83,    16,   102,    -1,    24,    16,   101,    -1,    61,    16,
 620     101,    -1,    61,    15,    83,    16,   101,    -1,    25,    15,
 621      94,    16,   102,    -1,    26,    15,    95,    16,   102,    -1,
 622      27,    15,    96,    16,   102,    -1,    38,    15,    84,    16,
 623     102,    -1,    38,    15,    84,    15,    12,    15,    84,    16,
 624     102,    -1,    28,    15,    97,    16,   101,    -1,    29,    15,
 625      97,    16,   101,    -1,    30,    15,    97,    16,   101,    -1,
 626      46,    16,   101,    -1,    46,    15,    83,    16,   101,    -1,
 627      45,    16,   101,    -1,    45,    15,    97,    16,   101,    -1,
 628      48,    15,    97,    16,   101,    -1,    48,    16,   102,    -1,
 629      43,    15,    97,    16,   100,    -1,    41,    15,    97,    16,
 630     100,    -1,    42,    16,   102,    -1,    44,    16,   101,    -1,
 631      44,    15,    97,    16,   101,    -1,    49,    16,   102,    -1,
 632      49,    15,    83,    16,   102,    -1,    50,    16,   102,    -1,
 633      51,    15,    97,    16,   101,    -1,    52,    15,    97,    16,
 634     100,    -1,    53,    16,   101,    -1,    54,    16,   101,    -1,
 635      80,    16,   102,    -1,    81,    15,    83,    16,   102,    -1,
 636      47,    15,    49,    16,   102,    -1,    47,    15,    49,    15,
 637      83,    16,   102,    -1,    47,    15,    62,    16,   101,    -1,
 638      47,    15,    62,    15,    99,    16,   100,    -1,    47,    15,
 639      64,    15,    99,    15,    97,    16,   100,    -1,    47,    15,
 640      63,    16,   102,    -1,    47,    15,    63,    15,    84,    16,
 641     102,    -1,    47,    15,    73,    15,    83,    16,   101,    -1,
 642      47,    15,    74,    16,   101,    -1,    47,    15,    75,    16,
 643     101,    -1,    47,    15,    76,    15,    83,    16,   101,    -1,
 644      47,    15,    77,    16,   101,    -1,    47,    15,    77,    15,
 645      83,    16,   101,    -1,    47,    15,    78,    15,    83,    16,
 646     101,    -1,    47,    15,    79,    16,   102,    -1,    55,    15,
 647      97,    16,   101,    -1,    57,    16,   102,    -1,    58,    15,
 648      97,    16,   101,    -1,    59,    15,    97,    16,   101,    -1,
 649      22,    16,   102,    -1,     1,    16,    -1,    40,    15,    97,
 650      16,   100,    -1,    39,    15,    91,    16,   102,    -1,    65,
 651      15,    83,    16,    -1,    66,    15,    83,    16,    -1,    68,
 652      15,    84,    16,   102,    -1,    67,    15,    83,    16,   102,
 653      -1,    69,    16,   102,    -1,    70,    15,    83,    16,    -1,
 654      71,    15,    83,    16,    -1,    72,    15,    83,    16,    -1,
 655      83,    -1,    -1,    83,    -1,    84,    -1,    84,    17,    84,
 656      17,    84,    17,    84,    17,    84,    17,    84,    -1,    10,
 657      -1,    14,    -1,     5,    -1,     3,    -1,     3,    15,    93,
 658      -1,     6,    -1,     6,    15,    93,    -1,     8,    -1,     9,
 659      -1,     9,    15,    91,    -1,     9,    91,    -1,     7,    -1,
 660      12,    -1,    11,    -1,    13,    -1,     4,    -1,     5,    -1,
 661      98,    -1,    83,    -1,    84,    -1,   101,    -1,   102,    -1,
 662      -1
 663};
 664
 665/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 666static const yytype_uint16 yyrline[] =
 667{
 668       0,   129,   129,   131,   136,   140,   146,   154,   175,   181,
 669     186,   191,   197,   234,   248,   262,   268,   274,   283,   292,
 670     301,   306,   315,   320,   326,   333,   338,   345,   359,   364,
 671     373,   380,   385,   402,   407,   414,   421,   426,   431,   441,
 672     448,   453,   458,   466,   479,   493,   500,   517,   521,   526,
 673     530,   534,   545,   558,   565,   570,   577,   595,   612,   640,
 674     647,   653,   663,   673,   678,   683,   688,   693,   698,   703,
 675     708,   716,   721,   724,   728,   732,   745,   749,   753,   760,
 676     765,   770,   775,   780,   784,   789,   795,   803,   807,   811,
 677     818,   822,   826,   833,   861,   865,   891,   899,   910
 678};
 679#endif
 680
 681#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
 682/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
 683   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 684static const char *const yytname[] =
 685{
 686  "$end", "error", "$undefined", "A", "B", "C", "E", "F", "I", "L", "N",
 687  "P", "R", "S", "T", "SP", "CRLF", "COMMA", "USER", "PASS", "ACCT",
 688  "REIN", "QUIT", "PORT", "PASV", "TYPE", "STRU", "MODE", "RETR", "STOR",
 689  "APPE", "MLFL", "MAIL", "MSND", "MSOM", "MSAM", "MRSQ", "MRCP", "ALLO",
 690  "REST", "RNFR", "RNTO", "ABOR", "DELE", "CWD", "LIST", "NLST", "SITE",
 691  "sTAT", "HELP", "NOOP", "MKD", "RMD", "PWD", "CDUP", "STOU", "SMNT",
 692  "SYST", "SIZE", "MDTM", "EPRT", "EPSV", "UMASK", "IDLE", "CHMOD", "AUTH",
 693  "ADAT", "PROT", "PBSZ", "CCC", "MIC", "CONF", "ENC", "KAUTH", "KLIST",
 694  "KDESTROY", "KRBTKFILE", "AFSLOG", "LOCATE", "URL", "FEAT", "OPTS",
 695  "LEXERR", "STRING", "NUMBER", "$accept", "cmd_list", "cmd", "rcmd",
 696  "username", "password", "byte_size", "host_port", "form_code",
 697  "type_code", "struct_code", "mode_code", "pathname", "pathstring",
 698  "octal_number", "check_login_no_guest", "check_login", "check_secure", 0
 699};
 700#endif
 701
 702# ifdef YYPRINT
 703/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
 704   token YYLEX-NUM.  */
 705static const yytype_uint16 yytoknum[] =
 706{
 707       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
 708     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
 709     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
 710     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
 711     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
 712     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
 713     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
 714     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
 715     335,   336,   337,   338,   339
 716};
 717# endif
 718
 719/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 720static const yytype_uint8 yyr1[] =
 721{
 722       0,    85,    86,    86,    86,    87,    87,    87,    87,    87,
 723      87,    87,    87,    87,    87,    87,    87,    87,    87,    87,
 724      87,    87,    87,    87,    87,    87,    87,    87,    87,    87,
 725      87,    87,    87,    87,    87,    87,    87,    87,    87,    87,
 726      87,    87,    87,    87,    87,    87,    87,    87,    87,    87,
 727      87,    87,    87,    87,    87,    87,    87,    87,    87,    87,
 728      87,    88,    88,    88,    88,    88,    88,    88,    88,    88,
 729      88,    89,    90,    90,    91,    92,    93,    93,    93,    94,
 730      94,    94,    94,    94,    94,    94,    94,    95,    95,    95,
 731      96,    96,    96,    97,    98,    99,   100,   101,   102
 732};
 733
 734/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 735static const yytype_uint8 yyr2[] =
 736{
 737       0,     2,     0,     2,     2,     5,     5,     5,     5,     3,
 738       3,     5,     5,     5,     5,     5,     9,     5,     5,     5,
 739       3,     5,     3,     5,     5,     3,     5,     5,     3,     3,
 740       5,     3,     5,     3,     5,     5,     3,     3,     3,     5,
 741       5,     7,     5,     7,     9,     5,     7,     7,     5,     5,
 742       7,     5,     7,     7,     5,     5,     3,     5,     5,     3,
 743       2,     5,     5,     4,     4,     5,     5,     3,     4,     4,
 744       4,     1,     0,     1,     1,    11,     1,     1,     1,     1,
 745       3,     1,     3,     1,     1,     3,     2,     1,     1,     1,
 746       1,     1,     1,     1,     1,     1,     1,     1,     0
 747};
 748
 749/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
 750   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
 751   means the default is an error.  */
 752static const yytype_uint8 yydefact[] =
 753{
 754       2,     0,     1,     0,     0,     0,     0,     0,     0,     0,
 755       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
 756       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
 757       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
 758       0,     0,     0,     0,     0,     0,     0,     0,     3,     4,
 759      60,     0,    72,    98,     0,    98,     0,     0,     0,     0,
 760       0,     0,     0,     0,     0,     0,    98,     0,     0,    98,
 761       0,    98,     0,    98,     0,     0,    98,     0,    98,    98,
 762       0,     0,    98,    98,     0,    98,     0,     0,     0,     0,
 763      98,     0,     0,     0,     0,    98,     0,     0,     0,    98,
 764       0,    71,     0,    73,     0,    59,     0,     0,     9,    97,
 765      79,    81,    83,    84,     0,    87,    89,    88,     0,    91,
 766      92,    90,     0,    94,     0,    93,     0,     0,     0,    74,
 767       0,     0,     0,    28,     0,     0,    29,     0,    22,     0,
 768      20,     0,     0,     0,     0,     0,     0,     0,     0,     0,
 769       0,     0,     0,    25,     0,    31,    33,     0,     0,    36,
 770      37,     0,    56,     0,     0,     0,     0,    10,     0,     0,
 771       0,     0,    67,     0,     0,     0,    38,     0,    98,    98,
 772       0,    98,     0,     0,     0,    86,    98,    98,    98,    98,
 773      98,    98,     0,    98,    98,    98,    98,    98,    98,    98,
 774      98,     0,    98,     0,    98,     0,    98,     0,     0,    98,
 775      98,     0,     0,    98,     0,    98,    98,    98,    98,    98,
 776      98,    98,    98,    98,    98,    63,    64,    98,    98,    68,
 777      69,    70,    98,     5,     6,     0,     7,    78,    76,    77,
 778      80,    82,    85,    12,    13,    14,    17,    18,    19,     0,
 779      15,    62,    61,    96,    27,    26,    30,    23,    21,     0,
 780      40,    95,     0,    42,     0,    45,     0,     0,    48,    49,
 781       0,     0,    51,     0,    54,    24,    32,    34,    35,    55,
 782      57,    58,     8,    11,    66,    65,    39,     0,     0,    98,
 783      98,    98,     0,    98,    98,    98,    98,     0,     0,    41,
 784      43,    46,     0,    47,    50,    52,    53,     0,    98,    98,
 785       0,    16,    44,     0,     0,     0,    75
 786};
 787
 788/* YYDEFGOTO[NTERM-NUM].  */
 789static const yytype_int16 yydefgoto[] =
 790{
 791      -1,     1,    48,    49,   102,   104,   130,   107,   240,   114,
 792     118,   122,   124,   125,   262,   252,   253,   109
 793};
 794
 795/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
 796   STATE-NUM.  */
 797#define YYPACT_NINF -196
 798static const yytype_int16 yypact[] =
 799{
 800    -196,   246,  -196,     3,    13,    20,    11,    24,    21,    26,
 801      30,    45,    66,    67,    68,    69,    70,    71,    72,    76,
 802      73,    -7,    -5,    15,    78,    28,    32,    80,    79,    82,
 803      83,    91,    93,    94,    96,    97,    98,    38,   100,   101,
 804     102,   103,   104,   106,   107,   108,   111,   109,  -196,  -196,
 805    -196,   -66,    36,  -196,    14,  -196,    12,    22,     1,    46,
 806      46,    46,    25,    48,    46,    46,  -196,    46,    46,  -196,
 807      46,  -196,    53,  -196,    27,    46,  -196,    55,  -196,  -196,
 808      46,    46,  -196,  -196,    46,  -196,    46,    46,    56,    59,
 809    -196,    60,    61,    62,    63,  -196,    65,    77,    85,  -196,
 810      86,  -196,   114,  -196,   115,  -196,   120,   130,  -196,  -196,
 811     135,   136,  -196,   -11,   138,  -196,  -196,  -196,   139,  -196,
 812    -196,  -196,   143,  -196,   145,  -196,   147,   156,    47,  -196,
 813     157,   162,   165,  -196,   166,   168,  -196,   170,  -196,   174,
 814    -196,    49,    52,    54,   137,   177,   178,   179,   181,    64,
 815     182,   183,   184,  -196,   185,  -196,  -196,   186,   187,  -196,
 816    -196,   188,  -196,   189,   190,   191,   192,  -196,   193,   194,
 817     195,   196,  -196,   197,   198,   199,  -196,   200,  -196,  -196,
 818     133,  -196,     2,     2,    48,  -196,  -196,  -196,  -196,  -196,
 819    -196,  -196,   206,  -196,  -196,  -196,  -196,  -196,  -196,  -196,
 820    -196,   110,  -196,   140,  -196,   141,  -196,   140,   144,  -196,
 821    -196,   146,   148,  -196,   149,  -196,  -196,  -196,  -196,  -196,
 822    -196,  -196,  -196,  -196,  -196,  -196,  -196,  -196,  -196,  -196,
 823    -196,  -196,  -196,  -196,  -196,   202,  -196,  -196,  -196,  -196,
 824    -196,  -196,  -196,  -196,  -196,  -196,  -196,  -196,  -196,   205,
 825    -196,  -196,  -196,  -196,  -196,  -196,  -196,  -196,  -196,   207,
 826    -196,  -196,   210,  -196,   212,  -196,   215,   217,  -196,  -196,
 827     218,   219,  -196,   221,  -196,  -196,  -196,  -196,  -196,  -196,
 828    -196,  -196,  -196,  -196,  -196,  -196,  -196,   155,   158,  -196,
 829    -196,  -196,    46,  -196,  -196,  -196,  -196,   204,   224,  -196,
 830    -196,  -196,   225,  -196,  -196,  -196,  -196,   159,  -196,  -196,
 831     227,  -196,  -196,   161,   231,   167,  -196
 832};
 833
 834/* YYPGOTO[NTERM-NUM].  */
 835static const yytype_int16 yypgoto[] =
 836{
 837    -196,  -196,  -196,  -196,  -196,  -196,  -110,  -196,    39,  -196,
 838    -196,  -196,    -9,  -196,    42,  -195,   -33,   -53
 839};
 840
 841/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
 842   positive, shift that token.  If negative, reduce the rule which
 843   number is the opposite.  If zero, do what YYDEFACT says.
 844   If YYTABLE_NINF, syntax error.  */
 845#define YYTABLE_NINF -1
 846static const yytype_uint16 yytable[] =
 847{
 848     105,   254,   255,   185,   184,   119,   120,   237,    68,    69,
 849      70,    71,   238,   133,   121,   110,   239,   101,   111,    50,
 850     112,   113,   108,   153,   278,   155,   156,    53,    51,   115,
 851      72,    73,   162,   116,   117,    52,   136,    55,   138,    54,
 852     140,    56,   172,    75,    76,    57,   176,    77,    78,   159,
 853     160,   126,   127,    89,    90,   131,   132,   167,   134,   135,
 854      58,   137,   192,   193,   201,   202,   152,   203,   204,   205,
 855     206,   157,   158,   129,   242,   161,   141,   163,   164,   212,
 856     213,    59,    60,    61,    62,    63,    64,    65,    67,   142,
 857     143,   144,    66,    74,    80,   300,    79,    81,   106,    82,
 858     145,   146,   147,   148,   149,   150,   151,    83,    84,   128,
 859      85,    86,    87,    88,   312,    91,    92,    93,    94,   103,
 860      95,    96,    97,    98,   100,   233,   234,    99,   236,   123,
 861     178,   179,   129,   243,   244,   245,   139,   180,   154,   165,
 862     250,   251,   166,   168,   169,   170,   181,   171,   173,   260,
 863     182,   183,   207,   265,   186,   187,   246,   247,   248,   188,
 864     174,   189,   274,   190,   276,   256,   257,   258,   175,   177,
 865     282,   263,   191,   194,   284,   285,   268,   269,   195,   286,
 866     272,   196,   197,   275,   198,   277,   199,   279,   280,   281,
 867     200,   283,   208,   259,   209,   210,   211,   214,     0,   215,
 868     216,   217,   218,   219,   220,   221,   222,   223,   224,   225,
 869     226,   227,   228,   229,   230,   231,   232,   235,   249,   287,
 870     288,   307,   241,   289,   261,   264,   290,   267,   291,   270,
 871     292,   271,   273,   293,   294,   295,   299,   296,   301,   297,
 872     308,   309,   298,   310,   313,   314,     2,     3,   315,   266,
 873       0,   316,     0,     0,     0,   311,     0,     0,     0,     0,
 874     303,   304,   305,   306,     4,     5,     0,     0,     6,     7,
 875       8,     9,    10,    11,    12,    13,    14,     0,     0,     0,
 876       0,     0,     0,   302,    15,    16,    17,    18,    19,    20,
 877      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
 878      31,    32,     0,    33,    34,    35,    36,    37,     0,     0,
 879       0,    38,    39,    40,    41,    42,    43,    44,    45,     0,
 880       0,     0,     0,     0,     0,     0,    46,    47
 881};
 882
 883static const yytype_int16 yycheck[] =
 884{
 885      53,   196,   197,   113,    15,     4,     5,     5,    15,    16,
 886      15,    16,    10,    66,    13,     3,    14,    83,     6,    16,
 887       8,     9,    55,    76,   219,    78,    79,    16,    15,     7,
 888      15,    16,    85,    11,    12,    15,    69,    16,    71,    15,
 889      73,    15,    95,    15,    16,    15,    99,    15,    16,    82,
 890      83,    60,    61,    15,    16,    64,    65,    90,    67,    68,
 891      15,    70,    15,    16,    15,    16,    75,    15,    16,    15,
 892      16,    80,    81,    84,   184,    84,    49,    86,    87,    15,
 893      16,    15,    15,    15,    15,    15,    15,    15,    15,    62,
 894      63,    64,    16,    15,    15,   290,    16,    15,    84,    16,
 895      73,    74,    75,    76,    77,    78,    79,    16,    15,    84,
 896      16,    15,    15,    15,   309,    15,    15,    15,    15,    83,
 897      16,    15,    15,    15,    15,   178,   179,    16,   181,    83,
 898      16,    16,    84,   186,   187,   188,    83,    17,    83,    83,
 899     193,   194,    83,    83,    83,    83,    16,    84,    83,   202,
 900      15,    15,    15,   206,    16,    16,   189,   190,   191,    16,
 901      83,    16,   215,    16,   217,   198,   199,   200,    83,    83,
 902     223,   204,    16,    16,   227,   228,   209,   210,    16,   232,
 903     213,    16,    16,   216,    16,   218,    16,   220,   221,   222,
 904      16,   224,    15,    83,    16,    16,    15,    15,    -1,    16,
 905      16,    16,    16,    16,    16,    16,    16,    16,    16,    16,
 906      16,    16,    16,    16,    16,    16,    16,    84,    12,    17,
 907      15,    17,   183,    16,    84,    84,    16,    83,    16,    83,
 908      15,    83,    83,    16,    16,    16,   289,    16,   291,    84,
 909      16,    16,    84,    84,    17,    84,     0,     1,    17,   207,
 910      -1,    84,    -1,    -1,    -1,   308,    -1,    -1,    -1,    -1,
 911     293,   294,   295,   296,    18,    19,    -1,    -1,    22,    23,
 912      24,    25,    26,    27,    28,    29,    30,    -1,    -1,    -1,
 913      -1,    -1,    -1,   292,    38,    39,    40,    41,    42,    43,
 914      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
 915      54,    55,    -1,    57,    58,    59,    60,    61,    -1,    -1,
 916      -1,    65,    66,    67,    68,    69,    70,    71,    72,    -1,
 917      -1,    -1,    -1,    -1,    -1,    -1,    80,    81
 918};
 919
 920/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
 921   symbol of state STATE-NUM.  */
 922static const yytype_uint8 yystos[] =
 923{
 924       0,    86,     0,     1,    18,    19,    22,    23,    24,    25,
 925      26,    27,    28,    29,    30,    38,    39,    40,    41,    42,
 926      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
 927      53,    54,    55,    57,    58,    59,    60,    61,    65,    66,
 928      67,    68,    69,    70,    71,    72,    80,    81,    87,    88,
 929      16,    15,    15,    16,    15,    16,    15,    15,    15,    15,
 930      15,    15,    15,    15,    15,    15,    16,    15,    15,    16,
 931      15,    16,    15,    16,    15,    15,    16,    15,    16,    16,
 932      15,    15,    16,    16,    15,    16,    15,    15,    15,    15,
 933      16,    15,    15,    15,    15,    16,    15,    15,    15,    16,
 934      15,    83,    89,    83,    90,   102,    84,    92,   101,   102,
 935       3,     6,     8,     9,    94,     7,    11,    12,    95,     4,
 936       5,    13,    96,    83,    97,    98,    97,    97,    84,    84,
 937      91,    97,    97,   102,    97,    97,   101,    97,   101,    83,
 938     101,    49,    62,    63,    64,    73,    74,    75,    76,    77,
 939      78,    79,    97,   102,    83,   102,   102,    97,    97,   101,
 940     101,    97,   102,    97,    97,    83,    83,   101,    83,    83,
 941      83,    84,   102,    83,    83,    83,   102,    83,    16,    16,
 942      17,    16,    15,    15,    15,    91,    16,    16,    16,    16,
 943      16,    16,    15,    16,    16,    16,    16,    16,    16,    16,
 944      16,    15,    16,    15,    16,    15,    16,    15,    15,    16,
 945      16,    15,    15,    16,    15,    16,    16,    16,    16,    16,
 946      16,    16,    16,    16,    16,    16,    16,    16,    16,    16,
 947      16,    16,    16,   102,   102,    84,   102,     5,    10,    14,
 948      93,    93,    91,   102,   102,   102,   101,   101,   101,    12,
 949     102,   102,   100,   101,   100,   100,   101,   101,   101,    83,
 950     102,    84,    99,   101,    84,   102,    99,    83,   101,   101,
 951      83,    83,   101,    83,   102,   101,   102,   101,   100,   101,
 952     101,   101,   102,   101,   102,   102,   102,    17,    15,    16,
 953      16,    16,    15,    16,    16,    16,    16,    84,    84,   102,
 954     100,   102,    97,   101,   101,   101,   101,    17,    16,    16,
 955      84,   102,   100,    17,    84,    17,    84
 956};
 957
 958#define yyerrok		(yyerrstatus = 0)
 959#define yyclearin	(yychar = YYEMPTY)
 960#define YYEMPTY		(-2)
 961#define YYEOF		0
 962
 963#define YYACCEPT	goto yyacceptlab
 964#define YYABORT		goto yyabortlab
 965#define YYERROR		goto yyerrorlab
 966
 967
 968/* Like YYERROR except do call yyerror.  This remains here temporarily
 969   to ease the transition to the new meaning of YYERROR, for GCC.
 970   Once GCC version 2 has supplanted version 1, this can go.  */
 971
 972#define YYFAIL		goto yyerrlab
 973
 974#define YYRECOVERING()  (!!yyerrstatus)
 975
 976#define YYBACKUP(Token, Value)					\
 977do								\
 978  if (yychar == YYEMPTY && yylen == 1)				\
 979    {								\
 980      yychar = (Token);						\
 981      yylval = (Value);						\
 982      yytoken = YYTRANSLATE (yychar);				\
 983      YYPOPSTACK (1);						\
 984      goto yybackup;						\
 985    }								\
 986  else								\
 987    {								\
 988      yyerror (YY_("syntax error: cannot back up")); \
 989      YYERROR;							\
 990    }								\
 991while (YYID (0))
 992
 993
 994#define YYTERROR	1
 995#define YYERRCODE	256
 996
 997
 998/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
 999   If N is 0, then set CURRENT to the empty location which ends
1000   the previous symbol: RHS[0] (always defined).  */
1001
1002#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1003#ifndef YYLLOC_DEFAULT
1004# define YYLLOC_DEFAULT(Current, Rhs, N)				\
1005    do									\
1006      if (YYID (N))                                                    \
1007	{								\
1008	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
1009	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
1010	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
1011	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
1012	}								\
1013      else								\
1014	{								\
1015	  (Current).first_line   = (Current).last_line   =		\
1016	    YYRHSLOC (Rhs, 0).last_line;				\
1017	  (Current).first_column = (Current).last_column =		\
1018	    YYRHSLOC (Rhs, 0).last_column;				\
1019	}								\
1020    while (YYID (0))
1021#endif
1022
1023
1024/* YY_LOCATION_PRINT -- Print the location on the stream.
1025   This macro was not mandated originally: define only if we know
1026   we won't break user code: when these are the locations we know.  */
1027
1028#ifndef YY_LOCATION_PRINT
1029# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1030#  define YY_LOCATION_PRINT(File, Loc)			\
1031     fprintf (File, "%d.%d-%d.%d",			\
1032	      (Loc).first_line, (Loc).first_column,	\
1033	      (Loc).last_line,  (Loc).last_column)
1034# else
1035#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1036# endif
1037#endif
1038
1039
1040/* YYLEX -- calling `yylex' with the right arguments.  */
1041
1042#ifdef YYLEX_PARAM
1043# define YYLEX yylex (YYLEX_PARAM)
1044#else
1045# define YYLEX yylex ()
1046#endif
1047
1048/* Enable debugging if requested.  */
1049#if YYDEBUG
1050
1051# ifndef YYFPRINTF
1052#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1053#  define YYFPRINTF fprintf
1054# endif
1055
1056# define YYDPRINTF(Args)			\
1057do {						\
1058  if (yydebug)					\
1059    YYFPRINTF Args;				\
1060} while (YYID (0))
1061
1062# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
1063do {									  \
1064  if (yydebug)								  \
1065    {									  \
1066      YYFPRINTF (stderr, "%s ", Title);					  \
1067      yy_symbol_print (stderr,						  \
1068		  Type, Value); \
1069      YYFPRINTF (stderr, "\n");						  \
1070    }									  \
1071} while (YYID (0))
1072
1073
1074/*--------------------------------.
1075| Print this symbol on YYOUTPUT.  |
1076`--------------------------------*/
1077
1078/*ARGSUSED*/
1079#if (defined __STDC__ || defined __C99__FUNC__ \
1080     || defined __cplusplus || defined _MSC_VER)
1081static void
1082yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1083#else
1084static void
1085yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1086    FILE *yyoutput;
1087    int yytype;
1088    YYSTYPE const * const yyvaluep;
1089#endif
1090{
1091  if (!yyvaluep)
1092    return;
1093# ifdef YYPRINT
1094  if (yytype < YYNTOKENS)
1095    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1096# else
1097  YYUSE (yyoutput);
1098# endif
1099  switch (yytype)
1100    {
1101      default:
1102	break;
1103    }
1104}
1105
1106
1107/*--------------------------------.
1108| Print this symbol on YYOUTPUT.  |
1109`--------------------------------*/
1110
1111#if (defined __STDC__ || defined __C99__FUNC__ \
1112     || defined __cplusplus || defined _MSC_VER)
1113static void
1114yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1115#else
1116static void
1117yy_symbol_print (yyoutput, yytype, yyvaluep)
1118    FILE *yyoutput;
1119    int yytype;
1120    YYSTYPE const * const yyvaluep;
1121#endif
1122{
1123  if (yytype < YYNTOKENS)
1124    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1125  else
1126    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1127
1128  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1129  YYFPRINTF (yyoutput, ")");
1130}
1131
1132/*------------------------------------------------------------------.
1133| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1134| TOP (included).                                                   |
1135`------------------------------------------------------------------*/
1136
1137#if (defined __STDC__ || defined __C99__FUNC__ \
1138     || defined __cplusplus || defined _MSC_VER)
1139static void
1140yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1141#else
1142static void
1143yy_stack_print (bottom, top)
1144    yytype_int16 *bottom;
1145    yytype_int16 *top;
1146#endif
1147{
1148  YYFPRINTF (stderr, "Stack now");
1149  for (; bottom <= top; ++bottom)
1150    YYFPRINTF (stderr, " %d", *bottom);
1151  YYFPRINTF (stderr, "\n");
1152}
1153
1154# define YY_STACK_PRINT(Bottom, Top)				\
1155do {								\
1156  if (yydebug)							\
1157    yy_stack_print ((Bottom), (Top));				\
1158} while (YYID (0))
1159
1160
1161/*------------------------------------------------.
1162| Report that the YYRULE is going to be reduced.  |
1163`------------------------------------------------*/
1164
1165#if (defined __STDC__ || defined __C99__FUNC__ \
1166     || defined __cplusplus || defined _MSC_VER)
1167static void
1168yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1169#else
1170static void
1171yy_reduce_print (yyvsp, yyrule)
1172    YYSTYPE *yyvsp;
1173    int yyrule;
1174#endif
1175{
1176  int yynrhs = yyr2[yyrule];
1177  int yyi;
1178  unsigned long int yylno = yyrline[yyrule];
1179  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1180	     yyrule - 1, yylno);
1181  /* The symbols being reduced.  */
1182  for (yyi = 0; yyi < yynrhs; yyi++)
1183    {
1184      fprintf (stderr, "   $%d = ", yyi + 1);
1185      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1186		       &(yyvsp[(yyi + 1) - (yynrhs)])
1187		       		       );
1188      fprintf (stderr, "\n");
1189    }
1190}
1191
1192# define YY_REDUCE_PRINT(Rule)		\
1193do {					\
1194  if (yydebug)				\
1195    yy_reduce_print (yyvsp, Rule); \
1196} while (YYID (0))
1197
1198/* Nonzero means print parse trace.  It is left uninitialized so that
1199   multiple parsers can coexist.  */
1200int yydebug;
1201#else /* !YYDEBUG */
1202# define YYDPRINTF(Args)
1203# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1204# define YY_STACK_PRINT(Bottom, Top)
1205# define YY_REDUCE_PRINT(Rule)
1206#endif /* !YYDEBUG */
1207
1208
1209/* YYINITDEPTH -- initial size of the parser's stacks.  */
1210#ifndef	YYINITDEPTH
1211# define YYINITDEPTH 200
1212#endif
1213
1214/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1215   if the built-in stack extension method is used).
1216
1217   Do not make this value too large; the results are undefined if
1218   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1219   evaluated with infinite-precision integer arithmetic.  */
1220
1221#ifndef YYMAXDEPTH
1222# define YYMAXDEPTH 10000
1223#endif
1224
1225
1226
1227#if YYERROR_VERBOSE
1228
1229# ifndef yystrlen
1230#  if defined __GLIBC__ && defined _STRING_H
1231#   define yystrlen strlen
1232#  else
1233/* Return the length of YYSTR.  */
1234#if (defined __STDC__ || defined __C99__FUNC__ \
1235     || defined __cplusplus || defined _MSC_VER)
1236static YYSIZE_T
1237yystrlen (const char *yystr)
1238#else
1239static YYSIZE_T
1240yystrlen (yystr)
1241    const char *yystr;
1242#endif
1243{
1244  YYSIZE_T yylen;
1245  for (yylen = 0; yystr[yylen]; yylen++)
1246    continue;
1247  return yylen;
1248}
1249#  endif
1250# endif
1251
1252# ifndef yystpcpy
1253#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1254#   define yystpcpy stpcpy
1255#  else
1256/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1257   YYDEST.  */
1258#if (defined __STDC__ || defined __C99__FUNC__ \
1259     || defined __cplusplus || defined _MSC_VER)
1260static char *
1261yystpcpy (char *yydest, const char *yysrc)
1262#else
1263static char *
1264yystpcpy (yydest, yysrc)
1265    char *yydest;
1266    const char *yysrc;
1267#endif
1268{
1269  char *yyd = yydest;
1270  const char *yys = yysrc;
1271
1272  while ((*yyd++ = *yys++) != '\0')
1273    continue;
1274
1275  return yyd - 1;
1276}
1277#  endif
1278# endif
1279
1280# ifndef yytnamerr
1281/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1282   quotes and backslashes, so that it's suitable for yyerror.  The
1283   heuristic is that double-quoting is unnecessary unless the string
1284   contains an apostrophe, a comma, or backslash (other than
1285   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1286   null, do not copy; instead, return the length of what the result
1287   would have been.  */
1288static YYSIZE_T
1289yytnamerr (char *yyres, const char *yystr)
1290{
1291  if (*yystr == '"')
1292    {
1293      YYSIZE_T yyn = 0;
1294      char const *yyp = yystr;
1295
1296      for (;;)
1297	switch (*++yyp)
1298	  {
1299	  case '\'':
1300	  case ',':
1301	    goto do_not_strip_quotes;
1302
1303	  case '\\':
1304	    if (*++yyp != '\\')
1305	      goto do_not_strip_quotes;
1306	    /* Fall through.  */
1307	  default:
1308	    if (yyres)
1309	      yyres[yyn] = *yyp;
1310	    yyn++;
1311	    break;
1312
1313	  case '"':
1314	    if (yyres)
1315	      yyres[yyn] = '\0';
1316	    return yyn;
1317	  }
1318    do_not_strip_quotes: ;
1319    }
1320
1321  if (! yyres)
1322    return yystrlen (yystr);
1323
1324  return yystpcpy (yyres, yystr) - yyres;
1325}
1326# endif
1327
1328/* Copy into YYRESULT an error message about the unexpected token
1329   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
1330   including the terminating null byte.  If YYRESULT is null, do not
1331   copy anything; just return the number of bytes that would be
1332   copied.  As a special case, return 0 if an ordinary "syntax error"
1333   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
1334   size calculation.  */
1335static YYSIZE_T
1336yysyntax_error (char *yyresult, int yystate, int yychar)
1337{
1338  int yyn = yypact[yystate];
1339
1340  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1341    return 0;
1342  else
1343    {
1344      int yytype = YYTRANSLATE (yychar);
1345      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1346      YYSIZE_T yysize = yysize0;
1347      YYSIZE_T yysize1;
1348      int yysize_overflow = 0;
1349      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1350      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1351      int yyx;
1352
1353# if 0
1354      /* This is so xgettext sees the translatable formats that are
1355	 constructed on the fly.  */
1356      YY_("syntax error, unexpected %s");
1357      YY_("syntax error, unexpected %s, expecting %s");
1358      YY_("syntax error, unexpected %s, expecting %s or %s");
1359      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1360      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1361# endif
1362      char *yyfmt;
1363      char const *yyf;
1364      static char const yyunexpected[] = "syntax error, unexpected %s";
1365      static char const yyexpecting[] = ", expecting %s";
1366      static char const yyor[] = " or %s";
1367      char yyformat[sizeof yyunexpected
1368		    + sizeof yyexpecting - 1
1369		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1370		       * (sizeof yyor - 1))];
1371      char const *yyprefix = yyexpecting;
1372
1373      /* Start YYX at -YYN if negative to avoid negative indexes in
1374	 YYCHECK.  */
1375      int yyxbegin = yyn < 0 ? -yyn : 0;
1376
1377      /* Stay within bounds of both yycheck and yytname.  */
1378      int yychecklim = YYLAST - yyn + 1;
1379      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1380      int yycount = 1;
1381
1382      yyarg[0] = yytname[yytype];
1383      yyfmt = yystpcpy (yyformat, yyunexpected);
1384
1385      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1386	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1387	  {
1388	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1389	      {
1390		yycount = 1;
1391		yysize = yysize0;
1392		yyformat[sizeof yyunexpected - 1] = '\0';
1393		break;
1394	      }
1395	    yyarg[yycount++] = yytname[yyx];
1396	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1397	    yysize_overflow |= (yysize1 < yysize);
1398	    yysize = yysize1;
1399	    yyfmt = yystpcpy (yyfmt, yyprefix);
1400	    yyprefix = yyor;
1401	  }
1402
1403      yyf = YY_(yyformat);
1404      yysize1 = yysize + yystrlen (yyf);
1405      yysize_overflow |= (yysize1 < yysize);
1406      yysize = yysize1;
1407
1408      if (yysize_overflow)
1409	return YYSIZE_MAXIMUM;
1410
1411      if (yyresult)
1412	{
1413	  /* Avoid sprintf, as that infringes on the user's name space.
1414	     Don't have undefined behavior even if the translation
1415	     produced a string with the wrong number of "%s"s.  */
1416	  char *yyp = yyresult;
1417	  int yyi = 0;
1418	  while ((*yyp = *yyf) != '\0')
1419	    {
1420	      if (*yyp == '%' && yyf[1] == 's' && yyi 

Large files files are truncated, but you can click here to view the full file