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