mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +00:00
2007-03-07 Paolo Bonzini <bonzini@gnu.org>
* data/java.m4 (b4_single_class_if): Remove.
(b4_abstract_if): Look at "%define abstract".
(b4_lexer_if): New.
(b4_union_name): Rename...
(b4_yystype): ... to this. Map to "%define stype".
(b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
b4_maybe_throws): Fix quoting.
(b4_lex_param_call): Move below to keep b4_*_param_decl close.
* data/lalr1.java (Lexer interface): Always define.
(Lexer interface within parser class): Remove.
(YYLexer class): New, used when "%code lexer" is present.
(constructor): When "%code lexer" is used, pass %lex-param
to the lexer constructor.
(yylex, yyparse): Remove %lex-param from method invocations
(YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
* doc/bison.texinfo (Java Bison Interface): Mention "%define
abstract". Rename "%define union_name" to "%define stype".
Rename method names according to previous patch.
(Java Scanner Interface): Describe "%code lexer" instead of
"%pure-parser" and "%define single_class".
(Java Differences): Mention "%code lexer".
* tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
Include scanner here, using macros from tests/local.at.
(AT_DATA_CALC_Y): Remove final argument.
(_AT_CHECK_JAVA_CALC): Likewise.
(AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
of %locations and %error-verbose.
(main): Test with and without %lex-param.
* tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
(AT_BISON_OPTION_POPDEFS): Pop it.
This commit is contained in:
@@ -52,6 +52,8 @@ m4_pushdef([AT_GLR_CC_IF],
|
||||
# Using yacc.c?
|
||||
m4_pushdef([AT_YACC_IF],
|
||||
[m4_bmatch([$3], [%language\|%glr-parser\|%skeleton], [$2], [$1])])
|
||||
m4_pushdef([AT_LEXPARAM_IF],
|
||||
[m4_bmatch([$3], [%lex-param], [$1], [$2])])
|
||||
m4_pushdef([AT_PARAM_IF],
|
||||
[m4_bmatch([$3], [%parse-param], [$1], [$2])])
|
||||
m4_pushdef([AT_LOCATION_IF],
|
||||
@@ -128,6 +130,7 @@ m4_popdef([AT_GLR_OR_PARAM_IF])
|
||||
m4_popdef([AT_PURE_AND_LOC_IF])
|
||||
m4_popdef([AT_LOCATION_IF])
|
||||
m4_popdef([AT_PARAM_IF])
|
||||
m4_popdef([AT_LEXPARAM_IF])
|
||||
m4_popdef([AT_YACC_IF])
|
||||
m4_popdef([AT_GLR_IF])
|
||||
m4_popdef([AT_SKEL_CC_IF])
|
||||
|
||||
Reference in New Issue
Block a user