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