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