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