X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/c89b4c032c039eedbd64418e7082f5268a27af1b..b50d2359d7608270561abd5c3cbf6e84834c2019:/data/glr.c diff --git a/data/glr.c b/data/glr.c index d2f19218..0f466131 100644 --- a/data/glr.c +++ b/data/glr.c @@ -154,7 +154,7 @@ m4_if(b4_prefix[], [yy], [], #define yynerrs b4_prefix[]nerrs #define yylloc b4_prefix[]lloc]) -b4_token_defines(b4_tokens) +b4_token_enums(b4_tokens) /* Copy the first part of user declarations. */ b4_pre_prologue[ @@ -920,12 +920,12 @@ yydestroyGLRState (char const *yymsg, yyGLRState *yys) if (yys->yysemantics.yyfirstVal) { yySemanticOption *yyoption = yys->yysemantics.yyfirstVal; - yyGLRState *yyrhs; + yyGLRState *yyrh; int yyn; - for (yyrhs = yyoption->yystate, yyn = yyrhsLength (yyoption->yyrule); + for (yyrh = yyoption->yystate, yyn = yyrhsLength (yyoption->yyrule); yyn > 0; - yyrhs = yyrhs->yypred, yyn -= 1) - yydestroyGLRState (yymsg, yyrhs); + yyrh = yyrh->yypred, yyn -= 1) + yydestroyGLRState (yymsg, yyrh); } } } @@ -1674,6 +1674,11 @@ yyresolveValue (yySemanticOption* yyoptionList, yyGLRStack* yystack, yybest = yyp; yymerge = yyfalse; break; + default: + /* This cannot happen so it is not worth a YYASSERT (yyfalse), + but some compilers complain if the default case is + omitted. */ + break; } yypp = &yyp->yynext; } @@ -2316,7 +2321,7 @@ m4_if(b4_defines_flag, 0, [], b4_copyright([Skeleton parser for GLR parsing with Bison], [2002, 2003, 2004, 2005]) -b4_token_defines(b4_tokens) +b4_token_enums(b4_tokens) #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) m4_ifdef([b4_stype],