Merge in usage for common.
[awesomized/libmemcached] / libmemcached / options / parser.yy
index 0f0aee65a459115f6da1f104b3198888bde67029..50db084b32ef4be76eec58611f6a0880f0716ce6 100644 (file)
 
 #include <stdint.h>
 
+#include <libmemcached/common.h>
 #include <libmemcached/options/context.h>
 #include <libmemcached/options/string.h>
 #include <libmemcached/options/symbol.h>
-#include <libmemcached/visibility.h>
-#include <libmemcached/prefix_key.h>
 
 #pragma GCC diagnostic ignored "-Wold-style-cast"
 #include <libmemcached/options/scanner.h>
@@ -108,6 +107,10 @@ inline void config_error(Context *context, yyscan_t *scanner, const char *error)
 /* Callbacks */
 %token NAMESPACE
 
+/* Pool */
+%token POOL_MIN
+%token POOL_MAX
+
 /* Hash types */
 %token MD5
 %token CRC
@@ -210,6 +213,14 @@ expression:
           {
             memcached_set_configuration_file(context->memc, $2.c_str, $2.length);
           }
+        | POOL_MIN NUMBER
+          {
+            context->memc->configure.initial_pool_size= $2;
+          }
+        | POOL_MAX NUMBER
+          {
+            context->memc->configure.max_pool_size= $2;
+          }
         | behaviors
         ;