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