[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07-yyrhs-in-glr.patch
From: |
Akim Demaille |
Subject: |
07-yyrhs-in-glr.patch |
Date: |
Sun, 13 Oct 2002 21:37:37 +0200 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
Un yy- yyrhs to avoid the name clash with the global YYRHS.
Index: data/glr.c
--- data/glr.c Sun, 13 Oct 2002 19:57:05 +0200 akim
+++ data/glr.c Sun, 13 Oct 2002 21:37:26 +0200 akim
@@ -757,14 +757,14 @@ m4_define_default([b4_header_guard],
static void
yyaddDeferredAction (yyGLRStack* yystack, yyGLRState* yystate,
- yyGLRState* yyrhs, yyRuleNum yyrule)
+ yyGLRState* rhs, yyRuleNum yyrule)
{
yySemanticOption* yynewItem;
yynewItem = &yystack->yynextFree->yyoption;
yystack->yyspaceLeft -= 1;
yystack->yynextFree += 1;
yynewItem->yyisState = yyfalse;
- yynewItem->yystate = yyrhs;
+ yynewItem->yystate = rhs;
yynewItem->yyrule = yyrule;
yynewItem->yynext = yystate->yysemantics.yyfirstVal;
yystate->yysemantics.yyfirstVal = yynewItem;
@@ -967,7 +967,7 @@ m4_define_default([b4_header_guard],
* the (unresolved) semantic value of RHS under the action for RULE. */
static inline void
yyglrShiftDefer (yyGLRStack* yystack, int yyk, yyStateNum yylrState,
- size_t yyposn, yyGLRState* yyrhs, yyRuleNum yyrule)
+ size_t yyposn, yyGLRState* rhs, yyRuleNum yyrule)
{
yyGLRStackItem* yynewItem;
@@ -981,7 +981,7 @@ m4_define_default([b4_header_guard],
yystack->yytops.yystates[yyk] = &yynewItem->yystate;
yystack->yynextFree += 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
@@ -999,7 +999,7 @@ m4_define_default([b4_header_guard],
if (yystack->yysplitPoint == NULL)
{
/* Standard special case: single stack. */
- yyGLRStackItem* yyrhs = (yyGLRStackItem*) yystack->yytops.yystates[yyk];
+ yyGLRStackItem* rhs = (yyGLRStackItem*) yystack->yytops.yystates[yyk];
assert (yyk == 0);
yystack->yynextFree -= yynrhs;
yystack->yyspaceLeft += yynrhs;
@@ -1011,10 +1011,10 @@ m4_define_default([b4_header_guard],
}
else
{
- *yyvalp = yyrhs[1-yynrhs].yystate.yysemantics.yysval;
- *yylocp = yyrhs[1-yynrhs].yystate.yyloc;
+ *yyvalp = rhs[1-yynrhs].yystate.yysemantics.yysval;
+ *yylocp = rhs[1-yynrhs].yystate.yyloc;
}
- return yyuserAction (yyrule, yynrhs, yyrhs, yyvalp, yylocp, yystack);
+ return yyuserAction (yyrule, yynrhs, rhs, yyvalp, yylocp, yystack);
}
else
{
@@ -1273,6 +1273,7 @@ m4_define_default([b4_header_guard],
}
#if YYDEBUG
+/* FIXME: How can we initialize the lloc bit? */
static yyGLRState YYLEFTMOST_STATE = { 0, 0, -1, NULL, 0, { NULL } };
static void yyreportTree (yySemanticOption* yyx, int yyindent)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 07-yyrhs-in-glr.patch,
Akim Demaille <=