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