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