]> git.saurik.com Git - bison.git/blobdiff - data/c++.m4
Generalize the display of semantic values and locations in traces.
[bison.git] / data / c++.m4
index f3926f7baa9262c94bec7795d000a02f7e7965ea..cf5e83d6b319bfac5c1e3b975e4c6493975627fc 100644 (file)
@@ -61,7 +61,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],
-[(yysemantic_stack_@{m4_eval([$1 - $2])@}m4_ifval([$3], [.$3]))])
+[(yysemantic_stack_@{($1) - ($2)@}m4_ifval([$3], [.$3]))])
 
 # b4_lhs_location()
 # -----------------
@@ -75,7 +75,7 @@ m4_define([b4_lhs_location],
 # Expansion of @NUM, where the current rule has RULE-LENGTH symbols
 # on RHS.
 m4_define([b4_rhs_location],
-[(yylocation_stack_@{m4_eval([$1 - $2])@})])
+[(yylocation_stack_@{($1) - ($2)@})])
 
 
 # b4_parse_param_decl