mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
java: add support for parse.error=detailed
In Java there is no need for N_ and yytranslate_. So instead of hard-coding the use of N_ in the table of the symbol names, rely on b4_symbol_translate. * src/output.c (prepare_symbol_names): Use b4_symbol_translate instead of N_. * data/skeletons/c.m4 (b4_symbol_translate): New. * data/skeletons/lalr1.java (yysymbolName): New. Use it. * examples/java/calc/Calc.y: Use parse.error=detailed. * tests/calc.at: Check parse.error=detailed.
This commit is contained in:
@@ -220,6 +220,13 @@ m4_define([b4_position_type], [b4_percent_define_get([[api.position.type]])])
|
||||
## ----------------- ##
|
||||
|
||||
|
||||
# b4_symbol_translate(STRING)
|
||||
# ---------------------------
|
||||
m4_define([b4_symbol_translate],
|
||||
[[_($1)]])
|
||||
|
||||
|
||||
|
||||
# b4_symbol_value(VAL, [SYMBOL-NUM], [TYPE-TAG])
|
||||
# ----------------------------------------------
|
||||
# See README.
|
||||
|
||||
Reference in New Issue
Block a user