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