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