Add missing files.
[awesomized/libmemcached] / libmemcached / options / parser.cc
index 2c1d5ac92a846f60910d63cf09799ea677800f5c..c5a671d57aabb4a8b921f0677d3402700ea36e0d 100644 (file)
@@ -190,12 +190,12 @@ inline void config_error(Context *context, yyscan_t *scanner, const char *error)
      RANDOM = 313,
      TRUE = 314,
      FALSE = 315,
-     NUMBER = 316,
-     FLOAT = 317,
-     HOSTNAME = 318,
-     HOSTNAME_WITH_PORT = 319,
+     FLOAT = 316,
+     NUMBER = 317,
+     PORT = 318,
+     WEIGHT_START = 319,
      IPADDRESS = 320,
-     IPADDRESS_WITH_PORT = 321,
+     HOSTNAME = 321,
      STRING = 322,
      QUOTED_STRING = 323,
      FILE_PATH = 324
@@ -428,7 +428,7 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  74
+#define YYFINAL  66
 /* YYLAST -- Last index in YYTABLE.  */
 #define YYLAST   72
 
@@ -437,9 +437,9 @@ union yyalloc
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  12
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  69
+#define YYNRULES  65
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  85
+#define YYNSTATES  79
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
@@ -492,12 +492,12 @@ static const yytype_uint8 yytranslate[] =
 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,   117,   120,   122,   124,   127,   129,   131,   133,   135,
-     137,   139,   141,   143,   145,   147,   149,   151,   153,   155
+      21,    23,    27,    32,    37,    40,    42,    45,    48,    53,
+      56,    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,   114,
+     116,   117,   119,   121,   123,   125,   127,   129,   131,   133,
+     135,   137,   139,   141,   143,   145
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
@@ -505,17 +505,16 @@ static const yytype_int8 yyrhs[] =
 {
       74,     0,    -1,    75,    -1,    74,    72,    75,    -1,    76,
       -1,     3,    -1,    10,    -1,     4,    -1,     5,    -1,     6,
-      -1,     7,    -1,     8,    72,    83,    -1,    11,    81,    -1,
-      13,    80,    -1,     9,    83,    -1,    77,    -1,    46,    83,
-      -1,    20,    84,    -1,    20,    84,    61,    82,    -1,    21,
-      82,    -1,    78,    63,    -1,    79,    -1,    43,    -1,    19,
-      -1,    25,    -1,    23,    -1,    24,    -1,    29,    -1,    30,
-      -1,    32,    -1,    33,    -1,    34,    -1,    35,    -1,    36,
-      -1,    37,    -1,    16,    -1,    17,    -1,    18,    -1,    22,
-      -1,    27,    -1,    28,    -1,    31,    -1,    38,    -1,    39,
-      -1,    40,    -1,    41,    -1,    42,    -1,    44,    -1,    45,
-      -1,    81,    -1,    80,    61,    81,    -1,    66,    63,    -1,
-      65,    -1,    69,    -1,    68,    63,    -1,    67,    -1,    47,
+      -1,     7,    -1,     8,    72,    83,    -1,    11,    68,    80,
+      81,    -1,    11,    67,    80,    81,    -1,     9,    83,    -1,
+      77,    -1,    46,    83,    -1,    20,    84,    -1,    20,    84,
+      61,    82,    -1,    21,    82,    -1,    78,    64,    -1,    79,
+      -1,    43,    -1,    19,    -1,    25,    -1,    23,    -1,    24,
+      -1,    29,    -1,    30,    -1,    32,    -1,    33,    -1,    34,
+      -1,    35,    -1,    36,    -1,    37,    -1,    16,    -1,    17,
+      -1,    18,    -1,    22,    -1,    28,    -1,    31,    -1,    38,
+      -1,    39,    -1,    40,    -1,    41,    -1,    42,    -1,    44,
+      -1,    45,    -1,    -1,    65,    -1,    -1,    66,    -1,    47,
       -1,    48,    -1,    49,    -1,    50,    -1,    51,    -1,    52,
       -1,    53,    -1,    54,    -1,    55,    -1,    69,    -1,    70,
       -1,    56,    -1,    57,    -1,    58,    -1
@@ -524,13 +523,13 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   156,   156,   157,   161,   163,   165,   167,   172,   177,
-     181,   185,   196,   203,   206,   210,   214,   221,   228,   239,
-     246,   253,   260,   266,   270,   274,   278,   282,   286,   290,
-     294,   298,   302,   306,   310,   317,   321,   325,   329,   333,
-     337,   341,   345,   349,   353,   357,   361,   365,   369,   376,
-     383,   393,   399,   405,   411,   417,   426,   430,   434,   438,
-     442,   446,   450,   454,   458,   465,   469,   477,   481,   485
+       0,   155,   155,   156,   160,   162,   164,   166,   171,   176,
+     180,   184,   195,   203,   211,   215,   219,   226,   233,   244,
+     251,   258,   265,   271,   275,   279,   283,   287,   291,   295,
+     299,   303,   307,   311,   315,   322,   326,   330,   334,   338,
+     342,   346,   350,   354,   358,   362,   366,   370,   377,   378,
+     383,   384,   389,   393,   397,   401,   405,   409,   413,   417,
+     421,   428,   432,   440,   444,   448
 };
 #endif
 
