1 /* A Bison parser, made by GNU Bison 2.4.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6 2009, 2010 Free Software Foundation, Inc.
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
37 /* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
44 /* Identify Bison output. */
48 #define YYBISON_VERSION "2.4.3"
51 #define YYSKELETON_NAME "yacc.c"
62 /* Using locations. */
63 #define YYLSP_NEEDED 0
65 /* Substitute the variable and function names. */
66 #define yyparse config_parse
67 #define yylex config_lex
68 #define yyerror config_error
69 #define yylval config_lval
70 #define yychar config_char
71 #define yydebug config_debug
72 #define yynerrs config_nerrs
75 /* Copy the first part of user declarations. */
77 /* Line 189 of yacc.c */
78 #line 36 "libmemcached/csl/parser.yy"
81 #include <libmemcached/csl/common.h>
82 #include <libmemcached/options.hpp>
84 #include <libmemcached/csl/context.h>
85 #include <libmemcached/csl/symbol.h>
86 #include <libmemcached/csl/scanner.h>
88 #pragma GCC diagnostic ignored "-Wold-style-cast"
90 int conf_lex(YYSTYPE
* lvalp
, void* scanner
);
92 #define select_yychar(__context) yychar == UNKNOWN ? ( (__context)->previous_token == END ? UNKNOWN : (__context)->previous_token ) : yychar
94 #define stryytname(__yytokentype) ((__yytokentype) < YYNTOKENS ) ? yytname[(__yytokentype)] : ""
96 #define parser_abort(__context, __error_message) do { (__context)->abort((__error_message), yytokentype(select_yychar(__context)), stryytname(YYTRANSLATE(select_yychar(__context)))); YYABORT; } while (0)
98 // This is bison calling error.
99 inline void __config_error(Context
*context
, yyscan_t
*scanner
, const char *error
, int last_token
, const char *last_token_str
)
101 if (not context
->end())
103 context
->error(error
, yytokentype(last_token
), last_token_str
);
107 context
->error(error
, yytokentype(last_token
), last_token_str
);
111 #define config_error(__context, __scanner, __error_msg) do { __config_error((__context), (__scanner), (__error_msg), select_yychar(__context), stryytname(YYTRANSLATE(select_yychar(__context)))); } while (0)
116 /* Line 189 of yacc.c */
117 #line 118 "libmemcached/csl/parser.cc"
119 /* Enabling traces. */
124 /* Enabling verbose error messages. */
125 #ifdef YYERROR_VERBOSE
126 # undef YYERROR_VERBOSE
127 # define YYERROR_VERBOSE 1
129 # define YYERROR_VERBOSE 1
132 /* Enabling the token table. */
133 #ifndef YYTOKEN_TABLE
134 # define YYTOKEN_TABLE 0
141 /* Put the tokens into the symbol table, so that GDB and other debuggers
150 CONFIGURE_FILE
= 264,
155 SERVERS_OPTION
= 269,
156 UNKNOWN_OPTION
= 270,
158 BINARY_PROTOCOL
= 272,
159 BUFFER_REQUESTS
= 273,
160 CONNECT_TIMEOUT
= 274,
163 HASH_WITH_NAMESPACE
= 277,
164 IO_BYTES_WATERMARK
= 278,
165 IO_KEY_PREFETCH
= 279,
166 IO_MSG_WATERMARK
= 280,
168 KETAMA_WEIGHTED
= 282,
170 NUMBER_OF_REPLICAS
= 284,
172 RANDOMIZE_REPLICA_READ
= 286,
174 REMOVE_FAILED_SERVERS
= 288,
177 SOCKET_RECV_SIZE
= 291,
178 SOCKET_SEND_SIZE
= 292,
184 _TCP_KEEPALIVE
= 298,
218 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
220 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
221 # define YYSTYPE_IS_DECLARED 1
225 /* Copy the second part of user declarations. */
228 /* Line 264 of yacc.c */
229 #line 230 "libmemcached/csl/parser.cc"
236 typedef YYTYPE_UINT8 yytype_uint8
;
238 typedef unsigned char yytype_uint8
;
242 typedef YYTYPE_INT8 yytype_int8
;
243 #elif (defined __STDC__ || defined __C99__FUNC__ \
244 || defined __cplusplus || defined _MSC_VER)
245 typedef signed char yytype_int8
;
247 typedef short int yytype_int8
;
251 typedef YYTYPE_UINT16 yytype_uint16
;
253 typedef unsigned short int yytype_uint16
;
257 typedef YYTYPE_INT16 yytype_int16
;
259 typedef short int yytype_int16
;
263 # ifdef __SIZE_TYPE__
264 # define YYSIZE_T __SIZE_TYPE__
265 # elif defined size_t
266 # define YYSIZE_T size_t
267 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
268 || defined __cplusplus || defined _MSC_VER)
269 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
270 # define YYSIZE_T size_t
272 # define YYSIZE_T unsigned int
276 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
279 # if defined YYENABLE_NLS && YYENABLE_NLS
281 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
282 # define YY_(msgid) dgettext ("bison-runtime", msgid)
286 # define YY_(msgid) msgid
290 /* Suppress unused-variable warnings by "using" E. */
291 #if ! defined lint || defined __GNUC__
292 # define YYUSE(e) ((void) (e))
294 # define YYUSE(e) /* empty */
297 /* Identity function, used to suppress warnings about constant conditions. */
301 #if (defined __STDC__ || defined __C99__FUNC__ \
302 || defined __cplusplus || defined _MSC_VER)
315 #if ! defined yyoverflow || YYERROR_VERBOSE
317 /* The parser invokes alloca or malloc; define the necessary symbols. */
319 # ifdef YYSTACK_USE_ALLOCA
320 # if YYSTACK_USE_ALLOCA
322 # define YYSTACK_ALLOC __builtin_alloca
323 # elif defined __BUILTIN_VA_ARG_INCR
324 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
326 # define YYSTACK_ALLOC __alloca
327 # elif defined _MSC_VER
328 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
329 # define alloca _alloca
331 # define YYSTACK_ALLOC alloca
332 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
333 || defined __cplusplus || defined _MSC_VER)
334 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
343 # ifdef YYSTACK_ALLOC
344 /* Pacify GCC's `empty if-body' warning. */
345 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
346 # ifndef YYSTACK_ALLOC_MAXIMUM
347 /* The OS might guarantee only one guard page at the bottom of the stack,
348 and a page size can be as small as 4096 bytes. So we cannot safely
349 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
350 to allow for a few compiler-allocated temporary stack slots. */
351 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
354 # define YYSTACK_ALLOC YYMALLOC
355 # define YYSTACK_FREE YYFREE
356 # ifndef YYSTACK_ALLOC_MAXIMUM
357 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
359 # if (defined __cplusplus && ! defined _STDLIB_H \
360 && ! ((defined YYMALLOC || defined malloc) \
361 && (defined YYFREE || defined free)))
362 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
368 # define YYMALLOC malloc
369 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
370 || defined __cplusplus || defined _MSC_VER)
371 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
376 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
377 || defined __cplusplus || defined _MSC_VER)
378 void free (void *); /* INFRINGES ON USER NAME SPACE */
382 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
385 #if (! defined yyoverflow \
386 && (! defined __cplusplus \
387 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
389 /* A type that is properly aligned for any stack member. */
392 yytype_int16 yyss_alloc
;
396 /* The size of the maximum gap between one aligned stack and the next. */
397 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
399 /* The size of an array large to enough to hold all stacks, each with
401 # define YYSTACK_BYTES(N) \
402 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
403 + YYSTACK_GAP_MAXIMUM)
405 /* Copy COUNT objects from FROM to TO. The source and destination do
408 # if defined __GNUC__ && 1 < __GNUC__
409 # define YYCOPY(To, From, Count) \
410 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
412 # define YYCOPY(To, From, Count) \
416 for (yyi = 0; yyi < (Count); yyi++) \
417 (To)[yyi] = (From)[yyi]; \
423 /* Relocate STACK from its old location to the new one. The
424 local variables YYSIZE and YYSTACKSIZE give the old and new number of
425 elements in the stack, and YYPTR gives the new location of the
426 stack. Advance YYPTR to a properly aligned location for the next
428 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
431 YYSIZE_T yynewbytes; \
432 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
433 Stack = &yyptr->Stack_alloc; \
434 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
435 yyptr += yynewbytes / sizeof (*yyptr); \
441 /* YYFINAL -- State number of the termination state. */
443 /* YYLAST -- Last index in YYTABLE. */
446 /* YYNTOKENS -- Number of terminals. */
448 /* YYNNTS -- Number of nonterminals. */
450 /* YYNRULES -- Number of rules. */
452 /* YYNRULES -- Number of states. */
455 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
457 #define YYMAXUTOK 326
459 #define YYTRANSLATE(YYX) \
460 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
462 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
463 static const yytype_uint8 yytranslate
[] =
465 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 2, 74, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 63, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 64, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
480 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
484 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
485 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
486 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
488 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
490 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
491 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
492 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
493 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
494 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
495 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
496 55, 56, 57, 58, 59, 60, 61, 62, 65, 66,
497 67, 68, 69, 70, 71, 72, 73
501 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
503 static const yytype_uint8 yyprhs
[] =
505 0, 0, 3, 5, 9, 11, 13, 15, 17, 19,
506 21, 23, 27, 32, 37, 41, 44, 47, 50, 52,
507 55, 58, 63, 66, 69, 71, 73, 75, 77, 79,
508 81, 83, 85, 87, 89, 91, 93, 95, 97, 99,
509 101, 103, 105, 107, 109, 111, 113, 115, 117, 119,
510 121, 122, 124, 125, 127, 129, 131, 133, 135, 137,
511 139, 141, 143, 145, 147, 149, 151, 153
514 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
515 static const yytype_int8 yyrhs
[] =
517 76, 0, -1, 77, -1, 76, 74, 77, -1, 78,
518 -1, 3, -1, 10, -1, 4, -1, 5, -1, 6,
519 -1, 7, -1, 8, 74, 85, -1, 11, 70, 82,
520 83, -1, 11, 69, 82, 83, -1, 12, 85, 83,
521 -1, 9, 85, -1, 47, 66, -1, 48, 66, -1,
522 79, -1, 46, 85, -1, 20, 86, -1, 20, 86,
523 63, 84, -1, 21, 84, -1, 80, 66, -1, 81,
524 -1, 40, -1, 33, -1, 19, -1, 25, -1, 23,
525 -1, 24, -1, 29, -1, 30, -1, 32, -1, 34,
526 -1, 35, -1, 36, -1, 37, -1, 17, -1, 18,
527 -1, 22, -1, 28, -1, 31, -1, 38, -1, 39,
528 -1, 45, -1, 43, -1, 44, -1, 41, -1, 42,
529 -1, -1, 67, -1, -1, 68, -1, 49, -1, 50,
530 -1, 51, -1, 52, -1, 53, -1, 54, -1, 55,
531 -1, 56, -1, 57, -1, 71, -1, 72, -1, 58,
535 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
536 static const yytype_uint16 yyrline
[] =
538 0, 170, 170, 171, 175, 177, 179, 181, 186, 191,
539 195, 199, 210, 218, 226, 233, 237, 241, 245, 249,
540 256, 263, 274, 281, 288, 295, 301, 305, 309, 313,
541 317, 321, 325, 329, 333, 337, 341, 345, 352, 356,
542 360, 364, 368, 372, 376, 380, 384, 388, 392, 396,
543 403, 404, 409, 410, 415, 419, 423, 427, 431, 435,
544 439, 443, 447, 454, 458, 465, 469, 473
548 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
549 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
550 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
551 static const char *const yytname
[] =
553 "$end", "error", "$undefined", "COMMENT", "END", "ERROR", "RESET",
554 "PARSER_DEBUG", "INCLUDE", "CONFIGURE_FILE", "EMPTY_LINE", "SERVER",
555 "SOCKET", "SERVERS", "SERVERS_OPTION", "UNKNOWN_OPTION", "UNKNOWN",
556 "BINARY_PROTOCOL", "BUFFER_REQUESTS", "CONNECT_TIMEOUT", "DISTRIBUTION",
557 "HASH", "HASH_WITH_NAMESPACE", "IO_BYTES_WATERMARK", "IO_KEY_PREFETCH",
558 "IO_MSG_WATERMARK", "KETAMA_HASH", "KETAMA_WEIGHTED", "NOREPLY",
559 "NUMBER_OF_REPLICAS", "POLL_TIMEOUT", "RANDOMIZE_REPLICA_READ",
560 "RCV_TIMEOUT", "REMOVE_FAILED_SERVERS", "RETRY_TIMEOUT", "SND_TIMEOUT",
561 "SOCKET_RECV_SIZE", "SOCKET_SEND_SIZE", "SORT_HOSTS", "SUPPORT_CAS",
562 "USER_DATA", "USE_UDP", "VERIFY_KEY", "_TCP_KEEPALIVE", "_TCP_KEEPIDLE",
563 "_TCP_NODELAY", "NAMESPACE", "POOL_MIN", "POOL_MAX", "MD5", "CRC",
564 "FNV1_64", "FNV1A_64", "FNV1_32", "FNV1A_32", "HSIEH", "MURMUR",
565 "JENKINS", "CONSISTENT", "MODULA", "RANDOM", "TRUE", "FALSE", "','",
566 "'='", "FLOAT", "NUMBER", "PORT", "WEIGHT_START", "IPADDRESS",
567 "HOSTNAME", "STRING", "QUOTED_STRING", "FILE_PATH", "' '", "$accept",
568 "begin", "statement", "expression", "behaviors", "behavior_number",
569 "behavior_boolean", "optional_port", "optional_weight", "hash", "string",
575 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
577 static const yytype_uint16 yytoknum
[] =
579 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
580 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
581 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
582 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
583 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
584 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
585 315, 316, 317, 44, 61, 318, 319, 320, 321, 322,
586 323, 324, 325, 326, 32
590 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
591 static const yytype_uint8 yyr1
[] =
593 0, 75, 76, 76, 77, 77, 77, 77, 77, 77,
594 77, 77, 78, 78, 78, 78, 78, 78, 78, 79,
595 79, 79, 79, 79, 79, 79, 80, 80, 80, 80,
596 80, 80, 80, 80, 80, 80, 80, 80, 81, 81,
597 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
598 82, 82, 83, 83, 84, 84, 84, 84, 84, 84,
599 84, 84, 84, 85, 85, 86, 86, 86
602 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
603 static const yytype_uint8 yyr2
[] =
605 0, 2, 1, 3, 1, 1, 1, 1, 1, 1,
606 1, 3, 4, 4, 3, 2, 2, 2, 1, 2,
607 2, 4, 2, 2, 1, 1, 1, 1, 1, 1,
608 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
609 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
610 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,
611 1, 1, 1, 1, 1, 1, 1, 1
614 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
615 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
616 means the default is an error. */
617 static const yytype_uint8 yydefact
[] =
619 0, 5, 7, 8, 9, 10, 0, 0, 6, 0,
620 0, 38, 39, 27, 0, 0, 40, 29, 30, 28,
621 41, 31, 32, 42, 33, 26, 34, 35, 36, 37,
622 43, 44, 25, 48, 49, 46, 47, 45, 0, 0,
623 0, 0, 2, 4, 18, 0, 24, 0, 63, 64,
624 15, 50, 50, 52, 65, 66, 67, 20, 54, 55,
625 56, 57, 58, 59, 60, 61, 62, 22, 19, 16,
626 17, 1, 0, 23, 11, 51, 52, 52, 53, 14,
630 /* YYDEFGOTO[NTERM-NUM]. */
631 static const yytype_int8 yydefgoto
[] =
633 -1, 41, 42, 43, 44, 45, 46, 76, 79, 67,
637 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
639 #define YYPACT_NINF -61
640 static const yytype_int8 yypact
[] =
642 -2, -61, -61, -61, -61, -61, -60, -24, -61, -20,
643 -24, -61, -61, -61, -47, 13, -61, -61, -61, -61,
644 -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
645 -61, -61, -61, -61, -61, -61, -61, -61, -24, -41,
646 -15, 0, -61, -61, -61, -11, -61, -24, -61, -61,
647 -61, -10, -10, -12, -61, -61, -61, -5, -61, -61,
648 -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
649 -61, -61, -2, -61, -61, -61, -12, -12, -61, -61,
650 13, -61, -61, -61, -61
653 /* YYPGOTO[NTERM-NUM]. */
654 static const yytype_int8 yypgoto
[] =
656 -61, -61, -13, -61, -61, -61, -61, 8, -23, -9,
660 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
661 positive, shift that token. If negative, reduce the rule which
662 number is the opposite. If zero, do what YYDEFACT says.
663 If YYTABLE_NINF, syntax error. */
664 #define YYTABLE_NINF -1
665 static const yytype_uint8 yytable
[] =
667 71, 1, 2, 3, 4, 5, 6, 7, 8, 9,
668 10, 54, 55, 56, 47, 11, 12, 13, 14, 15,
669 16, 17, 18, 19, 53, 69, 20, 21, 22, 23,
670 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
671 34, 35, 36, 37, 38, 39, 40, 48, 49, 51,
672 52, 70, 68, 82, 83, 73, 78, 75, 80, 81,
673 77, 74, 58, 59, 60, 61, 62, 63, 64, 65,
677 static const yytype_int8 yycheck
[] =
679 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
680 12, 58, 59, 60, 74, 17, 18, 19, 20, 21,
681 22, 23, 24, 25, 10, 66, 28, 29, 30, 31,
682 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
683 42, 43, 44, 45, 46, 47, 48, 71, 72, 69,
684 70, 66, 38, 76, 77, 66, 68, 67, 63, 72,
685 52, 47, 49, 50, 51, 52, 53, 54, 55, 56,
689 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
690 symbol of state STATE-NUM. */
691 static const yytype_uint8 yystos
[] =
693 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
694 12, 17, 18, 19, 20, 21, 22, 23, 24, 25,
695 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
696 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
697 48, 76, 77, 78, 79, 80, 81, 74, 71, 72,
698 85, 69, 70, 85, 58, 59, 60, 86, 49, 50,
699 51, 52, 53, 54, 55, 56, 57, 84, 85, 66,
700 66, 0, 74, 66, 85, 67, 82, 82, 68, 83,
704 #define yyerrok (yyerrstatus = 0)
705 #define yyclearin (yychar = YYEMPTY)
709 #define YYACCEPT goto yyacceptlab
710 #define YYABORT goto yyabortlab
711 #define YYERROR goto yyerrorlab
714 /* Like YYERROR except do call yyerror. This remains here temporarily
715 to ease the transition to the new meaning of YYERROR, for GCC.
716 Once GCC version 2 has supplanted version 1, this can go. However,
717 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
718 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
721 #define YYFAIL goto yyerrlab
723 /* This is here to suppress warnings from the GCC cpp's
724 -Wunused-macros. Normally we don't worry about that warning, but
725 some users do, and we want to make it easy for users to remove
726 YYFAIL uses, which will produce warnings from Bison 2.5. */
729 #define YYRECOVERING() (!!yyerrstatus)
731 #define YYBACKUP(Token, Value) \
733 if (yychar == YYEMPTY && yylen == 1) \
737 yytoken = YYTRANSLATE (yychar); \
743 yyerror (context, scanner, YY_("syntax error: cannot back up")); \
750 #define YYERRCODE 256
753 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
754 If N is 0, then set CURRENT to the empty location which ends
755 the previous symbol: RHS[0] (always defined). */
757 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
758 #ifndef YYLLOC_DEFAULT
759 # define YYLLOC_DEFAULT(Current, Rhs, N) \
763 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
764 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
765 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
766 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
770 (Current).first_line = (Current).last_line = \
771 YYRHSLOC (Rhs, 0).last_line; \
772 (Current).first_column = (Current).last_column = \
773 YYRHSLOC (Rhs, 0).last_column; \
779 /* YY_LOCATION_PRINT -- Print the location on the stream.
780 This macro was not mandated originally: define only if we know
781 we won't break user code: when these are the locations we know. */
783 #ifndef YY_LOCATION_PRINT
784 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
785 # define YY_LOCATION_PRINT(File, Loc) \
786 fprintf (File, "%d.%d-%d.%d", \
787 (Loc).first_line, (Loc).first_column, \
788 (Loc).last_line, (Loc).last_column)
790 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
795 /* YYLEX -- calling `yylex' with the right arguments. */
798 # define YYLEX yylex (&yylval, YYLEX_PARAM)
800 # define YYLEX yylex (&yylval, scanner)
803 /* Enable debugging if requested. */
807 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
808 # define YYFPRINTF fprintf
811 # define YYDPRINTF(Args) \
817 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
821 YYFPRINTF (stderr, "%s ", Title); \
822 yy_symbol_print (stderr, \
823 Type, Value, context, scanner); \
824 YYFPRINTF (stderr, "\n"); \
829 /*--------------------------------.
830 | Print this symbol on YYOUTPUT. |
831 `--------------------------------*/
834 #if (defined __STDC__ || defined __C99__FUNC__ \
835 || defined __cplusplus || defined _MSC_VER)
837 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, Context
*context
, yyscan_t
*scanner
)
840 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, context
, scanner
)
843 YYSTYPE
const * const yyvaluep
;
853 if (yytype
< YYNTOKENS
)
854 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
866 /*--------------------------------.
867 | Print this symbol on YYOUTPUT. |
868 `--------------------------------*/
870 #if (defined __STDC__ || defined __C99__FUNC__ \
871 || defined __cplusplus || defined _MSC_VER)
873 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, Context
*context
, yyscan_t
*scanner
)
876 yy_symbol_print (yyoutput
, yytype
, yyvaluep
, context
, scanner
)
879 YYSTYPE
const * const yyvaluep
;
884 if (yytype
< YYNTOKENS
)
885 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
887 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
889 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, context
, scanner
);
890 YYFPRINTF (yyoutput
, ")");
893 /*------------------------------------------------------------------.
894 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
896 `------------------------------------------------------------------*/
898 #if (defined __STDC__ || defined __C99__FUNC__ \
899 || defined __cplusplus || defined _MSC_VER)
901 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
904 yy_stack_print (yybottom
, yytop
)
905 yytype_int16
*yybottom
;
909 YYFPRINTF (stderr
, "Stack now");
910 for (; yybottom
<= yytop
; yybottom
++)
912 int yybot
= *yybottom
;
913 YYFPRINTF (stderr
, " %d", yybot
);
915 YYFPRINTF (stderr
, "\n");
918 # define YY_STACK_PRINT(Bottom, Top) \
921 yy_stack_print ((Bottom), (Top)); \
925 /*------------------------------------------------.
926 | Report that the YYRULE is going to be reduced. |
927 `------------------------------------------------*/
929 #if (defined __STDC__ || defined __C99__FUNC__ \
930 || defined __cplusplus || defined _MSC_VER)
932 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
, Context
*context
, yyscan_t
*scanner
)
935 yy_reduce_print (yyvsp
, yyrule
, context
, scanner
)
942 int yynrhs
= yyr2
[yyrule
];
944 unsigned long int yylno
= yyrline
[yyrule
];
945 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
947 /* The symbols being reduced. */
948 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
950 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
951 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
952 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
954 YYFPRINTF (stderr
, "\n");
958 # define YY_REDUCE_PRINT(Rule) \
961 yy_reduce_print (yyvsp, Rule, context, scanner); \
964 /* Nonzero means print parse trace. It is left uninitialized so that
965 multiple parsers can coexist. */
968 # define YYDPRINTF(Args)
969 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
970 # define YY_STACK_PRINT(Bottom, Top)
971 # define YY_REDUCE_PRINT(Rule)
972 #endif /* !YYDEBUG */
975 /* YYINITDEPTH -- initial size of the parser's stacks. */
977 # define YYINITDEPTH 200
980 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
981 if the built-in stack extension method is used).
983 Do not make this value too large; the results are undefined if
984 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
985 evaluated with infinite-precision integer arithmetic. */
988 # define YYMAXDEPTH 10000
996 # if defined __GLIBC__ && defined _STRING_H
997 # define yystrlen strlen
999 /* Return the length of YYSTR. */
1000 #if (defined __STDC__ || defined __C99__FUNC__ \
1001 || defined __cplusplus || defined _MSC_VER)
1003 yystrlen (const char *yystr
)
1011 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1019 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1020 # define yystpcpy stpcpy
1022 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1024 #if (defined __STDC__ || defined __C99__FUNC__ \
1025 || defined __cplusplus || defined _MSC_VER)
1027 yystpcpy (char *yydest
, const char *yysrc
)
1030 yystpcpy (yydest
, yysrc
)
1036 const char *yys
= yysrc
;
1038 while ((*yyd
++ = *yys
++) != '\0')
1047 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1048 quotes and backslashes, so that it's suitable for yyerror. The
1049 heuristic is that double-quoting is unnecessary unless the string
1050 contains an apostrophe, a comma, or backslash (other than
1051 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1052 null, do not copy; instead, return the length of what the result
1055 yytnamerr (char *yyres
, const char *yystr
)
1060 char const *yyp
= yystr
;
1067 goto do_not_strip_quotes
;
1071 goto do_not_strip_quotes
;
1084 do_not_strip_quotes
: ;
1088 return yystrlen (yystr
);
1090 return yystpcpy (yyres
, yystr
) - yyres
;
1094 /* Copy into YYRESULT an error message about the unexpected token
1095 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1096 including the terminating null byte. If YYRESULT is null, do not
1097 copy anything; just return the number of bytes that would be
1098 copied. As a special case, return 0 if an ordinary "syntax error"
1099 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1100 size calculation. */
1102 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1104 int yyn
= yypact
[yystate
];
1106 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1110 int yytype
= YYTRANSLATE (yychar
);
1111 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1112 YYSIZE_T yysize
= yysize0
;
1114 int yysize_overflow
= 0;
1115 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1116 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1120 /* This is so xgettext sees the translatable formats that are
1121 constructed on the fly. */
1122 YY_("syntax error, unexpected %s");
1123 YY_("syntax error, unexpected %s, expecting %s");
1124 YY_("syntax error, unexpected %s, expecting %s or %s");
1125 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1126 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1130 static char const yyunexpected
[] = "syntax error, unexpected %s";
1131 static char const yyexpecting
[] = ", expecting %s";
1132 static char const yyor
[] = " or %s";
1133 char yyformat
[sizeof yyunexpected
1134 + sizeof yyexpecting
- 1
1135 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1136 * (sizeof yyor
- 1))];
1137 char const *yyprefix
= yyexpecting
;
1139 /* Start YYX at -YYN if negative to avoid negative indexes in
1141 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1143 /* Stay within bounds of both yycheck and yytname. */
1144 int yychecklim
= YYLAST
- yyn
+ 1;
1145 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1148 yyarg
[0] = yytname
[yytype
];
1149 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1151 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1152 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1154 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1158 yyformat
[sizeof yyunexpected
- 1] = '\0';
1161 yyarg
[yycount
++] = yytname
[yyx
];
1162 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1163 yysize_overflow
|= (yysize1
< yysize
);
1165 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1169 yyf
= YY_(yyformat
);
1170 yysize1
= yysize
+ yystrlen (yyf
);
1171 yysize_overflow
|= (yysize1
< yysize
);
1174 if (yysize_overflow
)
1175 return YYSIZE_MAXIMUM
;
1179 /* Avoid sprintf, as that infringes on the user's name space.
1180 Don't have undefined behavior even if the translation
1181 produced a string with the wrong number of "%s"s. */
1182 char *yyp
= yyresult
;
1184 while ((*yyp
= *yyf
) != '\0')
1186 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1188 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1201 #endif /* YYERROR_VERBOSE */
1204 /*-----------------------------------------------.
1205 | Release the memory associated to this symbol. |
1206 `-----------------------------------------------*/
1209 #if (defined __STDC__ || defined __C99__FUNC__ \
1210 || defined __cplusplus || defined _MSC_VER)
1212 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, Context
*context
, yyscan_t
*scanner
)
1215 yydestruct (yymsg
, yytype
, yyvaluep
, context
, scanner
)
1229 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1239 /* Prevent warnings from -Wmissing-prototypes. */
1240 #ifdef YYPARSE_PARAM
1241 #if defined __STDC__ || defined __cplusplus
1242 int yyparse (void *YYPARSE_PARAM
);
1246 #else /* ! YYPARSE_PARAM */
1247 #if defined __STDC__ || defined __cplusplus
1248 int yyparse (Context
*context
, yyscan_t
*scanner
);
1252 #endif /* ! YYPARSE_PARAM */
1258 /*-------------------------.
1259 | yyparse or yypush_parse. |
1260 `-------------------------*/
1262 #ifdef YYPARSE_PARAM
1263 #if (defined __STDC__ || defined __C99__FUNC__ \
1264 || defined __cplusplus || defined _MSC_VER)
1266 yyparse (void *YYPARSE_PARAM
)
1269 yyparse (YYPARSE_PARAM
)
1270 void *YYPARSE_PARAM
;
1272 #else /* ! YYPARSE_PARAM */
1273 #if (defined __STDC__ || defined __C99__FUNC__ \
1274 || defined __cplusplus || defined _MSC_VER)
1276 yyparse (Context
*context
, yyscan_t
*scanner
)
1279 yyparse (context
, scanner
)
1285 /* The lookahead symbol. */
1288 /* The semantic value of the lookahead symbol. */
1291 /* Number of syntax errors so far. */
1295 /* Number of tokens to shift before error messages enabled. */
1298 /* The stacks and their tools:
1299 `yyss': related to states.
1300 `yyvs': related to semantic values.
1302 Refer to the stacks thru separate pointers, to allow yyoverflow
1303 to reallocate them elsewhere. */
1305 /* The state stack. */
1306 yytype_int16 yyssa
[YYINITDEPTH
];
1308 yytype_int16
*yyssp
;
1310 /* The semantic value stack. */
1311 YYSTYPE yyvsa
[YYINITDEPTH
];
1315 YYSIZE_T yystacksize
;
1319 /* Lookahead token as an internal (translated) token number. */
1321 /* The variables used to return semantic value and location from the
1326 /* Buffer for error messages, and its allocated size. */
1328 char *yymsg
= yymsgbuf
;
1329 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1332 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1334 /* The number of symbols on the RHS of the reduced rule.
1335 Keep to zero when no symbol should be popped. */
1341 yystacksize
= YYINITDEPTH
;
1343 YYDPRINTF ((stderr
, "Starting parse\n"));
1348 yychar
= YYEMPTY
; /* Cause a token to be read. */
1350 /* Initialize stack pointers.
1351 Waste one element of value and location stack
1352 so that they stay on the same level as the state stack.
1353 The wasted elements are never initialized. */
1359 /*------------------------------------------------------------.
1360 | yynewstate -- Push a new state, which is found in yystate. |
1361 `------------------------------------------------------------*/
1363 /* In all cases, when you get here, the value and location stacks
1364 have just been pushed. So pushing a state here evens the stacks. */
1370 if (yyss
+ yystacksize
- 1 <= yyssp
)
1372 /* Get the current used size of the three stacks, in elements. */
1373 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1377 /* Give user a chance to reallocate the stack. Use copies of
1378 these so that the &'s don't force the real ones into
1380 YYSTYPE
*yyvs1
= yyvs
;
1381 yytype_int16
*yyss1
= yyss
;
1383 /* Each stack pointer address is followed by the size of the
1384 data in use in that stack, in bytes. This used to be a
1385 conditional around just the two extra args, but that might
1386 be undefined if yyoverflow is a macro. */
1387 yyoverflow (YY_("memory exhausted"),
1388 &yyss1
, yysize
* sizeof (*yyssp
),
1389 &yyvs1
, yysize
* sizeof (*yyvsp
),
1395 #else /* no yyoverflow */
1396 # ifndef YYSTACK_RELOCATE
1397 goto yyexhaustedlab
;
1399 /* Extend the stack our own way. */
1400 if (YYMAXDEPTH
<= yystacksize
)
1401 goto yyexhaustedlab
;
1403 if (YYMAXDEPTH
< yystacksize
)
1404 yystacksize
= YYMAXDEPTH
;
1407 yytype_int16
*yyss1
= yyss
;
1408 union yyalloc
*yyptr
=
1409 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1411 goto yyexhaustedlab
;
1412 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1413 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1414 # undef YYSTACK_RELOCATE
1416 YYSTACK_FREE (yyss1
);
1419 #endif /* no yyoverflow */
1421 yyssp
= yyss
+ yysize
- 1;
1422 yyvsp
= yyvs
+ yysize
- 1;
1424 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1425 (unsigned long int) yystacksize
));
1427 if (yyss
+ yystacksize
- 1 <= yyssp
)
1431 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1433 if (yystate
== YYFINAL
)
1443 /* Do appropriate processing given the current state. Read a
1444 lookahead token if we need one and don't already have one. */
1446 /* First try to decide what to do without reference to lookahead token. */
1447 yyn
= yypact
[yystate
];
1448 if (yyn
== YYPACT_NINF
)
1451 /* Not known => get a lookahead token if don't already have one. */
1453 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1454 if (yychar
== YYEMPTY
)
1456 YYDPRINTF ((stderr
, "Reading a token: "));
1460 if (yychar
<= YYEOF
)
1462 yychar
= yytoken
= YYEOF
;
1463 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1467 yytoken
= YYTRANSLATE (yychar
);
1468 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1471 /* If the proper action on seeing token YYTOKEN is to reduce or to
1472 detect an error, take that action. */
1474 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1479 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1485 /* Count tokens shifted since error; after three, turn off error
1490 /* Shift the lookahead token. */
1491 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1493 /* Discard the shifted token. */
1502 /*-----------------------------------------------------------.
1503 | yydefault -- do the default action for the current state. |
1504 `-----------------------------------------------------------*/
1506 yyn
= yydefact
[yystate
];
1512 /*-----------------------------.
1513 | yyreduce -- Do a reduction. |
1514 `-----------------------------*/
1516 /* yyn is the number of a rule to reduce with. */
1519 /* If YYLEN is nonzero, implement the default value of the action:
1522 Otherwise, the following line sets YYVAL to garbage.
1523 This behavior is undocumented and Bison
1524 users should not rely upon it. Assigning to YYVAL
1525 unconditionally makes the parser a bit smaller, and it avoids a
1526 GCC warning that YYVAL may be used uninitialized. */
1527 yyval
= yyvsp
[1-yylen
];
1530 YY_REDUCE_PRINT (yyn
);
1535 /* Line 1464 of yacc.c */
1536 #line 176 "libmemcached/csl/parser.yy"
1542 /* Line 1464 of yacc.c */
1543 #line 178 "libmemcached/csl/parser.yy"
1549 /* Line 1464 of yacc.c */
1550 #line 180 "libmemcached/csl/parser.yy"
1556 /* Line 1464 of yacc.c */
1557 #line 182 "libmemcached/csl/parser.yy"
1566 /* Line 1464 of yacc.c */
1567 #line 187 "libmemcached/csl/parser.yy"
1569 context
->rc
= MEMCACHED_PARSE_USER_ERROR
;
1570 parser_abort(context
, NULL
);
1576 /* Line 1464 of yacc.c */
1577 #line 192 "libmemcached/csl/parser.yy"
1579 memcached_reset(context
->memc
);
1585 /* Line 1464 of yacc.c */
1586 #line 196 "libmemcached/csl/parser.yy"
1594 /* Line 1464 of yacc.c */
1595 #line 200 "libmemcached/csl/parser.yy"
1597 if ((context
->rc
= memcached_parse_configure_file(*context
->memc
, (yyvsp
[(3) - (3)].string
).c_str
, (yyvsp
[(3) - (3)].string
).size
)) != MEMCACHED_SUCCESS
)
1599 parser_abort(context
, NULL
);
1606 /* Line 1464 of yacc.c */
1607 #line 211 "libmemcached/csl/parser.yy"
1609 if (memcached_failed(context
->rc
= memcached_server_add_with_weight(context
->memc
, (yyvsp
[(2) - (4)].server
).c_str
, (yyvsp
[(3) - (4)].number
), (yyvsp
[(4) - (4)].number
))))
1611 parser_abort(context
, NULL
);
1613 context
->unset_server();
1619 /* Line 1464 of yacc.c */
1620 #line 219 "libmemcached/csl/parser.yy"
1622 if (memcached_failed(context
->rc
= memcached_server_add_with_weight(context
->memc
, (yyvsp
[(2) - (4)].server
).c_str
, (yyvsp
[(3) - (4)].number
), (yyvsp
[(4) - (4)].number
))))
1624 parser_abort(context
, NULL
);
1626 context
->unset_server();
1632 /* Line 1464 of yacc.c */
1633 #line 227 "libmemcached/csl/parser.yy"
1635 if (memcached_failed(context
->rc
= memcached_server_add_unix_socket_with_weight(context
->memc
, (yyvsp
[(2) - (3)].string
).c_str
, (yyvsp
[(3) - (3)].number
))))
1637 parser_abort(context
, NULL
);
1644 /* Line 1464 of yacc.c */
1645 #line 234 "libmemcached/csl/parser.yy"
1647 memcached_set_configuration_file(context
->memc
, (yyvsp
[(2) - (2)].string
).c_str
, (yyvsp
[(2) - (2)].string
).size
);
1653 /* Line 1464 of yacc.c */
1654 #line 238 "libmemcached/csl/parser.yy"
1656 context
->memc
->configure
.initial_pool_size
= (yyvsp
[(2) - (2)].number
);
1662 /* Line 1464 of yacc.c */
1663 #line 242 "libmemcached/csl/parser.yy"
1665 context
->memc
->configure
.max_pool_size
= (yyvsp
[(2) - (2)].number
);
1671 /* Line 1464 of yacc.c */
1672 #line 250 "libmemcached/csl/parser.yy"
1674 if ((context
->rc
= memcached_set_namespace(context
->memc
, (yyvsp
[(2) - (2)].string
).c_str
, (yyvsp
[(2) - (2)].string
).size
)) != MEMCACHED_SUCCESS
)
1676 parser_abort(context
, NULL
);;
1683 /* Line 1464 of yacc.c */
1684 #line 257 "libmemcached/csl/parser.yy"
1686 if ((context
->rc
= memcached_behavior_set(context
->memc
, MEMCACHED_BEHAVIOR_DISTRIBUTION
, (yyvsp
[(2) - (2)].distribution
))) != MEMCACHED_SUCCESS
)
1688 parser_abort(context
, NULL
);;
1695 /* Line 1464 of yacc.c */
1696 #line 264 "libmemcached/csl/parser.yy"
1698 if ((context
->rc
= memcached_behavior_set(context
->memc
, MEMCACHED_BEHAVIOR_DISTRIBUTION
, (yyvsp
[(2) - (4)].distribution
))) != MEMCACHED_SUCCESS
)
1700 parser_abort(context
, NULL
);;
1702 if ((context
->rc
= memcached_behavior_set_distribution_hash(context
->memc
, (yyvsp
[(4) - (4)].hash
))) != MEMCACHED_SUCCESS
)
1704 parser_abort(context
, NULL
);;
1711 /* Line 1464 of yacc.c */
1712 #line 275 "libmemcached/csl/parser.yy"
1714 if ((context
->rc
= memcached_behavior_set(context
->memc
, MEMCACHED_BEHAVIOR_HASH
, (yyvsp
[(2) - (2)].hash
))) != MEMCACHED_SUCCESS
)
1716 parser_abort(context
, NULL
);;
1723 /* Line 1464 of yacc.c */
1724 #line 282 "libmemcached/csl/parser.yy"
1726 if ((context
->rc
= memcached_behavior_set(context
->memc
, (yyvsp
[(1) - (2)].behavior
), (yyvsp
[(2) - (2)].number
))) != MEMCACHED_SUCCESS
)
1728 parser_abort(context
, NULL
);;
1735 /* Line 1464 of yacc.c */
1736 #line 289 "libmemcached/csl/parser.yy"
1738 if ((context
->rc
= memcached_behavior_set(context
->memc
, (yyvsp
[(1) - (1)].behavior
), true)) != MEMCACHED_SUCCESS
)
1740 parser_abort(context
, NULL
);;
1747 /* Line 1464 of yacc.c */
1748 #line 296 "libmemcached/csl/parser.yy"
1755 /* Line 1464 of yacc.c */
1756 #line 302 "libmemcached/csl/parser.yy"
1758 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
;
1764 /* Line 1464 of yacc.c */
1765 #line 306 "libmemcached/csl/parser.yy"
1767 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
;
1773 /* Line 1464 of yacc.c */
1774 #line 310 "libmemcached/csl/parser.yy"
1776 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
;
1782 /* Line 1464 of yacc.c */
1783 #line 314 "libmemcached/csl/parser.yy"
1785 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
;
1791 /* Line 1464 of yacc.c */
1792 #line 318 "libmemcached/csl/parser.yy"
1794 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
;
1800 /* Line 1464 of yacc.c */
1801 #line 322 "libmemcached/csl/parser.yy"
1803 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
;
1809 /* Line 1464 of yacc.c */
1810 #line 326 "libmemcached/csl/parser.yy"
1812 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT
;
1818 /* Line 1464 of yacc.c */
1819 #line 330 "libmemcached/csl/parser.yy"
1821 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT
;
1827 /* Line 1464 of yacc.c */
1828 #line 334 "libmemcached/csl/parser.yy"
1830 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
;
1836 /* Line 1464 of yacc.c */
1837 #line 338 "libmemcached/csl/parser.yy"
1839 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_SND_TIMEOUT
;
1845 /* Line 1464 of yacc.c */
1846 #line 342 "libmemcached/csl/parser.yy"
1848 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
;
1854 /* Line 1464 of yacc.c */
1855 #line 346 "libmemcached/csl/parser.yy"
1857 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
;
1863 /* Line 1464 of yacc.c */
1864 #line 353 "libmemcached/csl/parser.yy"
1866 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
;
1872 /* Line 1464 of yacc.c */
1873 #line 357 "libmemcached/csl/parser.yy"
1875 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
;
1881 /* Line 1464 of yacc.c */
1882 #line 361 "libmemcached/csl/parser.yy"
1884 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
;
1890 /* Line 1464 of yacc.c */
1891 #line 365 "libmemcached/csl/parser.yy"
1893 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_NOREPLY
;
1899 /* Line 1464 of yacc.c */
1900 #line 369 "libmemcached/csl/parser.yy"
1902 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
;
1908 /* Line 1464 of yacc.c */
1909 #line 373 "libmemcached/csl/parser.yy"
1911 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_SORT_HOSTS
;
1917 /* Line 1464 of yacc.c */
1918 #line 377 "libmemcached/csl/parser.yy"
1920 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_SUPPORT_CAS
;
1926 /* Line 1464 of yacc.c */
1927 #line 381 "libmemcached/csl/parser.yy"
1929 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_TCP_NODELAY
;
1935 /* Line 1464 of yacc.c */
1936 #line 385 "libmemcached/csl/parser.yy"
1938 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
;
1944 /* Line 1464 of yacc.c */
1945 #line 389 "libmemcached/csl/parser.yy"
1947 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE
;
1953 /* Line 1464 of yacc.c */
1954 #line 393 "libmemcached/csl/parser.yy"
1956 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_USE_UDP
;
1962 /* Line 1464 of yacc.c */
1963 #line 397 "libmemcached/csl/parser.yy"
1965 (yyval
.behavior
)= MEMCACHED_BEHAVIOR_VERIFY_KEY
;
1971 /* Line 1464 of yacc.c */
1972 #line 403 "libmemcached/csl/parser.yy"
1973 { (yyval
.number
)= MEMCACHED_DEFAULT_PORT
;;}
1978 /* Line 1464 of yacc.c */
1979 #line 405 "libmemcached/csl/parser.yy"
1985 /* Line 1464 of yacc.c */
1986 #line 409 "libmemcached/csl/parser.yy"
1987 { (yyval
.number
)= 1; ;}
1992 /* Line 1464 of yacc.c */
1993 #line 411 "libmemcached/csl/parser.yy"
1999 /* Line 1464 of yacc.c */
2000 #line 416 "libmemcached/csl/parser.yy"
2002 (yyval
.hash
)= MEMCACHED_HASH_MD5
;
2008 /* Line 1464 of yacc.c */
2009 #line 420 "libmemcached/csl/parser.yy"
2011 (yyval
.hash
)= MEMCACHED_HASH_CRC
;
2017 /* Line 1464 of yacc.c */
2018 #line 424 "libmemcached/csl/parser.yy"
2020 (yyval
.hash
)= MEMCACHED_HASH_FNV1_64
;
2026 /* Line 1464 of yacc.c */
2027 #line 428 "libmemcached/csl/parser.yy"
2029 (yyval
.hash
)= MEMCACHED_HASH_FNV1A_64
;
2035 /* Line 1464 of yacc.c */
2036 #line 432 "libmemcached/csl/parser.yy"
2038 (yyval
.hash
)= MEMCACHED_HASH_FNV1_32
;
2044 /* Line 1464 of yacc.c */
2045 #line 436 "libmemcached/csl/parser.yy"
2047 (yyval
.hash
)= MEMCACHED_HASH_FNV1A_32
;
2053 /* Line 1464 of yacc.c */
2054 #line 440 "libmemcached/csl/parser.yy"
2056 (yyval
.hash
)= MEMCACHED_HASH_HSIEH
;
2062 /* Line 1464 of yacc.c */
2063 #line 444 "libmemcached/csl/parser.yy"
2065 (yyval
.hash
)= MEMCACHED_HASH_MURMUR
;
2071 /* Line 1464 of yacc.c */
2072 #line 448 "libmemcached/csl/parser.yy"
2074 (yyval
.hash
)= MEMCACHED_HASH_JENKINS
;
2080 /* Line 1464 of yacc.c */
2081 #line 455 "libmemcached/csl/parser.yy"
2083 (yyval
.string
)= (yyvsp
[(1) - (1)].string
);
2089 /* Line 1464 of yacc.c */
2090 #line 459 "libmemcached/csl/parser.yy"
2092 (yyval
.string
)= (yyvsp
[(1) - (1)].string
);
2098 /* Line 1464 of yacc.c */
2099 #line 466 "libmemcached/csl/parser.yy"
2101 (yyval
.distribution
)= MEMCACHED_DISTRIBUTION_CONSISTENT
;
2107 /* Line 1464 of yacc.c */
2108 #line 470 "libmemcached/csl/parser.yy"
2110 (yyval
.distribution
)= MEMCACHED_DISTRIBUTION_MODULA
;
2116 /* Line 1464 of yacc.c */
2117 #line 474 "libmemcached/csl/parser.yy"
2119 (yyval
.distribution
)= MEMCACHED_DISTRIBUTION_RANDOM
;
2125 /* Line 1464 of yacc.c */
2126 #line 2127 "libmemcached/csl/parser.cc"
2129 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
2133 YY_STACK_PRINT (yyss
, yyssp
);
2137 /* Now `shift' the result of the reduction. Determine what state
2138 that goes to, based on the state we popped back to and the rule
2139 number reduced by. */
2143 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
2144 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
2145 yystate
= yytable
[yystate
];
2147 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
2152 /*------------------------------------.
2153 | yyerrlab -- here on detecting error |
2154 `------------------------------------*/
2156 /* If not already recovering from an error, report this error. */
2160 #if ! YYERROR_VERBOSE
2161 yyerror (context
, scanner
, YY_("syntax error"));
2164 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
2165 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
2167 YYSIZE_T yyalloc
= 2 * yysize
;
2168 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
2169 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
2170 if (yymsg
!= yymsgbuf
)
2171 YYSTACK_FREE (yymsg
);
2172 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
2174 yymsg_alloc
= yyalloc
;
2178 yymsg_alloc
= sizeof yymsgbuf
;
2182 if (0 < yysize
&& yysize
<= yymsg_alloc
)
2184 (void) yysyntax_error (yymsg
, yystate
, yychar
);
2185 yyerror (context
, scanner
, yymsg
);
2189 yyerror (context
, scanner
, YY_("syntax error"));
2191 goto yyexhaustedlab
;
2199 if (yyerrstatus
== 3)
2201 /* If just tried and failed to reuse lookahead token after an
2202 error, discard it. */
2204 if (yychar
<= YYEOF
)
2206 /* Return failure if at end of input. */
2207 if (yychar
== YYEOF
)
2212 yydestruct ("Error: discarding",
2213 yytoken
, &yylval
, context
, scanner
);
2218 /* Else will try to reuse lookahead token after shifting the error
2223 /*---------------------------------------------------.
2224 | yyerrorlab -- error raised explicitly by YYERROR. |
2225 `---------------------------------------------------*/
2228 /* Pacify compilers like GCC when the user code never invokes
2229 YYERROR and the label yyerrorlab therefore never appears in user
2231 if (/*CONSTCOND*/ 0)
2234 /* Do not reclaim the symbols of the rule which action triggered
2238 YY_STACK_PRINT (yyss
, yyssp
);
2243 /*-------------------------------------------------------------.
2244 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2245 `-------------------------------------------------------------*/
2247 yyerrstatus
= 3; /* Each real token shifted decrements this. */
2251 yyn
= yypact
[yystate
];
2252 if (yyn
!= YYPACT_NINF
)
2255 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
2263 /* Pop the current state because it cannot handle the error token. */
2268 yydestruct ("Error: popping",
2269 yystos
[yystate
], yyvsp
, context
, scanner
);
2272 YY_STACK_PRINT (yyss
, yyssp
);
2278 /* Shift the error token. */
2279 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
2285 /*-------------------------------------.
2286 | yyacceptlab -- YYACCEPT comes here. |
2287 `-------------------------------------*/
2292 /*-----------------------------------.
2293 | yyabortlab -- YYABORT comes here. |
2294 `-----------------------------------*/
2299 #if !defined(yyoverflow) || YYERROR_VERBOSE
2300 /*-------------------------------------------------.
2301 | yyexhaustedlab -- memory exhaustion comes here. |
2302 `-------------------------------------------------*/
2304 yyerror (context
, scanner
, YY_("memory exhausted"));
2310 if (yychar
!= YYEMPTY
)
2311 yydestruct ("Cleanup: discarding lookahead",
2312 yytoken
, &yylval
, context
, scanner
);
2313 /* Do not reclaim the symbols of the rule which action triggered
2314 this YYABORT or YYACCEPT. */
2316 YY_STACK_PRINT (yyss
, yyssp
);
2317 while (yyssp
!= yyss
)
2319 yydestruct ("Cleanup: popping",
2320 yystos
[*yyssp
], yyvsp
, context
, scanner
);
2325 YYSTACK_FREE (yyss
);
2328 if (yymsg
!= yymsgbuf
)
2329 YYSTACK_FREE (yymsg
);
2331 /* Make sure YYID is used. */
2332 return YYID (yyresult
);
2337 /* Line 1684 of yacc.c */
2338 #line 479 "libmemcached/csl/parser.yy"
2341 void Context::start()
2343 config_parse(this, (void **)scanner
);