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