@@ -552,11 +551,11 @@ static const char *const yytname[] =
   "_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
+  "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
 
@@ -583,21 +582,21 @@ static const yytype_uint8 yyr1[] =
       75,    75,    76,    76,    76,    76,    77,    77,    77,    77,
       77,    77,    77,    78,    78,    78,    78,    78,    78,    78,
       78,    78,    78,    78,    78,    79,    79,    79,    79,    79,
-      79,    79,    79,    79,    79,    79,    79,    79,    79,    80,
-      80,    81,    81,    81,    81,    81,    82,    82,    82,    82,
-      82,    82,    82,    82,    82,    83,    83,    84,    84,    84
+      79,    79,    79,    79,    79,    79,    79,    79,    80,    80,
+      81,    81,    82,    82,    82,    82,    82,    82,    82,    82,
+      82,    83,    83,    84,    84,    84
 };
 
 /* 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,
+       1,     3,     4,     4,     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,     1,     1,
-       3,     2,     1,     1,     2,     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
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -606,44 +605,42 @@ static const yytype_uint8 yyr2[] =
 static const yytype_uint8 yydefact[] =
 {
        0,     5,     7,     8,     9,    10,     0,     0,     6,     0,
-       0,    35,    36,    37,    23,     0,     0,    38,    25,    26,
-      24,    39,    40,    27,    28,    41,    29,    30,    31,    32,
-      33,    34,    42,    43,    44,    45,    46,    22,    47,    48,
-       0,     0,     2,     4,    15,     0,    21,     0,    65,    66,
-      14,    52,     0,    55,     0,    53,    12,    13,    49,    67,
-      68,    69,    17,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    19,    16,     1,     0,    20,    11,    51,    54,
-       0,     0,     3,    50,    18
+      35,    36,    37,    23,     0,     0,    38,    25,    26,    24,
+      39,    27,    28,    40,    29,    30,    31,    32,    33,    34,
+      41,    42,    43,    44,    45,    22,    46,    47,     0,     0,
+       2,     4,    15,     0,    21,     0,    61,    62,    14,    48,
+      48,    63,    64,    65,    17,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    19,    16,     1,     0,    20,    11,
+      49,    50,    50,     0,     3,    51,    13,    12,    18
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int8 yydefgoto[] =
 {
-      -1,    41,    42,    43,    44,    45,    46,    57,    56,    72,
-      50,    62
+      -1,    39,    40,    41,    42,    43,    44,    71,    76,    64,
+      48,    54
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -62
+#define YYPACT_NINF -60
 static const yytype_int8 yypact[] =
 {
-      -1,   -62,   -62,   -62,   -62,   -62,   -61,   -56,   -62,    -7,
-      -7,   -62,   -62,   -62,   -62,     9,     1,   -62,   -62,   -62,
-     -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,
-     -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,
-     -56,     0,   -62,   -62,   -62,   -38,   -62,   -56,   -62,   -62,
-     -62,   -62,   -17,   -62,   -16,   -62,   -62,     2,   -62,   -62,
-     -62,   -62,     7,   -62,   -62,   -62,   -62,   -62,   -62,   -62,
-     -62,   -62,   -62,   -62,   -62,    -1,   -62,   -62,   -62,   -62,
-      -7,     1,   -62,   -62,   -62
+      -2,   -60,   -60,   -60,   -60,   -60,   -59,   -45,   -60,   -11,
+     -60,   -60,   -60,   -60,   -46,    -1,   -60,   -60,   -60,   -60,
+     -60,   -60,   -60,   -60,   -60,   -60,   -60,   -60,   -60,   -60,
+     -60,   -60,   -60,   -60,   -60,   -60,   -60,   -60,   -45,     0,
+     -60,   -60,   -60,   -19,   -60,   -45,   -60,   -60,   -60,    -7,
+      -7,   -60,   -60,   -60,     2,   -60,   -60,   -60,   -60,   -60,
+     -60,   -60,   -60,   -60,   -60,   -60,   -60,    -2,   -60,   -60,
+     -60,    -6,    -6,    -1,   -60,   -60,   -60,   -60,   -60
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int8 yypgoto[] =
 {
-     -62,   -62,    -6,   -62,   -62,   -62,   -62,   -62,    -9,   -11,
-      17,   -62
+     -60,   -60,    -8,   -60,   -60,   -60,   -60,    11,    -5,    -9,
+      17,   -60
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -653,26 +650,26 @@ static const yytype_int8 yypgoto[] =
 #define YYTABLE_NINF -1
 static const yytype_uint8 yytable[] =
 {
-      74,    58,     1,     2,     3,     4,     5,     6,     7,     8,
-       9,    47,    10,    48,    49,    11,    12,    13,    14,    15,
-      16,    17,    18,    19,    20,    76,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    78,    79,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,    73,    51,    52,
-      53,    54,    55,    80,    77,    59,    60,    61,    81,    82,
-      84,    83,    75
+      66,     1,     2,     3,     4,     5,     6,     7,     8,     9,
+      51,    52,    53,    45,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    46,    47,    20,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
+      34,    35,    36,    37,    38,    68,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    65,    49,    50,    70,    74,
+      75,    72,    69,    73,    78,     0,     0,    77,     0,     0,
+       0,     0,    67
 };
 
-static const yytype_uint8 yycheck[] =
+static const yytype_int8 yycheck[] =
 {
-       0,    10,     3,     4,     5,     6,     7,     8,     9,    10,
-      11,    72,    13,    69,    70,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    63,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    63,    63,    47,    48,
-      49,    50,    51,    52,    53,    54,    55,    40,    65,    66,
-      67,    68,    69,    61,    47,    56,    57,    58,    61,    75,
-      81,    80,    72
+       0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
+      56,    57,    58,    72,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    69,    70,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    64,    47,    48,    49,    50,
+      51,    52,    53,    54,    55,    38,    67,    68,    65,    67,
+      66,    50,    45,    61,    73,    -1,    -1,    72,    -1,    -1,
+      -1,    -1,    72
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -680,14 +677,13 @@ static const yytype_uint8 yycheck[] =
 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,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    74,    75,    76,    77,    78,    79,    72,    69,    70,
-      83,    65,    66,    67,    68,    69,    81,    80,    81,    56,
-      57,    58,    84,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    82,    83,     0,    72,    63,    83,    63,    63,
-      61,    61,    75,    81,    82
+      16,    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,    74,
+      75,    76,    77,    78,    79,    72,    69,    70,    83,    67,
+      68,    56,    57,    58,    84,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    82,    83,     0,    72,    64,    83,
+      65,    80,    80,    61,    75,    66,    81,    81,    82
 };
 
 #define yyerrok                (yyerrstatus = 0)
@@ -1522,28 +1518,28 @@ yyreduce:
         case 4:
 
 /* Line 1464 of yacc.c  */
