mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
java: style: avoid useless initializers
Instead of
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
private static final byte yypact_[] = yypact_init ();
private static final byte[] yypact_init ()
{
return new byte[]
{
25, -7, -8, 37, -8, 40, -8, 20, -8, 61,
-8, -8, 3, 9, 51, -8, -8, -2, -2, -2,
-2, -2, -2, -8, -8, -8, 1, 66, 66, 3,
3, 3
};
}
generate
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
private static final byte[] yypact_ =
{
25, -7, -8, 37, -8, 40, -8, 20, -8, 61,
-8, -8, 3, 9, 51, -8, -8, -2, -2, -2,
-2, -2, -2, -8, -8, -8, 1, 66, 66, 3,
3, 3
};
I have no idea what motivated the previous approach.
* data/skeletons/java.m4 (b4_typed_parser_table_define): Here.
This commit is contained in:
@@ -109,14 +109,10 @@ m4_define([b4_null], [null])
|
|||||||
m4_define([b4_typed_parser_table_define],
|
m4_define([b4_typed_parser_table_define],
|
||||||
[m4_ifval([$4], [b4_comment([$4])
|
[m4_ifval([$4], [b4_comment([$4])
|
||||||
])dnl
|
])dnl
|
||||||
[private static final ]$1[[] yy$2_ = yy$2_init ();
|
[private static final ]$1[[] yy$2_ =
|
||||||
private static final ]$1[[] yy$2_init ()
|
|
||||||
{
|
{
|
||||||
return new ]$1[[]
|
|
||||||
{
|
|
||||||
]$3[
|
]$3[
|
||||||
};
|
};]])
|
||||||
}]])
|
|
||||||
|
|
||||||
|
|
||||||
# b4_integral_parser_table_define(NAME, DATA, COMMENT)
|
# b4_integral_parser_table_define(NAME, DATA, COMMENT)
|
||||||
|
|||||||
@@ -982,7 +982,7 @@ b4_dollar_popdef[]dnl
|
|||||||
private static final ]b4_int_type_for([b4_pact])[ yypact_ninf_ = ]b4_pact_ninf[;
|
private static final ]b4_int_type_for([b4_pact])[ yypact_ninf_ = ]b4_pact_ninf[;
|
||||||
private static final ]b4_int_type_for([b4_table])[ yytable_ninf_ = ]b4_table_ninf[;
|
private static final ]b4_int_type_for([b4_table])[ yytable_ninf_ = ]b4_table_ninf[;
|
||||||
|
|
||||||
]b4_parser_tables_define[
|
]b4_parser_tables_define[
|
||||||
|
|
||||||
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
||||||
First, the terminals, then, starting at \a yyntokens_, nonterminals. */
|
First, the terminals, then, starting at \a yyntokens_, nonterminals. */
|
||||||
|
|||||||
Reference in New Issue
Block a user