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