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

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

Large files are truncated click here to view the full file

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