{}, since this breaks the common use of `YYDPRINTF ((...));' if a
single statement is desired (e.g. before `else'). Work around GCC
warnings by surrounding corresponding calls with {} if needed.
(yyhasResolvedValue): Remove unused function.
(yymergeOptionSets, yyresolvStack): Use `continue;' for empty
loop body.
(yyreportSyntaxError): Renamed from yyreportParseError.
(yyrecoverSyntaxError): Renamed from yyrecoverParseError.
All uses changed.
#else /* !YYDEBUG */
/* Avoid empty `if' bodies. */
#else /* !YYDEBUG */
/* Avoid empty `if' bodies. */
-# define YYDPRINTF(Args) {}
-# define YYDSYMPRINT(Args) {}
-# define YYDSYMPRINTF(Title, Token, Value, Location) {}
+# define YYDPRINTF(Args)
+# define YYDSYMPRINT(Args)
+# define YYDSYMPRINTF(Title, Token, Value, Location)
-/** True iff the semantic value of the edge leading to STATE is
- * resolved. */
-static inline bool
-yyhasResolvedValue (yyGLRState* yystate)
-{
- return yystate->yyresolved;
-}
-
static void
yyaddDeferredAction (yyGLRStack* yystack, yyGLRState* yystate,
yyGLRState* rhs, yyRuleNum yyrule]b4_pure_formals[)
static void
yyaddDeferredAction (yyGLRStack* yystack, yyGLRState* yystate,
yyGLRState* rhs, yyRuleNum yyrule]b4_pure_formals[)
if (yystack->yytops.yystates[yyi] == NULL)
{
if (yyi == yyj)
if (yystack->yytops.yystates[yyi] == NULL)
{
if (yyi == yyj)
- YYDPRINTF ((stderr, "Removing dead stacks.\n"));
+ {
+ YYDPRINTF ((stderr, "Removing dead stacks.\n"));
+ }
yystack->yytops.yysize -= 1;
}
else
{
yystack->yytops.yystates[yyj] = yystack->yytops.yystates[yyi];
if (yyj != yyi)
yystack->yytops.yysize -= 1;
}
else
{
yystack->yytops.yystates[yyj] = yystack->yytops.yystates[yyi];
if (yyj != yyi)
- YYDPRINTF ((stderr, "Rename stack %d -> %d.\n", yyi, yyj));
+ {
+ YYDPRINTF ((stderr, "Rename stack %d -> %d.\n", yyi, yyj));
+ }
yySemanticOption* yyz;
for (yyz = yys0->yysemantics.yyfirstVal; yyz->yynext != NULL;
yyz = yyz->yynext)
yySemanticOption* yyz;
for (yyz = yys0->yysemantics.yyfirstVal; yyz->yynext != NULL;
yyz = yyz->yynext)
yyz->yynext = yys1->yysemantics.yyfirstVal;
}
}
yyz->yynext = yys1->yysemantics.yyfirstVal;
}
}
for (yyn = 0, yys = yystack->yytops.yystates[0];
yys != yystack->yysplitPoint;
yys = yys->yypred, yyn += 1)
for (yyn = 0, yys = yystack->yytops.yystates[0];
yys != yystack->yysplitPoint;
yys = yys->yypred, yyn += 1)
YYCHK (yyresolveStates (yystack->yytops.yystates[0], yyn, yystack
]b4_user_args[));
}
YYCHK (yyresolveStates (yystack->yytops.yystates[0], yyn, yystack
]b4_user_args[));
}
-yyreportParseError (yyGLRStack* yystack,
- YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[)
+yyreportSyntaxError (yyGLRStack* yystack,
+ YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[)
{
/* `Unused' warnings. */
(void) yylvalp;
{
/* `Unused' warnings. */
(void) yylvalp;
YYLVALP, and YYLLOCP point to the syntactic category, semantic
value, and location of the lookahead. */
static void
YYLVALP, and YYLLOCP point to the syntactic category, semantic
value, and location of the lookahead. */
static void
-yyrecoverParseError (yyGLRStack* yystack,
- YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[)
+yyrecoverSyntaxError (yyGLRStack* yystack,
+ YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[)
{
yySymbol* const yytokenp = yystack->yytokenp;
size_t yyk;
{
yySymbol* const yytokenp = yystack->yytokenp;
size_t yyk;
yyrule = yydefaultAction (yystate);
if (yyrule == 0)
{
yyrule = yydefaultAction (yystate);
if (yyrule == 0)
{
- yyreportParseError (&yystack, yylvalp, yyllocp]b4_user_args[);
+ yyreportSyntaxError (&yystack, yylvalp, yyllocp]b4_user_args[);
goto yyuser_error;
}
YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue]b4_lpure_args[));
goto yyuser_error;
}
YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue]b4_lpure_args[));
}
else if (yyisErrorAction (yyaction))
{
}
else if (yyisErrorAction (yyaction))
{
- yyreportParseError (&yystack, yylvalp, yyllocp]b4_user_args[);
+ yyreportSyntaxError (&yystack, yylvalp, yyllocp]b4_user_args[);
goto yyuser_error;
}
else
goto yyuser_error;
}
else
yyFail (&yystack][]b4_lpure_args[, "syntax error");
YYCHK1 (yyresolveStack (&yystack]b4_user_args[));
YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
yyFail (&yystack][]b4_lpure_args[, "syntax error");
YYCHK1 (yyresolveStack (&yystack]b4_user_args[));
YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
- yyreportParseError (&yystack, yylvalp, yyllocp]b4_user_args[);
+ yyreportSyntaxError (&yystack, yylvalp, yyllocp]b4_user_args[);
goto yyuser_error;
}
else if (yystack.yytops.yysize == 1)
goto yyuser_error;
}
else if (yystack.yytops.yysize == 1)
}
continue;
yyuser_error:
}
continue;
yyuser_error:
- yyrecoverParseError (&yystack, yylvalp, yyllocp]b4_user_args[);
+ yyrecoverSyntaxError (&yystack, yylvalp, yyllocp]b4_user_args[);
yyposn = yystack.yytops.yystates[0]->yyposn;
}
yyDone:
yyposn = yystack.yytops.yystates[0]->yyposn;
}
yyDone: