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