+2008-11-25 Akim Demaille <demaille@gostai.com>
+
+ Get rid of yyrhs and yyprhs in glr.c.
+ * data/glr.c (yyrhs, yyprhs): Remove.
+ Instead, use the state stack and yystos.
+
2008-11-25 Akim Demaille <demaille@gostai.com>
Flag glr tests.
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const ]b4_int_type_for([b4_prhs])[ yyprhs[] =
-{
- ]b4_prhs[
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const ]b4_int_type_for([b4_rhs])[ yyrhs[] =
-{
- ]b4_rhs[
-};
-
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const ]b4_int_type_for([b4_rline])[ yyrline[] =
{
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ yy_symbol_print (stderr,
+ ]yystos@{b4_rhs_data(yynrhs, yyi + 1).yylrState@}[,
&]b4_rhs_value(yynrhs, yyi + 1)[
]b4_locations_if([, &]b4_rhs_location(yynrhs, yyi + 1))[]dnl
b4_user_args[);
{
if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn)
YYFPRINTF (stderr, "%*s%s <empty>\n", yyindent+2, "",
- yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]));
+ yytokenName (yystos[yystates[yyi-1]->yylrState]));
else
YYFPRINTF (stderr, "%*s%s <tokens %lu .. %lu>\n", yyindent+2, "",
- yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]),
- (unsigned long int) (yystates[yyi - 1]->yyposn + 1),
+ yytokenName (yystos[yystates[yyi-1]->yylrState]),
+ (unsigned long int) (yystates[yyi-1]->yyposn + 1),
(unsigned long int) yystates[yyi]->yyposn);
}
else