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