]> git.saurik.com Git - bison.git/blobdiff - data/c.m4
* data/Makefile.am (dist_pkgdata_DATA): Add push.c.
[bison.git] / data / c.m4
index ffb04c202fa2bc87136615ad603a733285c86c5e..97c80d3d238d16d3adfd55c0971fc152a88d4410 100644 (file)
--- a/data/c.m4
+++ b/data/c.m4
@@ -76,6 +76,9 @@ m4_define([b4_identification],
 /* Pure parsers.  */
 [#]define YYPURE b4_pure_flag
 
+/* Push parsers.  */
+[#]define YYPUSH b4_push_flag
+
 /* Using locations.  */
 [#]define YYLSP_NEEDED b4_locations_flag
 ])
@@ -225,6 +228,15 @@ b4_define_flag_if([pure])           # Whether the interface is pure.
 b4_define_flag_if([yacc])           # Whether POSIX Yacc is emulated.
 
 
+# b4_push_if(IF-TRUE, IF-FALSE)
+# -----------------------------
+# Expand IF-TRUE, if %push-parser, IF-FALSE otherwise.
+m4_define([b4_push_if],
+[m4_if(b4_push_flag, [1],
+       [$1],
+       [$2])])
+
+
 
 ## ------------------------- ##
 ## Assigning token numbers.  ##