mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-27 13:13:04 +00:00
java/d: remove useless macros
There are many macros that are defined and used just once (b4_public_if, b4_abstract_if, etc.). That's overkill. Rather, let's define a macro to build the "public class YYParser" line. It appears that the same syntax with "extends", "abstract", etc. is implemented in the D parser, which looks very fishy... * data/skeletons/d.m4, data/skeletons/java.m4 (b4_public_if) (b4_abstract_if, b4_final_if, b4_strictfp_if): Replace with (b4_parser_class_declaration): this. * data/skeletons/lalr1.d, data/skeletons/lalr1.java: Adjust.
This commit is contained in:
@@ -129,12 +129,8 @@ b4_locations_if([, ref ]b4_location_type[ loc])[)
|
||||
public final void print (File stream)
|
||||
{
|
||||
stream.write ("Stack now");
|
||||
|
||||
for (int i = 0; i < stack.length; i++)
|
||||
{
|
||||
stream.write (' ');
|
||||
stream.write ("%d", stack[i].state);
|
||||
}
|
||||
stream.write (" %d", stack[i].state);
|
||||
stream.writeln ();
|
||||
}
|
||||
}
|
||||
@@ -230,12 +226,7 @@ b4_user_union_members
|
||||
[m4_if(b4_tag_seen_flag, 0,
|
||||
[[private alias int YYSemanticType;]])])[
|
||||
]b4_token_enums(b4_tokens)[
|
||||
]b4_public_if([public ])dnl
|
||||
b4_abstract_if([abstract ])dnl
|
||||
b4_final_if([final ])dnl
|
||||
[class ]b4_parser_class[]dnl
|
||||
b4_percent_define_get3([extends], [ extends ])dnl
|
||||
b4_percent_define_get3([implements], [ implements ])[
|
||||
]b4_parser_class_declaration[
|
||||
{
|
||||
]b4_identification[
|
||||
|
||||
|
||||
Reference in New Issue
Block a user