# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif
-#if ! defined (__GNUC__)
-# define inline
-#endif
-
/* YYFINAL -- State number of the termination state. */
#define YYFINAL ]b4_final_state_number[
/* YYLAST -- Last index in YYTABLE. */
yysymprint Args; \
} while (0)
+# define YYDSYMPRINTF(Title, Token, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Token, Value]b4_location_if([, Location])[); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
/* Avoid empty `if' bodies. */
# define YYDPRINTF(Args) {}
# define YYDSYMPRINT(Args) {}
+# define YYDSYMPRINTF(Title, Token, Value, Location) {}
#endif /* !YYDEBUG */
* have been previously resolved. Set *VALP to the resulting value,
* and *LOCP to the computed location (if any). Return value is as
* for userAction. */
-static inline int
+static inline YYRESULTTAG
yydoAction (yyGLRStack* yystack, int yyk, yyRuleNum yyrule,
YYSTYPE* yyvalp, YYLTYPE* yylocp]b4_user_formals[)
{
yy_reduce_print (size_t yyk, yyRuleNum yyrule)
{
int yyi;
- YYDPRINTF ((stderr, "Reducing stack %d by rule %d (line %d),",
+ YYDPRINTF ((stderr, "Reducing stack %d by rule %d (line %d), ",
yyk, yyrule - 1, yyrline[yyrule]));
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
YYFPRINTF (stderr, "%s ", yytokenName (yyrhs[yyi]));
- YYFPRINTF (stderr, " -> %s\n", yytokenName (yyr1[yyrule]));
+ YYFPRINTF (stderr, "-> %s\n", yytokenName (yyr1[yyrule]));
}
#endif
yymarkStackDeleted (yystack, yyk);
YYDPRINTF ((stderr, "Merging stack %d into stack %d.\n",
yyk, yyi));
- return 0;
+ return yyok;
}
yyp = yyp->yypred;
}
yystack->yytops.yystates[yyk] = yys;
yyglrShiftDefer (yystack, yyk, yynewLRState, yyposn, yys0, yyrule]b4_pure_args[);
}
- return 0;
+ return yyok;
}
static int
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
*yytokenp = YYTRANSLATE (yychar);
- YYDPRINTF ((stderr, "Next token is %s\n",
- yytokenName (*yytokenp)));
+ YYDSYMPRINTF ("Next token is", *yytokenp, yylvalp, yyllocp);
}
yygetLRActions (yystate, *yytokenp, &yyaction, &yyconflicts);
while (yystack->yytops.yystates[0] != NULL)
{
yyGLRState *yys = yystack->yytops.yystates[0];
- YYDPRINTF ((stderr, "Error: popping "));
- YYDSYMPRINT ((stderr,
+ YYDSYMPRINTF ("Error: popping",
yystos[yys->yylrState],
- &yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[));
- YYDPRINTF ((stderr, "\n"));
+ &yys->yysemantics.yysval, &yys->yyloc);
yydestruct (yystos[yys->yylrState],
&yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[);
yystack->yytops.yystates[0] = yys->yypred;
}
if (*yytokenp != YYEMPTY)
{
- YYDPRINTF ((stderr, "Discarding token %s\n",
- yytokenName (*yytokenp)));
+ YYDSYMPRINTF ("Error: discarding", *yytokenp, yylvalp, yyllocp);
yydestruct (*yytokenp, yylvalp]b4_location_if([, yyllocp])[);
}
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
*yytokenp = YYTRANSLATE (yychar);
- YYDPRINTF ((stderr, "Next token is %s\n", yytokenName (*yytokenp)));
+ YYDSYMPRINTF ("Next token is", *yytokenp, yylvalp, yyllocp);
yyj = yypact[yystack->yytops.yystates[0]->yylrState];
if (yyis_pact_ninf (yyj))
/* Something's not right; we shouldn't be here. */
YYDPRINTF ((stderr, "Shifting error token, "));
yyglrShift (yystack, 0, yytable[yyj],
yys->yyposn, *yylvalp, yyllocp]b4_user_args[);
+ YYDPRINTF ((stderr, "Entering state %d\n",
+ yystack->yytops.yystates[0]->yylrState));
break;
}
}
- YYDPRINTF ((stderr, "Error: popping "));
- YYDSYMPRINT ((stderr,
+ YYDSYMPRINTF ("Error: popping",
yystos[yys->yylrState],
- &yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[));
- YYDPRINTF ((stderr, "\n"));
+ &yys->yysemantics.yysval, &yys->yyloc);
yydestruct (yystos[yys->yylrState],
&yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[);
yystack->yytops.yystates[0] = yys->yypred;
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
yytoken = YYTRANSLATE (yychar);
- YYDPRINTF ((stderr, "Next token is %s\n",
- yytokenName (yytoken)));
+ YYDSYMPRINTF ("Next token is", yytoken, yylvalp, yyllocp);
}
yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
if (*yyconflicts != 0)