-#line 162 "libmemcached/options/parser.yy"
+#line 161 "libmemcached/options/parser.yy"
     { ;}
     break;
 
   case 5:
 
 /* Line 1464 of yacc.c  */
-#line 164 "libmemcached/options/parser.yy"
+#line 163 "libmemcached/options/parser.yy"
     { ;}
     break;
 
   case 6:
 
 /* Line 1464 of yacc.c  */
-#line 166 "libmemcached/options/parser.yy"
+#line 165 "libmemcached/options/parser.yy"
     { ;}
     break;
 
   case 7:
 
 /* Line 1464 of yacc.c  */
-#line 168 "libmemcached/options/parser.yy"
+#line 167 "libmemcached/options/parser.yy"
     {
             context->set_end();
             YYACCEPT;
@@ -1553,7 +1549,7 @@ yyreduce:
   case 8:
 
 /* Line 1464 of yacc.c  */
-#line 173 "libmemcached/options/parser.yy"
+#line 172 "libmemcached/options/parser.yy"
     {
             context->rc= MEMCACHED_PARSE_USER_ERROR;
             parser_abort(context, NULL);
@@ -1563,7 +1559,7 @@ yyreduce:
   case 9:
 
 /* Line 1464 of yacc.c  */
-#line 178 "libmemcached/options/parser.yy"
+#line 177 "libmemcached/options/parser.yy"
     {
             memcached_reset(context->memc);
           ;}
@@ -1572,7 +1568,7 @@ yyreduce:
   case 10:
 
 /* Line 1464 of yacc.c  */
-#line 182 "libmemcached/options/parser.yy"
+#line 181 "libmemcached/options/parser.yy"
     {
             yydebug= 1;
           ;}
@@ -1581,7 +1577,7 @@ yyreduce:
   case 11:
 
 /* Line 1464 of yacc.c  */
-#line 186 "libmemcached/options/parser.yy"
+#line 185 "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)
             {
@@ -1593,12 +1589,13 @@ yyreduce:
   case 12:
 
 /* Line 1464 of yacc.c  */
-#line 197 "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 196 "libmemcached/options/parser.yy"
+    {
+            if ((context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(2) - (4)].server).port, (yyvsp[(2) - (4)].server).weight)) != MEMCACHED_SUCCESS)
             {
               parser_abort(context, NULL);
             }
+            context->unset_server();
           ;}
     break;
 
