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