+ | SERVER IPADDRESS optional_port optional_weight
+ {
+ if ((context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $2.port, $2.weight)) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);
+ }
+ context->unset_server();
+ }
+ | CONFIGURE_FILE string
+ {
+ memcached_set_configuration_file(context->memc, $2.c_str, $2.length);
+ }
+ | behaviors
+ ;
+
+behaviors:
+ PREFIX_KEY string
+ {
+ if ((context->rc= memcached_set_prefix_key(context->memc, $2.c_str, $2.length)) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
+ }
+ | DISTRIBUTION distribution
+ {
+ if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, $2)) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
+ }
+ | DISTRIBUTION distribution ',' hash
+ {
+ if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, $2)) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
+ if ((context->rc= memcached_behavior_set_distribution_hash(context->memc, $4)) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
+ }
+ | HASH hash
+ {
+ if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, $2)) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
+ }
+ | behavior_number NUMBER
+ {
+ if ((context->rc= memcached_behavior_set(context->memc, $1, $2)) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
+ }
+ | behavior_boolean
+ {
+ if ((context->rc= memcached_behavior_set(context->memc, $1, true)) != MEMCACHED_SUCCESS)
+ {
+ parser_abort(context, NULL);;
+ }
+ }
+ | USER_DATA
+ {
+ }
+ ;
+
+behavior_number:
+ CONNECT_TIMEOUT