#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-fpermissive"
-#include <iostream>
-
#include <libmemcached/options/context.h>
#include <libmemcached/options/parser.h>
#include <libmemcached/options/string.h>
#include <libmemcached/options/symbol.h>
#define YY_EXTRA_TYPE Context*
-#define YY_USER_ACTION yylloc->first_line = yylineno;
}
%}
+%option 8bit
%option bison-bridge
-%option bison-locations
%option case-insensitive
%option debug
%option nounput
%option noyywrap
-%option yylineno
%option outfile="libmemcached/options/scanner.cc" header-file="libmemcached/options/scanner.h"
%option perf-report
-%option prefix="libmemcached_"
+%option prefix="config_"
%option reentrant
%%
}
"--SERVER" { yyextra->begin= yytext; return SERVER; }
-"--SERVERS" { yyextra->begin= yytext; return SERVERS; }
+"--SERVERS" { yyextra->begin= yytext; return SERVERS_OPTION; }
"--VERIFY_KEY" { yyextra->begin= yytext; return VERIFY_KEY; }
"--VERIFY-KEY" { yyextra->begin= yytext; return VERIFY_KEY; }
"--PREFIX-KEY" { yyextra->begin= yytext; return PREFIX_KEY; }
"--PREFIX_KEY" { yyextra->begin= yytext; return PREFIX_KEY; }
+INCLUDE { yyextra->begin= yytext; return INCLUDE; }
+RESET { yyextra->begin= yytext; return RESET; }
+DEBUG { yyextra->begin= yytext; return PARSER_DEBUG; }
+SERVERS { yyextra->begin= yytext; return SERVERS; }
+END { yyextra->begin= yytext; return END; }
+ERROR { yyextra->begin= yytext; return ERROR; }
+
+TRUE { return TRUE; }
+FALSE { return FALSE; }
+
+
"--"[[:alnum:]]* {
yyextra->begin= yytext;
return UNKNOWN_OPTION;
return HOSTNAME_WITH_PORT;
}
-[[:alnum:]]+"."[[:alpha:].]+ {
+[[:alnum:]]+"."[[:alpha:].]+[[:alnum:]] {
yylval->string.c_str = yytext;
yylval->string.length = yyleng;
return HOSTNAME;
{
yylex_destroy(scanner);
}
+