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