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