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