small but important bugfixes for the Java skeleton

2008-10-08  Di-an Jan  <dianj@freeshell.org>  (tiny change)

	Small but important bugfixes for the Java skeleton.
	* data/lalr1.java (yyerror): Change Location to b4_location_type.
	(yy_symbol_print): Call toString on yyvaluep.
This commit is contained in:
Paolo Bonzini
2008-10-09 21:26:29 +02:00
parent e1145ad8bd
commit ddf17a6e0e
3 changed files with 9 additions and 2 deletions

View File

@@ -205,7 +205,7 @@ b4_lexer_if([[
]b4_locations_if([
protected final void yyerror (String s) {
yylexer.yyerror ((Location)null, s);
yylexer.yyerror ((]b4_location_type[)null, s);
}
protected final void yyerror (]b4_position_type[ loc, String s) {
yylexer.yyerror (new ]b4_location_type[ (loc), s);
@@ -414,7 +414,7 @@ b4_lexer_if([[
yycdebug (s + (yytype < yyntokens_ ? " token " : " nterm ")
+ yytname_[yytype] + " ("]b4_locations_if([
+ yylocationp + ": "])[
+ (yyvaluep == null ? "(null)" : yyvaluep) + ")");
+ (yyvaluep == null ? "(null)" : yyvaluep.toString ()) + ")");
}
/**