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