java: check and fix support for api.token.raw

* tests/local.at (AT_LANG_MATCH, AT_YYERROR_DECLARE(java))
(AT_YYERROR_DECLARE_EXTERN(java), AT_PARSER_CLASS): New.
(AT_MAIN_DEFINE(java)): Use AT_PARSER_CLASS.
* tests/scanner.at: Add a test for Java.
* data/skeletons/lalr1.java (yytranslate_): Cast the result.
This commit is contained in:
Akim Demaille
2020-04-02 09:26:14 +02:00
parent cca8c73431
commit 72f04ca80f
3 changed files with 122 additions and 11 deletions

View File

@@ -1012,7 +1012,7 @@ b4_dollar_popdef[]dnl
private static final ]b4_int_type_for([b4_translate])[ yytranslate_ (int t)
]b4_api_token_raw_if(dnl
[[ {
return t;
return (]b4_int_type_for([b4_translate])[) t;
}
]],
[[ {