]> git.saurik.com Git - bison.git/blobdiff - data/c.m4
Add additional space after periods in NEWS.
[bison.git] / data / c.m4
index 33a4186c446570ad8f2d63afb00a36b88fcde31d..5cd404d1b260abe9db0c7b878c2b8dd9dd13c1e2 100644 (file)
--- a/data/c.m4
+++ b/data/c.m4
@@ -157,6 +157,17 @@ m4_define([b4_int_type_for],
 [b4_int_type($1_min, $1_max)])
 
 
+# b4_table_value_equals(TABLE, VALUE, LITERAL)
+# --------------------------------------------
+# Without inducing a comparison warning from the compiler, check if the
+# literal value LITERAL equals VALUE from table TABLE, which must have
+# TABLE_min and TABLE_max defined.  YYID must be defined as an identity
+# function that suppresses warnings about constant conditions.
+m4_define([b4_table_value_equals],
+[m4_if(m4_eval($3 < m4_indir([b4_]$1[_min])
+               || m4_indir([b4_]$1[_max]) < $3), [1],
+       [[YYID (0)]],
+       [[((]$2[) == (]$3[))]])])
 
 ## ---------##
 ## Values.  ##