@@ -1607,13 +1604,18 @@ yyreduce:
 /* Line 1464 of yacc.c  */
 #line 204 "libmemcached/options/parser.yy"
     {
+            if ((context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(2) - (4)].server).port, (yyvsp[(2) - (4)].server).weight)) != MEMCACHED_SUCCESS)
+            {
+              parser_abort(context, NULL);
+            }
+            context->unset_server();
           ;}
     break;
 
   case 14:
 
 /* Line 1464 of yacc.c  */
-#line 207 "libmemcached/options/parser.yy"
+#line 212 "libmemcached/options/parser.yy"
     {
             memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).length);
           ;}
@@ -1622,7 +1624,7 @@ yyreduce:
   case 16:
 
 /* Line 1464 of yacc.c  */
-#line 215 "libmemcached/options/parser.yy"
+#line 220 "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)
             {
@@ -1634,7 +1636,7 @@ yyreduce:
   case 17:
 
 /* Line 1464 of yacc.c  */
-#line 222 "libmemcached/options/parser.yy"
+#line 227 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS)
             {
@@ -1646,7 +1648,7 @@ yyreduce:
   case 18:
 
 /* Line 1464 of yacc.c  */
-#line 229 "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)
             {
@@ -1662,7 +1664,7 @@ yyreduce:
   case 19:
 
 /* Line 1464 of yacc.c  */
-#line 240 "libmemcached/options/parser.yy"
+#line 245 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, (yyvsp[(2) - (2)].hash))) != MEMCACHED_SUCCESS)
             {
@@ -1674,7 +1676,7 @@ yyreduce:
   case 20:
 
 /* Line 1464 of yacc.c  */
-#line 247 "libmemcached/options/parser.yy"
+#line 252 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS)
             {
@@ -1686,7 +1688,7 @@ yyreduce:
   case 21:
 
 /* Line 1464 of yacc.c  */
-#line 254 "libmemcached/options/parser.yy"
+#line 259 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS)
             {
@@ -1698,7 +1700,7 @@ yyreduce:
   case 22:
 
 /* Line 1464 of yacc.c  */
-#line 261 "libmemcached/options/parser.yy"
+#line 266 "libmemcached/options/parser.yy"
     {
           ;}
     break;
@@ -1706,7 +1708,7 @@ yyreduce:
   case 23:
 
 /* Line 1464 of yacc.c  */
-#line 267 "libmemcached/options/parser.yy"
+#line 272 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
           ;}
@@ -1715,7 +1717,7 @@ yyreduce:
   case 24:
 
 /* Line 1464 of yacc.c  */
-#line 271 "libmemcached/options/parser.yy"
+#line 276 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
           ;}
@@ -1724,7 +1726,7 @@ yyreduce:
   case 25:
 
 /* Line 1464 of yacc.c  */
-#line 275 "libmemcached/options/parser.yy"
+#line 280 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
           ;}
@@ -1733,7 +1735,7 @@ yyreduce:
   case 26:
 
 /* Line 1464 of yacc.c  */
-#line 279 "libmemcached/options/parser.yy"
+#line 284 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
           ;}
@@ -1742,7 +1744,7 @@ yyreduce:
   case 27:
 
 /* Line 1464 of yacc.c  */
-#line 283 "libmemcached/options/parser.yy"
+#line 288 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
           ;}
@@ -1751,7 +1753,7 @@ yyreduce:
   case 28:
 
 /* Line 1464 of yacc.c  */
-#line 287 "libmemcached/options/parser.yy"
+#line 292 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
           ;}
