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

@@ -117,7 +117,7 @@ m4_define([b4_lhs_value],
# Expand to the semantic stack place that contains value and location
# of symbol number NUM in a rule of length RULE-LENGTH.
m4_define([b4_rhs_data],
[((yyGLRStackItem const *)yyvsp)@{YYFILL (($2) - ($1))@}.yystate])
[((yyGLRStackItem const *)yyvsp)@{YYFILL (b4_subtract([$2], [$1]))@}.yystate])
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])