parser::abort_func(context, error);
}
-int config_parse(Context*, yyscan_t *);
-
-void Context::start()
-{
- config_parse(this, scanner);
-}
-
/* Line 189 of yacc.c */
-#line 116 "libmemcached/options/parser.cc"
+#line 109 "libmemcached/options/parser.cc"
/* Enabling traces. */
#ifndef YYDEBUG
/* Line 264 of yacc.c */
-#line 227 "libmemcached/options/parser.cc"
+#line 220 "libmemcached/options/parser.cc"
#ifdef short
# undef short
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 164, 164, 165, 169, 171, 173, 175, 180, 185,
- 189, 193, 204, 211, 214, 218, 222, 229, 236, 247,
- 254, 261, 268, 274, 278, 282, 286, 290, 294, 298,
- 302, 306, 310, 314, 318, 325, 329, 333, 337, 341,
- 345, 349, 353, 357, 361, 365, 369, 373, 377, 381,
- 388, 395, 405, 411, 417, 423, 429, 438, 442, 446,
- 450, 454, 458, 462, 466, 470, 477, 481, 489, 493,
- 497
+ 0, 157, 157, 158, 162, 164, 166, 168, 173, 178,
+ 182, 186, 197, 204, 207, 211, 215, 222, 229, 240,
+ 247, 254, 261, 267, 271, 275, 279, 283, 287, 291,
+ 295, 299, 303, 307, 311, 318, 322, 326, 330, 334,
+ 338, 342, 346, 350, 354, 358, 362, 366, 370, 374,
+ 381, 388, 398, 404, 410, 416, 422, 431, 435, 439,
+ 443, 447, 451, 455, 459, 463, 470, 474, 482, 486,
+ 490
};
#endif
case 4:
/* Line 1464 of yacc.c */
-#line 170 "libmemcached/options/parser.yy"
+#line 163 "libmemcached/options/parser.yy"
{ ;}
break;
case 5:
/* Line 1464 of yacc.c */
-#line 172 "libmemcached/options/parser.yy"
+#line 165 "libmemcached/options/parser.yy"
{ ;}
break;
case 6:
/* Line 1464 of yacc.c */
-#line 174 "libmemcached/options/parser.yy"
+#line 167 "libmemcached/options/parser.yy"
{ ;}
break;
case 7:
/* Line 1464 of yacc.c */
-#line 176 "libmemcached/options/parser.yy"
+#line 169 "libmemcached/options/parser.yy"
{
context->set_end();
YYACCEPT;
case 8:
/* Line 1464 of yacc.c */
-#line 181 "libmemcached/options/parser.yy"
+#line 174 "libmemcached/options/parser.yy"
{
context->rc= MEMCACHED_PARSE_USER_ERROR;
parser_abort(context, NULL);
case 9:
/* Line 1464 of yacc.c */
-#line 186 "libmemcached/options/parser.yy"
+#line 179 "libmemcached/options/parser.yy"
{
memcached_reset(context->memc);
;}
case 10:
/* Line 1464 of yacc.c */
-#line 190 "libmemcached/options/parser.yy"
+#line 183 "libmemcached/options/parser.yy"
{
yydebug= 1;
;}
case 11:
/* Line 1464 of yacc.c */
-#line 194 "libmemcached/options/parser.yy"
+#line 187 "libmemcached/options/parser.yy"
{
if ((context->rc= memcached_parse_configure_file(context->memc, (yyvsp[(3) - (3)].string).c_str, (yyvsp[(3) - (3)].string).length)) != MEMCACHED_SUCCESS)
{
case 12:
/* Line 1464 of yacc.c */
-#line 205 "libmemcached/options/parser.yy"
+#line 198 "libmemcached/options/parser.yy"
{
if ((context->rc= memcached_server_add_parsed(context->memc, (yyvsp[(2) - (2)].server).c_str, (yyvsp[(2) - (2)].server).length, (yyvsp[(2) - (2)].server).port, 0)) != MEMCACHED_SUCCESS)
{
case 13:
/* Line 1464 of yacc.c */
-#line 212 "libmemcached/options/parser.yy"
+#line 205 "libmemcached/options/parser.yy"
{
;}
break;
case 14:
/* Line 1464 of yacc.c */
-#line 215 "libmemcached/options/parser.yy"
+#line 208 "libmemcached/options/parser.yy"
{
memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).length);
;}
case 16:
/* Line 1464 of yacc.c */
-#line 223 "libmemcached/options/parser.yy"
+#line 216 "libmemcached/options/parser.yy"
{
if ((context->rc= memcached_set_prefix_key(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).length)) != MEMCACHED_SUCCESS)
{
case 17:
/* Line 1464 of yacc.c */
-#line 230 "libmemcached/options/parser.yy"
+#line 223 "libmemcached/options/parser.yy"
{
if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS)
{
case 18:
/* Line 1464 of yacc.c */
-#line 237 "libmemcached/options/parser.yy"
+#line 230 "libmemcached/options/parser.yy"
{
if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS)
{
case 19:
/* Line 1464 of yacc.c */
-#line 248 "libmemcached/options/parser.yy"
+#line 241 "libmemcached/options/parser.yy"
{
if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, (yyvsp[(2) - (2)].hash))) != MEMCACHED_SUCCESS)
{
case 20:
/* Line 1464 of yacc.c */
-#line 255 "libmemcached/options/parser.yy"
+#line 248 "libmemcached/options/parser.yy"
{
if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS)
{
case 21:
/* Line 1464 of yacc.c */
-#line 262 "libmemcached/options/parser.yy"
+#line 255 "libmemcached/options/parser.yy"
{
if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS)
{
case 22:
/* Line 1464 of yacc.c */
-#line 269 "libmemcached/options/parser.yy"
+#line 262 "libmemcached/options/parser.yy"
{
;}
break;
case 23:
/* Line 1464 of yacc.c */
-#line 275 "libmemcached/options/parser.yy"
+#line 268 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
;}
case 24:
/* Line 1464 of yacc.c */
-#line 279 "libmemcached/options/parser.yy"
+#line 272 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
;}
case 25:
/* Line 1464 of yacc.c */
-#line 283 "libmemcached/options/parser.yy"
+#line 276 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
;}
case 26:
/* Line 1464 of yacc.c */
-#line 287 "libmemcached/options/parser.yy"
+#line 280 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
;}
case 27:
/* Line 1464 of yacc.c */
-#line 291 "libmemcached/options/parser.yy"
+#line 284 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
;}
case 28:
/* Line 1464 of yacc.c */
-#line 295 "libmemcached/options/parser.yy"
+#line 288 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
;}
case 29:
/* Line 1464 of yacc.c */
-#line 299 "libmemcached/options/parser.yy"
+#line 292 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
;}
case 30:
/* Line 1464 of yacc.c */
-#line 303 "libmemcached/options/parser.yy"
+#line 296 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
;}
case 31:
/* Line 1464 of yacc.c */
-#line 307 "libmemcached/options/parser.yy"
+#line 300 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT;
;}
case 32:
/* Line 1464 of yacc.c */
-#line 311 "libmemcached/options/parser.yy"
+#line 304 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
;}
case 33:
/* Line 1464 of yacc.c */
-#line 315 "libmemcached/options/parser.yy"
+#line 308 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
;}
case 34:
/* Line 1464 of yacc.c */
-#line 319 "libmemcached/options/parser.yy"
+#line 312 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
;}
case 35:
/* Line 1464 of yacc.c */
-#line 326 "libmemcached/options/parser.yy"
+#line 319 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS;
;}
case 36:
/* Line 1464 of yacc.c */
-#line 330 "libmemcached/options/parser.yy"
+#line 323 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
;}
case 37:
/* Line 1464 of yacc.c */
-#line 334 "libmemcached/options/parser.yy"
+#line 327 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
;}
case 38:
/* Line 1464 of yacc.c */
-#line 338 "libmemcached/options/parser.yy"
+#line 331 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_CACHE_LOOKUPS;
;}
case 39:
/* Line 1464 of yacc.c */
-#line 342 "libmemcached/options/parser.yy"
+#line 335 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
;}
case 40:
/* Line 1464 of yacc.c */
-#line 346 "libmemcached/options/parser.yy"
+#line 339 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED;
;}
case 41:
/* Line 1464 of yacc.c */
-#line 350 "libmemcached/options/parser.yy"
+#line 343 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY;
;}
case 42:
/* Line 1464 of yacc.c */
-#line 354 "libmemcached/options/parser.yy"
+#line 347 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
;}
case 43:
/* Line 1464 of yacc.c */
-#line 358 "libmemcached/options/parser.yy"
+#line 351 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS;
;}
case 44:
/* Line 1464 of yacc.c */
-#line 362 "libmemcached/options/parser.yy"
+#line 355 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
;}
case 45:
/* Line 1464 of yacc.c */
-#line 366 "libmemcached/options/parser.yy"
+#line 359 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY;
;}
case 46:
/* Line 1464 of yacc.c */
-#line 370 "libmemcached/options/parser.yy"
+#line 363 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
;}
case 47:
/* Line 1464 of yacc.c */
-#line 374 "libmemcached/options/parser.yy"
+#line 367 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
;}
case 48:
/* Line 1464 of yacc.c */
-#line 378 "libmemcached/options/parser.yy"
+#line 371 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP;
;}
case 49:
/* Line 1464 of yacc.c */
-#line 382 "libmemcached/options/parser.yy"
+#line 375 "libmemcached/options/parser.yy"
{
(yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY;
;}
case 50:
/* Line 1464 of yacc.c */
-#line 389 "libmemcached/options/parser.yy"
+#line 382 "libmemcached/options/parser.yy"
{
if ((context->rc= memcached_server_add_parsed(context->memc, (yyvsp[(1) - (1)].server).c_str, (yyvsp[(1) - (1)].server).length, (yyvsp[(1) - (1)].server).port, 0)) != MEMCACHED_SUCCESS)
{
case 51:
/* Line 1464 of yacc.c */
-#line 396 "libmemcached/options/parser.yy"
+#line 389 "libmemcached/options/parser.yy"
{
if ((context->rc= memcached_server_add_parsed(context->memc, (yyvsp[(3) - (3)].server).c_str, (yyvsp[(3) - (3)].server).length, (yyvsp[(3) - (3)].server).port, 0)) != MEMCACHED_SUCCESS)
{
case 52:
/* Line 1464 of yacc.c */
-#line 406 "libmemcached/options/parser.yy"
+#line 399 "libmemcached/options/parser.yy"
{
(yyval.server).c_str= (yyvsp[(1) - (2)].string).c_str;
(yyval.server).length= (yyvsp[(1) - (2)].string).length -1; // -1 to remove :
case 53:
/* Line 1464 of yacc.c */
-#line 412 "libmemcached/options/parser.yy"
+#line 405 "libmemcached/options/parser.yy"
{
(yyval.server).c_str= (yyvsp[(1) - (1)].string).c_str;
(yyval.server).length= (yyvsp[(1) - (1)].string).length;
case 54:
/* Line 1464 of yacc.c */
-#line 418 "libmemcached/options/parser.yy"
+#line 411 "libmemcached/options/parser.yy"
{
(yyval.server).c_str= (yyvsp[(1) - (1)].string).c_str;
(yyval.server).length= (yyvsp[(1) - (1)].string).length;
case 55:
/* Line 1464 of yacc.c */
-#line 424 "libmemcached/options/parser.yy"
+#line 417 "libmemcached/options/parser.yy"
{
(yyval.server).c_str= (yyvsp[(1) - (2)].string).c_str;
(yyval.server).length= (yyvsp[(1) - (2)].string).length -1; // -1 to remove :
case 56:
/* Line 1464 of yacc.c */
-#line 430 "libmemcached/options/parser.yy"
+#line 423 "libmemcached/options/parser.yy"
{
(yyval.server).c_str= (yyvsp[(1) - (1)].string).c_str;
(yyval.server).length= (yyvsp[(1) - (1)].string).length;
case 57:
/* Line 1464 of yacc.c */
-#line 439 "libmemcached/options/parser.yy"
+#line 432 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_MD5;
;}
case 58:
/* Line 1464 of yacc.c */
-#line 443 "libmemcached/options/parser.yy"
+#line 436 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_CRC;
;}
case 59:
/* Line 1464 of yacc.c */
-#line 447 "libmemcached/options/parser.yy"
+#line 440 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_FNV1_64;
;}
case 60:
/* Line 1464 of yacc.c */
-#line 451 "libmemcached/options/parser.yy"
+#line 444 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_FNV1A_64;
;}
case 61:
/* Line 1464 of yacc.c */
-#line 455 "libmemcached/options/parser.yy"
+#line 448 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_FNV1_32;
;}
case 62:
/* Line 1464 of yacc.c */
-#line 459 "libmemcached/options/parser.yy"
+#line 452 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_FNV1A_32;
;}
case 63:
/* Line 1464 of yacc.c */
-#line 463 "libmemcached/options/parser.yy"
+#line 456 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_HSIEH;
;}
case 64:
/* Line 1464 of yacc.c */
-#line 467 "libmemcached/options/parser.yy"
+#line 460 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_MURMUR;
;}
case 65:
/* Line 1464 of yacc.c */
-#line 471 "libmemcached/options/parser.yy"
+#line 464 "libmemcached/options/parser.yy"
{
(yyval.hash)= MEMCACHED_HASH_JENKINS;
;}
case 66:
/* Line 1464 of yacc.c */
-#line 478 "libmemcached/options/parser.yy"
+#line 471 "libmemcached/options/parser.yy"
{
(yyval.string)= (yyvsp[(1) - (1)].string);
;}
case 67:
/* Line 1464 of yacc.c */
-#line 482 "libmemcached/options/parser.yy"
+#line 475 "libmemcached/options/parser.yy"
{
(yyval.string).c_str= (yyvsp[(1) - (1)].string).c_str +1; // +1 to move use passed the initial quote
(yyval.string).length= (yyvsp[(1) - (1)].string).length -1; // -1 removes the end quote
case 68:
/* Line 1464 of yacc.c */
-#line 490 "libmemcached/options/parser.yy"
+#line 483 "libmemcached/options/parser.yy"
{
(yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT;
;}
case 69:
/* Line 1464 of yacc.c */
-#line 494 "libmemcached/options/parser.yy"
+#line 487 "libmemcached/options/parser.yy"
{
(yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA;
;}
case 70:
/* Line 1464 of yacc.c */
-#line 498 "libmemcached/options/parser.yy"
+#line 491 "libmemcached/options/parser.yy"
{
(yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM;
;}
/* Line 1464 of yacc.c */
-#line 2172 "libmemcached/options/parser.cc"
+#line 2165 "libmemcached/options/parser.cc"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+/* Line 1684 of yacc.c */
+#line 496 "libmemcached/options/parser.yy"
+
+
+void Context::start()
+{
+ config_parse(this, (void **)scanner);
+}
+
+
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-fpermissive"
#include <libmemcached/options/context.h>
#include <libmemcached/options/parser.h>
-#line 19 "libmemcached/options/scanner.cc"
+#line 18 "libmemcached/options/scanner.cc"
#define YY_INT_ALIGNED short int
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
/* %if-not-reentrant */
/* %endif */
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
YY_BUFFER_STATE config__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE config__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
/* %endif */
static yyconst flex_int16_t yy_rule_linenum[96] =
{ 0,
- 77, 80, 82, 84, 88, 89, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
- 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
- 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
- 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
- 145, 146, 147, 148, 149, 151, 152, 154, 155, 156,
- 157, 158, 159, 161, 162, 165, 170, 171, 172, 174,
- 175, 176, 177, 178, 179, 180, 181, 182, 184, 190,
- 196, 202, 208, 214, 220
+ 76, 79, 81, 83, 87, 88, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 150, 151, 153, 154, 155,
+ 156, 157, 158, 160, 161, 164, 169, 170, 171, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 183, 189,
+ 195, 201, 207, 213, 219
} ;
* Libmemcached Scanner and Parser
*
* Copyright (C) 2011 DataDifferental, http://datadifferential.com
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#line 38 "libmemcached/options/scanner.l"
+#line 37 "libmemcached/options/scanner.l"
#include <cstdlib>
#include <cstring>
#define PARAM config_get_extra(yyscanner)
-static void get_lex_chars(char* buffer, int& result, int max_size, Context *context)
-{
- if (context->pos >= context->length)
- {
- result= YY_NULL;
- }
- else
- {
- result= context->length - context->pos;
- result > (int)max_size ? result = max_size : 0;
- memcpy(buffer, context->buf + context->pos, result);
- context->pos += result;
- }
+#define get_lex_chars(buffer, result, max_size, context) \
+{ \
+ if (context->pos >= context->length) \
+ { \
+ result= YY_NULL; \
+ } \
+ else \
+ { \
+ result= context->length - context->pos; \
+ result > max_size ? result = max_size : 0; \
+ memcpy(buffer, context->buf + context->pos, result); \
+ context->pos += result; \
+ } \
}
#define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
-#line 1362 "libmemcached/options/scanner.cc"
+#line 1361 "libmemcached/options/scanner.cc"
#define INITIAL 0
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
void config_set_out (FILE * out_str ,yyscan_t yyscanner );
-int config_get_leng (yyscan_t yyscanner );
+yy_size_t config_get_leng (yyscan_t yyscanner );
char *config_get_text (yyscan_t yyscanner );
void config_set_lineno (int line_number ,yyscan_t yyscanner );
-int config_get_column (yyscan_t yyscanner );
-
-void config_set_column (int column_no ,yyscan_t yyscanner );
-
/* %if-bison-bridge */
YYSTYPE * config_get_lval (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO fwrite( yytext, yyleng, 1, yyout )
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* %% [7.0] user's declarations go here */
-#line 74 "libmemcached/options/scanner.l"
+#line 73 "libmemcached/options/scanner.l"
-#line 1669 "libmemcached/options/scanner.cc"
+#line 1664 "libmemcached/options/scanner.cc"
yylval = yylval_param;
case 1:
YY_RULE_SETUP
-#line 77 "libmemcached/options/scanner.l"
+#line 76 "libmemcached/options/scanner.l"
{ return yytext[0];}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 80 "libmemcached/options/scanner.l"
+#line 79 "libmemcached/options/scanner.l"
{ yylval->number = atoi(yytext); return (NUMBER); }
YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 82 "libmemcached/options/scanner.l"
+#line 81 "libmemcached/options/scanner.l"
; /* skip whitespace */
YY_BREAK
case 4:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 84 "libmemcached/options/scanner.l"
+#line 83 "libmemcached/options/scanner.l"
{
return COMMENT;
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 88 "libmemcached/options/scanner.l"
+#line 87 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SERVER; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 89 "libmemcached/options/scanner.l"
+#line 88 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SERVERS_OPTION; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 91 "libmemcached/options/scanner.l"
+#line 90 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return VERIFY_KEY; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 92 "libmemcached/options/scanner.l"
+#line 91 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return VERIFY_KEY; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 93 "libmemcached/options/scanner.l"
+#line 92 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return AUTO_EJECT_HOSTS; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 94 "libmemcached/options/scanner.l"
+#line 93 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return AUTO_EJECT_HOSTS; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 95 "libmemcached/options/scanner.l"
+#line 94 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return BINARY_PROTOCOL; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 96 "libmemcached/options/scanner.l"
+#line 95 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return BINARY_PROTOCOL; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 97 "libmemcached/options/scanner.l"
+#line 96 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return BUFFER_REQUESTS; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 98 "libmemcached/options/scanner.l"
+#line 97 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return BUFFER_REQUESTS; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 99 "libmemcached/options/scanner.l"
+#line 98 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return CACHE_LOOKUPS; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 100 "libmemcached/options/scanner.l"
+#line 99 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return CACHE_LOOKUPS; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 101 "libmemcached/options/scanner.l"
+#line 100 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return CONFIGURE_FILE; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 102 "libmemcached/options/scanner.l"
+#line 101 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return CONFIGURE_FILE; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 103 "libmemcached/options/scanner.l"
+#line 102 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return CONNECT_TIMEOUT; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 104 "libmemcached/options/scanner.l"
+#line 103 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return CONNECT_TIMEOUT; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 105 "libmemcached/options/scanner.l"
+#line 104 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return DISTRIBUTION; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 106 "libmemcached/options/scanner.l"
+#line 105 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return HASH; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 107 "libmemcached/options/scanner.l"
+#line 106 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return HASH_WITH_PREFIX_KEY; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 108 "libmemcached/options/scanner.l"
+#line 107 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return HASH_WITH_PREFIX_KEY; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 109 "libmemcached/options/scanner.l"
+#line 108 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return IO_BYTES_WATERMARK; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 110 "libmemcached/options/scanner.l"
+#line 109 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return IO_BYTES_WATERMARK; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 111 "libmemcached/options/scanner.l"
+#line 110 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return IO_KEY_PREFETCH; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 112 "libmemcached/options/scanner.l"
+#line 111 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return IO_KEY_PREFETCH; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 113 "libmemcached/options/scanner.l"
+#line 112 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return IO_MSG_WATERMARK; }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 114 "libmemcached/options/scanner.l"
+#line 113 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return IO_MSG_WATERMARK; }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 115 "libmemcached/options/scanner.l"
+#line 114 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return KETAMA_WEIGHTED; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 116 "libmemcached/options/scanner.l"
+#line 115 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return KETAMA_WEIGHTED; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 117 "libmemcached/options/scanner.l"
+#line 116 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return NOREPLY; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 118 "libmemcached/options/scanner.l"
+#line 117 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return NUMBER_OF_REPLICAS; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 119 "libmemcached/options/scanner.l"
+#line 118 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return NUMBER_OF_REPLICAS; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 120 "libmemcached/options/scanner.l"
+#line 119 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return POLL_TIMEOUT; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 121 "libmemcached/options/scanner.l"
+#line 120 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return POLL_TIMEOUT; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 122 "libmemcached/options/scanner.l"
+#line 121 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return RANDOMIZE_REPLICA_READ; }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 123 "libmemcached/options/scanner.l"
+#line 122 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return RANDOMIZE_REPLICA_READ; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 124 "libmemcached/options/scanner.l"
+#line 123 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return RCV_TIMEOUT; }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 125 "libmemcached/options/scanner.l"
+#line 124 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return RCV_TIMEOUT; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 126 "libmemcached/options/scanner.l"
+#line 125 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return RETRY_TIMEOUT; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 127 "libmemcached/options/scanner.l"
+#line 126 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return RETRY_TIMEOUT; }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 128 "libmemcached/options/scanner.l"
+#line 127 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SERVER_FAILURE_LIMIT; }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 129 "libmemcached/options/scanner.l"
+#line 128 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SERVER_FAILURE_LIMIT; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 130 "libmemcached/options/scanner.l"
+#line 129 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SND_TIMEOUT; }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 131 "libmemcached/options/scanner.l"
+#line 130 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SND_TIMEOUT; }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 132 "libmemcached/options/scanner.l"
+#line 131 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SOCKET_RECV_SIZE; }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 133 "libmemcached/options/scanner.l"
+#line 132 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SOCKET_RECV_SIZE; }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 134 "libmemcached/options/scanner.l"
+#line 133 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SOCKET_SEND_SIZE; }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 135 "libmemcached/options/scanner.l"
+#line 134 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SOCKET_SEND_SIZE; }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 136 "libmemcached/options/scanner.l"
+#line 135 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SORT_HOSTS; }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 137 "libmemcached/options/scanner.l"
+#line 136 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SORT_HOSTS; }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 138 "libmemcached/options/scanner.l"
+#line 137 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SUPPORT_CAS; }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 139 "libmemcached/options/scanner.l"
+#line 138 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SUPPORT_CAS; }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 140 "libmemcached/options/scanner.l"
+#line 139 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return _TCP_NODELAY; }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 141 "libmemcached/options/scanner.l"
+#line 140 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return _TCP_NODELAY; }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 142 "libmemcached/options/scanner.l"
+#line 141 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return _TCP_KEEPALIVE; }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 143 "libmemcached/options/scanner.l"
+#line 142 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return _TCP_KEEPALIVE; }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 144 "libmemcached/options/scanner.l"
+#line 143 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return _TCP_KEEPIDLE; }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 145 "libmemcached/options/scanner.l"
+#line 144 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return _TCP_KEEPIDLE; }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 146 "libmemcached/options/scanner.l"
+#line 145 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return USER_DATA; }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 147 "libmemcached/options/scanner.l"
+#line 146 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return USER_DATA; }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 148 "libmemcached/options/scanner.l"
+#line 147 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return USE_UDP; }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 149 "libmemcached/options/scanner.l"
+#line 148 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return USE_UDP; }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 151 "libmemcached/options/scanner.l"
+#line 150 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return PREFIX_KEY; }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 152 "libmemcached/options/scanner.l"
+#line 151 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return PREFIX_KEY; }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 154 "libmemcached/options/scanner.l"
+#line 153 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return INCLUDE; }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 155 "libmemcached/options/scanner.l"
+#line 154 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return RESET; }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 156 "libmemcached/options/scanner.l"
+#line 155 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return PARSER_DEBUG; }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 157 "libmemcached/options/scanner.l"
+#line 156 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return SERVERS; }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 158 "libmemcached/options/scanner.l"
+#line 157 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return END; }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 159 "libmemcached/options/scanner.l"
+#line 158 "libmemcached/options/scanner.l"
{ yyextra->begin= yytext; return ERROR; }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 161 "libmemcached/options/scanner.l"
+#line 160 "libmemcached/options/scanner.l"
{ return TRUE; }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 162 "libmemcached/options/scanner.l"
+#line 161 "libmemcached/options/scanner.l"
{ return FALSE; }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 165 "libmemcached/options/scanner.l"
+#line 164 "libmemcached/options/scanner.l"
{
yyextra->begin= yytext;
return UNKNOWN_OPTION;
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 170 "libmemcached/options/scanner.l"
+#line 169 "libmemcached/options/scanner.l"
{ return CONSISTENT; }
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 171 "libmemcached/options/scanner.l"
+#line 170 "libmemcached/options/scanner.l"
{ return MODULA; }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 172 "libmemcached/options/scanner.l"
+#line 171 "libmemcached/options/scanner.l"
{ return RANDOM; }
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 174 "libmemcached/options/scanner.l"
+#line 173 "libmemcached/options/scanner.l"
{ return MD5; }
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 175 "libmemcached/options/scanner.l"
+#line 174 "libmemcached/options/scanner.l"
{ return CRC; }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 176 "libmemcached/options/scanner.l"
+#line 175 "libmemcached/options/scanner.l"
{ return FNV1_64; }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 177 "libmemcached/options/scanner.l"
+#line 176 "libmemcached/options/scanner.l"
{ return FNV1A_64; }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 178 "libmemcached/options/scanner.l"
+#line 177 "libmemcached/options/scanner.l"
{ return FNV1_32; }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 179 "libmemcached/options/scanner.l"
+#line 178 "libmemcached/options/scanner.l"
{ return FNV1A_32; }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 180 "libmemcached/options/scanner.l"
+#line 179 "libmemcached/options/scanner.l"
{ return HSIEH; }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 181 "libmemcached/options/scanner.l"
+#line 180 "libmemcached/options/scanner.l"
{ return MURMUR; }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 182 "libmemcached/options/scanner.l"
+#line 181 "libmemcached/options/scanner.l"
{ return JENKINS; }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 184 "libmemcached/options/scanner.l"
-{
+#line 183 "libmemcached/options/scanner.l"
+{
yylval->string.c_str = yytext;
yylval->string.length = yyleng;
return HOSTNAME_WITH_PORT;
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 190 "libmemcached/options/scanner.l"
-{
+#line 189 "libmemcached/options/scanner.l"
+{
yylval->string.c_str = yytext;
yylval->string.length = yyleng;
return HOSTNAME;
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 196 "libmemcached/options/scanner.l"
+#line 195 "libmemcached/options/scanner.l"
{
yylval->string.c_str = yytext;
yylval->string.length = yyleng;
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 202 "libmemcached/options/scanner.l"
+#line 201 "libmemcached/options/scanner.l"
{
yylval->string.c_str = yytext;
yylval->string.length = yyleng;
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 208 "libmemcached/options/scanner.l"
-{
+#line 207 "libmemcached/options/scanner.l"
+{
yylval->string.c_str = yytext;
yylval->string.length = yyleng;
return STRING;
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 214 "libmemcached/options/scanner.l"
+#line 213 "libmemcached/options/scanner.l"
{
yylval->string.c_str = yytext;
yylval->string.length = yyleng;
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 220 "libmemcached/options/scanner.l"
+#line 219 "libmemcached/options/scanner.l"
{
yyextra->begin= yytext;
return UNKNOWN;
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 225 "libmemcached/options/scanner.l"
+#line 224 "libmemcached/options/scanner.l"
ECHO;
YY_BREAK
-#line 2302 "libmemcached/options/scanner.cc"
+#line 2297 "libmemcached/options/scanner.cc"
case YY_STATE_EOF(INITIAL):
yyterminate();
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
case EOB_ACT_END_OF_FILE:
{
if ( config_wrap(yyscanner ) )
- return EOF;
+ return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
/* %if-c++-only */
/* %endif */
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE config__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE config__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int config_get_leng (yyscan_t yyscanner)
+yy_size_t config_get_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
/* %ok-for-header */
-#line 225 "libmemcached/options/scanner.l"
+#line 224 "libmemcached/options/scanner.l"