]> git.saurik.com Git - bison.git/blobdiff - data/c.m4
Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
[bison.git] / data / c.m4
index f0b5f14d2f7a4e3edc7b8d6dcbb2d8ae141276a9..518c05b6282b4a77587dab8c18fbd901237d64d5 100644 (file)
--- a/data/c.m4
+++ b/data/c.m4
@@ -169,6 +169,17 @@ m4_define([b4_int_type_for],
 m4_define([b4_null], [0])
 
 
+# b4_table_define(TABLE-NAME, CONTENT, COMMENT)
+# ---------------------------------------------
+# Define "yy<TABLE-NAME>" which contents is CONTENT.
+m4_define([b4_table_define],
+[m4_ifval([$3], [b4_c_comment([$3], [  ])
+])dnl
+static const b4_int_type_for([$2]) yy$1[[]] =
+{
+  $2
+};dnl
+])
 
 
 ## ------------------------- ##