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