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