1 /* original parser id follows */
2 /* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */
3 /* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
4
5 #define YYBYACC 1
6 #define YYMAJOR 1
7 #define YYMINOR 9
8 #define YYCHECK "yyyymmdd"
9
10 #define YYEMPTY (-1)
11 #define yyclearin (yychar = YYEMPTY)
12 #define yyerrok (yyerrflag = 0)
13 #define YYRECOVERING() (yyerrflag != 0)
14 #define YYENOMEM (-2)
15 #define YYEOF 0
16 #undef YYBTYACC
17 #define YYBTYACC 0
18 #define YYDEBUGSTR YYPREFIX "debug"
19
20 #ifndef yyparse
21 #define yyparse error_parse
22 #endif /* yyparse */
23
24 #ifndef yylex
25 #define yylex error_lex
26 #endif /* yylex */
27
28 #ifndef yyerror
29 #define yyerror error_error
30 #endif /* yyerror */
31
32 #ifndef yychar
33 #define yychar error_char
34 #endif /* yychar */
35
36 #ifndef yyval
37 #define yyval error_val
38 #endif /* yyval */
39
40 #ifndef yylval
41 #define yylval error_lval
42 #endif /* yylval */
43
44 #ifndef yydebug
45 #define yydebug error_debug
46 #endif /* yydebug */
47
48 #ifndef yynerrs
49 #define yynerrs error_nerrs
50 #endif /* yynerrs */
51
52 #ifndef yyerrflag
53 #define yyerrflag error_errflag
54 #endif /* yyerrflag */
55
56 #ifndef yylhs
57 #define yylhs error_lhs
58 #endif /* yylhs */
59
60 #ifndef yylen
61 #define yylen error_len
62 #endif /* yylen */
63
64 #ifndef yydefred
65 #define yydefred error_defred
66 #endif /* yydefred */
67
68 #ifndef yystos
69 #define yystos error_stos
70 #endif /* yystos */
71
72 #ifndef yydgoto
73 #define yydgoto error_dgoto
74 #endif /* yydgoto */
75
76 #ifndef yysindex
77 #define yysindex error_sindex
78 #endif /* yysindex */
79
80 #ifndef yyrindex
81 #define yyrindex error_rindex
82 #endif /* yyrindex */
83
84 #ifndef yygindex
85 #define yygindex error_gindex
86 #endif /* yygindex */
87
88 #ifndef yytable
89 #define yytable error_table
90 #endif /* yytable */
91
92 #ifndef yycheck
93 #define yycheck error_check
94 #endif /* yycheck */
95
96 #ifndef yyname
97 #define yyname error_name
98 #endif /* yyname */
99
100 #ifndef yyrule
101 #define yyrule error_rule
102 #endif /* yyrule */
103
104 #if YYBTYACC
105
106 #ifndef yycindex
107 #define yycindex error_cindex
108 #endif /* yycindex */
109
110 #ifndef yyctable
111 #define yyctable error_ctable
112 #endif /* yyctable */
113
114 #endif /* YYBTYACC */
115
116 #define YYPREFIX "error_"
117
118 #define YYPURE 0
119
120 #line 2 "code_error.y"
121
122 #ifdef YYBISON
123 int yylex(void);
124 static void yyerror(const char *);
125 #endif
126
127 #line 128 "code_error.code.c"
128
129 #if ! defined(YYSTYPE) && ! defined(YYSTYPE_IS_DECLARED)
130 /* Default: YYSTYPE is the semantic value type. */
131 typedef int YYSTYPE;
132 # define YYSTYPE_IS_DECLARED 1
133 #endif
134
135 /* compatibility with bison */
136 #ifdef YYPARSE_PARAM
137 /* compatibility with FreeBSD */
138 # ifdef YYPARSE_PARAM_TYPE
139 # define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
140 # else
141 # define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
142 # endif
143 #else
144 # define YYPARSE_DECL() yyparse(void)
145 #endif
146
147 /* Parameters sent to lex. */
148 #ifdef YYLEX_PARAM
149 # define YYLEX_DECL() yylex(void *YYLEX_PARAM)
150 # define YYLEX yylex(YYLEX_PARAM)
151 #else
152 # define YYLEX_DECL() yylex(void)
153 # define YYLEX yylex()
154 #endif
155
156 /* Parameters sent to yyerror. */
157 #ifndef YYERROR_DECL
158 #define YYERROR_DECL() yyerror(const char *s)
159 #endif
160 #ifndef YYERROR_CALL
161 #define YYERROR_CALL(msg) yyerror(msg)
162 #endif
163
164 #define YYERRCODE 256
165 #define YYTABLESIZE 0
166 #define YYFINAL 2
167 #ifndef YYDEBUG
168 #define YYDEBUG 0
169 #endif
170 #define YYMAXTOKEN 256
171 #define YYUNDFTOKEN 259
172 #define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
173
174 extern int YYPARSE_DECL();
175 typedef short YYINT;
176 extern const YYINT yylhs[];
177 extern const YYINT yylen[];
178 extern const YYINT yydefred[];
179 extern const YYINT yystos[];
180 extern const YYINT yydgoto[];
181 extern const YYINT yysindex[];
182 extern const YYINT yyrindex[];
183 #if YYBTYACC
184 extern const YYINT yycindex[];
185 #endif /* YYBTYACC */
186 extern const YYINT yygindex[];
187 extern const YYINT yytable[];
188 extern const YYINT yycheck[];
189 #if YYBTYACC
190 extern const YYINT yyctable[];
191 #endif /* YYBTYACC */
192
193 #if YYDEBUG || defined(yytname)
194 extern const char *const yyname[];
195 #endif
196 #if YYDEBUG
197 extern const char *const yyrule[];
198 #endif
199
200 int yydebug;
201 int yynerrs;
202
203 int yyerrflag;
204 int yychar;
205 YYSTYPE yyval;
206 YYSTYPE yylval;
207 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
208 YYLTYPE yyloc; /* position returned by actions */
209 YYLTYPE yylloc; /* position from the lexer */
210 #endif
211
212 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
213 #ifndef YYLLOC_DEFAULT
214 #define YYLLOC_DEFAULT(loc, rhs, n) \
215 do \
216 { \
217 if (n == 0) \
218 { \
219 (loc).first_line = ((rhs)[-1]).last_line; \
220 (loc).first_column = ((rhs)[-1]).last_column; \
221 (loc).last_line = ((rhs)[-1]).last_line; \
222 (loc).last_column = ((rhs)[-1]).last_column; \
223 } \
224 else \
225 { \
226 (loc).first_line = ((rhs)[ 0 ]).first_line; \
227 (loc).first_column = ((rhs)[ 0 ]).first_column; \
228 (loc).last_line = ((rhs)[n-1]).last_line; \
229 (loc).last_column = ((rhs)[n-1]).last_column; \
230 } \
231 } while (0)
232 #endif /* YYLLOC_DEFAULT */
233 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
234 #if YYBTYACC
235
236 #ifndef YYLVQUEUEGROWTH
237 #define YYLVQUEUEGROWTH 32
238 #endif
239 #endif /* YYBTYACC */
240
241 /* define the initial stack-sizes */
242 #ifdef YYSTACKSIZE
243 #undef YYMAXDEPTH
244 #define YYMAXDEPTH YYSTACKSIZE
245 #else
246 #ifdef YYMAXDEPTH
247 #define YYSTACKSIZE YYMAXDEPTH
248 #else
249 #define YYSTACKSIZE 10000
250 #define YYMAXDEPTH 10000
251 #endif
252 #endif
253
254 #ifndef YYINITSTACKSIZE
255 #define YYINITSTACKSIZE 200
256 #endif
257
258 typedef struct {
259 unsigned stacksize;
260 YYINT *s_base;
261 YYINT *s_mark;
262 YYINT *s_last;
263 YYSTYPE *l_base;
264 YYSTYPE *l_mark;
265 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
266 YYLTYPE *p_base;
267 YYLTYPE *p_mark;
268 #endif
269 } YYSTACKDATA;
270 #if YYBTYACC
271
272 struct YYParseState_s
273 {
274 struct YYParseState_s *save; /* Previously saved parser state */
275 YYSTACKDATA yystack; /* saved parser stack */
276 int state; /* saved parser state */
277 int errflag; /* saved error recovery status */
278 int lexeme; /* saved index of the conflict lexeme in the lexical queue */
279 YYINT ctry; /* saved index in yyctable[] for this conflict */
280 };
281 typedef struct YYParseState_s YYParseState;
282 #endif /* YYBTYACC */
283 /* variables for the parser stack */
284 static YYSTACKDATA yystack;
285 #if YYBTYACC
286
287 /* Current parser state */
288 static YYParseState *yyps = 0;
289
290 /* yypath != NULL: do the full parse, starting at *yypath parser state. */
291 static YYParseState *yypath = 0;
292
293 /* Base of the lexical value queue */
294 static YYSTYPE *yylvals = 0;
295
296 /* Current position at lexical value queue */
297 static YYSTYPE *yylvp = 0;
298
299 /* End position of lexical value queue */
300 static YYSTYPE *yylve = 0;
301
302 /* The last allocated position at the lexical value queue */
303 static YYSTYPE *yylvlim = 0;
304
305 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
306 /* Base of the lexical position queue */
307 static YYLTYPE *yylpsns = 0;
308
309 /* Current position at lexical position queue */
310 static YYLTYPE *yylpp = 0;
311
312 /* End position of lexical position queue */
313 static YYLTYPE *yylpe = 0;
314
315 /* The last allocated position at the lexical position queue */
316 static YYLTYPE *yylplim = 0;
317 #endif
318
319 /* Current position at lexical token queue */
320 static YYINT *yylexp = 0;
321
322 static YYINT *yylexemes = 0;
323 #endif /* YYBTYACC */
324 #line 12 "code_error.y"
325
326 #include <stdio.h>
327
328 #ifdef YYBYACC
329 extern int YYLEX_DECL();
330 #endif
331
332 int
main(void)333 main(void)
334 {
335 printf("yyparse() = %d\n", yyparse());
336 return 0;
337 }
338
339 int
yylex(void)340 yylex(void)
341 {
342 return -1;
343 }
344
345 static void
yyerror(const char * s)346 yyerror(const char* s)
347 {
348 printf("%s\n", s);
349 }
350 #line 351 "code_error.code.c"
351
352 /* For use in generated program */
353 #define yydepth (int)(yystack.s_mark - yystack.s_base)
354 #if YYBTYACC
355 #define yytrial (yyps->save)
356 #endif /* YYBTYACC */
357
358 #if YYDEBUG
359 #include <stdio.h> /* needed for printf */
360 #endif
361
362 #include <stdlib.h> /* needed for malloc, etc */
363 #include <string.h> /* needed for memset */
364
365 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
yygrowstack(YYSTACKDATA * data)366 static int yygrowstack(YYSTACKDATA *data)
367 {
368 int i;
369 unsigned newsize;
370 YYINT *newss;
371 YYSTYPE *newvs;
372 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
373 YYLTYPE *newps;
374 #endif
375
376 if ((newsize = data->stacksize) == 0)
377 newsize = YYINITSTACKSIZE;
378 else if (newsize >= YYMAXDEPTH)
379 return YYENOMEM;
380 else if ((newsize *= 2) > YYMAXDEPTH)
381 newsize = YYMAXDEPTH;
382
383 i = (int) (data->s_mark - data->s_base);
384 newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));
385 if (newss == 0)
386 return YYENOMEM;
387
388 data->s_base = newss;
389 data->s_mark = newss + i;
390
391 newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
392 if (newvs == 0)
393 return YYENOMEM;
394
395 data->l_base = newvs;
396 data->l_mark = newvs + i;
397
398 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
399 newps = (YYLTYPE *)realloc(data->p_base, newsize * sizeof(*newps));
400 if (newps == 0)
401 return YYENOMEM;
402
403 data->p_base = newps;
404 data->p_mark = newps + i;
405 #endif
406
407 data->stacksize = newsize;
408 data->s_last = data->s_base + newsize - 1;
409
410 #if YYDEBUG
411 if (yydebug)
412 fprintf(stderr, "%sdebug: stack size increased to %d\n", YYPREFIX, newsize);
413 #endif
414 return 0;
415 }
416
417 #if YYPURE || defined(YY_NO_LEAKS)
yyfreestack(YYSTACKDATA * data)418 static void yyfreestack(YYSTACKDATA *data)
419 {
420 free(data->s_base);
421 free(data->l_base);
422 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
423 free(data->p_base);
424 #endif
425 memset(data, 0, sizeof(*data));
426 }
427 #else
428 #define yyfreestack(data) /* nothing */
429 #endif /* YYPURE || defined(YY_NO_LEAKS) */
430 #if YYBTYACC
431
432 static YYParseState *
yyNewState(unsigned size)433 yyNewState(unsigned size)
434 {
435 YYParseState *p = (YYParseState *) malloc(sizeof(YYParseState));
436 if (p == NULL) return NULL;
437
438 p->yystack.stacksize = size;
439 if (size == 0)
440 {
441 p->yystack.s_base = NULL;
442 p->yystack.l_base = NULL;
443 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
444 p->yystack.p_base = NULL;
445 #endif
446 return p;
447 }
448 p->yystack.s_base = (YYINT *) malloc(size * sizeof(YYINT));
449 if (p->yystack.s_base == NULL) return NULL;
450 p->yystack.l_base = (YYSTYPE *) malloc(size * sizeof(YYSTYPE));
451 if (p->yystack.l_base == NULL) return NULL;
452 memset(p->yystack.l_base, 0, size * sizeof(YYSTYPE));
453 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
454 p->yystack.p_base = (YYLTYPE *) malloc(size * sizeof(YYLTYPE));
455 if (p->yystack.p_base == NULL) return NULL;
456 memset(p->yystack.p_base, 0, size * sizeof(YYLTYPE));
457 #endif
458
459 return p;
460 }
461
462 static void
yyFreeState(YYParseState * p)463 yyFreeState(YYParseState *p)
464 {
465 yyfreestack(&p->yystack);
466 free(p);
467 }
468 #endif /* YYBTYACC */
469
470 #define YYABORT goto yyabort
471 #define YYREJECT goto yyabort
472 #define YYACCEPT goto yyaccept
473 #define YYERROR goto yyerrlab
474 #if YYBTYACC
475 #define YYVALID do { if (yyps->save) goto yyvalid; } while(0)
476 #define YYVALID_NESTED do { if (yyps->save && \
477 yyps->save->save == 0) goto yyvalid; } while(0)
478 #endif /* YYBTYACC */
479
480 int
YYPARSE_DECL()481 YYPARSE_DECL()
482 {
483 int yym, yyn, yystate, yyresult;
484 #if YYBTYACC
485 int yynewerrflag;
486 YYParseState *yyerrctx = NULL;
487 #endif /* YYBTYACC */
488 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
489 YYLTYPE yyerror_loc_range[2]; /* position of error start & end */
490 #endif
491 #if YYDEBUG
492 const char *yys;
493
494 if ((yys = getenv("YYDEBUG")) != 0)
495 {
496 yyn = *yys;
497 if (yyn >= '0' && yyn <= '9')
498 yydebug = yyn - '0';
499 }
500 if (yydebug)
501 fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX);
502 #endif
503 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
504 memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range));
505 #endif
506
507 #if YYBTYACC
508 yyps = yyNewState(0); if (yyps == 0) goto yyenomem;
509 yyps->save = 0;
510 #endif /* YYBTYACC */
511 yym = 0;
512 yyn = 0;
513 yynerrs = 0;
514 yyerrflag = 0;
515 yychar = YYEMPTY;
516 yystate = 0;
517
518 #if YYPURE
519 memset(&yystack, 0, sizeof(yystack));
520 #endif
521
522 if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
523 yystack.s_mark = yystack.s_base;
524 yystack.l_mark = yystack.l_base;
525 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
526 yystack.p_mark = yystack.p_base;
527 #endif
528 yystate = 0;
529 *yystack.s_mark = 0;
530
531 yyloop:
532 if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
533 if (yychar < 0)
534 {
535 #if YYBTYACC
536 do {
537 if (yylvp < yylve)
538 {
539 /* we're currently re-reading tokens */
540 yylval = *yylvp++;
541 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
542 yylloc = *yylpp++;
543 #endif
544 yychar = *yylexp++;
545 break;
546 }
547 if (yyps->save)
548 {
549 /* in trial mode; save scanner results for future parse attempts */
550 if (yylvp == yylvlim)
551 { /* Enlarge lexical value queue */
552 size_t p = (size_t) (yylvp - yylvals);
553 size_t s = (size_t) (yylvlim - yylvals);
554
555 s += YYLVQUEUEGROWTH;
556 if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
557 if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
558 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
559 if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
560 #endif
561 yylvp = yylve = yylvals + p;
562 yylvlim = yylvals + s;
563 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
564 yylpp = yylpe = yylpsns + p;
565 yylplim = yylpsns + s;
566 #endif
567 yylexp = yylexemes + p;
568 }
569 *yylexp = (YYINT) YYLEX;
570 *yylvp++ = yylval;
571 yylve++;
572 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
573 *yylpp++ = yylloc;
574 yylpe++;
575 #endif
576 yychar = *yylexp++;
577 break;
578 }
579 /* normal operation, no conflict encountered */
580 #endif /* YYBTYACC */
581 yychar = YYLEX;
582 #if YYBTYACC
583 } while (0);
584 #endif /* YYBTYACC */
585 if (yychar < 0) yychar = YYEOF;
586 #if YYDEBUG
587 if (yydebug)
588 {
589 if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
590 fprintf(stderr, "%s[%d]: state %d, reading token %d (%s)",
591 YYDEBUGSTR, yydepth, yystate, yychar, yys);
592 #ifdef YYSTYPE_TOSTRING
593 #if YYBTYACC
594 if (!yytrial)
595 #endif /* YYBTYACC */
596 fprintf(stderr, " <%s>", YYSTYPE_TOSTRING(yychar, yylval));
597 #endif
598 fputc('\n', stderr);
599 }
600 #endif
601 }
602 #if YYBTYACC
603
604 /* Do we have a conflict? */
605 if (((yyn = yycindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
606 yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
607 {
608 YYINT ctry;
609
610 if (yypath)
611 {
612 YYParseState *save;
613 #if YYDEBUG
614 if (yydebug)
615 fprintf(stderr, "%s[%d]: CONFLICT in state %d: following successful trial parse\n",
616 YYDEBUGSTR, yydepth, yystate);
617 #endif
618 /* Switch to the next conflict context */
619 save = yypath;
620 yypath = save->save;
621 save->save = NULL;
622 ctry = save->ctry;
623 if (save->state != yystate) YYABORT;
624 yyFreeState(save);
625
626 }
627 else
628 {
629
630 /* Unresolved conflict - start/continue trial parse */
631 YYParseState *save;
632 #if YYDEBUG
633 if (yydebug)
634 {
635 fprintf(stderr, "%s[%d]: CONFLICT in state %d. ", YYDEBUGSTR, yydepth, yystate);
636 if (yyps->save)
637 fputs("ALREADY in conflict, continuing trial parse.\n", stderr);
638 else
639 fputs("Starting trial parse.\n", stderr);
640 }
641 #endif
642 save = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));
643 if (save == NULL) goto yyenomem;
644 save->save = yyps->save;
645 save->state = yystate;
646 save->errflag = yyerrflag;
647 save->yystack.s_mark = save->yystack.s_base + (yystack.s_mark - yystack.s_base);
648 memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));
649 save->yystack.l_mark = save->yystack.l_base + (yystack.l_mark - yystack.l_base);
650 memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
651 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
652 save->yystack.p_mark = save->yystack.p_base + (yystack.p_mark - yystack.p_base);
653 memcpy (save->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
654 #endif
655 ctry = yytable[yyn];
656 if (yyctable[ctry] == -1)
657 {
658 #if YYDEBUG
659 if (yydebug && yychar >= YYEOF)
660 fprintf(stderr, "%s[%d]: backtracking 1 token\n", YYDEBUGSTR, yydepth);
661 #endif
662 ctry++;
663 }
664 save->ctry = ctry;
665 if (yyps->save == NULL)
666 {
667 /* If this is a first conflict in the stack, start saving lexemes */
668 if (!yylexemes)
669 {
670 yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
671 if (yylexemes == NULL) goto yyenomem;
672 yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
673 if (yylvals == NULL) goto yyenomem;
674 yylvlim = yylvals + YYLVQUEUEGROWTH;
675 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
676 yylpsns = (YYLTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYLTYPE));
677 if (yylpsns == NULL) goto yyenomem;
678 yylplim = yylpsns + YYLVQUEUEGROWTH;
679 #endif
680 }
681 if (yylvp == yylve)
682 {
683 yylvp = yylve = yylvals;
684 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
685 yylpp = yylpe = yylpsns;
686 #endif
687 yylexp = yylexemes;
688 if (yychar >= YYEOF)
689 {
690 *yylve++ = yylval;
691 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
692 *yylpe++ = yylloc;
693 #endif
694 *yylexp = (YYINT) yychar;
695 yychar = YYEMPTY;
696 }
697 }
698 }
699 if (yychar >= YYEOF)
700 {
701 yylvp--;
702 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
703 yylpp--;
704 #endif
705 yylexp--;
706 yychar = YYEMPTY;
707 }
708 save->lexeme = (int) (yylvp - yylvals);
709 yyps->save = save;
710 }
711 if (yytable[yyn] == ctry)
712 {
713 #if YYDEBUG
714 if (yydebug)
715 fprintf(stderr, "%s[%d]: state %d, shifting to state %d\n",
716 YYDEBUGSTR, yydepth, yystate, yyctable[ctry]);
717 #endif
718 if (yychar < 0)
719 {
720 yylvp++;
721 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
722 yylpp++;
723 #endif
724 yylexp++;
725 }
726 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
727 goto yyoverflow;
728 yystate = yyctable[ctry];
729 *++yystack.s_mark = (YYINT) yystate;
730 *++yystack.l_mark = yylval;
731 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
732 *++yystack.p_mark = yylloc;
733 #endif
734 yychar = YYEMPTY;
735 if (yyerrflag > 0) --yyerrflag;
736 goto yyloop;
737 }
738 else
739 {
740 yyn = yyctable[ctry];
741 goto yyreduce;
742 }
743 } /* End of code dealing with conflicts */
744 #endif /* YYBTYACC */
745 if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
746 yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
747 {
748 #if YYDEBUG
749 if (yydebug)
750 fprintf(stderr, "%s[%d]: state %d, shifting to state %d\n",
751 YYDEBUGSTR, yydepth, yystate, yytable[yyn]);
752 #endif
753 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
754 yystate = yytable[yyn];
755 *++yystack.s_mark = yytable[yyn];
756 *++yystack.l_mark = yylval;
757 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
758 *++yystack.p_mark = yylloc;
759 #endif
760 yychar = YYEMPTY;
761 if (yyerrflag > 0) --yyerrflag;
762 goto yyloop;
763 }
764 if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
765 yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
766 {
767 yyn = yytable[yyn];
768 goto yyreduce;
769 }
770 if (yyerrflag != 0) goto yyinrecovery;
771 #if YYBTYACC
772
773 yynewerrflag = 1;
774 goto yyerrhandler;
775 goto yyerrlab; /* redundant goto avoids 'unused label' warning */
776
777 yyerrlab:
778 /* explicit YYERROR from an action -- pop the rhs of the rule reduced
779 * before looking for error recovery */
780 yystack.s_mark -= yym;
781 yystate = *yystack.s_mark;
782 yystack.l_mark -= yym;
783 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
784 yystack.p_mark -= yym;
785 #endif
786
787 yynewerrflag = 0;
788 yyerrhandler:
789 while (yyps->save)
790 {
791 int ctry;
792 YYParseState *save = yyps->save;
793 #if YYDEBUG
794 if (yydebug)
795 fprintf(stderr, "%s[%d]: ERROR in state %d, CONFLICT BACKTRACKING to state %d, %d tokens\n",
796 YYDEBUGSTR, yydepth, yystate, yyps->save->state,
797 (int)(yylvp - yylvals - yyps->save->lexeme));
798 #endif
799 /* Memorize most forward-looking error state in case it's really an error. */
800 if (yyerrctx == NULL || yyerrctx->lexeme < yylvp - yylvals)
801 {
802 /* Free old saved error context state */
803 if (yyerrctx) yyFreeState(yyerrctx);
804 /* Create and fill out new saved error context state */
805 yyerrctx = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));
806 if (yyerrctx == NULL) goto yyenomem;
807 yyerrctx->save = yyps->save;
808 yyerrctx->state = yystate;
809 yyerrctx->errflag = yyerrflag;
810 yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base);
811 memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));
812 yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base);
813 memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
814 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
815 yyerrctx->yystack.p_mark = yyerrctx->yystack.p_base + (yystack.p_mark - yystack.p_base);
816 memcpy (yyerrctx->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
817 #endif
818 yyerrctx->lexeme = (int) (yylvp - yylvals);
819 }
820 yylvp = yylvals + save->lexeme;
821 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
822 yylpp = yylpsns + save->lexeme;
823 #endif
824 yylexp = yylexemes + save->lexeme;
825 yychar = YYEMPTY;
826 yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base);
827 memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));
828 yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base);
829 memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
830 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
831 yystack.p_mark = yystack.p_base + (save->yystack.p_mark - save->yystack.p_base);
832 memcpy (yystack.p_base, save->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
833 #endif
834 ctry = ++save->ctry;
835 yystate = save->state;
836 /* We tried shift, try reduce now */
837 if ((yyn = yyctable[ctry]) >= 0) goto yyreduce;
838 yyps->save = save->save;
839 save->save = NULL;
840 yyFreeState(save);
841
842 /* Nothing left on the stack -- error */
843 if (!yyps->save)
844 {
845 #if YYDEBUG
846 if (yydebug)
847 fprintf(stderr, "%sdebug[%d,trial]: trial parse FAILED, entering ERROR mode\n",
848 YYPREFIX, yydepth);
849 #endif
850 /* Restore state as it was in the most forward-advanced error */
851 yylvp = yylvals + yyerrctx->lexeme;
852 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
853 yylpp = yylpsns + yyerrctx->lexeme;
854 #endif
855 yylexp = yylexemes + yyerrctx->lexeme;
856 yychar = yylexp[-1];
857 yylval = yylvp[-1];
858 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
859 yylloc = yylpp[-1];
860 #endif
861 yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base);
862 memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));
863 yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base);
864 memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
865 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
866 yystack.p_mark = yystack.p_base + (yyerrctx->yystack.p_mark - yyerrctx->yystack.p_base);
867 memcpy (yystack.p_base, yyerrctx->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
868 #endif
869 yystate = yyerrctx->state;
870 yyFreeState(yyerrctx);
871 yyerrctx = NULL;
872 }
873 yynewerrflag = 1;
874 }
875 if (yynewerrflag == 0) goto yyinrecovery;
876 #endif /* YYBTYACC */
877
878 YYERROR_CALL("syntax error");
879 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
880 yyerror_loc_range[0] = yylloc; /* lookahead position is error start position */
881 #endif
882
883 #if !YYBTYACC
884 goto yyerrlab; /* redundant goto avoids 'unused label' warning */
885 yyerrlab:
886 #endif
887 ++yynerrs;
888
889 yyinrecovery:
890 if (yyerrflag < 3)
891 {
892 yyerrflag = 3;
893 for (;;)
894 {
895 if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&
896 yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)
897 {
898 #if YYDEBUG
899 if (yydebug)
900 fprintf(stderr, "%s[%d]: state %d, error recovery shifting to state %d\n",
901 YYDEBUGSTR, yydepth, *yystack.s_mark, yytable[yyn]);
902 #endif
903 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
904 yystate = yytable[yyn];
905 *++yystack.s_mark = yytable[yyn];
906 *++yystack.l_mark = yylval;
907 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
908 /* lookahead position is error end position */
909 yyerror_loc_range[1] = yylloc;
910 YYLLOC_DEFAULT(yyloc, yyerror_loc_range, 2); /* position of error span */
911 *++yystack.p_mark = yyloc;
912 #endif
913 goto yyloop;
914 }
915 else
916 {
917 #if YYDEBUG
918 if (yydebug)
919 fprintf(stderr, "%s[%d]: error recovery discarding state %d\n",
920 YYDEBUGSTR, yydepth, *yystack.s_mark);
921 #endif
922 if (yystack.s_mark <= yystack.s_base) goto yyabort;
923 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
924 /* the current TOS position is the error start position */
925 yyerror_loc_range[0] = *yystack.p_mark;
926 #endif
927 #if defined(YYDESTRUCT_CALL)
928 #if YYBTYACC
929 if (!yytrial)
930 #endif /* YYBTYACC */
931 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
932 YYDESTRUCT_CALL("error: discarding state",
933 yystos[*yystack.s_mark], yystack.l_mark, yystack.p_mark);
934 #else
935 YYDESTRUCT_CALL("error: discarding state",
936 yystos[*yystack.s_mark], yystack.l_mark);
937 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
938 #endif /* defined(YYDESTRUCT_CALL) */
939 --yystack.s_mark;
940 --yystack.l_mark;
941 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
942 --yystack.p_mark;
943 #endif
944 }
945 }
946 }
947 else
948 {
949 if (yychar == YYEOF) goto yyabort;
950 #if YYDEBUG
951 if (yydebug)
952 {
953 if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
954 fprintf(stderr, "%s[%d]: state %d, error recovery discarding token %d (%s)\n",
955 YYDEBUGSTR, yydepth, yystate, yychar, yys);
956 }
957 #endif
958 #if defined(YYDESTRUCT_CALL)
959 #if YYBTYACC
960 if (!yytrial)
961 #endif /* YYBTYACC */
962 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
963 YYDESTRUCT_CALL("error: discarding token", yychar, &yylval, &yylloc);
964 #else
965 YYDESTRUCT_CALL("error: discarding token", yychar, &yylval);
966 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
967 #endif /* defined(YYDESTRUCT_CALL) */
968 yychar = YYEMPTY;
969 goto yyloop;
970 }
971
972 yyreduce:
973 yym = yylen[yyn];
974 #if YYDEBUG
975 if (yydebug)
976 {
977 fprintf(stderr, "%s[%d]: state %d, reducing by rule %d (%s)",
978 YYDEBUGSTR, yydepth, yystate, yyn, yyrule[yyn]);
979 #ifdef YYSTYPE_TOSTRING
980 #if YYBTYACC
981 if (!yytrial)
982 #endif /* YYBTYACC */
983 if (yym > 0)
984 {
985 int i;
986 fputc('<', stderr);
987 for (i = yym; i > 0; i--)
988 {
989 if (i != yym) fputs(", ", stderr);
990 fputs(YYSTYPE_TOSTRING(yystos[yystack.s_mark[1-i]],
991 yystack.l_mark[1-i]), stderr);
992 }
993 fputc('>', stderr);
994 }
995 #endif
996 fputc('\n', stderr);
997 }
998 #endif
999 if (yym > 0)
1000 yyval = yystack.l_mark[1-yym];
1001 else
1002 memset(&yyval, 0, sizeof yyval);
1003 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1004
1005 /* Perform position reduction */
1006 memset(&yyloc, 0, sizeof(yyloc));
1007 #if YYBTYACC
1008 if (!yytrial)
1009 #endif /* YYBTYACC */
1010 {
1011 YYLLOC_DEFAULT(yyloc, &yystack.p_mark[1-yym], yym);
1012 /* just in case YYERROR is invoked within the action, save
1013 the start of the rhs as the error start position */
1014 yyerror_loc_range[0] = yystack.p_mark[1-yym];
1015 }
1016 #endif
1017
1018 switch (yyn)
1019 {
1020 default:
1021 break;
1022 }
1023 yystack.s_mark -= yym;
1024 yystate = *yystack.s_mark;
1025 yystack.l_mark -= yym;
1026 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1027 yystack.p_mark -= yym;
1028 #endif
1029 yym = yylhs[yyn];
1030 if (yystate == 0 && yym == 0)
1031 {
1032 #if YYDEBUG
1033 if (yydebug)
1034 {
1035 fprintf(stderr, "%s[%d]: after reduction, ", YYDEBUGSTR, yydepth);
1036 #ifdef YYSTYPE_TOSTRING
1037 #if YYBTYACC
1038 if (!yytrial)
1039 #endif /* YYBTYACC */
1040 fprintf(stderr, "result is <%s>, ", YYSTYPE_TOSTRING(yystos[YYFINAL], yyval));
1041 #endif
1042 fprintf(stderr, "shifting from state 0 to final state %d\n", YYFINAL);
1043 }
1044 #endif
1045 yystate = YYFINAL;
1046 *++yystack.s_mark = YYFINAL;
1047 *++yystack.l_mark = yyval;
1048 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1049 *++yystack.p_mark = yyloc;
1050 #endif
1051 if (yychar < 0)
1052 {
1053 #if YYBTYACC
1054 do {
1055 if (yylvp < yylve)
1056 {
1057 /* we're currently re-reading tokens */
1058 yylval = *yylvp++;
1059 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1060 yylloc = *yylpp++;
1061 #endif
1062 yychar = *yylexp++;
1063 break;
1064 }
1065 if (yyps->save)
1066 {
1067 /* in trial mode; save scanner results for future parse attempts */
1068 if (yylvp == yylvlim)
1069 { /* Enlarge lexical value queue */
1070 size_t p = (size_t) (yylvp - yylvals);
1071 size_t s = (size_t) (yylvlim - yylvals);
1072
1073 s += YYLVQUEUEGROWTH;
1074 if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
1075 goto yyenomem;
1076 if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
1077 goto yyenomem;
1078 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1079 if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
1080 goto yyenomem;
1081 #endif
1082 yylvp = yylve = yylvals + p;
1083 yylvlim = yylvals + s;
1084 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1085 yylpp = yylpe = yylpsns + p;
1086 yylplim = yylpsns + s;
1087 #endif
1088 yylexp = yylexemes + p;
1089 }
1090 *yylexp = (YYINT) YYLEX;
1091 *yylvp++ = yylval;
1092 yylve++;
1093 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1094 *yylpp++ = yylloc;
1095 yylpe++;
1096 #endif
1097 yychar = *yylexp++;
1098 break;
1099 }
1100 /* normal operation, no conflict encountered */
1101 #endif /* YYBTYACC */
1102 yychar = YYLEX;
1103 #if YYBTYACC
1104 } while (0);
1105 #endif /* YYBTYACC */
1106 if (yychar < 0) yychar = YYEOF;
1107 #if YYDEBUG
1108 if (yydebug)
1109 {
1110 if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
1111 fprintf(stderr, "%s[%d]: state %d, reading token %d (%s)\n",
1112 YYDEBUGSTR, yydepth, YYFINAL, yychar, yys);
1113 }
1114 #endif
1115 }
1116 if (yychar == YYEOF) goto yyaccept;
1117 goto yyloop;
1118 }
1119 if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&
1120 yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)
1121 yystate = yytable[yyn];
1122 else
1123 yystate = yydgoto[yym];
1124 #if YYDEBUG
1125 if (yydebug)
1126 {
1127 fprintf(stderr, "%s[%d]: after reduction, ", YYDEBUGSTR, yydepth);
1128 #ifdef YYSTYPE_TOSTRING
1129 #if YYBTYACC
1130 if (!yytrial)
1131 #endif /* YYBTYACC */
1132 fprintf(stderr, "result is <%s>, ", YYSTYPE_TOSTRING(yystos[yystate], yyval));
1133 #endif
1134 fprintf(stderr, "shifting from state %d to state %d\n", *yystack.s_mark, yystate);
1135 }
1136 #endif
1137 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
1138 *++yystack.s_mark = (YYINT) yystate;
1139 *++yystack.l_mark = yyval;
1140 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1141 *++yystack.p_mark = yyloc;
1142 #endif
1143 goto yyloop;
1144 #if YYBTYACC
1145
1146 /* Reduction declares that this path is valid. Set yypath and do a full parse */
1147 yyvalid:
1148 if (yypath) YYABORT;
1149 while (yyps->save)
1150 {
1151 YYParseState *save = yyps->save;
1152 yyps->save = save->save;
1153 save->save = yypath;
1154 yypath = save;
1155 }
1156 #if YYDEBUG
1157 if (yydebug)
1158 fprintf(stderr, "%s[%d]: state %d, CONFLICT trial successful, backtracking to state %d, %d tokens\n",
1159 YYDEBUGSTR, yydepth, yystate, yypath->state, (int)(yylvp - yylvals - yypath->lexeme));
1160 #endif
1161 if (yyerrctx)
1162 {
1163 yyFreeState(yyerrctx);
1164 yyerrctx = NULL;
1165 }
1166 yylvp = yylvals + yypath->lexeme;
1167 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1168 yylpp = yylpsns + yypath->lexeme;
1169 #endif
1170 yylexp = yylexemes + yypath->lexeme;
1171 yychar = YYEMPTY;
1172 yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base);
1173 memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));
1174 yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base);
1175 memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
1176 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1177 yystack.p_mark = yystack.p_base + (yypath->yystack.p_mark - yypath->yystack.p_base);
1178 memcpy (yystack.p_base, yypath->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
1179 #endif
1180 yystate = yypath->state;
1181 goto yyloop;
1182 #endif /* YYBTYACC */
1183
1184 yyoverflow:
1185 YYERROR_CALL("yacc stack overflow");
1186 #if YYBTYACC
1187 goto yyabort_nomem;
1188 yyenomem:
1189 YYERROR_CALL("memory exhausted");
1190 yyabort_nomem:
1191 #endif /* YYBTYACC */
1192 yyresult = 2;
1193 goto yyreturn;
1194
1195 yyabort:
1196 yyresult = 1;
1197 goto yyreturn;
1198
1199 yyaccept:
1200 #if YYBTYACC
1201 if (yyps->save) goto yyvalid;
1202 #endif /* YYBTYACC */
1203 yyresult = 0;
1204
1205 yyreturn:
1206 #if defined(YYDESTRUCT_CALL)
1207 if (yychar != YYEOF && yychar != YYEMPTY)
1208 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1209 YYDESTRUCT_CALL("cleanup: discarding token", yychar, &yylval, &yylloc);
1210 #else
1211 YYDESTRUCT_CALL("cleanup: discarding token", yychar, &yylval);
1212 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
1213
1214 {
1215 YYSTYPE *pv;
1216 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1217 YYLTYPE *pp;
1218
1219 for (pv = yystack.l_base, pp = yystack.p_base; pv <= yystack.l_mark; ++pv, ++pp)
1220 YYDESTRUCT_CALL("cleanup: discarding state",
1221 yystos[*(yystack.s_base + (pv - yystack.l_base))], pv, pp);
1222 #else
1223 for (pv = yystack.l_base; pv <= yystack.l_mark; ++pv)
1224 YYDESTRUCT_CALL("cleanup: discarding state",
1225 yystos[*(yystack.s_base + (pv - yystack.l_base))], pv);
1226 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
1227 }
1228 #endif /* defined(YYDESTRUCT_CALL) */
1229
1230 #if YYBTYACC
1231 if (yyerrctx)
1232 {
1233 yyFreeState(yyerrctx);
1234 yyerrctx = NULL;
1235 }
1236 while (yyps)
1237 {
1238 YYParseState *save = yyps;
1239 yyps = save->save;
1240 save->save = NULL;
1241 yyFreeState(save);
1242 }
1243 while (yypath)
1244 {
1245 YYParseState *save = yypath;
1246 yypath = save->save;
1247 save->save = NULL;
1248 yyFreeState(save);
1249 }
1250 #endif /* YYBTYACC */
1251 yyfreestack(&yystack);
1252 return (yyresult);
1253 }
1254