mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 02:33:03 +00:00
java: avoid useless work
* data/skeletons/lalr1.java (yySymbolPrint): Avoid the computation of the argument if useless. While at it, fix Java coding style.
This commit is contained in:
@@ -505,13 +505,14 @@ import java.text.MessageFormat;
|
|||||||
`--------------------------------*/
|
`--------------------------------*/
|
||||||
|
|
||||||
private void yySymbolPrint(String s, SymbolKind yykind,
|
private void yySymbolPrint(String s, SymbolKind yykind,
|
||||||
]b4_yystype[ yyvalue]b4_locations_if([, ]b4_location_type[ yylocation])[)
|
]b4_yystype[ yyvalue]b4_locations_if([, ]b4_location_type[ yylocation])[) {
|
||||||
{
|
if (0 < yydebug) {
|
||||||
yycdebug(s
|
yycdebug(s
|
||||||
+ (yykind.getCode() < YYNTOKENS_ ? " token " : " nterm ")
|
+ (yykind.getCode() < YYNTOKENS_ ? " token " : " nterm ")
|
||||||
+ yykind.getName() + " ("]b4_locations_if([
|
+ yykind.getName() + " ("]b4_locations_if([
|
||||||
+ yylocation + ": "])[
|
+ yylocation + ": "])[
|
||||||
+ (yyvalue == null ? "(null)" : yyvalue.toString()) + ")");
|
+ (yyvalue == null ? "(null)" : yyvalue.toString()) + ")");
|
||||||
|
}
|
||||||
}]])[
|
}]])[
|
||||||
|
|
||||||
]b4_push_if([],[[
|
]b4_push_if([],[[
|
||||||
|
|||||||
Reference in New Issue
Block a user