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