d, java: compute static subtractions

* data/d.m4, data/java.m4: Use b4_subtract where appropriate.
This commit is contained in:
Akim Demaille
2018-12-04 21:02:57 +01:00
parent f15382f7d7
commit cfd682f46d
2 changed files with 4 additions and 4 deletions

View File

@@ -242,7 +242,7 @@ m4_define([b4_lhs_value], [yyval])
# -----------------------------
# See README.
m4_define([b4_rhs_data],
[yystack.valueAt ($1-($2))])
[yystack.valueAt (b4_subtract($@))])
# b4_rhs_value(RULE-LENGTH, POS, SYMBOL-NUM, [TYPE])
# --------------------------------------------------
@@ -266,7 +266,7 @@ m4_define([b4_lhs_location],
# Expansion of @POS, where the current rule has RULE-LENGTH symbols
# on RHS.
m4_define([b4_rhs_location],
[yystack.locationAt ($1-($2))])
[yystack.locationAt (b4_subtract($@))])
# b4_lex_param