mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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:
@@ -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])@})])
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user