X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fcsl%2Fscanner.l;h=d82af27c6c407c04fe38fd070fafdfa32582db63;hb=4a35931d46dadb5d664389b0fbe1498c5567e15f;hp=5a3419069faf4aa04e663ae64a808b07e821c00f;hpb=6cca0302addd6ea9714f2b8deff2c48aab3002ef;p=awesomized%2Flibmemcached diff --git a/libmemcached/csl/scanner.l b/libmemcached/csl/scanner.l index 5a341906..d82af27c 100644 --- a/libmemcached/csl/scanner.l +++ b/libmemcached/csl/scanner.l @@ -61,15 +61,10 @@ #endif #endif -#define YY_EXTRA_TYPE Context* - } %{ -#include -#include - #define PARAM yyget_extra(yyscanner) #define get_lex_chars(buffer, result, max_size, context) \ @@ -91,23 +86,25 @@ { \ } +#define YYSTYPE CONFIG_STYPE #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM) %} +%option nostdinit %option 8bit +%option warn %option bison-bridge %option never-interactive %option case-insensitive +%option nodefault %option noinput %option nounput %option noyywrap -%option outfile="libmemcached/csl/scanner.cc" header-file="libmemcached/csl/scanner.h" %option perf-report %option prefix="config_" %option reentrant -%option warn %% @@ -129,7 +126,7 @@ "--SERVER=" { yyextra->begin= yytext; yyextra->set_server(); return yyextra->previous_token= SERVER; } -"--SOCKET=" { yyextra->begin= yytext; return yyextra->previous_token= SOCKET; } +"--SOCKET=" { yyextra->begin= yytext; return yyextra->previous_token= CSL_SOCKET; } "--BINARY-PROTOCOL" { yyextra->begin= yytext; return yyextra->previous_token= BINARY_PROTOCOL; } "--BUFFER-REQUESTS" { yyextra->begin= yytext; return yyextra->previous_token= BUFFER_REQUESTS; } @@ -172,10 +169,10 @@ RESET { yyextra->begin= yytext; return yyextra->previous_token= RESET; DEBUG { yyextra->begin= yytext; return yyextra->previous_token= PARSER_DEBUG; } SERVERS { yyextra->begin= yytext; return yyextra->previous_token= SERVERS; } END { yyextra->begin= yytext; return yyextra->previous_token= END; } -ERROR { yyextra->begin= yytext; return yyextra->previous_token= ERROR; } +CSL_ERROR { yyextra->begin= yytext; return yyextra->previous_token= CSL_ERROR; } -TRUE { return yyextra->previous_token= TRUE; } -FALSE { return yyextra->previous_token= FALSE; } +TRUE { return yyextra->previous_token= CSL_TRUE; } +FALSE { return yyextra->previous_token= CSL_FALSE; } "--"[[:alnum:]]* {