Use yy* consistently.

* data/glr.c: Now that yyrhs no longer exists as a global
	variable, rename local "rhs" variables into "yyrhs" for
	consistency.
This commit is contained in:
Akim Demaille
2008-11-25 20:55:01 +01:00
parent 783aa653f4
commit 8452c667e6
2 changed files with 13 additions and 6 deletions

View File

@@ -1,3 +1,10 @@
2008-11-26 Akim Demaille <demaille@gostai.com>
Use yy* consistently.
* data/glr.c: Now that yyrhs no longer exists as a global
variable, rename local "rhs" variables into "yyrhs" for
consistency.
2008-11-25 Akim Demaille <demaille@gostai.com> 2008-11-25 Akim Demaille <demaille@gostai.com>
Get rid of yyrhs and yyprhs in glr.c. Get rid of yyrhs and yyprhs in glr.c.

View File

@@ -1108,11 +1108,11 @@ yynewGLRStackItem (yyGLRStack* yystackp, yybool yyisState)
* stack #K of *STACKP. */ * stack #K of *STACKP. */
static void static void
yyaddDeferredAction (yyGLRStack* yystackp, size_t yyk, yyGLRState* yystate, yyaddDeferredAction (yyGLRStack* yystackp, size_t yyk, yyGLRState* yystate,
yyGLRState* rhs, yyRuleNum yyrule) yyGLRState* yyrhs, yyRuleNum yyrule)
{ {
yySemanticOption* yynewOption = yySemanticOption* yynewOption =
&yynewGLRStackItem (yystackp, yyfalse)->yyoption; &yynewGLRStackItem (yystackp, yyfalse)->yyoption;
yynewOption->yystate = rhs; yynewOption->yystate = yyrhs;
yynewOption->yyrule = yyrule; yynewOption->yyrule = yyrule;
if (yystackp->yytops.yylookaheadNeeds[yyk]) if (yystackp->yytops.yylookaheadNeeds[yyk])
{ {
@@ -1343,7 +1343,7 @@ yyglrShift (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
* semantic value of YYRHS under the action for YYRULE. */ * semantic value of YYRHS under the action for YYRULE. */
static inline void static inline void
yyglrShiftDefer (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState, yyglrShiftDefer (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
size_t yyposn, yyGLRState* rhs, yyRuleNum yyrule) size_t yyposn, yyGLRState* yyrhs, yyRuleNum yyrule)
{ {
yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate; yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
@@ -1355,7 +1355,7 @@ yyglrShiftDefer (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
yystackp->yytops.yystates[yyk] = yynewState; yystackp->yytops.yystates[yyk] = yynewState;
/* Invokes YY_RESERVE_GLRSTACK. */ /* Invokes YY_RESERVE_GLRSTACK. */
yyaddDeferredAction (yystackp, yyk, yynewState, rhs, yyrule); yyaddDeferredAction (yystackp, yyk, yynewState, yyrhs, 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
@@ -1373,12 +1373,12 @@ yydoAction (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
if (yystackp->yysplitPoint == NULL) if (yystackp->yysplitPoint == NULL)
{ {
/* Standard special case: single stack. */ /* Standard special case: single stack. */
yyGLRStackItem* rhs = (yyGLRStackItem*) yystackp->yytops.yystates[yyk]; yyGLRStackItem* yyrhs = (yyGLRStackItem*) yystackp->yytops.yystates[yyk];
YYASSERT (yyk == 0); YYASSERT (yyk == 0);
yystackp->yynextFree -= yynrhs; yystackp->yynextFree -= yynrhs;
yystackp->yyspaceLeft += yynrhs; yystackp->yyspaceLeft += yynrhs;
yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate; yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate;
return yyuserAction (yyrule, yynrhs, rhs, return yyuserAction (yyrule, yynrhs, yyrhs,
yyvalp, yylocp, yystackp]b4_user_args[); yyvalp, yylocp, yystackp]b4_user_args[);
} }
else else