mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
Work around Java's ``code too large'' problem for parser tables.
* data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New. * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_, yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_ yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table. (yytname_): Use b4_typed_parser_table. * doc/bison.texinfo (Java Bison Interface): Add note on Java's ``code too large'' error.
This commit is contained in:
19
data/java.m4
19
data/java.m4
@@ -117,6 +117,25 @@ m4_define([b4_int_type_for],
|
||||
m4_define([b4_null], [null])
|
||||
|
||||
|
||||
# b4_typed_parser_table(TYPE, NAME, DATA)
|
||||
# ---------------------------------------
|
||||
m4_define([b4_typed_parser_table],
|
||||
[[private static final ]$1[ $2[] = $2init();
|
||||
private static final ]$1[[] $2init()
|
||||
{
|
||||
return new ]$1[[]
|
||||
{
|
||||
]$3[
|
||||
};
|
||||
}]])
|
||||
|
||||
|
||||
# b4_integral_parser_table(NAME, DATA)
|
||||
#-------------------------------------
|
||||
m4_define([b4_integral_parser_table],
|
||||
[b4_typed_parser_table([b4_int_type_for([$2])], [$1], [$2])])
|
||||
|
||||
|
||||
## ------------------------- ##
|
||||
## Assigning token numbers. ##
|
||||
## ------------------------- ##
|
||||
|
||||
Reference in New Issue
Block a user