#include <stdint.h>
+#include <libmemcached/common.h>
+#include <libmemcached/options.hpp>
+
#include <libmemcached/options/context.h>
-#include <libmemcached/options/build.h>
-#include <libmemcached/options/string.h>
#include <libmemcached/options/symbol.h>
-#include <libmemcached/visibility.h>
-#include <libmemcached/prefix_key.h>
+#include <libmemcached/options/scanner.h>
+
+#include <iostream>
#pragma GCC diagnostic ignored "-Wold-style-cast"
-#include <libmemcached/options/scanner.h>
int conf_lex(YYSTYPE* lvalp, void* scanner);
-#define parser_abort(A, B) do { parser::abort_func((A), (B)); YYABORT; } while (0)
+#define parser_abort(A, B) do { (A)->abort((B)); YYABORT; } while (0)
inline void config_error(Context *context, yyscan_t *scanner, const char *error)
{
if (not context->end())
- parser::abort_func(context, error);
-}
-
-int config_parse(Context*, yyscan_t *);
-
-void Context::start()
-{
- config_parse(this, scanner);
+ context->abort(error);
}
/* Line 189 of yacc.c */
-#line 116 "libmemcached/options/parser.cc"
+#line 110 "libmemcached/options/parser.cc"
/* Enabling traces. */
#ifndef YYDEBUG
CONFIGURE_FILE = 264,
EMPTY_LINE = 265,
SERVER = 266,
- SERVERS = 267,
- SERVERS_OPTION = 268,
- UNKNOWN_OPTION = 269,
- UNKNOWN = 270,
- AUTO_EJECT_HOSTS = 271,
+ SOCKET = 267,
+ SERVERS = 268,
+ SERVERS_OPTION = 269,
+ UNKNOWN_OPTION = 270,
+ UNKNOWN = 271,
BINARY_PROTOCOL = 272,
BUFFER_REQUESTS = 273,
- CACHE_LOOKUPS = 274,
- CONNECT_TIMEOUT = 275,
- DISTRIBUTION = 276,
- HASH = 277,
- HASH_WITH_PREFIX_KEY = 278,
- IO_BYTES_WATERMARK = 279,
- IO_KEY_PREFETCH = 280,
- IO_MSG_WATERMARK = 281,
- KETAMA_HASH = 282,
- KETAMA_WEIGHTED = 283,
- NOREPLY = 284,
- NUMBER_OF_REPLICAS = 285,
- POLL_TIMEOUT = 286,
- RANDOMIZE_REPLICA_READ = 287,
- RCV_TIMEOUT = 288,
+ CONNECT_TIMEOUT = 274,
+ DISTRIBUTION = 275,
+ HASH = 276,
+ HASH_WITH_NAMESPACE = 277,
+ IO_BYTES_WATERMARK = 278,
+ IO_KEY_PREFETCH = 279,
+ IO_MSG_WATERMARK = 280,
+ KETAMA_HASH = 281,
+ KETAMA_WEIGHTED = 282,
+ NOREPLY = 283,
+ NUMBER_OF_REPLICAS = 284,
+ POLL_TIMEOUT = 285,
+ RANDOMIZE_REPLICA_READ = 286,
+ RCV_TIMEOUT = 287,
+ REMOVE_FAILED_SERVERS = 288,
RETRY_TIMEOUT = 289,
- SERVER_FAILURE_LIMIT = 290,
- SND_TIMEOUT = 291,
- SOCKET_RECV_SIZE = 292,
- SOCKET_SEND_SIZE = 293,
- SORT_HOSTS = 294,
- SUPPORT_CAS = 295,
- _TCP_NODELAY = 296,
- _TCP_KEEPALIVE = 297,
- _TCP_KEEPIDLE = 298,
- USER_DATA = 299,
- USE_UDP = 300,
- VERIFY_KEY = 301,
- PREFIX_KEY = 302,
- MD5 = 303,
- CRC = 304,
- FNV1_64 = 305,
- FNV1A_64 = 306,
- FNV1_32 = 307,
- FNV1A_32 = 308,
- HSIEH = 309,
- MURMUR = 310,
- JENKINS = 311,
- CONSISTENT = 312,
- MODULA = 313,
- RANDOM = 314,
- TRUE = 315,
- FALSE = 316,
- NUMBER = 317,
+ SND_TIMEOUT = 290,
+ SOCKET_RECV_SIZE = 291,
+ SOCKET_SEND_SIZE = 292,
+ SORT_HOSTS = 293,
+ SUPPORT_CAS = 294,
+ USER_DATA = 295,
+ USE_UDP = 296,
+ VERIFY_KEY = 297,
+ _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,
- HOSTNAME = 319,
- HOSTNAME_WITH_PORT = 320,
- IPADDRESS = 321,
- IPADDRESS_WITH_PORT = 322,
- STRING = 323,
- QUOTED_STRING = 324,
- FILE_PATH = 325
+ NUMBER = 319,
+ PORT = 320,
+ WEIGHT_START = 321,
+ IPADDRESS = 322,
+ HOSTNAME = 323,
+ STRING = 324,
+ QUOTED_STRING = 325,
+ FILE_PATH = 326
};
#endif
/* Line 264 of yacc.c */
-#line 227 "libmemcached/options/parser.cc"
+#line 222 "libmemcached/options/parser.cc"
#ifdef short
# undef short
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 75
+#define YYFINAL 71
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 73
+#define YYLAST 74
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 74
+#define YYNTOKENS 75
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 12
/* YYNRULES -- Number of rules. */
-#define YYNRULES 70
+#define YYNRULES 67
/* YYNRULES -- Number of states. */
-#define YYNSTATES 86
+#define YYNSTATES 84
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 325
+#define YYMAXUTOK 326
#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, 73, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 62, 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, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 63, 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, 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, 64, 65, 66,
- 67, 68, 69, 70, 71, 72
+ 55, 56, 57, 58, 59, 60, 61, 62, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73
};
#if YYDEBUG
static const yytype_uint8 yyprhs[] =
{
0, 0, 3, 5, 9, 11, 13, 15, 17, 19,
- 21, 23, 27, 30, 33, 36, 38, 41, 44, 49,
- 52, 55, 57, 59, 61, 63, 65, 67, 69, 71,
- 73, 75, 77, 79, 81, 83, 85, 87, 89, 91,
- 93, 95, 97, 99, 101, 103, 105, 107, 109, 111,
- 113, 115, 119, 122, 124, 126, 129, 131, 133, 135,
- 137, 139, 141, 143, 145, 147, 149, 151, 153, 155,
- 157
+ 21, 23, 27, 32, 37, 40, 43, 46, 49, 51,
+ 54, 57, 62, 65, 68, 70, 72, 74, 76, 78,
+ 80, 82, 84, 86, 88, 90, 92, 94, 96, 98,
+ 100, 102, 104, 106, 108, 110, 112, 114, 116, 118,
+ 120, 121, 123, 124, 126, 128, 130, 132, 134, 136,
+ 138, 140, 142, 144, 146, 148, 150, 152
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
- 75, 0, -1, 76, -1, 75, 73, 76, -1, 77,
+ 76, 0, -1, 77, -1, 76, 74, 77, -1, 78,
-1, 3, -1, 10, -1, 4, -1, 5, -1, 6,
- -1, 7, -1, 8, 73, 84, -1, 11, 82, -1,
- 13, 81, -1, 9, 84, -1, 78, -1, 47, 84,
- -1, 21, 85, -1, 21, 85, 62, 83, -1, 22,
- 83, -1, 79, 64, -1, 80, -1, 44, -1, 20,
- -1, 26, -1, 24, -1, 25, -1, 30, -1, 31,
- -1, 33, -1, 34, -1, 35, -1, 36, -1, 37,
- -1, 38, -1, 16, -1, 17, -1, 18, -1, 19,
- -1, 23, -1, 28, -1, 29, -1, 32, -1, 39,
- -1, 40, -1, 41, -1, 42, -1, 43, -1, 45,
- -1, 46, -1, 82, -1, 81, 62, 82, -1, 67,
- 64, -1, 66, -1, 70, -1, 69, 64, -1, 68,
- -1, 48, -1, 49, -1, 50, -1, 51, -1, 52,
- -1, 53, -1, 54, -1, 55, -1, 56, -1, 70,
- -1, 71, -1, 57, -1, 58, -1, 59, -1
+ -1, 7, -1, 8, 74, 85, -1, 11, 70, 82,
+ 83, -1, 11, 69, 82, 83, -1, 12, 85, -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,
+ 51, -1, 52, -1, 53, -1, 54, -1, 55, -1,
+ 56, -1, 57, -1, 71, -1, 72, -1, 58, -1,
+ 59, -1, 60, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 164, 164, 165, 169, 171, 173, 175, 180, 185,
- 189, 193, 204, 211, 214, 218, 222, 229, 236, 247,
- 254, 261, 268, 274, 278, 282, 286, 290, 294, 298,
- 302, 306, 310, 314, 318, 325, 329, 333, 337, 341,
- 345, 349, 353, 357, 361, 365, 369, 373, 377, 381,
- 388, 395, 405, 411, 417, 423, 429, 438, 442, 446,
- 450, 454, 458, 462, 466, 470, 477, 481, 489, 493,
- 497
+ 0, 162, 162, 163, 167, 169, 171, 173, 178, 183,
+ 187, 191, 202, 210, 218, 225, 229, 233, 237, 241,
+ 248, 255, 266, 273, 280, 287, 293, 297, 301, 305,
+ 309, 313, 317, 321, 325, 329, 333, 337, 344, 348,
+ 352, 356, 360, 364, 368, 372, 376, 380, 384, 388,
+ 395, 396, 401, 402, 407, 411, 415, 419, 423, 427,
+ 431, 435, 439, 446, 450, 458, 462, 466
};
#endif
{
"$end", "error", "$undefined", "COMMENT", "END", "ERROR", "RESET",
"PARSER_DEBUG", "INCLUDE", "CONFIGURE_FILE", "EMPTY_LINE", "SERVER",
- "SERVERS", "SERVERS_OPTION", "UNKNOWN_OPTION", "UNKNOWN",
- "AUTO_EJECT_HOSTS", "BINARY_PROTOCOL", "BUFFER_REQUESTS",
- "CACHE_LOOKUPS", "CONNECT_TIMEOUT", "DISTRIBUTION", "HASH",
- "HASH_WITH_PREFIX_KEY", "IO_BYTES_WATERMARK", "IO_KEY_PREFETCH",
+ "SOCKET", "SERVERS", "SERVERS_OPTION", "UNKNOWN_OPTION", "UNKNOWN",
+ "BINARY_PROTOCOL", "BUFFER_REQUESTS", "CONNECT_TIMEOUT", "DISTRIBUTION",
+ "HASH", "HASH_WITH_NAMESPACE", "IO_BYTES_WATERMARK", "IO_KEY_PREFETCH",
"IO_MSG_WATERMARK", "KETAMA_HASH", "KETAMA_WEIGHTED", "NOREPLY",
"NUMBER_OF_REPLICAS", "POLL_TIMEOUT", "RANDOMIZE_REPLICA_READ",
- "RCV_TIMEOUT", "RETRY_TIMEOUT", "SERVER_FAILURE_LIMIT", "SND_TIMEOUT",
+ "RCV_TIMEOUT", "REMOVE_FAILED_SERVERS", "RETRY_TIMEOUT", "SND_TIMEOUT",
"SOCKET_RECV_SIZE", "SOCKET_SEND_SIZE", "SORT_HOSTS", "SUPPORT_CAS",
- "_TCP_NODELAY", "_TCP_KEEPALIVE", "_TCP_KEEPIDLE", "USER_DATA",
- "USE_UDP", "VERIFY_KEY", "PREFIX_KEY", "MD5", "CRC", "FNV1_64",
- "FNV1A_64", "FNV1_32", "FNV1A_32", "HSIEH", "MURMUR", "JENKINS",
- "CONSISTENT", "MODULA", "RANDOM", "TRUE", "FALSE", "','", "'='",
- "NUMBER", "FLOAT", "HOSTNAME", "HOSTNAME_WITH_PORT", "IPADDRESS",
- "IPADDRESS_WITH_PORT", "STRING", "QUOTED_STRING", "FILE_PATH", "' '",
- "$accept", "begin", "statement", "expression", "behaviors",
- "behavior_number", "behavior_boolean", "server_list", "server", "hash",
- "string", "distribution", 0
+ "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",
+ "HOSTNAME", "STRING", "QUOTED_STRING", "FILE_PATH", "' '", "$accept",
+ "begin", "statement", "expression", "behaviors", "behavior_number",
+ "behavior_boolean", "optional_port", "optional_weight", "hash", "string",
+ "distribution", 0
};
#endif
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, 44, 61, 317, 318, 319, 320, 321, 322,
- 323, 324, 325, 32
+ 315, 316, 317, 44, 61, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 32
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 74, 75, 75, 76, 76, 76, 76, 76, 76,
- 76, 76, 77, 77, 77, 77, 78, 78, 78, 78,
- 78, 78, 78, 79, 79, 79, 79, 79, 79, 79,
- 79, 79, 79, 79, 79, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 81, 81, 82, 82, 82, 82, 82, 83, 83, 83,
- 83, 83, 83, 83, 83, 83, 84, 84, 85, 85,
- 85
+ 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
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 1, 3, 1, 1, 1, 1, 1, 1,
- 1, 3, 2, 2, 2, 1, 2, 2, 4, 2,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 4, 4, 2, 2, 2, 2, 1, 2,
+ 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, 1,
- 1, 3, 2, 1, 1, 2, 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
static const yytype_uint8 yydefact[] =
{
0, 5, 7, 8, 9, 10, 0, 0, 6, 0,
- 0, 35, 36, 37, 38, 23, 0, 0, 39, 25,
- 26, 24, 40, 41, 27, 28, 42, 29, 30, 31,
- 32, 33, 34, 43, 44, 45, 46, 47, 22, 48,
- 49, 0, 0, 2, 4, 15, 0, 21, 0, 66,
- 67, 14, 53, 0, 56, 0, 54, 12, 13, 50,
- 68, 69, 70, 17, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 19, 16, 1, 0, 20, 11, 52,
- 55, 0, 0, 3, 51, 18
+ 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, 14, 65, 66, 67, 20, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 22, 19, 16,
+ 17, 1, 0, 23, 11, 51, 52, 52, 0, 3,
+ 53, 13, 12, 21
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 42, 43, 44, 45, 46, 47, 58, 57, 73,
- 51, 63
+ -1, 41, 42, 43, 44, 45, 46, 76, 81, 67,
+ 50, 57
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -63
+#define YYPACT_NINF -61
static const yytype_int8 yypact[] =
{
- -1, -63, -63, -63, -63, -63, -62, -57, -63, -7,
- -7, -63, -63, -63, -63, -63, 9, 1, -63, -63,
- -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
- -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
- -63, -57, 0, -63, -63, -63, -38, -63, -57, -63,
- -63, -63, -63, -17, -63, -16, -63, -63, 2, -63,
- -63, -63, -63, 7, -63, -63, -63, -63, -63, -63,
- -63, -63, -63, -63, -63, -63, -1, -63, -63, -63,
- -63, -7, 1, -63, -63, -63
+ -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, -13, -61, -24, -61, -61,
+ -61, -12, -12, -61, -61, -61, -61, -9, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -2, -61, -61, -61, -11, -11, 13, -61,
+ -61, -61, -61, -61
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -63, -63, -6, -63, -63, -63, -63, -63, -9, -11,
- 17, -63
+ -61, -61, -16, -61, -61, -61, -61, 6, -18, -7,
+ 14, -61
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
- 75, 59, 1, 2, 3, 4, 5, 6, 7, 8,
- 9, 48, 10, 49, 50, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 77, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 79, 80, 64,
- 65, 66, 67, 68, 69, 70, 71, 72, 74, 52,
- 53, 54, 55, 56, 81, 78, 60, 61, 62, 82,
- 83, 85, 84, 76
+ 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,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 48, 49, 51,
+ 52, 70, 68, 73, 78, 75, 79, 80, 77, 82,
+ 0, 74, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 83, 0, 0, 72
};
-static const yytype_uint8 yycheck[] =
+static const yytype_int8 yycheck[] =
{
- 0, 10, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 73, 13, 70, 71, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 64, 28, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 64, 64, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 41, 66,
- 67, 68, 69, 70, 62, 48, 57, 58, 59, 62,
- 76, 82, 81, 73
+ 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,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 71, 72, 69,
+ 70, 66, 38, 66, 63, 67, 72, 68, 52, 77,
+ -1, 47, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 78, -1, -1, 74
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
static const yytype_uint8 yystos[] =
{
0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 13, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 75, 76, 77, 78, 79, 80, 73, 70,
- 71, 84, 66, 67, 68, 69, 70, 82, 81, 82,
- 57, 58, 59, 85, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 83, 84, 0, 73, 64, 84, 64,
- 64, 62, 62, 76, 82, 83
+ 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, 63, 77,
+ 68, 83, 83, 84
};
#define yyerrok (yyerrstatus = 0)
case 4:
/* Line 1464 of yacc.c */
-#line 170 "libmemcached/options/parser.yy"
+#line 168 "libmemcached/options/parser.yy"
{ ;}
break;
case 5:
/* Line 1464 of yacc.c */
-#line 172 "libmemcached/options/parser.yy"
+#line 170 "libmemcached/options/parser.yy"
{ ;}
break;
case 6:
/* Line 1464 of yacc.c */
-#line 174 "libmemcached/options/parser.yy"
+#line 172 "libmemcached/options/parser.yy"
{ ;}
break;
case 7:
/* Line 1464 of yacc.c */
-#line 176 "libmemcached/options/parser.yy"
+#line 174 "libmemcached/options/parser.yy"
{
context->set_end();
YYACCEPT;
case 8:
/* Line 1464 of yacc.c */
-#line 181 "libmemcached/options/parser.yy"
+#line 179 "libmemcached/options/parser.yy"
{
context->rc= MEMCACHED_PARSE_USER_ERROR;
parser_abort(context, NULL);
case 9:
/* Line 1464 of yacc.c */
-#line 186 "libmemcached/options/parser.yy"
+#line 184 "libmemcached/options/parser.yy"
{
memcached_reset(context->memc);
;}
case 10:
/* Line 1464 of yacc.c */
-#line 190 "libmemcached/options/parser.yy"
+#line 188 "libmemcached/options/parser.yy"
{
yydebug= 1;
;}
case 11:
/* Line 1464 of yacc.c */
-#line 194 "libmemcached/options/parser.yy"
+#line 192 "libmemcached/options/parser.yy"
{
- if ((context->rc= memcached_parse_configure_file(context->memc, (yyvsp[(3) - (3)].string).c_str, (yyvsp[(3) - (3)].string).length)) != MEMCACHED_SUCCESS)
+ 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);
}
case 12:
/* Line 1464 of yacc.c */
-#line 205 "libmemcached/options/parser.yy"
- {
- if ((context->rc= memcached_server_add_parsed(context->memc, (yyvsp[(2) - (2)].server).c_str, (yyvsp[(2) - (2)].server).length, (yyvsp[(2) - (2)].server).port, 0)) != MEMCACHED_SUCCESS)
+#line 203 "libmemcached/options/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);
}
+ context->unset_server();
;}
break;
case 13:
/* Line 1464 of yacc.c */
-#line 212 "libmemcached/options/parser.yy"
+#line 211 "libmemcached/options/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);
+ }
+ context->unset_server();
;}
break;
case 14:
/* Line 1464 of yacc.c */
-#line 215 "libmemcached/options/parser.yy"
+#line 219 "libmemcached/options/parser.yy"
{
- memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).length);
+ if (memcached_failed(context->rc= memcached_server_add_unix_socket(context->memc, (yyvsp[(2) - (2)].string).c_str)))
+ {
+ parser_abort(context, NULL);
+ }
;}
break;
- case 16:
+ case 15:
/* Line 1464 of yacc.c */
-#line 223 "libmemcached/options/parser.yy"
+#line 226 "libmemcached/options/parser.yy"
{
- if ((context->rc= memcached_set_prefix_key(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).length)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
+ memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).size);
;}
break;
- case 17:
+ case 16:
/* Line 1464 of yacc.c */
#line 230 "libmemcached/options/parser.yy"
{
- if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
+ context->memc->configure.initial_pool_size= (yyvsp[(2) - (2)].number);
;}
break;
- case 18:
+ case 17:
/* Line 1464 of yacc.c */
-#line 237 "libmemcached/options/parser.yy"
+#line 234 "libmemcached/options/parser.yy"
{
- if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- if ((context->rc= memcached_behavior_set_distribution_hash(context->memc, (yyvsp[(4) - (4)].hash))) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
+ context->memc->configure.max_pool_size= (yyvsp[(2) - (2)].number);
;}
break;
case 19:
/* Line 1464 of yacc.c */
-#line 248 "libmemcached/options/parser.yy"
+#line 242 "libmemcached/options/parser.yy"
{
- if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, (yyvsp[(2) - (2)].hash))) != MEMCACHED_SUCCESS)
+ 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, NULL);;
}
;}
break;
case 20:
/* Line 1464 of yacc.c */
-#line 255 "libmemcached/options/parser.yy"
+#line 249 "libmemcached/options/parser.yy"
{
- if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS)
+ if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS)
{
parser_abort(context, NULL);;
}
case 21:
/* Line 1464 of yacc.c */
-#line 262 "libmemcached/options/parser.yy"
+#line 256 "libmemcached/options/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, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
+ if ((context->rc= memcached_behavior_set_distribution_hash(context->memc, (yyvsp[(4) - (4)].hash))) != MEMCACHED_SUCCESS)
{
parser_abort(context, NULL);;
}
case 22:
/* Line 1464 of yacc.c */
-#line 269 "libmemcached/options/parser.yy"
+#line 267 "libmemcached/options/parser.yy"
{
+ if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, (yyvsp[(2) - (2)].hash))) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
;}
break;
case 23:
/* Line 1464 of yacc.c */
-#line 275 "libmemcached/options/parser.yy"
+#line 274 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
+ if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
;}
break;
case 24:
/* Line 1464 of yacc.c */
-#line 279 "libmemcached/options/parser.yy"
+#line 281 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
+ if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
;}
break;
case 25:
/* Line 1464 of yacc.c */
-#line 283 "libmemcached/options/parser.yy"
+#line 288 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
;}
break;
case 26:
/* Line 1464 of yacc.c */
-#line 287 "libmemcached/options/parser.yy"
+#line 294 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS;
;}
break;
case 27:
/* Line 1464 of yacc.c */
-#line 291 "libmemcached/options/parser.yy"
+#line 298 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
;}
break;
case 28:
/* Line 1464 of yacc.c */
-#line 295 "libmemcached/options/parser.yy"
+#line 302 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
;}
break;
case 29:
/* Line 1464 of yacc.c */
-#line 299 "libmemcached/options/parser.yy"
+#line 306 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
;}
break;
case 30:
/* Line 1464 of yacc.c */
-#line 303 "libmemcached/options/parser.yy"
+#line 310 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
;}
break;
case 31:
/* Line 1464 of yacc.c */
-#line 307 "libmemcached/options/parser.yy"
+#line 314 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
;}
break;
case 32:
/* Line 1464 of yacc.c */
-#line 311 "libmemcached/options/parser.yy"
+#line 318 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
;}
break;
case 33:
/* Line 1464 of yacc.c */
-#line 315 "libmemcached/options/parser.yy"
+#line 322 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
;}
break;
case 34:
/* Line 1464 of yacc.c */
-#line 319 "libmemcached/options/parser.yy"
+#line 326 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
;}
break;
case 35:
/* Line 1464 of yacc.c */
-#line 326 "libmemcached/options/parser.yy"
+#line 330 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
;}
break;
case 36:
/* Line 1464 of yacc.c */
-#line 330 "libmemcached/options/parser.yy"
+#line 334 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
;}
break;
case 37:
/* Line 1464 of yacc.c */
-#line 334 "libmemcached/options/parser.yy"
+#line 338 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
;}
break;
case 38:
/* Line 1464 of yacc.c */
-#line 338 "libmemcached/options/parser.yy"
+#line 345 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_CACHE_LOOKUPS;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
;}
break;
case 39:
/* Line 1464 of yacc.c */
-#line 342 "libmemcached/options/parser.yy"
+#line 349 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
;}
break;
case 40:
/* Line 1464 of yacc.c */
-#line 346 "libmemcached/options/parser.yy"
+#line 353 "libmemcached/options/parser.yy"
{
- (yyval.behavior)= MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED;
+ (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
;}
break;
case 41:
/* Line 1464 of yacc.c */
-#line 350 "libmemcached/options/parser.yy"
+#line 357 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY;
;}
case 42:
/* Line 1464 of yacc.c */
-#line 354 "libmemcached/options/parser.yy"
+#line 361 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
;}
case 43:
/* Line 1464 of yacc.c */
-#line 358 "libmemcached/options/parser.yy"
+#line 365 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS;
;}
case 44:
/* Line 1464 of yacc.c */
-#line 362 "libmemcached/options/parser.yy"
+#line 369 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
;}
case 45:
/* Line 1464 of yacc.c */
-#line 366 "libmemcached/options/parser.yy"
+#line 373 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY;
;}
case 46:
/* Line 1464 of yacc.c */
-#line 370 "libmemcached/options/parser.yy"
+#line 377 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
;}
case 47:
/* Line 1464 of yacc.c */
-#line 374 "libmemcached/options/parser.yy"
+#line 381 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
;}
case 48:
/* Line 1464 of yacc.c */
-#line 378 "libmemcached/options/parser.yy"
+#line 385 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP;
;}
case 49:
/* Line 1464 of yacc.c */
-#line 382 "libmemcached/options/parser.yy"
+#line 389 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY;
;}
case 50:
/* Line 1464 of yacc.c */
-#line 389 "libmemcached/options/parser.yy"
- {
- if ((context->rc= memcached_server_add_parsed(context->memc, (yyvsp[(1) - (1)].server).c_str, (yyvsp[(1) - (1)].server).length, (yyvsp[(1) - (1)].server).port, 0)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- ;}
+#line 395 "libmemcached/options/parser.yy"
+ { (yyval.number)= MEMCACHED_DEFAULT_PORT;;}
break;
case 51:
/* Line 1464 of yacc.c */
-#line 396 "libmemcached/options/parser.yy"
- {
- if ((context->rc= memcached_server_add_parsed(context->memc, (yyvsp[(3) - (3)].server).c_str, (yyvsp[(3) - (3)].server).length, (yyvsp[(3) - (3)].server).port, 0)) != MEMCACHED_SUCCESS)
- {
- parser_abort(context, NULL);;
- }
- ;}
+#line 397 "libmemcached/options/parser.yy"
+ { ;}
break;
case 52:
/* Line 1464 of yacc.c */
-#line 406 "libmemcached/options/parser.yy"
- {
- (yyval.server).c_str= (yyvsp[(1) - (2)].string).c_str;
- (yyval.server).length= (yyvsp[(1) - (2)].string).length -1; // -1 to remove :
- (yyval.server).port= (yyvsp[(2) - (2)].number);
- ;}
+#line 401 "libmemcached/options/parser.yy"
+ { (yyval.number)= 1; ;}
break;
case 53:
/* Line 1464 of yacc.c */
-#line 412 "libmemcached/options/parser.yy"
- {
- (yyval.server).c_str= (yyvsp[(1) - (1)].string).c_str;
- (yyval.server).length= (yyvsp[(1) - (1)].string).length;
- (yyval.server).port= MEMCACHED_DEFAULT_PORT;
- ;}
+#line 403 "libmemcached/options/parser.yy"
+ { ;}
break;
case 54:
/* Line 1464 of yacc.c */
-#line 418 "libmemcached/options/parser.yy"
- {
- (yyval.server).c_str= (yyvsp[(1) - (1)].string).c_str;
- (yyval.server).length= (yyvsp[(1) - (1)].string).length;
- (yyval.server).port= MEMCACHED_DEFAULT_PORT;
- ;}
- break;
-
- case 55:
-
-/* Line 1464 of yacc.c */
-#line 424 "libmemcached/options/parser.yy"
- {
- (yyval.server).c_str= (yyvsp[(1) - (2)].string).c_str;
- (yyval.server).length= (yyvsp[(1) - (2)].string).length -1; // -1 to remove :
- (yyval.server).port= (yyvsp[(2) - (2)].number);
- ;}
- break;
-
- case 56:
-
-/* Line 1464 of yacc.c */
-#line 430 "libmemcached/options/parser.yy"
- {
- (yyval.server).c_str= (yyvsp[(1) - (1)].string).c_str;
- (yyval.server).length= (yyvsp[(1) - (1)].string).length;
- (yyval.server).port= MEMCACHED_DEFAULT_PORT;
- ;}
- break;
-
- case 57:
-
-/* Line 1464 of yacc.c */
-#line 439 "libmemcached/options/parser.yy"
+#line 408 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_MD5;
;}
break;
- case 58:
+ case 55:
/* Line 1464 of yacc.c */
-#line 443 "libmemcached/options/parser.yy"
+#line 412 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_CRC;
;}
break;
- case 59:
+ case 56:
/* Line 1464 of yacc.c */
-#line 447 "libmemcached/options/parser.yy"
+#line 416 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_FNV1_64;
;}
break;
- case 60:
+ case 57:
/* Line 1464 of yacc.c */
-#line 451 "libmemcached/options/parser.yy"
+#line 420 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_FNV1A_64;
;}
break;
- case 61:
+ case 58:
/* Line 1464 of yacc.c */
-#line 455 "libmemcached/options/parser.yy"
+#line 424 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_FNV1_32;
;}
break;
- case 62:
+ case 59:
/* Line 1464 of yacc.c */
-#line 459 "libmemcached/options/parser.yy"
+#line 428 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_FNV1A_32;
;}
break;
- case 63:
+ case 60:
/* Line 1464 of yacc.c */
-#line 463 "libmemcached/options/parser.yy"
+#line 432 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_HSIEH;
;}
break;
- case 64:
+ case 61:
/* Line 1464 of yacc.c */
-#line 467 "libmemcached/options/parser.yy"
+#line 436 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_MURMUR;
;}
break;
- case 65:
+ case 62:
/* Line 1464 of yacc.c */
-#line 471 "libmemcached/options/parser.yy"
+#line 440 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_JENKINS;
;}
break;
- case 66:
+ case 63:
/* Line 1464 of yacc.c */
-#line 478 "libmemcached/options/parser.yy"
+#line 447 "libmemcached/options/parser.yy"
{
(yyval.string)= (yyvsp[(1) - (1)].string);
;}
break;
- case 67:
+ case 64:
/* Line 1464 of yacc.c */
-#line 482 "libmemcached/options/parser.yy"
+#line 451 "libmemcached/options/parser.yy"
{
(yyval.string).c_str= (yyvsp[(1) - (1)].string).c_str +1; // +1 to move use passed the initial quote
- (yyval.string).length= (yyvsp[(1) - (1)].string).length -1; // -1 removes the end quote
+ (yyval.string).size= (yyvsp[(1) - (1)].string).size -2; // -2 removes the begin and end quote
;}
break;
- case 68:
+ case 65:
/* Line 1464 of yacc.c */
-#line 490 "libmemcached/options/parser.yy"
+#line 459 "libmemcached/options/parser.yy"
{
(yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT;
;}
break;
- case 69:
+ case 66:
/* Line 1464 of yacc.c */
-#line 494 "libmemcached/options/parser.yy"
+#line 463 "libmemcached/options/parser.yy"
{
(yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA;
;}
break;
- case 70:
+ case 67:
/* Line 1464 of yacc.c */
-#line 498 "libmemcached/options/parser.yy"
+#line 467 "libmemcached/options/parser.yy"
{
(yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM;
;}
/* Line 1464 of yacc.c */
-#line 2172 "libmemcached/options/parser.cc"
+#line 2120 "libmemcached/options/parser.cc"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+/* Line 1684 of yacc.c */
+#line 472 "libmemcached/options/parser.yy"
+
+
+void Context::start()
+{
+ config_parse(this, (void **)scanner);
+}
+
+