* data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):

Un yy- yyrhs to avoid the name clash with the global YYRHS.
This commit is contained in:
Akim Demaille
2002-10-13 19:40:30 +00:00
parent 32f0598d06
commit 6fed0802ee
2 changed files with 14 additions and 8 deletions

View File

@@ -1,3 +1,8 @@
2002-10-13 Akim Demaille <akim@epita.fr>
* data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
Un yy- yyrhs to avoid the name clash with the global YYRHS.
2002-10-13 Akim Demaille <akim@epita.fr> 2002-10-13 Akim Demaille <akim@epita.fr>
* Makefile.maint: Update from Autoconf 2.54. * Makefile.maint: Update from Autoconf 2.54.

View File

@@ -757,14 +757,14 @@ yyhasResolvedValue (yyGLRState* yystate)
static void static void
yyaddDeferredAction (yyGLRStack* yystack, yyGLRState* yystate, yyaddDeferredAction (yyGLRStack* yystack, yyGLRState* yystate,
yyGLRState* yyrhs, yyRuleNum yyrule) yyGLRState* rhs, yyRuleNum yyrule)
{ {
yySemanticOption* yynewItem; yySemanticOption* yynewItem;
yynewItem = &yystack->yynextFree->yyoption; yynewItem = &yystack->yynextFree->yyoption;
yystack->yyspaceLeft -= 1; yystack->yyspaceLeft -= 1;
yystack->yynextFree += 1; yystack->yynextFree += 1;
yynewItem->yyisState = yyfalse; yynewItem->yyisState = yyfalse;
yynewItem->yystate = yyrhs; yynewItem->yystate = rhs;
yynewItem->yyrule = yyrule; yynewItem->yyrule = yyrule;
yynewItem->yynext = yystate->yysemantics.yyfirstVal; yynewItem->yynext = yystate->yysemantics.yyfirstVal;
yystate->yysemantics.yyfirstVal = yynewItem; yystate->yysemantics.yyfirstVal = yynewItem;
@@ -967,7 +967,7 @@ yyglrShift (yyGLRStack* yystack, int yyk, yyStateNum yylrState, size_t yyposn,
* the (unresolved) semantic value of RHS under the action for RULE. */ * the (unresolved) semantic value of RHS under the action for RULE. */
static inline void static inline void
yyglrShiftDefer (yyGLRStack* yystack, int yyk, yyStateNum yylrState, yyglrShiftDefer (yyGLRStack* yystack, int yyk, yyStateNum yylrState,
size_t yyposn, yyGLRState* yyrhs, yyRuleNum yyrule) size_t yyposn, yyGLRState* rhs, yyRuleNum yyrule)
{ {
yyGLRStackItem* yynewItem; yyGLRStackItem* yynewItem;
@@ -981,7 +981,7 @@ yyglrShiftDefer (yyGLRStack* yystack, int yyk, yyStateNum yylrState,
yystack->yytops.yystates[yyk] = &yynewItem->yystate; yystack->yytops.yystates[yyk] = &yynewItem->yystate;
yystack->yynextFree += 1; yystack->yynextFree += 1;
yystack->yyspaceLeft -= 1; yystack->yyspaceLeft -= 1;
yyaddDeferredAction (yystack, &yynewItem->yystate, yyrhs, yyrule); yyaddDeferredAction (yystack, &yynewItem->yystate, rhs, yyrule);
} }
/** Pop the symbols consumed by reduction #RULE from the top of stack /** Pop the symbols consumed by reduction #RULE from the top of stack
@@ -999,7 +999,7 @@ yydoAction (yyGLRStack* yystack, int yyk, yyRuleNum yyrule,
if (yystack->yysplitPoint == NULL) if (yystack->yysplitPoint == NULL)
{ {
/* Standard special case: single stack. */ /* Standard special case: single stack. */
yyGLRStackItem* yyrhs = (yyGLRStackItem*) yystack->yytops.yystates[yyk]; yyGLRStackItem* rhs = (yyGLRStackItem*) yystack->yytops.yystates[yyk];
assert (yyk == 0); assert (yyk == 0);
yystack->yynextFree -= yynrhs; yystack->yynextFree -= yynrhs;
yystack->yyspaceLeft += yynrhs; yystack->yyspaceLeft += yynrhs;
@@ -1011,10 +1011,10 @@ yydoAction (yyGLRStack* yystack, int yyk, yyRuleNum yyrule,
} }
else else
{ {
*yyvalp = yyrhs[1-yynrhs].yystate.yysemantics.yysval; *yyvalp = rhs[1-yynrhs].yystate.yysemantics.yysval;
*yylocp = yyrhs[1-yynrhs].yystate.yyloc; *yylocp = rhs[1-yynrhs].yystate.yyloc;
} }
return yyuserAction (yyrule, yynrhs, yyrhs, yyvalp, yylocp, yystack); return yyuserAction (yyrule, yynrhs, rhs, yyvalp, yylocp, yystack);
} }
else else
{ {
@@ -1273,6 +1273,7 @@ yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystack,
} }
#if YYDEBUG #if YYDEBUG
/* FIXME: How can we initialize the lloc bit? */
static yyGLRState YYLEFTMOST_STATE = { 0, 0, -1, NULL, 0, { NULL } }; static yyGLRState YYLEFTMOST_STATE = { 0, 0, -1, NULL, 0, { NULL } };
static void yyreportTree (yySemanticOption* yyx, int yyindent) static void yyreportTree (yySemanticOption* yyx, int yyindent)