Use b4_subtract where possible.

* data/lalr1.cc (b4_subtract): Move to...
	* data/bison.m4: here.
	* data/glr.c (b4_rhs_data): Use it.
	* data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
This commit is contained in:
Akim Demaille
2008-11-17 08:48:00 +01:00
parent 6085ab0d78
commit bd187d7b65
5 changed files with 20 additions and 18 deletions

View File

@@ -124,7 +124,7 @@ m4_define([b4_lhs_value],
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
# symbols on RHS.
m4_define([b4_rhs_value],
[b4_symbol_value([yyvsp@{($2) - ($1)@}], [$3])])
[b4_symbol_value([yyvsp@{b4_subtract([$2], [$1])@}], [$3])])
@@ -144,7 +144,7 @@ m4_define([b4_lhs_location],
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
# on RHS.
m4_define([b4_rhs_location],
[(yylsp@{($2) - ($1)@})])
[(yylsp@{b4_subtract([$2], [$1])@})])