xref: /minix3/external/bsd/byacc/dist/test/btyacc/code_error.code.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1 /*	$NetBSD: code_error.code.c,v 1.1.1.1 2015/01/03 22:58:24 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    error_parse
24 #endif /* yyparse */
25 
26 #ifndef yylex
27 #define yylex      error_lex
28 #endif /* yylex */
29 
30 #ifndef yyerror
31 #define yyerror    error_error
32 #endif /* yyerror */
33 
34 #ifndef yychar
35 #define yychar     error_char
36 #endif /* yychar */
37 
38 #ifndef yyval
39 #define yyval      error_val
40 #endif /* yyval */
41 
42 #ifndef yylval
43 #define yylval     error_lval
44 #endif /* yylval */
45 
46 #ifndef yydebug
47 #define yydebug    error_debug
48 #endif /* yydebug */
49 
50 #ifndef yynerrs
51 #define yynerrs    error_nerrs
52 #endif /* yynerrs */
53 
54 #ifndef yyerrflag
55 #define yyerrflag  error_errflag
56 #endif /* yyerrflag */
57 
58 #ifndef yylhs
59 #define yylhs      error_lhs
60 #endif /* yylhs */
61 
62 #ifndef yylen
63 #define yylen      error_len
64 #endif /* yylen */
65 
66 #ifndef yydefred
67 #define yydefred   error_defred
68 #endif /* yydefred */
69 
70 #ifndef yystos
71 #define yystos     error_stos
72 #endif /* yystos */
73 
74 #ifndef yydgoto
75 #define yydgoto    error_dgoto
76 #endif /* yydgoto */
77 
78 #ifndef yysindex
79 #define yysindex   error_sindex
80 #endif /* yysindex */
81 
82 #ifndef yyrindex
83 #define yyrindex   error_rindex
84 #endif /* yyrindex */
85 
86 #ifndef yygindex
87 #define yygindex   error_gindex
88 #endif /* yygindex */
89 
90 #ifndef yytable
91 #define yytable    error_table
92 #endif /* yytable */
93 
94 #ifndef yycheck
95 #define yycheck    error_check
96 #endif /* yycheck */
97 
98 #ifndef yyname
99 #define yyname     error_name
100 #endif /* yyname */
101 
102 #ifndef yyrule
103 #define yyrule     error_rule
104 #endif /* yyrule */
105 
106 #if YYBTYACC
107 
108 #ifndef yycindex
109 #define yycindex   error_cindex
110 #endif /* yycindex */
111 
112 #ifndef yyctable
113 #define yyctable   error_ctable
114 #endif /* yyctable */
115 
116 #endif /* YYBTYACC */
117 
118 #define YYPREFIX "error_"
119 
120 #define YYPURE 0
121 
122 #line 2 "code_error.y"
123 
124 #ifdef YYBISON
125 int yylex(void);
126 static void yyerror(const char *);
127 #endif
128 
129 #line 128 "code_error.code.c"
130 
131 #if ! defined(YYSTYPE) && ! defined(YYSTYPE_IS_DECLARED)
132 /* Default: YYSTYPE is the semantic value type. */
133 typedef int YYSTYPE;
134 # define YYSTYPE_IS_DECLARED 1
135 #endif
136 
137 /* compatibility with bison */
138 #ifdef YYPARSE_PARAM
139 /* compatibility with FreeBSD */
140 # ifdef YYPARSE_PARAM_TYPE
141 #  define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
142 # else
143 #  define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
144 # endif
145 #else
146 # define YYPARSE_DECL() yyparse(void)
147 #endif
148 
149 /* Parameters sent to lex. */
150 #ifdef YYLEX_PARAM
151 # define YYLEX_DECL() yylex(void *YYLEX_PARAM)
152 # define YYLEX yylex(YYLEX_PARAM)
153 #else
154 # define YYLEX_DECL() yylex(void)
155 # define YYLEX yylex()
156 #endif
157 
158 /* Parameters sent to yyerror. */
159 #ifndef YYERROR_DECL
160 #define YYERROR_DECL() yyerror(const char *s)
161 #endif
162 #ifndef YYERROR_CALL
163 #define YYERROR_CALL(msg) yyerror(msg)
164 #endif
165 
166 #define YYERRCODE 256
167 #define YYTABLESIZE 0
168 #define YYFINAL 2
169 #ifndef YYDEBUG
170 #define YYDEBUG 0
171 #endif
172 #define YYMAXTOKEN 256
173 #define YYUNDFTOKEN 259
174 #define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
175 
176 extern int YYPARSE_DECL();
177 typedef short YYINT;
178 extern const YYINT yylhs[];
179 extern const YYINT yylen[];
180 extern const YYINT yydefred[];
181 extern const YYINT yystos[];
182 extern const YYINT yydgoto[];
183 extern const YYINT yysindex[];
184 extern const YYINT yyrindex[];
185 #if YYBTYACC
186 extern const YYINT yycindex[];
187 #endif /* YYBTYACC */
188 extern const YYINT yygindex[];
189 extern const YYINT yytable[];
190 extern const YYINT yycheck[];
191 #if YYBTYACC
192 extern const YYINT yyctable[];
193 #endif /* YYBTYACC */
194 
195 #if YYDEBUG
196 extern const char *const yyname[];
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     short    *s_base;
261     short    *s_mark;
262     short    *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 short  *yylexp = 0;
321 
322 static short  *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 349 "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     short *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 = (short *)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    = (short *) malloc(size * sizeof(short));
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 
504 #if YYBTYACC
505     yyps = yyNewState(0); if (yyps == 0) goto yyenomem;
506     yyps->save = 0;
507 #endif /* YYBTYACC */
508     yynerrs = 0;
509     yyerrflag = 0;
510     yychar = YYEMPTY;
511     yystate = 0;
512 
513 #if YYPURE
514     memset(&yystack, 0, sizeof(yystack));
515 #endif
516 
517     if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
518     yystack.s_mark = yystack.s_base;
519     yystack.l_mark = yystack.l_base;
520 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
521     yystack.p_mark = yystack.p_base;
522 #endif
523     yystate = 0;
524     *yystack.s_mark = 0;
525 
526 yyloop:
527     if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
528     if (yychar < 0)
529     {
530 #if YYBTYACC
531         do {
532         if (yylvp < yylve)
533         {
534             /* we're currently re-reading tokens */
535             yylval = *yylvp++;
536 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
537             yylloc = *yylpp++;
538 #endif
539             yychar = *yylexp++;
540             break;
541         }
542         if (yyps->save)
543         {
544             /* in trial mode; save scanner results for future parse attempts */
545             if (yylvp == yylvlim)
546             {   /* Enlarge lexical value queue */
547                 size_t p = (size_t) (yylvp - yylvals);
548                 size_t s = (size_t) (yylvlim - yylvals);
549 
550                 s += YYLVQUEUEGROWTH;
551                 if ((yylexemes = (short *)   realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
552                 if ((yylvals   = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
553 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
554                 if ((yylpsns   = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
555 #endif
556                 yylvp   = yylve = yylvals + p;
557                 yylvlim = yylvals + s;
558 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
559                 yylpp   = yylpe = yylpsns + p;
560                 yylplim = yylpsns + s;
561 #endif
562                 yylexp  = yylexemes + p;
563             }
564             *yylexp = (short) YYLEX;
565             *yylvp++ = yylval;
566             yylve++;
567 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
568             *yylpp++ = yylloc;
569             yylpe++;
570 #endif
571             yychar = *yylexp++;
572             break;
573         }
574         /* normal operation, no conflict encountered */
575 #endif /* YYBTYACC */
576         yychar = YYLEX;
577 #if YYBTYACC
578         } while (0);
579 #endif /* YYBTYACC */
580         if (yychar < 0) yychar = YYEOF;
581         /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */
582 #if YYDEBUG
583         if (yydebug)
584         {
585             yys = yyname[YYTRANSLATE(yychar)];
586             fprintf(stderr, "%s[%d]: state %d, reading token %d (%s)",
587                             YYDEBUGSTR, yydepth, yystate, yychar, yys);
588 #ifdef YYSTYPE_TOSTRING
589 #if YYBTYACC
590             if (!yytrial)
591 #endif /* YYBTYACC */
592                 fprintf(stderr, " <%s>", YYSTYPE_TOSTRING(yychar, yylval));
593 #endif
594             fputc('\n', stderr);
595         }
596 #endif
597     }
598 #if YYBTYACC
599 
600     /* Do we have a conflict? */
601     if (((yyn = yycindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
602         yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
603     {
604         YYINT ctry;
605 
606         if (yypath)
607         {
608             YYParseState *save;
609 #if YYDEBUG
610             if (yydebug)
611                 fprintf(stderr, "%s[%d]: CONFLICT in state %d: following successful trial parse\n",
612                                 YYDEBUGSTR, yydepth, yystate);
613 #endif
614             /* Switch to the next conflict context */
615             save = yypath;
616             yypath = save->save;
617             save->save = NULL;
618             ctry = save->ctry;
619             if (save->state != yystate) YYABORT;
620             yyFreeState(save);
621 
622         }
623         else
624         {
625 
626             /* Unresolved conflict - start/continue trial parse */
627             YYParseState *save;
628 #if YYDEBUG
629             if (yydebug)
630             {
631                 fprintf(stderr, "%s[%d]: CONFLICT in state %d. ", YYDEBUGSTR, yydepth, yystate);
632                 if (yyps->save)
633                     fputs("ALREADY in conflict, continuing trial parse.\n", stderr);
634                 else
635                     fputs("Starting trial parse.\n", stderr);
636             }
637 #endif
638             save                  = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));
639             if (save == NULL) goto yyenomem;
640             save->save            = yyps->save;
641             save->state           = yystate;
642             save->errflag         = yyerrflag;
643             save->yystack.s_mark  = save->yystack.s_base + (yystack.s_mark - yystack.s_base);
644             memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));
645             save->yystack.l_mark  = save->yystack.l_base + (yystack.l_mark - yystack.l_base);
646             memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
647 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
648             save->yystack.p_mark  = save->yystack.p_base + (yystack.p_mark - yystack.p_base);
649             memcpy (save->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
650 #endif
651             ctry                  = yytable[yyn];
652             if (yyctable[ctry] == -1)
653             {
654 #if YYDEBUG
655                 if (yydebug && yychar >= YYEOF)
656                     fprintf(stderr, "%s[%d]: backtracking 1 token\n", YYDEBUGSTR, yydepth);
657 #endif
658                 ctry++;
659             }
660             save->ctry = ctry;
661             if (yyps->save == NULL)
662             {
663                 /* If this is a first conflict in the stack, start saving lexemes */
664                 if (!yylexemes)
665                 {
666                     yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
667                     if (yylexemes == NULL) goto yyenomem;
668                     yylvals   = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
669                     if (yylvals == NULL) goto yyenomem;
670                     yylvlim   = yylvals + YYLVQUEUEGROWTH;
671 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
672                     yylpsns   = (YYLTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYLTYPE));
673                     if (yylpsns == NULL) goto yyenomem;
674                     yylplim   = yylpsns + YYLVQUEUEGROWTH;
675 #endif
676                 }
677                 if (yylvp == yylve)
678                 {
679                     yylvp  = yylve = yylvals;
680 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
681                     yylpp  = yylpe = yylpsns;
682 #endif
683                     yylexp = yylexemes;
684                     if (yychar >= YYEOF)
685                     {
686                         *yylve++ = yylval;
687 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
688                         *yylpe++ = yylloc;
689 #endif
690                         *yylexp  = (short) yychar;
691                         yychar   = YYEMPTY;
692                     }
693                 }
694             }
695             if (yychar >= YYEOF)
696             {
697                 yylvp--;
698 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
699                 yylpp--;
700 #endif
701                 yylexp--;
702                 yychar = YYEMPTY;
703             }
704             save->lexeme = (int) (yylvp - yylvals);
705             yyps->save   = save;
706         }
707         if (yytable[yyn] == ctry)
708         {
709 #if YYDEBUG
710             if (yydebug)
711                 fprintf(stderr, "%s[%d]: state %d, shifting to state %d\n",
712                                 YYDEBUGSTR, yydepth, yystate, yyctable[ctry]);
713 #endif
714             if (yychar < 0)
715             {
716                 yylvp++;
717 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
718                 yylpp++;
719 #endif
720                 yylexp++;
721             }
722             if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
723                 goto yyoverflow;
724             yystate = yyctable[ctry];
725             *++yystack.s_mark = (short) yystate;
726             *++yystack.l_mark = yylval;
727 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
728             *++yystack.p_mark = yylloc;
729 #endif
730             yychar  = YYEMPTY;
731             if (yyerrflag > 0) --yyerrflag;
732             goto yyloop;
733         }
734         else
735         {
736             yyn = yyctable[ctry];
737             goto yyreduce;
738         }
739     } /* End of code dealing with conflicts */
740 #endif /* YYBTYACC */
741     if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
742             yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
743     {
744 #if YYDEBUG
745         if (yydebug)
746             fprintf(stderr, "%s[%d]: state %d, shifting to state %d\n",
747                             YYDEBUGSTR, yydepth, yystate, yytable[yyn]);
748 #endif
749         if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
750         yystate = yytable[yyn];
751         *++yystack.s_mark = yytable[yyn];
752         *++yystack.l_mark = yylval;
753 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
754         *++yystack.p_mark = yylloc;
755 #endif
756         yychar = YYEMPTY;
757         if (yyerrflag > 0)  --yyerrflag;
758         goto yyloop;
759     }
760     if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
761             yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
762     {
763         yyn = yytable[yyn];
764         goto yyreduce;
765     }
766     if (yyerrflag != 0) goto yyinrecovery;
767 #if YYBTYACC
768 
769     yynewerrflag = 1;
770     goto yyerrhandler;
771     goto yyerrlab;
772 
773 yyerrlab:
774     yynewerrflag = 0;
775 yyerrhandler:
776     while (yyps->save)
777     {
778         int ctry;
779         YYParseState *save = yyps->save;
780 #if YYDEBUG
781         if (yydebug)
782             fprintf(stderr, "%s[%d]: ERROR in state %d, CONFLICT BACKTRACKING to state %d, %d tokens\n",
783                             YYDEBUGSTR, yydepth, yystate, yyps->save->state,
784                     (int)(yylvp - yylvals - yyps->save->lexeme));
785 #endif
786         /* Memorize most forward-looking error state in case it's really an error. */
787         if (yyerrctx == NULL || yyerrctx->lexeme < yylvp - yylvals)
788         {
789             /* Free old saved error context state */
790             if (yyerrctx) yyFreeState(yyerrctx);
791             /* Create and fill out new saved error context state */
792             yyerrctx                 = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));
793             if (yyerrctx == NULL) goto yyenomem;
794             yyerrctx->save           = yyps->save;
795             yyerrctx->state          = yystate;
796             yyerrctx->errflag        = yyerrflag;
797             yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base);
798             memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));
799             yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base);
800             memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
801 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
802             yyerrctx->yystack.p_mark = yyerrctx->yystack.p_base + (yystack.p_mark - yystack.p_base);
803             memcpy (yyerrctx->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
804 #endif
805             yyerrctx->lexeme         = (int) (yylvp - yylvals);
806         }
807         yylvp          = yylvals   + save->lexeme;
808 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
809         yylpp          = yylpsns   + save->lexeme;
810 #endif
811         yylexp         = yylexemes + save->lexeme;
812         yychar         = YYEMPTY;
813         yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base);
814         memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));
815         yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base);
816         memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
817 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
818         yystack.p_mark = yystack.p_base + (save->yystack.p_mark - save->yystack.p_base);
819         memcpy (yystack.p_base, save->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
820 #endif
821         ctry           = ++save->ctry;
822         yystate        = save->state;
823         /* We tried shift, try reduce now */
824         if ((yyn = yyctable[ctry]) >= 0) goto yyreduce;
825         yyps->save     = save->save;
826         save->save     = NULL;
827         yyFreeState(save);
828 
829         /* Nothing left on the stack -- error */
830         if (!yyps->save)
831         {
832 #if YYDEBUG
833             if (yydebug)
834                 fprintf(stderr, "%sdebug[%d,trial]: trial parse FAILED, entering ERROR mode\n",
835                                 YYPREFIX, yydepth);
836 #endif
837             /* Restore state as it was in the most forward-advanced error */
838             yylvp          = yylvals   + yyerrctx->lexeme;
839 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
840             yylpp          = yylpsns   + yyerrctx->lexeme;
841 #endif
842             yylexp         = yylexemes + yyerrctx->lexeme;
843             yychar         = yylexp[-1];
844             yylval         = yylvp[-1];
845 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
846             yylloc         = yylpp[-1];
847 #endif
848             yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base);
849             memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));
850             yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base);
851             memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
852 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
853             yystack.p_mark = yystack.p_base + (yyerrctx->yystack.p_mark - yyerrctx->yystack.p_base);
854             memcpy (yystack.p_base, yyerrctx->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
855 #endif
856             yystate        = yyerrctx->state;
857             yyFreeState(yyerrctx);
858             yyerrctx       = NULL;
859         }
860         yynewerrflag = 1;
861     }
862     if (yynewerrflag == 0) goto yyinrecovery;
863 #endif /* YYBTYACC */
864 
865     YYERROR_CALL("syntax error");
866 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
867     yyerror_loc_range[0] = yylloc; /* lookahead position is error start position */
868 #endif
869 
870 #if !YYBTYACC
871     goto yyerrlab;
872 yyerrlab:
873 #endif
874     ++yynerrs;
875 
876 yyinrecovery:
877     if (yyerrflag < 3)
878     {
879         yyerrflag = 3;
880         for (;;)
881         {
882             if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&
883                     yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)
884             {
885 #if YYDEBUG
886                 if (yydebug)
887                     fprintf(stderr, "%s[%d]: state %d, error recovery shifting to state %d\n",
888                                     YYDEBUGSTR, yydepth, *yystack.s_mark, yytable[yyn]);
889 #endif
890                 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
891                 yystate = yytable[yyn];
892                 *++yystack.s_mark = yytable[yyn];
893                 *++yystack.l_mark = yylval;
894 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
895                 /* lookahead position is error end position */
896                 yyerror_loc_range[1] = yylloc;
897                 YYLLOC_DEFAULT(yyloc, yyerror_loc_range, 2); /* position of error span */
898                 *++yystack.p_mark = yyloc;
899 #endif
900                 goto yyloop;
901             }
902             else
903             {
904 #if YYDEBUG
905                 if (yydebug)
906                     fprintf(stderr, "%s[%d]: error recovery discarding state %d\n",
907                                     YYDEBUGSTR, yydepth, *yystack.s_mark);
908 #endif
909                 if (yystack.s_mark <= yystack.s_base) goto yyabort;
910 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
911                 /* the current TOS position is the error start position */
912                 yyerror_loc_range[0] = *yystack.p_mark;
913 #endif
914 #if defined(YYDESTRUCT_CALL)
915 #if YYBTYACC
916                 if (!yytrial)
917 #endif /* YYBTYACC */
918 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
919                     YYDESTRUCT_CALL("error: discarding state",
920                                     yystos[*yystack.s_mark], yystack.l_mark, yystack.p_mark);
921 #else
922                     YYDESTRUCT_CALL("error: discarding state",
923                                     yystos[*yystack.s_mark], yystack.l_mark);
924 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
925 #endif /* defined(YYDESTRUCT_CALL) */
926                 --yystack.s_mark;
927                 --yystack.l_mark;
928 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
929                 --yystack.p_mark;
930 #endif
931             }
932         }
933     }
934     else
935     {
936         if (yychar == YYEOF) goto yyabort;
937 #if YYDEBUG
938         if (yydebug)
939         {
940             yys = yyname[YYTRANSLATE(yychar)];
941             fprintf(stderr, "%s[%d]: state %d, error recovery discarding token %d (%s)\n",
942                             YYDEBUGSTR, yydepth, yystate, yychar, yys);
943         }
944 #endif
945 #if defined(YYDESTRUCT_CALL)
946 #if YYBTYACC
947         if (!yytrial)
948 #endif /* YYBTYACC */
949 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
950             YYDESTRUCT_CALL("error: discarding token", yychar, &yylval, &yylloc);
951 #else
952             YYDESTRUCT_CALL("error: discarding token", yychar, &yylval);
953 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
954 #endif /* defined(YYDESTRUCT_CALL) */
955         yychar = YYEMPTY;
956         goto yyloop;
957     }
958 
959 yyreduce:
960     yym = yylen[yyn];
961 #if YYDEBUG
962     if (yydebug)
963     {
964         fprintf(stderr, "%s[%d]: state %d, reducing by rule %d (%s)",
965                         YYDEBUGSTR, yydepth, yystate, yyn, yyrule[yyn]);
966 #ifdef YYSTYPE_TOSTRING
967 #if YYBTYACC
968         if (!yytrial)
969 #endif /* YYBTYACC */
970             if (yym > 0)
971             {
972                 int i;
973                 fputc('<', stderr);
974                 for (i = yym; i > 0; i--)
975                 {
976                     if (i != yym) fputs(", ", stderr);
977                     fputs(YYSTYPE_TOSTRING(yystos[yystack.s_mark[1-i]],
978                                            yystack.l_mark[1-i]), stderr);
979                 }
980                 fputc('>', stderr);
981             }
982 #endif
983         fputc('\n', stderr);
984     }
985 #endif
986     if (yym > 0)
987         yyval = yystack.l_mark[1-yym];
988     else
989         memset(&yyval, 0, sizeof yyval);
990 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
991 
992     /* Perform position reduction */
993     memset(&yyloc, 0, sizeof(yyloc));
994 #if YYBTYACC
995     if (!yytrial)
996 #endif /* YYBTYACC */
997     {
998         YYLLOC_DEFAULT(yyloc, &yystack.p_mark[1-yym], yym);
999         /* just in case YYERROR is invoked within the action, save
1000            the start of the rhs as the error start position */
1001         yyerror_loc_range[0] = yystack.p_mark[1-yym];
1002     }
1003 #endif
1004 
1005     switch (yyn)
1006     {
1007     default:
1008         break;
1009     }
1010     yystack.s_mark -= yym;
1011     yystate = *yystack.s_mark;
1012     yystack.l_mark -= yym;
1013 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1014     yystack.p_mark -= yym;
1015 #endif
1016     yym = yylhs[yyn];
1017     if (yystate == 0 && yym == 0)
1018     {
1019 #if YYDEBUG
1020         if (yydebug)
1021         {
1022             fprintf(stderr, "%s[%d]: after reduction, ", YYDEBUGSTR, yydepth);
1023 #ifdef YYSTYPE_TOSTRING
1024 #if YYBTYACC
1025             if (!yytrial)
1026 #endif /* YYBTYACC */
1027                 fprintf(stderr, "result is <%s>, ", YYSTYPE_TOSTRING(yystos[YYFINAL], yyval));
1028 #endif
1029             fprintf(stderr, "shifting from state 0 to final state %d\n", YYFINAL);
1030         }
1031 #endif
1032         yystate = YYFINAL;
1033         *++yystack.s_mark = YYFINAL;
1034         *++yystack.l_mark = yyval;
1035 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1036         *++yystack.p_mark = yyloc;
1037 #endif
1038         if (yychar < 0)
1039         {
1040 #if YYBTYACC
1041             do {
1042             if (yylvp < yylve)
1043             {
1044                 /* we're currently re-reading tokens */
1045                 yylval = *yylvp++;
1046 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1047                 yylloc = *yylpp++;
1048 #endif
1049                 yychar = *yylexp++;
1050                 break;
1051             }
1052             if (yyps->save)
1053             {
1054                 /* in trial mode; save scanner results for future parse attempts */
1055                 if (yylvp == yylvlim)
1056                 {   /* Enlarge lexical value queue */
1057                     size_t p = (size_t) (yylvp - yylvals);
1058                     size_t s = (size_t) (yylvlim - yylvals);
1059 
1060                     s += YYLVQUEUEGROWTH;
1061                     if ((yylexemes = (short *)   realloc(yylexemes, s * sizeof(short))) == NULL)
1062                         goto yyenomem;
1063                     if ((yylvals   = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
1064                         goto yyenomem;
1065 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1066                     if ((yylpsns   = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
1067                         goto yyenomem;
1068 #endif
1069                     yylvp   = yylve = yylvals + p;
1070                     yylvlim = yylvals + s;
1071 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1072                     yylpp   = yylpe = yylpsns + p;
1073                     yylplim = yylpsns + s;
1074 #endif
1075                     yylexp  = yylexemes + p;
1076                 }
1077                 *yylexp = (short) YYLEX;
1078                 *yylvp++ = yylval;
1079                 yylve++;
1080 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1081                 *yylpp++ = yylloc;
1082                 yylpe++;
1083 #endif
1084                 yychar = *yylexp++;
1085                 break;
1086             }
1087             /* normal operation, no conflict encountered */
1088 #endif /* YYBTYACC */
1089             yychar = YYLEX;
1090 #if YYBTYACC
1091             } while (0);
1092 #endif /* YYBTYACC */
1093             if (yychar < 0) yychar = YYEOF;
1094             /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */
1095 #if YYDEBUG
1096             if (yydebug)
1097             {
1098                 yys = yyname[YYTRANSLATE(yychar)];
1099                 fprintf(stderr, "%s[%d]: state %d, reading %d (%s)\n",
1100                                 YYDEBUGSTR, yydepth, YYFINAL, yychar, yys);
1101             }
1102 #endif
1103         }
1104         if (yychar == YYEOF) goto yyaccept;
1105         goto yyloop;
1106     }
1107     if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&
1108             yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)
1109         yystate = yytable[yyn];
1110     else
1111         yystate = yydgoto[yym];
1112 #if YYDEBUG
1113     if (yydebug)
1114     {
1115         fprintf(stderr, "%s[%d]: after reduction, ", YYDEBUGSTR, yydepth);
1116 #ifdef YYSTYPE_TOSTRING
1117 #if YYBTYACC
1118         if (!yytrial)
1119 #endif /* YYBTYACC */
1120             fprintf(stderr, "result is <%s>, ", YYSTYPE_TOSTRING(yystos[yystate], yyval));
1121 #endif
1122         fprintf(stderr, "shifting from state %d to state %d\n", *yystack.s_mark, yystate);
1123     }
1124 #endif
1125     if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
1126     *++yystack.s_mark = (short) yystate;
1127     *++yystack.l_mark = yyval;
1128 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1129     *++yystack.p_mark = yyloc;
1130 #endif
1131     goto yyloop;
1132 #if YYBTYACC
1133 
1134     /* Reduction declares that this path is valid. Set yypath and do a full parse */
1135 yyvalid:
1136     if (yypath) YYABORT;
1137     while (yyps->save)
1138     {
1139         YYParseState *save = yyps->save;
1140         yyps->save = save->save;
1141         save->save = yypath;
1142         yypath = save;
1143     }
1144 #if YYDEBUG
1145     if (yydebug)
1146         fprintf(stderr, "%s[%d]: state %d, CONFLICT trial successful, backtracking to state %d, %d tokens\n",
1147                         YYDEBUGSTR, yydepth, yystate, yypath->state, (int)(yylvp - yylvals - yypath->lexeme));
1148 #endif
1149     if (yyerrctx)
1150     {
1151         yyFreeState(yyerrctx);
1152         yyerrctx = NULL;
1153     }
1154     yylvp          = yylvals + yypath->lexeme;
1155 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1156     yylpp          = yylpsns + yypath->lexeme;
1157 #endif
1158     yylexp         = yylexemes + yypath->lexeme;
1159     yychar         = YYEMPTY;
1160     yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base);
1161     memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));
1162     yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base);
1163     memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
1164 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1165     yystack.p_mark = yystack.p_base + (yypath->yystack.p_mark - yypath->yystack.p_base);
1166     memcpy (yystack.p_base, yypath->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
1167 #endif
1168     yystate        = yypath->state;
1169     goto yyloop;
1170 #endif /* YYBTYACC */
1171 
1172 yyoverflow:
1173     YYERROR_CALL("yacc stack overflow");
1174 #if YYBTYACC
1175     goto yyabort_nomem;
1176 yyenomem:
1177     YYERROR_CALL("memory exhausted");
1178 yyabort_nomem:
1179 #endif /* YYBTYACC */
1180     yyresult = 2;
1181     goto yyreturn;
1182 
1183 yyabort:
1184     yyresult = 1;
1185     goto yyreturn;
1186 
1187 yyaccept:
1188 #if YYBTYACC
1189     if (yyps->save) goto yyvalid;
1190 #endif /* YYBTYACC */
1191     yyresult = 0;
1192 
1193 yyreturn:
1194 #if defined(YYDESTRUCT_CALL)
1195     if (yychar != YYEOF && yychar != YYEMPTY)
1196 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1197         YYDESTRUCT_CALL("cleanup: discarding token", yychar, &yylval, &yylloc);
1198 #else
1199         YYDESTRUCT_CALL("cleanup: discarding token", yychar, &yylval);
1200 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
1201 
1202     {
1203         YYSTYPE *pv;
1204 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
1205         YYLTYPE *pp;
1206 
1207         for (pv = yystack.l_base, pp = yystack.p_base; pv <= yystack.l_mark; ++pv, ++pp)
1208              YYDESTRUCT_CALL("cleanup: discarding state",
1209                              yystos[*(yystack.s_base + (pv - yystack.l_base))], pv, pp);
1210 #else
1211         for (pv = yystack.l_base; pv <= yystack.l_mark; ++pv)
1212              YYDESTRUCT_CALL("cleanup: discarding state",
1213                              yystos[*(yystack.s_base + (pv - yystack.l_base))], pv);
1214 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
1215     }
1216 #endif /* defined(YYDESTRUCT_CALL) */
1217 
1218 #if YYBTYACC
1219     if (yyerrctx)
1220     {
1221         yyFreeState(yyerrctx);
1222         yyerrctx = NULL;
1223     }
1224     while (yyps)
1225     {
1226         YYParseState *save = yyps;
1227         yyps = save->save;
1228         save->save = NULL;
1229         yyFreeState(save);
1230     }
1231     while (yypath)
1232     {
1233         YYParseState *save = yypath;
1234         yypath = save->save;
1235         save->save = NULL;
1236         yyFreeState(save);
1237     }
1238 #endif /* YYBTYACC */
1239     yyfreestack(&yystack);
1240     return (yyresult);
1241 }
1242