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