projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge lp:~tangent-org/libmemcached/1.0-build Build: jenkins-Libmemcached-1.0-115
[m6w6/libmemcached]
/
libmemcached
/
csl
/
scanner.l
diff --git
a/libmemcached/csl/scanner.l
b/libmemcached/csl/scanner.l
index 8e404b5f9531aa3bd659be5ff3c3de853059bd72..e35008a8da37f768e1f5c62206b84738a6098f33 100644
(file)
--- a/
libmemcached/csl/scanner.l
+++ b/
libmemcached/csl/scanner.l
@@
-47,9
+47,19
@@
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wmissing-declarations"
+#pragma GCC diagnostic ignored "-Wunused-result"
+#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#endif
#endif
-#define YY_NO_INPUT
+#ifdef __clang__
+#pragma GCC diagnostic ignored "-Wshorten-64-to-32"
+#endif
+
+#ifndef __INTEL_COMPILER
+#ifndef __clang__
+#pragma GCC diagnostic ignored "-Wlogical-op"
+#endif
+#endif
#define YY_EXTRA_TYPE Context*
#define YY_EXTRA_TYPE Context*
@@
-57,9
+67,6
@@
%{
%{
-#include <cstdlib>
-#include <cstring>
-
#define PARAM yyget_extra(yyscanner)
#define get_lex_chars(buffer, result, max_size, context) \
#define PARAM yyget_extra(yyscanner)
#define get_lex_chars(buffer, result, max_size, context) \
@@
-77,6
+84,10
@@
} \
}
} \
}
+#define YY_FATAL_ERROR(msg) \
+{ \
+}
+
#define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
#define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
@@
-84,14
+95,16
@@
%option 8bit
%option bison-bridge
%option 8bit
%option bison-bridge
+%option never-interactive
%option case-insensitive
%option case-insensitive
-%option
debug
+%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 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
%%
%%
@@
-113,7
+126,7
@@
"--SERVER=" { yyextra->begin= yytext; yyextra->set_server(); return yyextra->previous_token= SERVER; }
"--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; }
"--BINARY-PROTOCOL" { yyextra->begin= yytext; return yyextra->previous_token= BINARY_PROTOCOL; }
"--BUFFER-REQUESTS" { yyextra->begin= yytext; return yyextra->previous_token= BUFFER_REQUESTS; }
@@
-156,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; }
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:]]* {
"--"[[:alnum:]]* {
@@
-182,36
+195,26
@@
MURMUR { return MURMUR; }
JENKINS { return JENKINS; }
(([[:digit:]]{1,3}"."){3}([[:digit:]]{1,3})) {
JENKINS { return JENKINS; }
(([[:digit:]]{1,3}"."){3}([[:digit:]]{1,3})) {
- yylval->server.port= MEMCACHED_DEFAULT_PORT;
- yylval->server.weight= 1;
- yylval->server.c_str= yyextra->set_hostname(yytext, yyleng);
- if (yylval->server.c_str)
- yylval->server.size= yyleng;
+ yyextra->hostname(yytext, yyleng, yylval->server);
return IPADDRESS;
}
[[:alnum:]]["."[:alnum:]_-]+[[:alnum:]] {
if (yyextra->is_server())
{
return IPADDRESS;
}
[[:alnum:]]["."[:alnum:]_-]+[[:alnum:]] {
if (yyextra->is_server())
{
- yylval->server.port= MEMCACHED_DEFAULT_PORT;
- yylval->server.weight= 1;
- yylval->server.c_str= yyextra->set_hostname(yytext, yyleng);
- if (yylval->server.c_str)
- yylval->server.size= yyleng;
+ yyextra->hostname(yytext, yyleng, yylval->server);
return HOSTNAME;
}
return HOSTNAME;
}
- yylval->string.c_str = yytext;
- yylval->string.size = yyleng;
+ yyextra->string_buffer(yytext, yyleng, yylval->string);
return STRING;
}
L?\"(\\.|[^\\"])*\" {
yyget_text(yyscanner)[yyleng -1]= 0;
return STRING;
}
L?\"(\\.|[^\\"])*\" {
yyget_text(yyscanner)[yyleng -1]= 0;
- yylval->string.c_str= yytext +1;
- yylval->string.size= yyleng -2;
+ yyextra->string_buffer(yytext +1, yyleng -2, yylval->string);
return QUOTED_STRING;
}
return QUOTED_STRING;
}
@@
-230,6
+233,7
@@
void Context::init_scanner()
void Context::destroy_scanner()
{
void Context::destroy_scanner()
{
+ (void)yy_fatal_error; // Removes warning about unused yy_fatal_error()
yylex_destroy(scanner);
}
yylex_destroy(scanner);
}