From 0383808588783dbc9f7d66c5f9a0ea935cc574e5 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Sat, 26 Mar 2011 17:29:14 -0700 Subject: [PATCH] Merge in change such that we now use "config_" as the prepend on the parser/scanner. --- libmemcached/get.c | 2 +- libmemcached/options/parser.yy | 11 ++++++----- libmemcached/options/scanner.l | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/libmemcached/get.c b/libmemcached/get.c index 13fe6079..7cb5ec04 100644 --- a/libmemcached/get.c +++ b/libmemcached/get.c @@ -374,7 +374,7 @@ static memcached_return_t simple_binary_mget(memcached_st *ptr, { memcached_return_t rc= MEMCACHED_NOTFOUND; - int flush= number_of_keys == 1; + bool flush= (number_of_keys == 1); /* If a server fails we warn about errors and start all over with sending keys diff --git a/libmemcached/options/parser.yy b/libmemcached/options/parser.yy index fb7ccd86..6145ec72 100644 --- a/libmemcached/options/parser.yy +++ b/libmemcached/options/parser.yy @@ -25,7 +25,7 @@ %output "libmemcached/options/parser.cc" %defines "libmemcached/options/parser.h" %lex-param { yyscan_t *scanner } -%name-prefix="libmemcached_" +%name-prefix="config_" %parse-param { Context *context } %parse-param { yyscan_t *scanner } %pure-parser @@ -49,20 +49,21 @@ #pragma GCC diagnostic ignored "-Wold-style-cast" #include -int libmemcached_lex(YYSTYPE* lvalp, void* scanner); +int conf_lex(YYSTYPE* lvalp, void* scanner); #define parser_abort(A, B) do { parser::abort_func((A), (B)); YYABORT; } while (0) -inline void libmemcached_error(Context *context, yyscan_t *scanner, const char *error) +inline void config_error(Context *context, yyscan_t *scanner, const char *error) { if (not context->end()) parser::abort_func(context, error); } -int libmemcached_parse(Context*, yyscan_t *); +int config_parse(Context*, yyscan_t *); + void Context::start() { - libmemcached_parse(this, scanner); + config_parse(this, scanner); } %} diff --git a/libmemcached/options/scanner.l b/libmemcached/options/scanner.l index b653c460..67fdb96d 100644 --- a/libmemcached/options/scanner.l +++ b/libmemcached/options/scanner.l @@ -60,6 +60,7 @@ static void get_lex_chars(char* buffer, int& result, int max_size, Context *cont %} +%option 8bit %option bison-bridge %option case-insensitive %option debug @@ -67,7 +68,7 @@ static void get_lex_chars(char* buffer, int& result, int max_size, Context *cont %option noyywrap %option outfile="libmemcached/options/scanner.cc" header-file="libmemcached/options/scanner.h" %option perf-report -%option prefix="libmemcached_" +%option prefix="config_" %option reentrant %% -- 2.30.2