java: fix reduction traces.

* data/lalr1.java (yy_reduce_print): Fix state index.
	Reported by Tim Landscheidt.
This commit is contained in:
Akim Demaille
2012-01-15 14:23:15 +01:00
parent 78e365574e
commit 2d404819d0
2 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2012-01-15 Akim Demaille <demaille@gostai.com>
java: fix reduction traces.
* data/lalr1.java (yy_reduce_print): Fix state index.
Reported by Tim Landscheidt.
2012-01-12 Jim Meyering <meyering@redhat.com> 2012-01-12 Jim Meyering <meyering@redhat.com>
build: avoid warning from coverity about lbitset_elt_find build: avoid warning from coverity about lbitset_elt_find

View File

@@ -848,7 +848,7 @@ m4_popdef([b4_at_dollar])])dnl
/* The symbols being reduced. */ /* The symbols being reduced. */
for (int yyi = 0; yyi < yynrhs; yyi++) for (int yyi = 0; yyi < yynrhs; yyi++)
yy_symbol_print (" $" + (yyi + 1) + " =", yy_symbol_print (" $" + (yyi + 1) + " =",
yystos_[yystack.stateAt(yyi + 1 - yynrhs)], yystos_[yystack.stateAt(yynrhs - (yyi + 1))],
]b4_rhs_value(yynrhs, yyi + 1)b4_locations_if([, ]b4_rhs_value(yynrhs, yyi + 1)b4_locations_if([,
b4_rhs_location(yynrhs, yyi + 1)])[); b4_rhs_location(yynrhs, yyi + 1)])[);
} }