@@ -1760,7 +1762,7 @@ yyreduce:
   case 29:
 
 /* Line 1464 of yacc.c  */
-#line 291 "libmemcached/options/parser.yy"
+#line 296 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
           ;}
@@ -1769,7 +1771,7 @@ yyreduce:
   case 30:
 
 /* Line 1464 of yacc.c  */
-#line 295 "libmemcached/options/parser.yy"
+#line 300 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
           ;}
@@ -1778,7 +1780,7 @@ yyreduce:
   case 31:
 
 /* Line 1464 of yacc.c  */
-#line 299 "libmemcached/options/parser.yy"
+#line 304 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT;
           ;}
@@ -1787,7 +1789,7 @@ yyreduce:
   case 32:
 
 /* Line 1464 of yacc.c  */
-#line 303 "libmemcached/options/parser.yy"
+#line 308 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
           ;}
@@ -1796,7 +1798,7 @@ yyreduce:
   case 33:
 
 /* Line 1464 of yacc.c  */
-#line 307 "libmemcached/options/parser.yy"
+#line 312 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
           ;}
@@ -1805,7 +1807,7 @@ yyreduce:
   case 34:
 
 /* Line 1464 of yacc.c  */
-#line 311 "libmemcached/options/parser.yy"
+#line 316 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
           ;}
@@ -1814,7 +1816,7 @@ yyreduce:
   case 35:
 
 /* Line 1464 of yacc.c  */
-#line 318 "libmemcached/options/parser.yy"
+#line 323 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS;
           ;}
@@ -1823,7 +1825,7 @@ yyreduce:
   case 36:
 
 /* Line 1464 of yacc.c  */
-#line 322 "libmemcached/options/parser.yy"
+#line 327 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
           ;}
@@ -1832,7 +1834,7 @@ yyreduce:
   case 37:
 
 /* Line 1464 of yacc.c  */
-#line 326 "libmemcached/options/parser.yy"
+#line 331 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
           ;}
@@ -1841,7 +1843,7 @@ yyreduce:
   case 38:
 
 /* Line 1464 of yacc.c  */
-#line 330 "libmemcached/options/parser.yy"
+#line 335 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
           ;}
@@ -1850,294 +1852,234 @@ yyreduce:
   case 39:
 
 /* Line 1464 of yacc.c  */
-#line 334 "libmemcached/options/parser.yy"
+#line 339 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY;
           ;}
     break;
 
   case 40:
 
 /* Line 1464 of yacc.c  */
-#line 338 "libmemcached/options/parser.yy"
+#line 343 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
           ;}
     break;
 
   case 41:
 
 /* Line 1464 of yacc.c  */
-#line 342 "libmemcached/options/parser.yy"
+#line 347 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS;
           ;}
     break;
 
   case 42:
 
 /* Line 1464 of yacc.c  */
-#line 346 "libmemcached/options/parser.yy"
+#line 351 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
           ;}
     break;
 
   case 43:
 
 /* Line 1464 of yacc.c  */
-#line 350 "libmemcached/options/parser.yy"
+#line 355 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY;
           ;}
     break;
 
   case 44:
 
 /* Line 1464 of yacc.c  */
-#line 354 "libmemcached/options/parser.yy"
+#line 359 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
           ;}
     break;
 
   case 45:
 
 /* Line 1464 of yacc.c  */
-#line 358 "libmemcached/options/parser.yy"
+#line 363 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
           ;}
     break;
 
   case 46:
 
 /* Line 1464 of yacc.c  */
-#line 362 "libmemcached/options/parser.yy"
+#line 367 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP;
           ;}
     break;
 
   case 47:
 
 /* Line 1464 of yacc.c  */
-#line 366 "libmemcached/options/parser.yy"
+#line 371 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY;
           ;}
     break;
 
   case 48:
 
 /* Line 1464 of yacc.c  */
