Merge in changes around setting up better syntax for distribution.
[m6w6/libmemcached] / libmemcached / options / parser.cc
1 /* A Bison parser, made by GNU Bison 2.4.3. */
2
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6 2009, 2010 Free Software Foundation, Inc.
7
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.
12
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.
17
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/>. */
20
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.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
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. */
43
44 /* Identify Bison output. */
45 #define YYBISON 1
46
47 /* Bison version. */
48 #define YYBISON_VERSION "2.4.3"
49
50 /* Skeleton name. */
51 #define YYSKELETON_NAME "yacc.c"
52
53 /* Pure parsers. */
54 #define YYPURE 1
55
56 /* Push parsers. */
57 #define YYPUSH 0
58
59 /* Pull parsers. */
60 #define YYPULL 1
61
62 /* Using locations. */
63 #define YYLSP_NEEDED 0
64
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
73
74
75 /* Copy the first part of user declarations. */
76
77 /* Line 189 of yacc.c */
78 #line 36 "libmemcached/options/parser.yy"
79
80
81 #include <config.h>
82
83 #include <stdint.h>
84
85 #include <libmemcached/options/context.h>
86 #include <libmemcached/options/build.h>
87 #include <libmemcached/options/string.h>
88 #include <libmemcached/options/symbol.h>
89 #include <libmemcached/visibility.h>
90 #include <libmemcached/prefix_key.h>
91
92 #pragma GCC diagnostic ignored "-Wold-style-cast"
93 #include <libmemcached/options/scanner.h>
94
95 int conf_lex(YYSTYPE* lvalp, void* scanner);
96
97 #define parser_abort(A, B) do { parser::abort_func((A), (B)); YYABORT; } while (0)
98
99 inline void config_error(Context *context, yyscan_t *scanner, const char *error)
100 {
101 if (not context->end())
102 parser::abort_func(context, error);
103 }
104
105 int config_parse(Context*, yyscan_t *);
106
107 void Context::start()
108 {
109 config_parse(this, scanner);
110 }
111
112
113
114 /* Line 189 of yacc.c */
115 #line 116 "libmemcached/options/parser.cc"
116
117 /* Enabling traces. */
118 #ifndef YYDEBUG
119 # define YYDEBUG 1
120 #endif
121
122 /* Enabling verbose error messages. */
123 #ifdef YYERROR_VERBOSE
124 # undef YYERROR_VERBOSE
125 # define YYERROR_VERBOSE 1
126 #else
127 # define YYERROR_VERBOSE 1
128 #endif
129
130 /* Enabling the token table. */
131 #ifndef YYTOKEN_TABLE
132 # define YYTOKEN_TABLE 0
133 #endif
134
135
136 /* Tokens. */
137 #ifndef YYTOKENTYPE
138 # define YYTOKENTYPE
139 /* Put the tokens into the symbol table, so that GDB and other debuggers
140 know about them. */
141 enum yytokentype {
142 COMMENT = 258,
143 END = 259,
144 ERROR = 260,
145 RESET = 261,
146 PARSER_DEBUG = 262,
147 INCLUDE = 263,
148 CONFIGURE_FILE = 264,
149 EMPTY_LINE = 265,
150 SERVER = 266,
151 SERVERS = 267,
152 SERVERS_OPTION = 268,
153 UNKNOWN_OPTION = 269,
154 UNKNOWN = 270,
155 AUTO_EJECT_HOSTS = 271,
156 BINARY_PROTOCOL = 272,
157 BUFFER_REQUESTS = 273,
158 CACHE_LOOKUPS = 274,
159 CONNECT_TIMEOUT = 275,
160 DISTRIBUTION = 276,
161 HASH = 277,
162 HASH_WITH_PREFIX_KEY = 278,
163 IO_BYTES_WATERMARK = 279,
164 IO_KEY_PREFETCH = 280,
165 IO_MSG_WATERMARK = 281,
166 KETAMA_HASH = 282,
167 KETAMA_WEIGHTED = 283,
168 NOREPLY = 284,
169 NUMBER_OF_REPLICAS = 285,
170 POLL_TIMEOUT = 286,
171 RANDOMIZE_REPLICA_READ = 287,
172 RCV_TIMEOUT = 288,
173 RETRY_TIMEOUT = 289,
174 SERVER_FAILURE_LIMIT = 290,
175 SND_TIMEOUT = 291,
176 SOCKET_RECV_SIZE = 292,
177 SOCKET_SEND_SIZE = 293,
178 SORT_HOSTS = 294,
179 SUPPORT_CAS = 295,
180 _TCP_NODELAY = 296,
181 _TCP_KEEPALIVE = 297,
182 _TCP_KEEPIDLE = 298,
183 USER_DATA = 299,
184 USE_UDP = 300,
185 VERIFY_KEY = 301,
186 PREFIX_KEY = 302,
187 MD5 = 303,
188 CRC = 304,
189 FNV1_64 = 305,
190 FNV1A_64 = 306,
191 FNV1_32 = 307,
192 FNV1A_32 = 308,
193 HSIEH = 309,
194 MURMUR = 310,
195 JENKINS = 311,
196 CONSISTENT = 312,
197 MODULA = 313,
198 RANDOM = 314,
199 TRUE = 315,
200 FALSE = 316,
201 NUMBER = 317,
202 FLOAT = 318,
203 HOSTNAME = 319,
204 HOSTNAME_WITH_PORT = 320,
205 IPADDRESS = 321,
206 IPADDRESS_WITH_PORT = 322,
207 STRING = 323,
208 QUOTED_STRING = 324,
209 FILE_PATH = 325
210 };
211 #endif
212
213
214
215 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
216
217 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
218 # define YYSTYPE_IS_DECLARED 1
219 #endif
220
221
222 /* Copy the second part of user declarations. */
223
224
225 /* Line 264 of yacc.c */
226 #line 227 "libmemcached/options/parser.cc"
227
228 #ifdef short
229 # undef short
230 #endif
231
232 #ifdef YYTYPE_UINT8
233 typedef YYTYPE_UINT8 yytype_uint8;
234 #else
235 typedef unsigned char yytype_uint8;
236 #endif
237
238 #ifdef YYTYPE_INT8
239 typedef YYTYPE_INT8 yytype_int8;
240 #elif (defined __STDC__ || defined __C99__FUNC__ \
241 || defined __cplusplus || defined _MSC_VER)
242 typedef signed char yytype_int8;
243 #else
244 typedef short int yytype_int8;
245 #endif
246
247 #ifdef YYTYPE_UINT16
248 typedef YYTYPE_UINT16 yytype_uint16;
249 #else
250 typedef unsigned short int yytype_uint16;
251 #endif
252
253 #ifdef YYTYPE_INT16
254 typedef YYTYPE_INT16 yytype_int16;
255 #else
256 typedef short int yytype_int16;
257 #endif
258
259 #ifndef YYSIZE_T
260 # ifdef __SIZE_TYPE__
261 # define YYSIZE_T __SIZE_TYPE__
262 # elif defined size_t
263 # define YYSIZE_T size_t
264 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
265 || defined __cplusplus || defined _MSC_VER)
266 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
267 # define YYSIZE_T size_t
268 # else
269 # define YYSIZE_T unsigned int
270 # endif
271 #endif
272
273 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
274
275 #ifndef YY_
276 # if defined YYENABLE_NLS && YYENABLE_NLS
277 # if ENABLE_NLS
278 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
279 # define YY_(msgid) dgettext ("bison-runtime", msgid)
280 # endif
281 # endif
282 # ifndef YY_
283 # define YY_(msgid) msgid
284 # endif
285 #endif
286
287 /* Suppress unused-variable warnings by "using" E. */
288 #if ! defined lint || defined __GNUC__
289 # define YYUSE(e) ((void) (e))
290 #else
291 # define YYUSE(e) /* empty */
292 #endif
293
294 /* Identity function, used to suppress warnings about constant conditions. */
295 #ifndef lint
296 # define YYID(n) (n)
297 #else
298 #if (defined __STDC__ || defined __C99__FUNC__ \
299 || defined __cplusplus || defined _MSC_VER)
300 static int
301 YYID (int yyi)
302 #else
303 static int
304 YYID (yyi)
305 int yyi;
306 #endif
307 {
308 return yyi;
309 }
310 #endif
311
312 #if ! defined yyoverflow || YYERROR_VERBOSE
313
314 /* The parser invokes alloca or malloc; define the necessary symbols. */
315
316 # ifdef YYSTACK_USE_ALLOCA
317 # if YYSTACK_USE_ALLOCA
318 # ifdef __GNUC__
319 # define YYSTACK_ALLOC __builtin_alloca
320 # elif defined __BUILTIN_VA_ARG_INCR
321 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
322 # elif defined _AIX
323 # define YYSTACK_ALLOC __alloca
324 # elif defined _MSC_VER
325 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
326 # define alloca _alloca
327 # else
328 # define YYSTACK_ALLOC alloca
329 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
330 || defined __cplusplus || defined _MSC_VER)
331 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
332 # ifndef _STDLIB_H
333 # define _STDLIB_H 1
334 # endif
335 # endif
336 # endif
337 # endif
338 # endif
339
340 # ifdef YYSTACK_ALLOC
341 /* Pacify GCC's `empty if-body' warning. */
342 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
343 # ifndef YYSTACK_ALLOC_MAXIMUM
344 /* The OS might guarantee only one guard page at the bottom of the stack,
345 and a page size can be as small as 4096 bytes. So we cannot safely
346 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
347 to allow for a few compiler-allocated temporary stack slots. */
348 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
349 # endif
350 # else
351 # define YYSTACK_ALLOC YYMALLOC
352 # define YYSTACK_FREE YYFREE
353 # ifndef YYSTACK_ALLOC_MAXIMUM
354 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
355 # endif
356 # if (defined __cplusplus && ! defined _STDLIB_H \
357 && ! ((defined YYMALLOC || defined malloc) \
358 && (defined YYFREE || defined free)))
359 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
360 # ifndef _STDLIB_H
361 # define _STDLIB_H 1
362 # endif
363 # endif
364 # ifndef YYMALLOC
365 # define YYMALLOC malloc
366 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
367 || defined __cplusplus || defined _MSC_VER)
368 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
369 # endif
370 # endif
371 # ifndef YYFREE
372 # define YYFREE free
373 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
374 || defined __cplusplus || defined _MSC_VER)
375 void free (void *); /* INFRINGES ON USER NAME SPACE */
376 # endif
377 # endif
378 # endif
379 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
380
381
382 #if (! defined yyoverflow \
383 && (! defined __cplusplus \
384 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
385
386 /* A type that is properly aligned for any stack member. */
387 union yyalloc
388 {
389 yytype_int16 yyss_alloc;
390 YYSTYPE yyvs_alloc;
391 };
392
393 /* The size of the maximum gap between one aligned stack and the next. */
394 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
395
396 /* The size of an array large to enough to hold all stacks, each with
397 N elements. */
398 # define YYSTACK_BYTES(N) \
399 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
400 + YYSTACK_GAP_MAXIMUM)
401
402 /* Copy COUNT objects from FROM to TO. The source and destination do
403 not overlap. */
404 # ifndef YYCOPY
405 # if defined __GNUC__ && 1 < __GNUC__
406 # define YYCOPY(To, From, Count) \
407 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
408 # else
409 # define YYCOPY(To, From, Count) \
410 do \
411 { \
412 YYSIZE_T yyi; \
413 for (yyi = 0; yyi < (Count); yyi++) \
414 (To)[yyi] = (From)[yyi]; \
415 } \
416 while (YYID (0))
417 # endif
418 # endif
419
420 /* Relocate STACK from its old location to the new one. The
421 local variables YYSIZE and YYSTACKSIZE give the old and new number of
422 elements in the stack, and YYPTR gives the new location of the
423 stack. Advance YYPTR to a properly aligned location for the next
424 stack. */
425 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
426 do \
427 { \
428 YYSIZE_T yynewbytes; \
429 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
430 Stack = &yyptr->Stack_alloc; \
431 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
432 yyptr += yynewbytes / sizeof (*yyptr); \
433 } \
434 while (YYID (0))
435
436 #endif
437
438 /* YYFINAL -- State number of the termination state. */
439 #define YYFINAL 75
440 /* YYLAST -- Last index in YYTABLE. */
441 #define YYLAST 73
442
443 /* YYNTOKENS -- Number of terminals. */
444 #define YYNTOKENS 74
445 /* YYNNTS -- Number of nonterminals. */
446 #define YYNNTS 12
447 /* YYNRULES -- Number of rules. */
448 #define YYNRULES 70
449 /* YYNRULES -- Number of states. */
450 #define YYNSTATES 86
451
452 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
453 #define YYUNDEFTOK 2
454 #define YYMAXUTOK 325
455
456 #define YYTRANSLATE(YYX) \
457 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
458
459 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
460 static const yytype_uint8 yytranslate[] =
461 {
462 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 73, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 62, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 63, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 2, 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, 1, 2, 3, 4,
488 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
489 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
490 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
491 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
492 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
493 55, 56, 57, 58, 59, 60, 61, 64, 65, 66,
494 67, 68, 69, 70, 71, 72
495 };
496
497 #if YYDEBUG
498 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
499 YYRHS. */
500 static const yytype_uint8 yyprhs[] =
501 {
502 0, 0, 3, 5, 9, 11, 13, 15, 17, 19,
503 21, 23, 27, 30, 33, 36, 38, 41, 44, 49,
504 52, 55, 57, 59, 61, 63, 65, 67, 69, 71,
505 73, 75, 77, 79, 81, 83, 85, 87, 89, 91,
506 93, 95, 97, 99, 101, 103, 105, 107, 109, 111,
507 113, 115, 119, 122, 124, 126, 129, 131, 133, 135,
508 137, 139, 141, 143, 145, 147, 149, 151, 153, 155,
509 157
510 };
511
512 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
513 static const yytype_int8 yyrhs[] =
514 {
515 75, 0, -1, 76, -1, 75, 73, 76, -1, 77,
516 -1, 3, -1, 10, -1, 4, -1, 5, -1, 6,
517 -1, 7, -1, 8, 73, 84, -1, 11, 82, -1,
518 13, 81, -1, 9, 84, -1, 78, -1, 47, 84,
519 -1, 21, 85, -1, 21, 85, 62, 83, -1, 22,
520 83, -1, 79, 64, -1, 80, -1, 44, -1, 20,
521 -1, 26, -1, 24, -1, 25, -1, 30, -1, 31,
522 -1, 33, -1, 34, -1, 35, -1, 36, -1, 37,
523 -1, 38, -1, 16, -1, 17, -1, 18, -1, 19,
524 -1, 23, -1, 28, -1, 29, -1, 32, -1, 39,
525 -1, 40, -1, 41, -1, 42, -1, 43, -1, 45,
526 -1, 46, -1, 82, -1, 81, 62, 82, -1, 67,
527 64, -1, 66, -1, 70, -1, 69, 64, -1, 68,
528 -1, 48, -1, 49, -1, 50, -1, 51, -1, 52,
529 -1, 53, -1, 54, -1, 55, -1, 56, -1, 70,
530 -1, 71, -1, 57, -1, 58, -1, 59, -1
531 };
532
533 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
534 static const yytype_uint16 yyrline[] =
535 {
536 0, 164, 164, 165, 169, 171, 173, 175, 180, 185,
537 189, 193, 204, 211, 214, 218, 222, 229, 236, 247,
538 254, 261, 268, 274, 278, 282, 286, 290, 294, 298,
539 302, 306, 310, 314, 318, 325, 329, 333, 337, 341,
540 345, 349, 353, 357, 361, 365, 369, 373, 377, 381,
541 388, 395, 405, 411, 417, 423, 429, 438, 442, 446,
542 450, 454, 458, 462, 466, 470, 477, 481, 489, 493,
543 497
544 };
545 #endif
546
547 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
548 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
549 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
550 static const char *const yytname[] =
551 {
552 "$end", "error", "$undefined", "COMMENT", "END", "ERROR", "RESET",
553 "PARSER_DEBUG", "INCLUDE", "CONFIGURE_FILE", "EMPTY_LINE", "SERVER",
554 "SERVERS", "SERVERS_OPTION", "UNKNOWN_OPTION", "UNKNOWN",
555 "AUTO_EJECT_HOSTS", "BINARY_PROTOCOL", "BUFFER_REQUESTS",
556 "CACHE_LOOKUPS", "CONNECT_TIMEOUT", "DISTRIBUTION", "HASH",
557 "HASH_WITH_PREFIX_KEY", "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", "RETRY_TIMEOUT", "SERVER_FAILURE_LIMIT", "SND_TIMEOUT",
561 "SOCKET_RECV_SIZE", "SOCKET_SEND_SIZE", "SORT_HOSTS", "SUPPORT_CAS",
562 "_TCP_NODELAY", "_TCP_KEEPALIVE", "_TCP_KEEPIDLE", "USER_DATA",
563 "USE_UDP", "VERIFY_KEY", "PREFIX_KEY", "MD5", "CRC", "FNV1_64",
564 "FNV1A_64", "FNV1_32", "FNV1A_32", "HSIEH", "MURMUR", "JENKINS",
565 "CONSISTENT", "MODULA", "RANDOM", "TRUE", "FALSE", "','", "'='",
566 "NUMBER", "FLOAT", "HOSTNAME", "HOSTNAME_WITH_PORT", "IPADDRESS",
567 "IPADDRESS_WITH_PORT", "STRING", "QUOTED_STRING", "FILE_PATH", "' '",
568 "$accept", "begin", "statement", "expression", "behaviors",
569 "behavior_number", "behavior_boolean", "server_list", "server", "hash",
570 "string", "distribution", 0
571 };
572 #endif
573
574 # ifdef YYPRINT
575 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
576 token YYLEX-NUM. */
577 static const yytype_uint16 yytoknum[] =
578 {
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, 44, 61, 317, 318, 319, 320, 321, 322,
586 323, 324, 325, 32
587 };
588 # endif
589
590 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
591 static const yytype_uint8 yyr1[] =
592 {
593 0, 74, 75, 75, 76, 76, 76, 76, 76, 76,
594 76, 76, 77, 77, 77, 77, 78, 78, 78, 78,
595 78, 78, 78, 79, 79, 79, 79, 79, 79, 79,
596 79, 79, 79, 79, 79, 80, 80, 80, 80, 80,
597 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
598 81, 81, 82, 82, 82, 82, 82, 83, 83, 83,
599 83, 83, 83, 83, 83, 83, 84, 84, 85, 85,
600 85
601 };
602
603 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
604 static const yytype_uint8 yyr2[] =
605 {
606 0, 2, 1, 3, 1, 1, 1, 1, 1, 1,
607 1, 3, 2, 2, 2, 1, 2, 2, 4, 2,
608 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
609 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
610 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
611 1, 3, 2, 1, 1, 2, 1, 1, 1, 1,
612 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
613 1
614 };
615
616 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
617 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
618 means the default is an error. */
619 static const yytype_uint8 yydefact[] =
620 {
621 0, 5, 7, 8, 9, 10, 0, 0, 6, 0,
622 0, 35, 36, 37, 38, 23, 0, 0, 39, 25,
623 26, 24, 40, 41, 27, 28, 42, 29, 30, 31,
624 32, 33, 34, 43, 44, 45, 46, 47, 22, 48,
625 49, 0, 0, 2, 4, 15, 0, 21, 0, 66,
626 67, 14, 53, 0, 56, 0, 54, 12, 13, 50,
627 68, 69, 70, 17, 57, 58, 59, 60, 61, 62,
628 63, 64, 65, 19, 16, 1, 0, 20, 11, 52,
629 55, 0, 0, 3, 51, 18
630 };
631
632 /* YYDEFGOTO[NTERM-NUM]. */
633 static const yytype_int8 yydefgoto[] =
634 {
635 -1, 42, 43, 44, 45, 46, 47, 58, 57, 73,
636 51, 63
637 };
638
639 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
640 STATE-NUM. */
641 #define YYPACT_NINF -63
642 static const yytype_int8 yypact[] =
643 {
644 -1, -63, -63, -63, -63, -63, -62, -57, -63, -7,
645 -7, -63, -63, -63, -63, -63, 9, 1, -63, -63,
646 -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
647 -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
648 -63, -57, 0, -63, -63, -63, -38, -63, -57, -63,
649 -63, -63, -63, -17, -63, -16, -63, -63, 2, -63,
650 -63, -63, -63, 7, -63, -63, -63, -63, -63, -63,
651 -63, -63, -63, -63, -63, -63, -1, -63, -63, -63,
652 -63, -7, 1, -63, -63, -63
653 };
654
655 /* YYPGOTO[NTERM-NUM]. */
656 static const yytype_int8 yypgoto[] =
657 {
658 -63, -63, -6, -63, -63, -63, -63, -63, -9, -11,
659 17, -63
660 };
661
662 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
663 positive, shift that token. If negative, reduce the rule which
664 number is the opposite. If zero, do what YYDEFACT says.
665 If YYTABLE_NINF, syntax error. */
666 #define YYTABLE_NINF -1
667 static const yytype_uint8 yytable[] =
668 {
669 75, 59, 1, 2, 3, 4, 5, 6, 7, 8,
670 9, 48, 10, 49, 50, 11, 12, 13, 14, 15,
671 16, 17, 18, 19, 20, 21, 77, 22, 23, 24,
672 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
673 35, 36, 37, 38, 39, 40, 41, 79, 80, 64,
674 65, 66, 67, 68, 69, 70, 71, 72, 74, 52,
675 53, 54, 55, 56, 81, 78, 60, 61, 62, 82,
676 83, 85, 84, 76
677 };
678
679 static const yytype_uint8 yycheck[] =
680 {
681 0, 10, 3, 4, 5, 6, 7, 8, 9, 10,
682 11, 73, 13, 70, 71, 16, 17, 18, 19, 20,
683 21, 22, 23, 24, 25, 26, 64, 28, 29, 30,
684 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
685 41, 42, 43, 44, 45, 46, 47, 64, 64, 48,
686 49, 50, 51, 52, 53, 54, 55, 56, 41, 66,
687 67, 68, 69, 70, 62, 48, 57, 58, 59, 62,
688 76, 82, 81, 73
689 };
690
691 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
692 symbol of state STATE-NUM. */
693 static const yytype_uint8 yystos[] =
694 {
695 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
696 13, 16, 17, 18, 19, 20, 21, 22, 23, 24,
697 25, 26, 28, 29, 30, 31, 32, 33, 34, 35,
698 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
699 46, 47, 75, 76, 77, 78, 79, 80, 73, 70,
700 71, 84, 66, 67, 68, 69, 70, 82, 81, 82,
701 57, 58, 59, 85, 48, 49, 50, 51, 52, 53,
702 54, 55, 56, 83, 84, 0, 73, 64, 84, 64,
703 64, 62, 62, 76, 82, 83
704 };
705
706 #define yyerrok (yyerrstatus = 0)
707 #define yyclearin (yychar = YYEMPTY)
708 #define YYEMPTY (-2)
709 #define YYEOF 0
710
711 #define YYACCEPT goto yyacceptlab
712 #define YYABORT goto yyabortlab
713 #define YYERROR goto yyerrorlab
714
715
716 /* Like YYERROR except do call yyerror. This remains here temporarily
717 to ease the transition to the new meaning of YYERROR, for GCC.
718 Once GCC version 2 has supplanted version 1, this can go. However,
719 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
720 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
721 discussed. */
722
723 #define YYFAIL goto yyerrlab
724 #if defined YYFAIL
725 /* This is here to suppress warnings from the GCC cpp's
726 -Wunused-macros. Normally we don't worry about that warning, but
727 some users do, and we want to make it easy for users to remove
728 YYFAIL uses, which will produce warnings from Bison 2.5. */
729 #endif
730
731 #define YYRECOVERING() (!!yyerrstatus)
732
733 #define YYBACKUP(Token, Value) \
734 do \
735 if (yychar == YYEMPTY && yylen == 1) \
736 { \
737 yychar = (Token); \
738 yylval = (Value); \
739 yytoken = YYTRANSLATE (yychar); \
740 YYPOPSTACK (1); \
741 goto yybackup; \
742 } \
743 else \
744 { \
745 yyerror (context, scanner, YY_("syntax error: cannot back up")); \
746 YYERROR; \
747 } \
748 while (YYID (0))
749
750
751 #define YYTERROR 1
752 #define YYERRCODE 256
753
754
755 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
756 If N is 0, then set CURRENT to the empty location which ends
757 the previous symbol: RHS[0] (always defined). */
758
759 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
760 #ifndef YYLLOC_DEFAULT
761 # define YYLLOC_DEFAULT(Current, Rhs, N) \
762 do \
763 if (YYID (N)) \
764 { \
765 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
766 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
767 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
768 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
769 } \
770 else \
771 { \
772 (Current).first_line = (Current).last_line = \
773 YYRHSLOC (Rhs, 0).last_line; \
774 (Current).first_column = (Current).last_column = \
775 YYRHSLOC (Rhs, 0).last_column; \
776 } \
777 while (YYID (0))
778 #endif
779
780
781 /* YY_LOCATION_PRINT -- Print the location on the stream.
782 This macro was not mandated originally: define only if we know
783 we won't break user code: when these are the locations we know. */
784
785 #ifndef YY_LOCATION_PRINT
786 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
787 # define YY_LOCATION_PRINT(File, Loc) \
788 fprintf (File, "%d.%d-%d.%d", \
789 (Loc).first_line, (Loc).first_column, \
790 (Loc).last_line, (Loc).last_column)
791 # else
792 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
793 # endif
794 #endif
795
796
797 /* YYLEX -- calling `yylex' with the right arguments. */
798
799 #ifdef YYLEX_PARAM
800 # define YYLEX yylex (&yylval, YYLEX_PARAM)
801 #else
802 # define YYLEX yylex (&yylval, scanner)
803 #endif
804
805 /* Enable debugging if requested. */
806 #if YYDEBUG
807
808 # ifndef YYFPRINTF
809 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
810 # define YYFPRINTF fprintf
811 # endif
812
813 # define YYDPRINTF(Args) \
814 do { \
815 if (yydebug) \
816 YYFPRINTF Args; \
817 } while (YYID (0))
818
819 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
820 do { \
821 if (yydebug) \
822 { \
823 YYFPRINTF (stderr, "%s ", Title); \
824 yy_symbol_print (stderr, \
825 Type, Value, context, scanner); \
826 YYFPRINTF (stderr, "\n"); \
827 } \
828 } while (YYID (0))
829
830
831 /*--------------------------------.
832 | Print this symbol on YYOUTPUT. |
833 `--------------------------------*/
834
835 /*ARGSUSED*/
836 #if (defined __STDC__ || defined __C99__FUNC__ \
837 || defined __cplusplus || defined _MSC_VER)
838 static void
839 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, Context *context, yyscan_t *scanner)
840 #else
841 static void
842 yy_symbol_value_print (yyoutput, yytype, yyvaluep, context, scanner)
843 FILE *yyoutput;
844 int yytype;
845 YYSTYPE const * const yyvaluep;
846 Context *context;
847 yyscan_t *scanner;
848 #endif
849 {
850 if (!yyvaluep)
851 return;
852 YYUSE (context);
853 YYUSE (scanner);
854 # ifdef YYPRINT
855 if (yytype < YYNTOKENS)
856 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
857 # else
858 YYUSE (yyoutput);
859 # endif
860 switch (yytype)
861 {
862 default:
863 break;
864 }
865 }
866
867
868 /*--------------------------------.
869 | Print this symbol on YYOUTPUT. |
870 `--------------------------------*/
871
872 #if (defined __STDC__ || defined __C99__FUNC__ \
873 || defined __cplusplus || defined _MSC_VER)
874 static void
875 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, Context *context, yyscan_t *scanner)
876 #else
877 static void
878 yy_symbol_print (yyoutput, yytype, yyvaluep, context, scanner)
879 FILE *yyoutput;
880 int yytype;
881 YYSTYPE const * const yyvaluep;
882 Context *context;
883 yyscan_t *scanner;
884 #endif
885 {
886 if (yytype < YYNTOKENS)
887 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
888 else
889 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
890
891 yy_symbol_value_print (yyoutput, yytype, yyvaluep, context, scanner);
892 YYFPRINTF (yyoutput, ")");
893 }
894
895 /*------------------------------------------------------------------.
896 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
897 | TOP (included). |
898 `------------------------------------------------------------------*/
899
900 #if (defined __STDC__ || defined __C99__FUNC__ \
901 || defined __cplusplus || defined _MSC_VER)
902 static void
903 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
904 #else
905 static void
906 yy_stack_print (yybottom, yytop)
907 yytype_int16 *yybottom;
908 yytype_int16 *yytop;
909 #endif
910 {
911 YYFPRINTF (stderr, "Stack now");
912 for (; yybottom <= yytop; yybottom++)
913 {
914 int yybot = *yybottom;
915 YYFPRINTF (stderr, " %d", yybot);
916 }
917 YYFPRINTF (stderr, "\n");
918 }
919
920 # define YY_STACK_PRINT(Bottom, Top) \
921 do { \
922 if (yydebug) \
923 yy_stack_print ((Bottom), (Top)); \
924 } while (YYID (0))
925
926
927 /*------------------------------------------------.
928 | Report that the YYRULE is going to be reduced. |
929 `------------------------------------------------*/
930
931 #if (defined __STDC__ || defined __C99__FUNC__ \
932 || defined __cplusplus || defined _MSC_VER)
933 static void
934 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, Context *context, yyscan_t *scanner)
935 #else
936 static void
937 yy_reduce_print (yyvsp, yyrule, context, scanner)
938 YYSTYPE *yyvsp;
939 int yyrule;
940 Context *context;
941 yyscan_t *scanner;
942 #endif
943 {
944 int yynrhs = yyr2[yyrule];
945 int yyi;
946 unsigned long int yylno = yyrline[yyrule];
947 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
948 yyrule - 1, yylno);
949 /* The symbols being reduced. */
950 for (yyi = 0; yyi < yynrhs; yyi++)
951 {
952 YYFPRINTF (stderr, " $%d = ", yyi + 1);
953 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
954 &(yyvsp[(yyi + 1) - (yynrhs)])
955 , context, scanner);
956 YYFPRINTF (stderr, "\n");
957 }
958 }
959
960 # define YY_REDUCE_PRINT(Rule) \
961 do { \
962 if (yydebug) \
963 yy_reduce_print (yyvsp, Rule, context, scanner); \
964 } while (YYID (0))
965
966 /* Nonzero means print parse trace. It is left uninitialized so that
967 multiple parsers can coexist. */
968 int yydebug;
969 #else /* !YYDEBUG */
970 # define YYDPRINTF(Args)
971 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
972 # define YY_STACK_PRINT(Bottom, Top)
973 # define YY_REDUCE_PRINT(Rule)
974 #endif /* !YYDEBUG */
975
976
977 /* YYINITDEPTH -- initial size of the parser's stacks. */
978 #ifndef YYINITDEPTH
979 # define YYINITDEPTH 200
980 #endif
981
982 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
983 if the built-in stack extension method is used).
984
985 Do not make this value too large; the results are undefined if
986 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
987 evaluated with infinite-precision integer arithmetic. */
988
989 #ifndef YYMAXDEPTH
990 # define YYMAXDEPTH 10000
991 #endif
992
993 \f
994
995 #if YYERROR_VERBOSE
996
997 # ifndef yystrlen
998 # if defined __GLIBC__ && defined _STRING_H
999 # define yystrlen strlen
1000 # else
1001 /* Return the length of YYSTR. */
1002 #if (defined __STDC__ || defined __C99__FUNC__ \
1003 || defined __cplusplus || defined _MSC_VER)
1004 static YYSIZE_T
1005 yystrlen (const char *yystr)
1006 #else
1007 static YYSIZE_T
1008 yystrlen (yystr)
1009 const char *yystr;
1010 #endif
1011 {
1012 YYSIZE_T yylen;
1013 for (yylen = 0; yystr[yylen]; yylen++)
1014 continue;
1015 return yylen;
1016 }
1017 # endif
1018 # endif
1019
1020 # ifndef yystpcpy
1021 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1022 # define yystpcpy stpcpy
1023 # else
1024 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1025 YYDEST. */
1026 #if (defined __STDC__ || defined __C99__FUNC__ \
1027 || defined __cplusplus || defined _MSC_VER)
1028 static char *
1029 yystpcpy (char *yydest, const char *yysrc)
1030 #else
1031 static char *
1032 yystpcpy (yydest, yysrc)
1033 char *yydest;
1034 const char *yysrc;
1035 #endif
1036 {
1037 char *yyd = yydest;
1038 const char *yys = yysrc;
1039
1040 while ((*yyd++ = *yys++) != '\0')
1041 continue;
1042
1043 return yyd - 1;
1044 }
1045 # endif
1046 # endif
1047
1048 # ifndef yytnamerr
1049 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1050 quotes and backslashes, so that it's suitable for yyerror. The
1051 heuristic is that double-quoting is unnecessary unless the string
1052 contains an apostrophe, a comma, or backslash (other than
1053 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1054 null, do not copy; instead, return the length of what the result
1055 would have been. */
1056 static YYSIZE_T
1057 yytnamerr (char *yyres, const char *yystr)
1058 {
1059 if (*yystr == '"')
1060 {
1061 YYSIZE_T yyn = 0;
1062 char const *yyp = yystr;
1063
1064 for (;;)
1065 switch (*++yyp)
1066 {
1067 case '\'':
1068 case ',':
1069 goto do_not_strip_quotes;
1070
1071 case '\\':
1072 if (*++yyp != '\\')
1073 goto do_not_strip_quotes;
1074 /* Fall through. */
1075 default:
1076 if (yyres)
1077 yyres[yyn] = *yyp;
1078 yyn++;
1079 break;
1080
1081 case '"':
1082 if (yyres)
1083 yyres[yyn] = '\0';
1084 return yyn;
1085 }
1086 do_not_strip_quotes: ;
1087 }
1088
1089 if (! yyres)
1090 return yystrlen (yystr);
1091
1092 return yystpcpy (yyres, yystr) - yyres;
1093 }
1094 # endif
1095
1096 /* Copy into YYRESULT an error message about the unexpected token
1097 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1098 including the terminating null byte. If YYRESULT is null, do not
1099 copy anything; just return the number of bytes that would be
1100 copied. As a special case, return 0 if an ordinary "syntax error"
1101 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1102 size calculation. */
1103 static YYSIZE_T
1104 yysyntax_error (char *yyresult, int yystate, int yychar)
1105 {
1106 int yyn = yypact[yystate];
1107
1108 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1109 return 0;
1110 else
1111 {
1112 int yytype = YYTRANSLATE (yychar);
1113 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1114 YYSIZE_T yysize = yysize0;
1115 YYSIZE_T yysize1;
1116 int yysize_overflow = 0;
1117 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1118 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1119 int yyx;
1120
1121 # if 0
1122 /* This is so xgettext sees the translatable formats that are
1123 constructed on the fly. */
1124 YY_("syntax error, unexpected %s");
1125 YY_("syntax error, unexpected %s, expecting %s");
1126 YY_("syntax error, unexpected %s, expecting %s or %s");
1127 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1128 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1129 # endif
1130 char *yyfmt;
1131 char const *yyf;
1132 static char const yyunexpected[] = "syntax error, unexpected %s";
1133 static char const yyexpecting[] = ", expecting %s";
1134 static char const yyor[] = " or %s";
1135 char yyformat[sizeof yyunexpected
1136 + sizeof yyexpecting - 1
1137 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1138 * (sizeof yyor - 1))];
1139 char const *yyprefix = yyexpecting;
1140
1141 /* Start YYX at -YYN if negative to avoid negative indexes in
1142 YYCHECK. */
1143 int yyxbegin = yyn < 0 ? -yyn : 0;
1144
1145 /* Stay within bounds of both yycheck and yytname. */
1146 int yychecklim = YYLAST - yyn + 1;
1147 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1148 int yycount = 1;
1149
1150 yyarg[0] = yytname[yytype];
1151 yyfmt = yystpcpy (yyformat, yyunexpected);
1152
1153 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1154 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1155 {
1156 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1157 {
1158 yycount = 1;
1159 yysize = yysize0;
1160 yyformat[sizeof yyunexpected - 1] = '\0';
1161 break;
1162 }
1163 yyarg[yycount++] = yytname[yyx];
1164 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1165 yysize_overflow |= (yysize1 < yysize);
1166 yysize = yysize1;
1167 yyfmt = yystpcpy (yyfmt, yyprefix);
1168 yyprefix = yyor;
1169 }
1170
1171 yyf = YY_(yyformat);
1172 yysize1 = yysize + yystrlen (yyf);
1173 yysize_overflow |= (yysize1 < yysize);
1174 yysize = yysize1;
1175
1176 if (yysize_overflow)
1177 return YYSIZE_MAXIMUM;
1178
1179 if (yyresult)
1180 {
1181 /* Avoid sprintf, as that infringes on the user's name space.
1182 Don't have undefined behavior even if the translation
1183 produced a string with the wrong number of "%s"s. */
1184 char *yyp = yyresult;
1185 int yyi = 0;
1186 while ((*yyp = *yyf) != '\0')
1187 {
1188 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1189 {
1190 yyp += yytnamerr (yyp, yyarg[yyi++]);
1191 yyf += 2;
1192 }
1193 else
1194 {
1195 yyp++;
1196 yyf++;
1197 }
1198 }
1199 }
1200 return yysize;
1201 }
1202 }
1203 #endif /* YYERROR_VERBOSE */
1204 \f
1205
1206 /*-----------------------------------------------.
1207 | Release the memory associated to this symbol. |
1208 `-----------------------------------------------*/
1209
1210 /*ARGSUSED*/
1211 #if (defined __STDC__ || defined __C99__FUNC__ \
1212 || defined __cplusplus || defined _MSC_VER)
1213 static void
1214 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, Context *context, yyscan_t *scanner)
1215 #else
1216 static void
1217 yydestruct (yymsg, yytype, yyvaluep, context, scanner)
1218 const char *yymsg;
1219 int yytype;
1220 YYSTYPE *yyvaluep;
1221 Context *context;
1222 yyscan_t *scanner;
1223 #endif
1224 {
1225 YYUSE (yyvaluep);
1226 YYUSE (context);
1227 YYUSE (scanner);
1228
1229 if (!yymsg)
1230 yymsg = "Deleting";
1231 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1232
1233 switch (yytype)
1234 {
1235
1236 default:
1237 break;
1238 }
1239 }
1240
1241 /* Prevent warnings from -Wmissing-prototypes. */
1242 #ifdef YYPARSE_PARAM
1243 #if defined __STDC__ || defined __cplusplus
1244 int yyparse (void *YYPARSE_PARAM);
1245 #else
1246 int yyparse ();
1247 #endif
1248 #else /* ! YYPARSE_PARAM */
1249 #if defined __STDC__ || defined __cplusplus
1250 int yyparse (Context *context, yyscan_t *scanner);
1251 #else
1252 int yyparse ();
1253 #endif
1254 #endif /* ! YYPARSE_PARAM */
1255
1256
1257
1258
1259
1260 /*-------------------------.
1261 | yyparse or yypush_parse. |
1262 `-------------------------*/
1263
1264 #ifdef YYPARSE_PARAM
1265 #if (defined __STDC__ || defined __C99__FUNC__ \
1266 || defined __cplusplus || defined _MSC_VER)
1267 int
1268 yyparse (void *YYPARSE_PARAM)
1269 #else
1270 int
1271 yyparse (YYPARSE_PARAM)
1272 void *YYPARSE_PARAM;
1273 #endif
1274 #else /* ! YYPARSE_PARAM */
1275 #if (defined __STDC__ || defined __C99__FUNC__ \
1276 || defined __cplusplus || defined _MSC_VER)
1277 int
1278 yyparse (Context *context, yyscan_t *scanner)
1279 #else
1280 int
1281 yyparse (context, scanner)
1282 Context *context;
1283 yyscan_t *scanner;
1284 #endif
1285 #endif
1286 {
1287 /* The lookahead symbol. */
1288 int yychar;
1289
1290 /* The semantic value of the lookahead symbol. */
1291 YYSTYPE yylval;
1292
1293 /* Number of syntax errors so far. */
1294 int yynerrs;
1295
1296 int yystate;
1297 /* Number of tokens to shift before error messages enabled. */
1298 int yyerrstatus;
1299
1300 /* The stacks and their tools:
1301 `yyss': related to states.
1302 `yyvs': related to semantic values.
1303
1304 Refer to the stacks thru separate pointers, to allow yyoverflow
1305 to reallocate them elsewhere. */
1306
1307 /* The state stack. */
1308 yytype_int16 yyssa[YYINITDEPTH];
1309 yytype_int16 *yyss;
1310 yytype_int16 *yyssp;
1311
1312 /* The semantic value stack. */
1313 YYSTYPE yyvsa[YYINITDEPTH];
1314 YYSTYPE *yyvs;
1315 YYSTYPE *yyvsp;
1316
1317 YYSIZE_T yystacksize;
1318
1319 int yyn;
1320 int yyresult;
1321 /* Lookahead token as an internal (translated) token number. */
1322 int yytoken;
1323 /* The variables used to return semantic value and location from the
1324 action routines. */
1325 YYSTYPE yyval;
1326
1327 #if YYERROR_VERBOSE
1328 /* Buffer for error messages, and its allocated size. */
1329 char yymsgbuf[128];
1330 char *yymsg = yymsgbuf;
1331 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1332 #endif
1333
1334 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1335
1336 /* The number of symbols on the RHS of the reduced rule.
1337 Keep to zero when no symbol should be popped. */
1338 int yylen = 0;
1339
1340 yytoken = 0;
1341 yyss = yyssa;
1342 yyvs = yyvsa;
1343 yystacksize = YYINITDEPTH;
1344
1345 YYDPRINTF ((stderr, "Starting parse\n"));
1346
1347 yystate = 0;
1348 yyerrstatus = 0;
1349 yynerrs = 0;
1350 yychar = YYEMPTY; /* Cause a token to be read. */
1351
1352 /* Initialize stack pointers.
1353 Waste one element of value and location stack
1354 so that they stay on the same level as the state stack.
1355 The wasted elements are never initialized. */
1356 yyssp = yyss;
1357 yyvsp = yyvs;
1358
1359 goto yysetstate;
1360
1361 /*------------------------------------------------------------.
1362 | yynewstate -- Push a new state, which is found in yystate. |
1363 `------------------------------------------------------------*/
1364 yynewstate:
1365 /* In all cases, when you get here, the value and location stacks
1366 have just been pushed. So pushing a state here evens the stacks. */
1367 yyssp++;
1368
1369 yysetstate:
1370 *yyssp = yystate;
1371
1372 if (yyss + yystacksize - 1 <= yyssp)
1373 {
1374 /* Get the current used size of the three stacks, in elements. */
1375 YYSIZE_T yysize = yyssp - yyss + 1;
1376
1377 #ifdef yyoverflow
1378 {
1379 /* Give user a chance to reallocate the stack. Use copies of
1380 these so that the &'s don't force the real ones into
1381 memory. */
1382 YYSTYPE *yyvs1 = yyvs;
1383 yytype_int16 *yyss1 = yyss;
1384
1385 /* Each stack pointer address is followed by the size of the
1386 data in use in that stack, in bytes. This used to be a
1387 conditional around just the two extra args, but that might
1388 be undefined if yyoverflow is a macro. */
1389 yyoverflow (YY_("memory exhausted"),
1390 &yyss1, yysize * sizeof (*yyssp),
1391 &yyvs1, yysize * sizeof (*yyvsp),
1392 &yystacksize);
1393
1394 yyss = yyss1;
1395 yyvs = yyvs1;
1396 }
1397 #else /* no yyoverflow */
1398 # ifndef YYSTACK_RELOCATE
1399 goto yyexhaustedlab;
1400 # else
1401 /* Extend the stack our own way. */
1402 if (YYMAXDEPTH <= yystacksize)
1403 goto yyexhaustedlab;
1404 yystacksize *= 2;
1405 if (YYMAXDEPTH < yystacksize)
1406 yystacksize = YYMAXDEPTH;
1407
1408 {
1409 yytype_int16 *yyss1 = yyss;
1410 union yyalloc *yyptr =
1411 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1412 if (! yyptr)
1413 goto yyexhaustedlab;
1414 YYSTACK_RELOCATE (yyss_alloc, yyss);
1415 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1416 # undef YYSTACK_RELOCATE
1417 if (yyss1 != yyssa)
1418 YYSTACK_FREE (yyss1);
1419 }
1420 # endif
1421 #endif /* no yyoverflow */
1422
1423 yyssp = yyss + yysize - 1;
1424 yyvsp = yyvs + yysize - 1;
1425
1426 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1427 (unsigned long int) yystacksize));
1428
1429 if (yyss + yystacksize - 1 <= yyssp)
1430 YYABORT;
1431 }
1432
1433 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1434
1435 if (yystate == YYFINAL)
1436 YYACCEPT;
1437
1438 goto yybackup;
1439
1440 /*-----------.
1441 | yybackup. |
1442 `-----------*/
1443 yybackup:
1444
1445 /* Do appropriate processing given the current state. Read a
1446 lookahead token if we need one and don't already have one. */
1447
1448 /* First try to decide what to do without reference to lookahead token. */
1449 yyn = yypact[yystate];
1450 if (yyn == YYPACT_NINF)
1451 goto yydefault;
1452
1453 /* Not known => get a lookahead token if don't already have one. */
1454
1455 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1456 if (yychar == YYEMPTY)
1457 {
1458 YYDPRINTF ((stderr, "Reading a token: "));
1459 yychar = YYLEX;
1460 }
1461
1462 if (yychar <= YYEOF)
1463 {
1464 yychar = yytoken = YYEOF;
1465 YYDPRINTF ((stderr, "Now at end of input.\n"));
1466 }
1467 else
1468 {
1469 yytoken = YYTRANSLATE (yychar);
1470 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1471 }
1472
1473 /* If the proper action on seeing token YYTOKEN is to reduce or to
1474 detect an error, take that action. */
1475 yyn += yytoken;
1476 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1477 goto yydefault;
1478 yyn = yytable[yyn];
1479 if (yyn <= 0)
1480 {
1481 if (yyn == 0 || yyn == YYTABLE_NINF)
1482 goto yyerrlab;
1483 yyn = -yyn;
1484 goto yyreduce;
1485 }
1486
1487 /* Count tokens shifted since error; after three, turn off error
1488 status. */
1489 if (yyerrstatus)
1490 yyerrstatus--;
1491
1492 /* Shift the lookahead token. */
1493 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1494
1495 /* Discard the shifted token. */
1496 yychar = YYEMPTY;
1497
1498 yystate = yyn;
1499 *++yyvsp = yylval;
1500
1501 goto yynewstate;
1502
1503
1504 /*-----------------------------------------------------------.
1505 | yydefault -- do the default action for the current state. |
1506 `-----------------------------------------------------------*/
1507 yydefault:
1508 yyn = yydefact[yystate];
1509 if (yyn == 0)
1510 goto yyerrlab;
1511 goto yyreduce;
1512
1513
1514 /*-----------------------------.
1515 | yyreduce -- Do a reduction. |
1516 `-----------------------------*/
1517 yyreduce:
1518 /* yyn is the number of a rule to reduce with. */
1519 yylen = yyr2[yyn];
1520
1521 /* If YYLEN is nonzero, implement the default value of the action:
1522 `$$ = $1'.
1523
1524 Otherwise, the following line sets YYVAL to garbage.
1525 This behavior is undocumented and Bison
1526 users should not rely upon it. Assigning to YYVAL
1527 unconditionally makes the parser a bit smaller, and it avoids a
1528 GCC warning that YYVAL may be used uninitialized. */
1529 yyval = yyvsp[1-yylen];
1530
1531
1532 YY_REDUCE_PRINT (yyn);
1533 switch (yyn)
1534 {
1535 case 4:
1536
1537 /* Line 1464 of yacc.c */
1538 #line 170 "libmemcached/options/parser.yy"
1539 { ;}
1540 break;
1541
1542 case 5:
1543
1544 /* Line 1464 of yacc.c */
1545 #line 172 "libmemcached/options/parser.yy"
1546 { ;}
1547 break;
1548
1549 case 6:
1550
1551 /* Line 1464 of yacc.c */
1552 #line 174 "libmemcached/options/parser.yy"
1553 { ;}
1554 break;
1555
1556 case 7:
1557
1558 /* Line 1464 of yacc.c */
1559 #line 176 "libmemcached/options/parser.yy"
1560 {
1561 context->set_end();
1562 YYACCEPT;
1563 ;}
1564 break;
1565
1566 case 8:
1567
1568 /* Line 1464 of yacc.c */
1569 #line 181 "libmemcached/options/parser.yy"
1570 {
1571 context->rc= MEMCACHED_PARSE_USER_ERROR;
1572 parser_abort(context, NULL);
1573 ;}
1574 break;
1575
1576 case 9:
1577
1578 /* Line 1464 of yacc.c */
1579 #line 186 "libmemcached/options/parser.yy"
1580 {
1581 memcached_reset(context->memc);
1582 ;}
1583 break;
1584
1585 case 10:
1586
1587 /* Line 1464 of yacc.c */
1588 #line 190 "libmemcached/options/parser.yy"
1589 {
1590 yydebug= 1;
1591 ;}
1592 break;
1593
1594 case 11:
1595
1596 /* Line 1464 of yacc.c */
1597 #line 194 "libmemcached/options/parser.yy"
1598 {
1599 if ((context->rc= memcached_parse_configure_file(context->memc, (yyvsp[(3) - (3)].string).c_str, (yyvsp[(3) - (3)].string).length)) != MEMCACHED_SUCCESS)
1600 {
1601 parser_abort(context, NULL);
1602 }
1603 ;}
1604 break;
1605
1606 case 12:
1607
1608 /* Line 1464 of yacc.c */
1609 #line 205 "libmemcached/options/parser.yy"
1610 {
1611 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)
1612 {
1613 parser_abort(context, NULL);
1614 }
1615 ;}
1616 break;
1617
1618 case 13:
1619
1620 /* Line 1464 of yacc.c */
1621 #line 212 "libmemcached/options/parser.yy"
1622 {
1623 ;}
1624 break;
1625
1626 case 14:
1627
1628 /* Line 1464 of yacc.c */
1629 #line 215 "libmemcached/options/parser.yy"
1630 {
1631 memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).length);
1632 ;}
1633 break;
1634
1635 case 16:
1636
1637 /* Line 1464 of yacc.c */
1638 #line 223 "libmemcached/options/parser.yy"
1639 {
1640 if ((context->rc= memcached_set_prefix_key(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).length)) != MEMCACHED_SUCCESS)
1641 {
1642 parser_abort(context, NULL);;
1643 }
1644 ;}
1645 break;
1646
1647 case 17:
1648
1649 /* Line 1464 of yacc.c */
1650 #line 230 "libmemcached/options/parser.yy"
1651 {
1652 if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS)
1653 {
1654 parser_abort(context, NULL);;
1655 }
1656 ;}
1657 break;
1658
1659 case 18:
1660
1661 /* Line 1464 of yacc.c */
1662 #line 237 "libmemcached/options/parser.yy"
1663 {
1664 if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS)
1665 {
1666 parser_abort(context, NULL);;
1667 }
1668 if ((context->rc= memcached_behavior_set_distribution_hash(context->memc, (yyvsp[(4) - (4)].hash))) != MEMCACHED_SUCCESS)
1669 {
1670 parser_abort(context, NULL);;
1671 }
1672 ;}
1673 break;
1674
1675 case 19:
1676
1677 /* Line 1464 of yacc.c */
1678 #line 248 "libmemcached/options/parser.yy"
1679 {
1680 if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, (yyvsp[(2) - (2)].hash))) != MEMCACHED_SUCCESS)
1681 {
1682 parser_abort(context, NULL);;
1683 }
1684 ;}
1685 break;
1686
1687 case 20:
1688
1689 /* Line 1464 of yacc.c */
1690 #line 255 "libmemcached/options/parser.yy"
1691 {
1692 if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS)
1693 {
1694 parser_abort(context, NULL);;
1695 }
1696 ;}
1697 break;
1698
1699 case 21:
1700
1701 /* Line 1464 of yacc.c */
1702 #line 262 "libmemcached/options/parser.yy"
1703 {
1704 if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS)
1705 {
1706 parser_abort(context, NULL);;
1707 }
1708 ;}
1709 break;
1710
1711 case 22:
1712
1713 /* Line 1464 of yacc.c */
1714 #line 269 "libmemcached/options/parser.yy"
1715 {
1716 ;}
1717 break;
1718
1719 case 23:
1720
1721 /* Line 1464 of yacc.c */
1722 #line 275 "libmemcached/options/parser.yy"
1723 {
1724 (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
1725 ;}
1726 break;
1727
1728 case 24:
1729
1730 /* Line 1464 of yacc.c */
1731 #line 279 "libmemcached/options/parser.yy"
1732 {
1733 (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
1734 ;}
1735 break;
1736
1737 case 25:
1738
1739 /* Line 1464 of yacc.c */
1740 #line 283 "libmemcached/options/parser.yy"
1741 {
1742 (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
1743 ;}
1744 break;
1745
1746 case 26:
1747
1748 /* Line 1464 of yacc.c */
1749 #line 287 "libmemcached/options/parser.yy"
1750 {
1751 (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
1752 ;}
1753 break;
1754
1755 case 27:
1756
1757 /* Line 1464 of yacc.c */
1758 #line 291 "libmemcached/options/parser.yy"
1759 {
1760 (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
1761 ;}
1762 break;
1763
1764 case 28:
1765
1766 /* Line 1464 of yacc.c */
1767 #line 295 "libmemcached/options/parser.yy"
1768 {
1769 (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
1770 ;}
1771 break;
1772
1773 case 29:
1774
1775 /* Line 1464 of yacc.c */
1776 #line 299 "libmemcached/options/parser.yy"
1777 {
1778 (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
1779 ;}
1780 break;
1781
1782 case 30:
1783
1784 /* Line 1464 of yacc.c */
1785 #line 303 "libmemcached/options/parser.yy"
1786 {
1787 (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
1788 ;}
1789 break;
1790
1791 case 31:
1792
1793 /* Line 1464 of yacc.c */
1794 #line 307 "libmemcached/options/parser.yy"
1795 {
1796 (yyval.behavior)= MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT;
1797 ;}
1798 break;
1799
1800 case 32:
1801
1802 /* Line 1464 of yacc.c */
1803 #line 311 "libmemcached/options/parser.yy"
1804 {
1805 (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
1806 ;}
1807 break;
1808
1809 case 33:
1810
1811 /* Line 1464 of yacc.c */
1812 #line 315 "libmemcached/options/parser.yy"
1813 {
1814 (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
1815 ;}
1816 break;
1817
1818 case 34:
1819
1820 /* Line 1464 of yacc.c */
1821 #line 319 "libmemcached/options/parser.yy"
1822 {
1823 (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
1824 ;}
1825 break;
1826
1827 case 35:
1828
1829 /* Line 1464 of yacc.c */
1830 #line 326 "libmemcached/options/parser.yy"
1831 {
1832 (yyval.behavior)= MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS;
1833 ;}
1834 break;
1835
1836 case 36:
1837
1838 /* Line 1464 of yacc.c */
1839 #line 330 "libmemcached/options/parser.yy"
1840 {
1841 (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
1842 ;}
1843 break;
1844
1845 case 37:
1846
1847 /* Line 1464 of yacc.c */
1848 #line 334 "libmemcached/options/parser.yy"
1849 {
1850 (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
1851 ;}
1852 break;
1853
1854 case 38:
1855
1856 /* Line 1464 of yacc.c */
1857 #line 338 "libmemcached/options/parser.yy"
1858 {
1859 (yyval.behavior)= MEMCACHED_BEHAVIOR_CACHE_LOOKUPS;
1860 ;}
1861 break;
1862
1863 case 39:
1864
1865 /* Line 1464 of yacc.c */
1866 #line 342 "libmemcached/options/parser.yy"
1867 {
1868 (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
1869 ;}
1870 break;
1871
1872 case 40:
1873
1874 /* Line 1464 of yacc.c */
1875 #line 346 "libmemcached/options/parser.yy"
1876 {
1877 (yyval.behavior)= MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED;
1878 ;}
1879 break;
1880
1881 case 41:
1882
1883 /* Line 1464 of yacc.c */
1884 #line 350 "libmemcached/options/parser.yy"
1885 {
1886 (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY;
1887 ;}
1888 break;
1889
1890 case 42:
1891
1892 /* Line 1464 of yacc.c */
1893 #line 354 "libmemcached/options/parser.yy"
1894 {
1895 (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
1896 ;}
1897 break;
1898
1899 case 43:
1900
1901 /* Line 1464 of yacc.c */
1902 #line 358 "libmemcached/options/parser.yy"
1903 {
1904 (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS;
1905 ;}
1906 break;
1907
1908 case 44:
1909
1910 /* Line 1464 of yacc.c */
1911 #line 362 "libmemcached/options/parser.yy"
1912 {
1913 (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
1914 ;}
1915 break;
1916
1917 case 45:
1918
1919 /* Line 1464 of yacc.c */
1920 #line 366 "libmemcached/options/parser.yy"
1921 {
1922 (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY;
1923 ;}
1924 break;
1925
1926 case 46:
1927
1928 /* Line 1464 of yacc.c */
1929 #line 370 "libmemcached/options/parser.yy"
1930 {
1931 (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
1932 ;}
1933 break;
1934
1935 case 47:
1936
1937 /* Line 1464 of yacc.c */
1938 #line 374 "libmemcached/options/parser.yy"
1939 {
1940 (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
1941 ;}
1942 break;
1943
1944 case 48:
1945
1946 /* Line 1464 of yacc.c */
1947 #line 378 "libmemcached/options/parser.yy"
1948 {
1949 (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP;
1950 ;}
1951 break;
1952
1953 case 49:
1954
1955 /* Line 1464 of yacc.c */
1956 #line 382 "libmemcached/options/parser.yy"
1957 {
1958 (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY;
1959 ;}
1960 break;
1961
1962 case 50:
1963
1964 /* Line 1464 of yacc.c */
1965 #line 389 "libmemcached/options/parser.yy"
1966 {
1967 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)
1968 {
1969 parser_abort(context, NULL);;
1970 }
1971 ;}
1972 break;
1973
1974 case 51:
1975
1976 /* Line 1464 of yacc.c */
1977 #line 396 "libmemcached/options/parser.yy"
1978 {
1979 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)
1980 {
1981 parser_abort(context, NULL);;
1982 }
1983 ;}
1984 break;
1985
1986 case 52:
1987
1988 /* Line 1464 of yacc.c */
1989 #line 406 "libmemcached/options/parser.yy"
1990 {
1991 (yyval.server).c_str= (yyvsp[(1) - (2)].string).c_str;
1992 (yyval.server).length= (yyvsp[(1) - (2)].string).length -1; // -1 to remove :
1993 (yyval.server).port= (yyvsp[(2) - (2)].number);
1994 ;}
1995 break;
1996
1997 case 53:
1998
1999 /* Line 1464 of yacc.c */
2000 #line 412 "libmemcached/options/parser.yy"
2001 {
2002 (yyval.server).c_str= (yyvsp[(1) - (1)].string).c_str;
2003 (yyval.server).length= (yyvsp[(1) - (1)].string).length;
2004 (yyval.server).port= MEMCACHED_DEFAULT_PORT;
2005 ;}
2006 break;
2007
2008 case 54:
2009
2010 /* Line 1464 of yacc.c */
2011 #line 418 "libmemcached/options/parser.yy"
2012 {
2013 (yyval.server).c_str= (yyvsp[(1) - (1)].string).c_str;
2014 (yyval.server).length= (yyvsp[(1) - (1)].string).length;
2015 (yyval.server).port= MEMCACHED_DEFAULT_PORT;
2016 ;}
2017 break;
2018
2019 case 55:
2020
2021 /* Line 1464 of yacc.c */
2022 #line 424 "libmemcached/options/parser.yy"
2023 {
2024 (yyval.server).c_str= (yyvsp[(1) - (2)].string).c_str;
2025 (yyval.server).length= (yyvsp[(1) - (2)].string).length -1; // -1 to remove :
2026 (yyval.server).port= (yyvsp[(2) - (2)].number);
2027 ;}
2028 break;
2029
2030 case 56:
2031
2032 /* Line 1464 of yacc.c */
2033 #line 430 "libmemcached/options/parser.yy"
2034 {
2035 (yyval.server).c_str= (yyvsp[(1) - (1)].string).c_str;
2036 (yyval.server).length= (yyvsp[(1) - (1)].string).length;
2037 (yyval.server).port= MEMCACHED_DEFAULT_PORT;
2038 ;}
2039 break;
2040
2041 case 57:
2042
2043 /* Line 1464 of yacc.c */
2044 #line 439 "libmemcached/options/parser.yy"
2045 {
2046 (yyval.hash)= MEMCACHED_HASH_MD5;
2047 ;}
2048 break;
2049
2050 case 58:
2051
2052 /* Line 1464 of yacc.c */
2053 #line 443 "libmemcached/options/parser.yy"
2054 {
2055 (yyval.hash)= MEMCACHED_HASH_CRC;
2056 ;}
2057 break;
2058
2059 case 59:
2060
2061 /* Line 1464 of yacc.c */
2062 #line 447 "libmemcached/options/parser.yy"
2063 {
2064 (yyval.hash)= MEMCACHED_HASH_FNV1_64;
2065 ;}
2066 break;
2067
2068 case 60:
2069
2070 /* Line 1464 of yacc.c */
2071 #line 451 "libmemcached/options/parser.yy"
2072 {
2073 (yyval.hash)= MEMCACHED_HASH_FNV1A_64;
2074 ;}
2075 break;
2076
2077 case 61:
2078
2079 /* Line 1464 of yacc.c */
2080 #line 455 "libmemcached/options/parser.yy"
2081 {
2082 (yyval.hash)= MEMCACHED_HASH_FNV1_32;
2083 ;}
2084 break;
2085
2086 case 62:
2087
2088 /* Line 1464 of yacc.c */
2089 #line 459 "libmemcached/options/parser.yy"
2090 {
2091 (yyval.hash)= MEMCACHED_HASH_FNV1A_32;
2092 ;}
2093 break;
2094
2095 case 63:
2096
2097 /* Line 1464 of yacc.c */
2098 #line 463 "libmemcached/options/parser.yy"
2099 {
2100 (yyval.hash)= MEMCACHED_HASH_HSIEH;
2101 ;}
2102 break;
2103
2104 case 64:
2105
2106 /* Line 1464 of yacc.c */
2107 #line 467 "libmemcached/options/parser.yy"
2108 {
2109 (yyval.hash)= MEMCACHED_HASH_MURMUR;
2110 ;}
2111 break;
2112
2113 case 65:
2114
2115 /* Line 1464 of yacc.c */
2116 #line 471 "libmemcached/options/parser.yy"
2117 {
2118 (yyval.hash)= MEMCACHED_HASH_JENKINS;
2119 ;}
2120 break;
2121
2122 case 66:
2123
2124 /* Line 1464 of yacc.c */
2125 #line 478 "libmemcached/options/parser.yy"
2126 {
2127 (yyval.string)= (yyvsp[(1) - (1)].string);
2128 ;}
2129 break;
2130
2131 case 67:
2132
2133 /* Line 1464 of yacc.c */
2134 #line 482 "libmemcached/options/parser.yy"
2135 {
2136 (yyval.string).c_str= (yyvsp[(1) - (1)].string).c_str +1; // +1 to move use passed the initial quote
2137 (yyval.string).length= (yyvsp[(1) - (1)].string).length -1; // -1 removes the end quote
2138 ;}
2139 break;
2140
2141 case 68:
2142
2143 /* Line 1464 of yacc.c */
2144 #line 490 "libmemcached/options/parser.yy"
2145 {
2146 (yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT;
2147 ;}
2148 break;
2149
2150 case 69:
2151
2152 /* Line 1464 of yacc.c */
2153 #line 494 "libmemcached/options/parser.yy"
2154 {
2155 (yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA;
2156 ;}
2157 break;
2158
2159 case 70:
2160
2161 /* Line 1464 of yacc.c */
2162 #line 498 "libmemcached/options/parser.yy"
2163 {
2164 (yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM;
2165 ;}
2166 break;
2167
2168
2169
2170 /* Line 1464 of yacc.c */
2171 #line 2172 "libmemcached/options/parser.cc"
2172 default: break;
2173 }
2174 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2175
2176 YYPOPSTACK (yylen);
2177 yylen = 0;
2178 YY_STACK_PRINT (yyss, yyssp);
2179
2180 *++yyvsp = yyval;
2181
2182 /* Now `shift' the result of the reduction. Determine what state
2183 that goes to, based on the state we popped back to and the rule
2184 number reduced by. */
2185
2186 yyn = yyr1[yyn];
2187
2188 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2189 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2190 yystate = yytable[yystate];
2191 else
2192 yystate = yydefgoto[yyn - YYNTOKENS];
2193
2194 goto yynewstate;
2195
2196
2197 /*------------------------------------.
2198 | yyerrlab -- here on detecting error |
2199 `------------------------------------*/
2200 yyerrlab:
2201 /* If not already recovering from an error, report this error. */
2202 if (!yyerrstatus)
2203 {
2204 ++yynerrs;
2205 #if ! YYERROR_VERBOSE
2206 yyerror (context, scanner, YY_("syntax error"));
2207 #else
2208 {
2209 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2210 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2211 {
2212 YYSIZE_T yyalloc = 2 * yysize;
2213 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2214 yyalloc = YYSTACK_ALLOC_MAXIMUM;
2215 if (yymsg != yymsgbuf)
2216 YYSTACK_FREE (yymsg);
2217 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2218 if (yymsg)
2219 yymsg_alloc = yyalloc;
2220 else
2221 {
2222 yymsg = yymsgbuf;
2223 yymsg_alloc = sizeof yymsgbuf;
2224 }
2225 }
2226
2227 if (0 < yysize && yysize <= yymsg_alloc)
2228 {
2229 (void) yysyntax_error (yymsg, yystate, yychar);
2230 yyerror (context, scanner, yymsg);
2231 }
2232 else
2233 {
2234 yyerror (context, scanner, YY_("syntax error"));
2235 if (yysize != 0)
2236 goto yyexhaustedlab;
2237 }
2238 }
2239 #endif
2240 }
2241
2242
2243
2244 if (yyerrstatus == 3)
2245 {
2246 /* If just tried and failed to reuse lookahead token after an
2247 error, discard it. */
2248
2249 if (yychar <= YYEOF)
2250 {
2251 /* Return failure if at end of input. */
2252 if (yychar == YYEOF)
2253 YYABORT;
2254 }
2255 else
2256 {
2257 yydestruct ("Error: discarding",
2258 yytoken, &yylval, context, scanner);
2259 yychar = YYEMPTY;
2260 }
2261 }
2262
2263 /* Else will try to reuse lookahead token after shifting the error
2264 token. */
2265 goto yyerrlab1;
2266
2267
2268 /*---------------------------------------------------.
2269 | yyerrorlab -- error raised explicitly by YYERROR. |
2270 `---------------------------------------------------*/
2271 yyerrorlab:
2272
2273 /* Pacify compilers like GCC when the user code never invokes
2274 YYERROR and the label yyerrorlab therefore never appears in user
2275 code. */
2276 if (/*CONSTCOND*/ 0)
2277 goto yyerrorlab;
2278
2279 /* Do not reclaim the symbols of the rule which action triggered
2280 this YYERROR. */
2281 YYPOPSTACK (yylen);
2282 yylen = 0;
2283 YY_STACK_PRINT (yyss, yyssp);
2284 yystate = *yyssp;
2285 goto yyerrlab1;
2286
2287
2288 /*-------------------------------------------------------------.
2289 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2290 `-------------------------------------------------------------*/
2291 yyerrlab1:
2292 yyerrstatus = 3; /* Each real token shifted decrements this. */
2293
2294 for (;;)
2295 {
2296 yyn = yypact[yystate];
2297 if (yyn != YYPACT_NINF)
2298 {
2299 yyn += YYTERROR;
2300 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2301 {
2302 yyn = yytable[yyn];
2303 if (0 < yyn)
2304 break;
2305 }
2306 }
2307
2308 /* Pop the current state because it cannot handle the error token. */
2309 if (yyssp == yyss)
2310 YYABORT;
2311
2312
2313 yydestruct ("Error: popping",
2314 yystos[yystate], yyvsp, context, scanner);
2315 YYPOPSTACK (1);
2316 yystate = *yyssp;
2317 YY_STACK_PRINT (yyss, yyssp);
2318 }
2319
2320 *++yyvsp = yylval;
2321
2322
2323 /* Shift the error token. */
2324 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2325
2326 yystate = yyn;
2327 goto yynewstate;
2328
2329
2330 /*-------------------------------------.
2331 | yyacceptlab -- YYACCEPT comes here. |
2332 `-------------------------------------*/
2333 yyacceptlab:
2334 yyresult = 0;
2335 goto yyreturn;
2336
2337 /*-----------------------------------.
2338 | yyabortlab -- YYABORT comes here. |
2339 `-----------------------------------*/
2340 yyabortlab:
2341 yyresult = 1;
2342 goto yyreturn;
2343
2344 #if !defined(yyoverflow) || YYERROR_VERBOSE
2345 /*-------------------------------------------------.
2346 | yyexhaustedlab -- memory exhaustion comes here. |
2347 `-------------------------------------------------*/
2348 yyexhaustedlab:
2349 yyerror (context, scanner, YY_("memory exhausted"));
2350 yyresult = 2;
2351 /* Fall through. */
2352 #endif
2353
2354 yyreturn:
2355 if (yychar != YYEMPTY)
2356 yydestruct ("Cleanup: discarding lookahead",
2357 yytoken, &yylval, context, scanner);
2358 /* Do not reclaim the symbols of the rule which action triggered
2359 this YYABORT or YYACCEPT. */
2360 YYPOPSTACK (yylen);
2361 YY_STACK_PRINT (yyss, yyssp);
2362 while (yyssp != yyss)
2363 {
2364 yydestruct ("Cleanup: popping",
2365 yystos[*yyssp], yyvsp, context, scanner);
2366 YYPOPSTACK (1);
2367 }
2368 #ifndef yyoverflow
2369 if (yyss != yyssa)
2370 YYSTACK_FREE (yyss);
2371 #endif
2372 #if YYERROR_VERBOSE
2373 if (yymsg != yymsgbuf)
2374 YYSTACK_FREE (yymsg);
2375 #endif
2376 /* Make sure YYID is used. */
2377 return YYID (yyresult);
2378 }
2379
2380
2381