-/* A Bison parser, made by GNU Bison 2.4.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "2.5"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Copy the first part of user declarations. */
-/* Line 189 of yacc.c */
-#line 36 "libmemcached/csl/parser.yy"
+/* Line 268 of yacc.c */
+#line 52 "libmemcached/csl/parser.yy"
#include <libmemcached/csl/common.h>
-/* Line 189 of yacc.c */
-#line 120 "libmemcached/csl/parser.cc"
+/* Line 268 of yacc.c */
+#line 119 "libmemcached/csl/parser.cc"
/* Enabling traces. */
#ifndef YYDEBUG
_TCP_KEEPALIVE = 298,
_TCP_KEEPIDLE = 299,
_TCP_NODELAY = 300,
- NAMESPACE = 301,
- POOL_MIN = 302,
- POOL_MAX = 303,
- MD5 = 304,
- CRC = 305,
- FNV1_64 = 306,
- FNV1A_64 = 307,
- FNV1_32 = 308,
- FNV1A_32 = 309,
- HSIEH = 310,
- MURMUR = 311,
- JENKINS = 312,
- CONSISTENT = 313,
- MODULA = 314,
- RANDOM = 315,
- TRUE = 316,
- FALSE = 317,
- FLOAT = 318,
- NUMBER = 319,
- PORT = 320,
- WEIGHT_START = 321,
- IPADDRESS = 322,
- HOSTNAME = 323,
- STRING = 324,
- QUOTED_STRING = 325,
- FILE_PATH = 326
+ FETCH_VERSION = 301,
+ NAMESPACE = 302,
+ POOL_MIN = 303,
+ POOL_MAX = 304,
+ MD5 = 305,
+ CRC = 306,
+ FNV1_64 = 307,
+ FNV1A_64 = 308,
+ FNV1_32 = 309,
+ FNV1A_32 = 310,
+ HSIEH = 311,
+ MURMUR = 312,
+ JENKINS = 313,
+ CONSISTENT = 314,
+ MODULA = 315,
+ RANDOM = 316,
+ TRUE = 317,
+ FALSE = 318,
+ FLOAT = 319,
+ NUMBER = 320,
+ PORT = 321,
+ WEIGHT_START = 322,
+ IPADDRESS = 323,
+ HOSTNAME = 324,
+ STRING = 325,
+ QUOTED_STRING = 326,
+ FILE_PATH = 327
};
#endif
/* Copy the second part of user declarations. */
-/* Line 264 of yacc.c */
+/* Line 343 of yacc.c */
#line 232 "libmemcached/csl/parser.cc"
#ifdef short
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
+# define YYCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
#endif
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 71
+#define YYFINAL 72
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 74
+#define YYLAST 75
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 75
+#define YYNTOKENS 76
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 12
/* YYNRULES -- Number of rules. */
-#define YYNRULES 67
+#define YYNRULES 68
/* YYNRULES -- Number of states. */
-#define YYNSTATES 85
+#define YYNSTATES 86
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 326
+#define YYMAXUTOK 327
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 74, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 63, 2, 2, 2, 2, 2,
+ 2, 2, 75, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 64, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 64, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 65, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 65, 66,
- 67, 68, 69, 70, 71, 72, 73
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74
};
#if YYDEBUG
{
0, 0, 3, 5, 9, 11, 13, 15, 17, 19,
21, 23, 27, 32, 37, 41, 44, 47, 50, 52,
- 55, 58, 63, 66, 69, 71, 73, 75, 77, 79,
+ 55, 57, 60, 65, 68, 71, 73, 75, 77, 79,
81, 83, 85, 87, 89, 91, 93, 95, 97, 99,
101, 103, 105, 107, 109, 111, 113, 115, 117, 119,
- 121, 122, 124, 125, 127, 129, 131, 133, 135, 137,
- 139, 141, 143, 145, 147, 149, 151, 153
+ 121, 123, 124, 126, 127, 129, 131, 133, 135, 137,
+ 139, 141, 143, 145, 147, 149, 151, 153, 155
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
- 76, 0, -1, 77, -1, 76, 74, 77, -1, 78,
+ 77, 0, -1, 78, -1, 77, 75, 78, -1, 79,
-1, 3, -1, 10, -1, 4, -1, 5, -1, 6,
- -1, 7, -1, 8, 74, 85, -1, 11, 70, 82,
- 83, -1, 11, 69, 82, 83, -1, 12, 85, 83,
- -1, 9, 85, -1, 47, 66, -1, 48, 66, -1,
- 79, -1, 46, 85, -1, 20, 86, -1, 20, 86,
- 63, 84, -1, 21, 84, -1, 80, 66, -1, 81,
- -1, 40, -1, 33, -1, 19, -1, 25, -1, 23,
- -1, 24, -1, 29, -1, 30, -1, 32, -1, 34,
- -1, 35, -1, 36, -1, 37, -1, 17, -1, 18,
- -1, 22, -1, 28, -1, 31, -1, 38, -1, 39,
- -1, 45, -1, 43, -1, 44, -1, 41, -1, 42,
- -1, -1, 67, -1, -1, 68, -1, 49, -1, 50,
+ -1, 7, -1, 8, 75, 86, -1, 11, 71, 83,
+ 84, -1, 11, 70, 83, 84, -1, 12, 86, 84,
+ -1, 9, 86, -1, 48, 67, -1, 49, 67, -1,
+ 80, -1, 47, 86, -1, 46, -1, 20, 87, -1,
+ 20, 87, 64, 85, -1, 21, 85, -1, 81, 67,
+ -1, 82, -1, 40, -1, 33, -1, 19, -1, 25,
+ -1, 23, -1, 24, -1, 29, -1, 30, -1, 32,
+ -1, 34, -1, 35, -1, 36, -1, 37, -1, 17,
+ -1, 18, -1, 22, -1, 28, -1, 31, -1, 38,
+ -1, 39, -1, 45, -1, 43, -1, 44, -1, 41,
+ -1, 42, -1, -1, 68, -1, -1, 69, -1, 50,
-1, 51, -1, 52, -1, 53, -1, 54, -1, 55,
- -1, 56, -1, 57, -1, 71, -1, 72, -1, 58,
- -1, 59, -1, 60, -1
+ -1, 56, -1, 57, -1, 58, -1, 72, -1, 73,
+ -1, 59, -1, 60, -1, 61, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 172, 172, 173, 177, 179, 181, 183, 188, 193,
- 197, 201, 212, 220, 228, 235, 239, 243, 247, 251,
- 258, 265, 276, 283, 290, 297, 303, 307, 311, 315,
- 319, 323, 327, 331, 335, 339, 343, 347, 354, 358,
- 362, 366, 370, 374, 378, 382, 386, 390, 394, 398,
- 405, 406, 411, 412, 417, 421, 425, 429, 433, 437,
- 441, 445, 449, 456, 460, 467, 471, 475
+ 0, 189, 189, 190, 194, 196, 198, 200, 205, 210,
+ 214, 218, 229, 239, 249, 258, 262, 266, 270, 274,
+ 286, 290, 303, 316, 323, 330, 339, 345, 349, 353,
+ 357, 361, 365, 369, 373, 377, 381, 385, 389, 396,
+ 400, 404, 408, 412, 416, 420, 424, 428, 432, 436,
+ 440, 447, 448, 453, 454, 459, 463, 467, 471, 475,
+ 479, 483, 487, 491, 498, 502, 509, 513, 517
};
#endif
"RCV_TIMEOUT", "REMOVE_FAILED_SERVERS", "RETRY_TIMEOUT", "SND_TIMEOUT",
"SOCKET_RECV_SIZE", "SOCKET_SEND_SIZE", "SORT_HOSTS", "SUPPORT_CAS",
"USER_DATA", "USE_UDP", "VERIFY_KEY", "_TCP_KEEPALIVE", "_TCP_KEEPIDLE",
- "_TCP_NODELAY", "NAMESPACE", "POOL_MIN", "POOL_MAX", "MD5", "CRC",
- "FNV1_64", "FNV1A_64", "FNV1_32", "FNV1A_32", "HSIEH", "MURMUR",
- "JENKINS", "CONSISTENT", "MODULA", "RANDOM", "TRUE", "FALSE", "','",
- "'='", "FLOAT", "NUMBER", "PORT", "WEIGHT_START", "IPADDRESS",
+ "_TCP_NODELAY", "FETCH_VERSION", "NAMESPACE", "POOL_MIN", "POOL_MAX",
+ "MD5", "CRC", "FNV1_64", "FNV1A_64", "FNV1_32", "FNV1A_32", "HSIEH",
+ "MURMUR", "JENKINS", "CONSISTENT", "MODULA", "RANDOM", "TRUE", "FALSE",
+ "','", "'='", "FLOAT", "NUMBER", "PORT", "WEIGHT_START", "IPADDRESS",
"HOSTNAME", "STRING", "QUOTED_STRING", "FILE_PATH", "' '", "$accept",
"begin", "statement", "expression", "behaviors", "behavior_number",
"behavior_boolean", "optional_port", "optional_weight", "hash", "string",
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
- 315, 316, 317, 44, 61, 318, 319, 320, 321, 322,
- 323, 324, 325, 326, 32
+ 315, 316, 317, 318, 44, 61, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 32
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 75, 76, 76, 77, 77, 77, 77, 77, 77,
- 77, 77, 78, 78, 78, 78, 78, 78, 78, 79,
- 79, 79, 79, 79, 79, 79, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 81, 81,
- 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
- 82, 82, 83, 83, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 85, 85, 86, 86, 86
+ 0, 76, 77, 77, 78, 78, 78, 78, 78, 78,
+ 78, 78, 79, 79, 79, 79, 79, 79, 79, 80,
+ 80, 80, 80, 80, 80, 80, 80, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 83, 83, 84, 84, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 86, 86, 87, 87, 87
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
{
0, 2, 1, 3, 1, 1, 1, 1, 1, 1,
1, 3, 4, 4, 3, 2, 2, 2, 1, 2,
- 2, 4, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 2, 4, 2, 2, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1
+ 1, 0, 1, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1
};
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
0, 5, 7, 8, 9, 10, 0, 0, 6, 0,
- 0, 38, 39, 27, 0, 0, 40, 29, 30, 28,
- 41, 31, 32, 42, 33, 26, 34, 35, 36, 37,
- 43, 44, 25, 48, 49, 46, 47, 45, 0, 0,
- 0, 0, 2, 4, 18, 0, 24, 0, 63, 64,
- 15, 50, 50, 52, 65, 66, 67, 20, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 22, 19, 16,
- 17, 1, 0, 23, 11, 51, 52, 52, 53, 14,
- 0, 3, 13, 12, 21
+ 0, 39, 40, 28, 0, 0, 41, 30, 31, 29,
+ 42, 32, 33, 43, 34, 27, 35, 36, 37, 38,
+ 44, 45, 26, 49, 50, 47, 48, 46, 20, 0,
+ 0, 0, 0, 2, 4, 18, 0, 25, 0, 64,
+ 65, 15, 51, 51, 53, 66, 67, 68, 21, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 23, 19,
+ 16, 17, 1, 0, 24, 11, 52, 53, 53, 54,
+ 14, 0, 3, 13, 12, 22
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 41, 42, 43, 44, 45, 46, 76, 79, 67,
- 50, 57
+ -1, 42, 43, 44, 45, 46, 47, 77, 80, 68,
+ 51, 58
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -61
+#define YYPACT_NINF -62
static const yytype_int8 yypact[] =
{
- -2, -61, -61, -61, -61, -61, -60, -24, -61, -20,
- -24, -61, -61, -61, -47, 13, -61, -61, -61, -61,
- -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
- -61, -61, -61, -61, -61, -61, -61, -61, -24, -41,
- -15, 0, -61, -61, -61, -11, -61, -24, -61, -61,
- -61, -10, -10, -12, -61, -61, -61, -5, -61, -61,
- -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
- -61, -61, -2, -61, -61, -61, -12, -12, -61, -61,
- 13, -61, -61, -61, -61
+ -2, -62, -62, -62, -62, -62, -61, -24, -62, -20,
+ -24, -62, -62, -62, -48, 13, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -24,
+ -42, -15, 0, -62, -62, -62, -11, -62, -24, -62,
+ -62, -62, -10, -10, -12, -62, -62, -62, -5, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -2, -62, -62, -62, -12, -12, -62,
+ -62, 13, -62, -62, -62, -62
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -61, -61, -13, -61, -61, -61, -61, 8, -23, -9,
- 14, -61
+ -62, -62, -13, -62, -62, -62, -62, 8, -23, -9,
+ 14, -62
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
+ number is the opposite. If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
- 71, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 10, 54, 55, 56, 47, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 53, 69, 20, 21, 22, 23,
+ 72, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 55, 56, 57, 48, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 54, 70, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 48, 49, 51,
- 52, 70, 68, 82, 83, 73, 78, 75, 80, 81,
- 77, 74, 58, 59, 60, 61, 62, 63, 64, 65,
- 66, 84, 0, 0, 72
+ 34, 35, 36, 37, 38, 39, 40, 41, 49, 50,
+ 52, 53, 71, 69, 83, 84, 74, 79, 76, 81,
+ 82, 78, 75, 59, 60, 61, 62, 63, 64, 65,
+ 66, 67, 85, 0, 0, 73
};
+#define yypact_value_is_default(yystate) \
+ ((yystate) == (-62))
+
+#define yytable_value_is_error(yytable_value) \
+ YYID (0)
+
static const yytype_int8 yycheck[] =
{
0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 58, 59, 60, 74, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 10, 66, 28, 29, 30, 31,
+ 12, 59, 60, 61, 75, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 10, 67, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 71, 72, 69,
- 70, 66, 38, 76, 77, 66, 68, 67, 63, 72,
- 52, 47, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 80, -1, -1, 74
+ 42, 43, 44, 45, 46, 47, 48, 49, 72, 73,
+ 70, 71, 67, 39, 77, 78, 67, 69, 68, 64,
+ 73, 53, 48, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 81, -1, -1, 75
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
12, 17, 18, 19, 20, 21, 22, 23, 24, 25,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 76, 77, 78, 79, 80, 81, 74, 71, 72,
- 85, 69, 70, 85, 58, 59, 60, 86, 49, 50,
- 51, 52, 53, 54, 55, 56, 57, 84, 85, 66,
- 66, 0, 74, 66, 85, 67, 82, 82, 68, 83,
- 63, 77, 83, 83, 84
+ 48, 49, 77, 78, 79, 80, 81, 82, 75, 72,
+ 73, 86, 70, 71, 86, 59, 60, 61, 87, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 85, 86,
+ 67, 67, 0, 75, 67, 86, 68, 83, 83, 69,
+ 84, 64, 78, 84, 84, 85
};
#define yyerrok (yyerrstatus = 0)
{ \
yychar = (Token); \
yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
#endif
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
+/* This macro is provided for backward compatibility. */
#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-# define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
# define YYMAXDEPTH 10000
#endif
-\f
#if YYERROR_VERBOSE
}
# endif
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
- int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
- {
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = 0;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
+ yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
}
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-\f
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
}
}
+
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
#endif /* ! YYPARSE_PARAM */
-
-
-
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
+/*----------.
+| yyparse. |
+`----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
{
case 4:
-/* Line 1464 of yacc.c */
-#line 178 "libmemcached/csl/parser.yy"
- { ;}
+/* Line 1806 of yacc.c */
+#line 195 "libmemcached/csl/parser.yy"
+ { }
break;
case 5:
-/* Line 1464 of yacc.c */
-#line 180 "libmemcached/csl/parser.yy"
- { ;}
+/* Line 1806 of yacc.c */
+#line 197 "libmemcached/csl/parser.yy"
+ { }
break;
case 6:
-/* Line 1464 of yacc.c */
-#line 182 "libmemcached/csl/parser.yy"
- { ;}
+/* Line 1806 of yacc.c */
+#line 199 "libmemcached/csl/parser.yy"
+ { }
break;
case 7:
-/* Line 1464 of yacc.c */
-#line 184 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 201 "libmemcached/csl/parser.yy"
{
context->set_end();
YYACCEPT;
- ;}
+ }
break;
case 8:
-/* Line 1464 of yacc.c */
-#line 189 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 206 "libmemcached/csl/parser.yy"
{
context->rc= MEMCACHED_PARSE_USER_ERROR;
- parser_abort(context, NULL);
- ;}
+ parser_abort(context, "ERROR called directly");
+ }
break;
case 9:
-/* Line 1464 of yacc.c */
-#line 194 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 211 "libmemcached/csl/parser.yy"
{
memcached_reset(context->memc);
- ;}
+ }
break;
case 10:
-/* Line 1464 of yacc.c */
-#line 198 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 215 "libmemcached/csl/parser.yy"
{
yydebug= 1;
- ;}
+ }
break;
case 11:
-/* Line 1464 of yacc.c */
-#line 202 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 219 "libmemcached/csl/parser.yy"
{
if ((context->rc= memcached_parse_configure_file(*context->memc, (yyvsp[(3) - (3)].string).c_str, (yyvsp[(3) - (3)].string).size)) != MEMCACHED_SUCCESS)
{
- parser_abort(context, NULL);
+ parser_abort(context, "Failed to parse configuration file");
}
- ;}
+ }
break;
case 12:
-/* Line 1464 of yacc.c */
-#line 213 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 230 "libmemcached/csl/parser.yy"
{
if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), (yyvsp[(4) - (4)].number))))
{
- parser_abort(context, NULL);
+ char buffer[1024];
+ snprintf(buffer, sizeof(buffer), "Failed to add server: %s:%u", (yyvsp[(2) - (4)].server).c_str, uint32_t((yyvsp[(3) - (4)].number)));
+ parser_abort(context, buffer);
}
context->unset_server();
- ;}
+ }
break;
case 13:
-/* Line 1464 of yacc.c */
-#line 221 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 240 "libmemcached/csl/parser.yy"
{
if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), (yyvsp[(4) - (4)].number))))
{
- parser_abort(context, NULL);
+ char buffer[1024];
+ snprintf(buffer, sizeof(buffer), "Failed to add server: %s:%u", (yyvsp[(2) - (4)].server).c_str, uint32_t((yyvsp[(3) - (4)].number)));
+ parser_abort(context, buffer);
}
context->unset_server();
- ;}
+ }
break;
case 14:
-/* Line 1464 of yacc.c */
-#line 229 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 250 "libmemcached/csl/parser.yy"
{
if (memcached_failed(context->rc= memcached_server_add_unix_socket_with_weight(context->memc, (yyvsp[(2) - (3)].string).c_str, (yyvsp[(3) - (3)].number))))
{
- parser_abort(context, NULL);
+ char buffer[1024];
+ snprintf(buffer, sizeof(buffer), "Failed to add socket: %s", (yyvsp[(2) - (3)].string).c_str);
+ parser_abort(context, buffer);
}
- ;}
+ }
break;
case 15:
-/* Line 1464 of yacc.c */
-#line 236 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 259 "libmemcached/csl/parser.yy"
{
memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).size);
- ;}
+ }
break;
case 16:
-/* Line 1464 of yacc.c */
-#line 240 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 263 "libmemcached/csl/parser.yy"
{
context->memc->configure.initial_pool_size= (yyvsp[(2) - (2)].number);
- ;}
+ }
break;
case 17:
-/* Line 1464 of yacc.c */
-#line 244 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 267 "libmemcached/csl/parser.yy"
{
context->memc->configure.max_pool_size= (yyvsp[(2) - (2)].number);
- ;}
+ }
break;
case 19:
-/* Line 1464 of yacc.c */
-#line 252 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 275 "libmemcached/csl/parser.yy"
{
+ if (memcached_callback_get(context->memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL))
+ {
+ parser_abort(context, "--NAMESPACE can only be called once");
+ }
+
if ((context->rc= memcached_set_namespace(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).size)) != MEMCACHED_SUCCESS)
{
- parser_abort(context, NULL);;
+ parser_abort(context, memcached_last_error_message(context->memc));
}
- ;}
+ }
break;
case 20:
-/* Line 1464 of yacc.c */
-#line 259 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 287 "libmemcached/csl/parser.yy"
{
- if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- ;}
+ memcached_flag(*context->memc, MEMCACHED_FLAG_IS_FETCHING_VERSION, true);
+ }
break;
case 21:
-/* Line 1464 of yacc.c */
-#line 266 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 291 "libmemcached/csl/parser.yy"
{
- if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS)
+ // Check to see if DISTRIBUTION has already been set
+ if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS)
{
- parser_abort(context, NULL);;
+ parser_abort(context, "--DISTRIBUTION can only be called once");
}
- if ((context->rc= memcached_behavior_set_distribution_hash(context->memc, (yyvsp[(4) - (4)].hash))) != MEMCACHED_SUCCESS)
+
+ if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS)
{
- parser_abort(context, NULL);;
+ parser_abort(context, memcached_last_error_message(context->memc));;
}
- ;}
+ }
break;
case 22:
-/* Line 1464 of yacc.c */
-#line 277 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 304 "libmemcached/csl/parser.yy"
{
- if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, (yyvsp[(2) - (2)].hash))) != MEMCACHED_SUCCESS)
+ // Check to see if DISTRIBUTION has already been set
+ if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, "--DISTRIBUTION can only be called once");
+ }
+
+ if ((context->rc= memcached_behavior_set_distribution_hash(context->memc, (yyvsp[(4) - (4)].hash))) != MEMCACHED_SUCCESS)
{
- parser_abort(context, NULL);;
+ parser_abort(context, "Unable to set the hash for the DISTRIBUTION requested");
}
- ;}
+ }
break;
case 23:
-/* Line 1464 of yacc.c */
-#line 284 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 317 "libmemcached/csl/parser.yy"
{
- if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS)
+ if (context->set_hash((yyvsp[(2) - (2)].hash)) == false)
{
- parser_abort(context, NULL);;
+ parser_abort(context, "--HASH can only be set once");
}
- ;}
+ }
break;
case 24:
-/* Line 1464 of yacc.c */
-#line 291 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 324 "libmemcached/csl/parser.yy"
{
- if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS)
+ if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS)
{
- parser_abort(context, NULL);;
+ parser_abort(context, "Unable to set behavior");
}
- ;}
+ }
break;
case 25:
-/* Line 1464 of yacc.c */
-#line 298 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 331 "libmemcached/csl/parser.yy"
{
- ;}
+ if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS)
+ {
+ char buffer[1024];
+ snprintf(buffer, sizeof(buffer), "Could not set: %s", libmemcached_string_behavior((yyvsp[(1) - (1)].behavior)));
+ parser_abort(context, buffer);
+ }
+ }
break;
case 26:
-/* Line 1464 of yacc.c */
-#line 304 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 340 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS;
- ;}
+ }
break;
case 27:
-/* Line 1464 of yacc.c */
-#line 308 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 346 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS;
+ }
break;
case 28:
-/* Line 1464 of yacc.c */
-#line 312 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 350 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
+ }
break;
case 29:
-/* Line 1464 of yacc.c */
-#line 316 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 354 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
+ }
break;
case 30:
-/* Line 1464 of yacc.c */
-#line 320 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 358 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
+ }
break;
case 31:
-/* Line 1464 of yacc.c */
-#line 324 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 362 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
+ }
break;
case 32:
-/* Line 1464 of yacc.c */
-#line 328 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 366 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
+ }
break;
case 33:
-/* Line 1464 of yacc.c */
-#line 332 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 370 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
+ }
break;
case 34:
-/* Line 1464 of yacc.c */
-#line 336 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 374 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
+ }
break;
case 35:
-/* Line 1464 of yacc.c */
-#line 340 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 378 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
+ }
break;
case 36:
-/* Line 1464 of yacc.c */
-#line 344 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 382 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
+ }
break;
case 37:
-/* Line 1464 of yacc.c */
-#line 348 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 386 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
+ }
break;
case 38:
-/* Line 1464 of yacc.c */
-#line 355 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 390 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
+ }
break;
case 39:
-/* Line 1464 of yacc.c */
-#line 359 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 397 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
+ }
break;
case 40:
-/* Line 1464 of yacc.c */
-#line 363 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 401 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
+ }
break;
case 41:
-/* Line 1464 of yacc.c */
-#line 367 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 405 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
+ }
break;
case 42:
-/* Line 1464 of yacc.c */
-#line 371 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 409 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY;
+ }
break;
case 43:
-/* Line 1464 of yacc.c */
-#line 375 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 413 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
+ }
break;
case 44:
-/* Line 1464 of yacc.c */
-#line 379 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 417 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS;
+ }
break;
case 45:
-/* Line 1464 of yacc.c */
-#line 383 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 421 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
+ }
break;
case 46:
-/* Line 1464 of yacc.c */
-#line 387 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 425 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY;
+ }
break;
case 47:
-/* Line 1464 of yacc.c */
-#line 391 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 429 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
+ }
break;
case 48:
-/* Line 1464 of yacc.c */
-#line 395 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 433 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
+ }
break;
case 49:
-/* Line 1464 of yacc.c */
-#line 399 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 437 "libmemcached/csl/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY;
- ;}
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP;
+ }
break;
case 50:
-/* Line 1464 of yacc.c */
-#line 405 "libmemcached/csl/parser.yy"
- { (yyval.number)= MEMCACHED_DEFAULT_PORT;;}
+/* Line 1806 of yacc.c */
+#line 441 "libmemcached/csl/parser.yy"
+ {
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY;
+ }
break;
case 51:
-/* Line 1464 of yacc.c */
-#line 407 "libmemcached/csl/parser.yy"
- { ;}
+/* Line 1806 of yacc.c */
+#line 447 "libmemcached/csl/parser.yy"
+ { (yyval.number)= MEMCACHED_DEFAULT_PORT;}
break;
case 52:
-/* Line 1464 of yacc.c */
-#line 411 "libmemcached/csl/parser.yy"
- { (yyval.number)= 1; ;}
+/* Line 1806 of yacc.c */
+#line 449 "libmemcached/csl/parser.yy"
+ { }
break;
case 53:
-/* Line 1464 of yacc.c */
-#line 413 "libmemcached/csl/parser.yy"
- { ;}
+/* Line 1806 of yacc.c */
+#line 453 "libmemcached/csl/parser.yy"
+ { (yyval.number)= 1; }
break;
case 54:
-/* Line 1464 of yacc.c */
-#line 418 "libmemcached/csl/parser.yy"
- {
- (yyval.hash)= MEMCACHED_HASH_MD5;
- ;}
+/* Line 1806 of yacc.c */
+#line 455 "libmemcached/csl/parser.yy"
+ { }
break;
case 55:
-/* Line 1464 of yacc.c */
-#line 422 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 460 "libmemcached/csl/parser.yy"
{
- (yyval.hash)= MEMCACHED_HASH_CRC;
- ;}
+ (yyval.hash)= MEMCACHED_HASH_MD5;
+ }
break;
case 56:
-/* Line 1464 of yacc.c */
-#line 426 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 464 "libmemcached/csl/parser.yy"
{
- (yyval.hash)= MEMCACHED_HASH_FNV1_64;
- ;}
+ (yyval.hash)= MEMCACHED_HASH_CRC;
+ }
break;
case 57:
-/* Line 1464 of yacc.c */
-#line 430 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 468 "libmemcached/csl/parser.yy"
{
- (yyval.hash)= MEMCACHED_HASH_FNV1A_64;
- ;}
+ (yyval.hash)= MEMCACHED_HASH_FNV1_64;
+ }
break;
case 58:
-/* Line 1464 of yacc.c */
-#line 434 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 472 "libmemcached/csl/parser.yy"
{
- (yyval.hash)= MEMCACHED_HASH_FNV1_32;
- ;}
+ (yyval.hash)= MEMCACHED_HASH_FNV1A_64;
+ }
break;
case 59:
-/* Line 1464 of yacc.c */
-#line 438 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 476 "libmemcached/csl/parser.yy"
{
- (yyval.hash)= MEMCACHED_HASH_FNV1A_32;
- ;}
+ (yyval.hash)= MEMCACHED_HASH_FNV1_32;
+ }
break;
case 60:
-/* Line 1464 of yacc.c */
-#line 442 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 480 "libmemcached/csl/parser.yy"
{
- (yyval.hash)= MEMCACHED_HASH_HSIEH;
- ;}
+ (yyval.hash)= MEMCACHED_HASH_FNV1A_32;
+ }
break;
case 61:
-/* Line 1464 of yacc.c */
-#line 446 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 484 "libmemcached/csl/parser.yy"
{
- (yyval.hash)= MEMCACHED_HASH_MURMUR;
- ;}
+ (yyval.hash)= MEMCACHED_HASH_HSIEH;
+ }
break;
case 62:
-/* Line 1464 of yacc.c */
-#line 450 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 488 "libmemcached/csl/parser.yy"
{
- (yyval.hash)= MEMCACHED_HASH_JENKINS;
- ;}
+ (yyval.hash)= MEMCACHED_HASH_MURMUR;
+ }
break;
case 63:
-/* Line 1464 of yacc.c */
-#line 457 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 492 "libmemcached/csl/parser.yy"
{
- (yyval.string)= (yyvsp[(1) - (1)].string);
- ;}
+ (yyval.hash)= MEMCACHED_HASH_JENKINS;
+ }
break;
case 64:
-/* Line 1464 of yacc.c */
-#line 461 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 499 "libmemcached/csl/parser.yy"
{
(yyval.string)= (yyvsp[(1) - (1)].string);
- ;}
+ }
break;
case 65:
-/* Line 1464 of yacc.c */
-#line 468 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 503 "libmemcached/csl/parser.yy"
{
- (yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT;
- ;}
+ (yyval.string)= (yyvsp[(1) - (1)].string);
+ }
break;
case 66:
-/* Line 1464 of yacc.c */
-#line 472 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 510 "libmemcached/csl/parser.yy"
{
- (yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA;
- ;}
+ (yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT;
+ }
break;
case 67:
-/* Line 1464 of yacc.c */
-#line 476 "libmemcached/csl/parser.yy"
+/* Line 1806 of yacc.c */
+#line 514 "libmemcached/csl/parser.yy"
+ {
+ (yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA;
+ }
+ break;
+
+ case 68:
+
+/* Line 1806 of yacc.c */
+#line 518 "libmemcached/csl/parser.yy"
{
(yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM;
- ;}
+ }
break;
-/* Line 1464 of yacc.c */
-#line 2129 "libmemcached/csl/parser.cc"
+/* Line 1806 of yacc.c */
+#line 2182 "libmemcached/csl/parser.cc"
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
#if ! YYERROR_VERBOSE
yyerror (context, scanner, YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (context, scanner, yymsg);
- }
- else
- {
- yyerror (context, scanner, YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (context, scanner, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
+ if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
yyreturn:
if (yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, context, scanner);
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, context, scanner);
+ }
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
-/* Line 1684 of yacc.c */
-#line 481 "libmemcached/csl/parser.yy"
+/* Line 2067 of yacc.c */
+#line 523 "libmemcached/csl/parser.yy"
void Context::start()