-#line 370 "libmemcached/options/parser.yy"
-    {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY;
-          ;}
+#line 377 "libmemcached/options/parser.yy"
+    { ;}
     break;
 
   case 49:
 
 /* Line 1464 of yacc.c  */
-#line 377 "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 379 "libmemcached/options/parser.yy"
+    { ;}
     break;
 
   case 50:
 
 /* Line 1464 of yacc.c  */
-#line 384 "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 383 "libmemcached/options/parser.yy"
+    { ;}
     break;
 
   case 51:
 
 /* Line 1464 of yacc.c  */
-#line 394 "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 385 "libmemcached/options/parser.yy"
+    { ;}
     break;
 
   case 52:
 
 /* Line 1464 of yacc.c  */
-#line 400 "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 53:
-
-/* Line 1464 of yacc.c  */
-#line 406 "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 54:
-
-/* Line 1464 of yacc.c  */
-#line 412 "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 55:
-
-/* 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 56:
-
-/* Line 1464 of yacc.c  */
-#line 427 "libmemcached/options/parser.yy"
+#line 390 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_MD5;
           ;}
     break;
 
-  case 57:
+  case 53:
 
 /* Line 1464 of yacc.c  */
-#line 431 "libmemcached/options/parser.yy"
+#line 394 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_CRC;
           ;}
     break;
 
-  case 58:
+  case 54:
 
 /* Line 1464 of yacc.c  */
-#line 435 "libmemcached/options/parser.yy"
+#line 398 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1_64;
           ;}
     break;
 
-  case 59:
+  case 55:
 
 /* Line 1464 of yacc.c  */
-#line 439 "libmemcached/options/parser.yy"
+#line 402 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1A_64;
           ;}
     break;
 
-  case 60:
+  case 56:
 
 /* Line 1464 of yacc.c  */
-#line 443 "libmemcached/options/parser.yy"
+#line 406 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1_32;
           ;}
     break;
 
-  case 61:
+  case 57:
 
 /* Line 1464 of yacc.c  */
-#line 447 "libmemcached/options/parser.yy"
+#line 410 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1A_32;
           ;}
     break;
 
-  case 62:
+  case 58:
 
 /* Line 1464 of yacc.c  */
-#line 451 "libmemcached/options/parser.yy"
+#line 414 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_HSIEH;
           ;}
     break;
 
-  case 63:
+  case 59:
 
 /* Line 1464 of yacc.c  */
-#line 455 "libmemcached/options/parser.yy"
+#line 418 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_MURMUR;
           ;}
     break;
 
-  case 64:
+  case 60:
 
 /* Line 1464 of yacc.c  */
-#line 459 "libmemcached/options/parser.yy"
+#line 422 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_JENKINS;
           ;}
     break;
 
-  case 65:
+  case 61:
 
 /* Line 1464 of yacc.c  */
-#line 466 "libmemcached/options/parser.yy"
+#line 429 "libmemcached/options/parser.yy"
     {
             (yyval.string)= (yyvsp[(1) - (1)].string);
           ;}
     break;
 
-  case 66:
+  case 62:
 
 /* Line 1464 of yacc.c  */
-#line 470 "libmemcached/options/parser.yy"
+#line 433 "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
           ;}
     break;
 
-  case 67:
+  case 63:
 
 /* Line 1464 of yacc.c  */
-#line 478 "libmemcached/options/parser.yy"
+#line 441 "libmemcached/options/parser.yy"
     {
             (yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT;
           ;}
     break;
 
-  case 68:
+  case 64:
 
 /* Line 1464 of yacc.c  */
-#line 482 "libmemcached/options/parser.yy"
+#line 445 "libmemcached/options/parser.yy"
     {
             (yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA;
           ;}
     break;
 
-  case 69:
+  case 65:
 
 /* Line 1464 of yacc.c  */
-#line 486 "libmemcached/options/parser.yy"
+#line 449 "libmemcached/options/parser.yy"
     {
             (yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM;
           ;}
@@ -2146,7 +2088,7 @@ yyreduce:
 
 
 /* Line 1464 of yacc.c  */
-#line 2150 "libmemcached/options/parser.cc"
+#line 2092 "libmemcached/options/parser.cc"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2358,7 +2300,7 @@ yyreturn:
 
 
 /* Line 1684 of yacc.c  */
-#line 491 "libmemcached/options/parser.yy"
+#line 454 "libmemcached/options/parser.yy"
  
 
 void Context::start()