java: avoid trailing white spaces

* data/skeletons/java.m4 (b4_maybe_throws): Issue a space before when needed.
* data/skeletons/lalr1.java: Avoid trailing spaces.
This commit is contained in:
Akim Demaille
2020-02-01 10:41:44 +01:00
parent fb554c2804
commit 9ed802a026
2 changed files with 57 additions and 54 deletions

View File

@@ -147,18 +147,20 @@ b4_symbol_foreach([b4_token_enum])])])
# b4-case(ID, CODE)
# -----------------
# We need to fool Java's stupid unreachable code detection.
m4_define([b4_case], [ case $1:
m4_define([b4_case],
[ case $1:
if (yyn == $1)
$2;
break;
])
])
# b4_predicate_case(LABEL, CONDITIONS)
# ------------------------------------
m4_define([b4_predicate_case], [ case $1:
m4_define([b4_predicate_case],
[ case $1:
if (! ($2)) YYERROR;
break;
])
])
## -------- ##
@@ -361,4 +363,4 @@ m4_define([b4_var_decl],
# -----------------------
# Expand to either an empty string or "throws THROWS".
m4_define([b4_maybe_throws],
[m4_ifval($1, [throws $1])])
[m4_ifval($1, [ throws $1])])