version 2.2 of Bison.])])
+## -------- ##
+## Output. ##
+## -------- ##
+
+# b4_output_begin(FILE)
+# ---------------------
+# Enable output, i.e., send to diversion 0, expand after "#", and
+# generate the tag to output into FILE. Must be followed by EOL.
+m4_define([b4_output_begin],
+[m4_changecom()
+m4_divert_push(0)dnl
+@output(m4_unquote([$1])@)@dnl
+])
+
+
+# b4_output_end()
+# ---------------
+# Output nothing, restore # as comment character (no expansions after #).
+m4_define([b4_output_end],
+[m4_divert_pop(0)
+m4_changecom([#])
+])
+
+
## ---------------- ##
## Error handling. ##
## ---------------- ##
m4_exit(1)])
-## ---------------- ##
-## Default values. ##
-## ---------------- ##
-
-# m4_define_default([b4_lex_param], []) dnl breaks other skeletons
-m4_define_default([b4_pre_prologue], [])
-m4_define_default([b4_post_prologue], [])
-m4_define_default([b4_epilogue], [])
-m4_define_default([b4_parse_param], [])
-
-# The initial column and line.
-m4_define_default([b4_location_initial_column], [1])
-m4_define_default([b4_location_initial_line], [1])
-
-
## ------------ ##
## Data Types. ##
## ------------ ##
b4_error_verbose_if([m4_define([b4_token_table_flag], [1])])
-## ------------------------- ##
-## Assigning token numbers. ##
-## ------------------------- ##
-
## ----------- ##
## Synclines. ##
# b4_syncline(LINE, FILE)
# -----------------------
m4_define([b4_syncline],
-[b4_flag_if([synclines], [
-b4_sync_end([__line__], [b4_basename(m4_quote(__file__))])
+[b4_flag_if([synclines],
+[b4_sync_end([__line__], [b4_basename(m4_quote(__file__))])
b4_sync_start([$1], [$2])])])
m4_define([b4_sync_end], [b4_comment([Line $1 of $2])])
b4_check_user_names_wrap([[define]], [[variable]])
b4_check_user_names_wrap([[code]], [[qualifier]])
])
+
+
+## ---------------- ##
+## Default values. ##
+## ---------------- ##
+
+# m4_define_default([b4_lex_param], []) dnl breaks other skeletons
+m4_define_default([b4_pre_prologue], [])
+m4_define_default([b4_post_prologue], [])
+m4_define_default([b4_epilogue], [])
+m4_define_default([b4_parse_param], [])
+
+# The initial column and line.
+m4_define_default([b4_location_initial_column], [1])
+m4_define_default([b4_location_initial_line], [1])
+
+# Sanity checks.
+b4_percent_define_ifdef([api.prefix],
+[m4_ifdef([b4_prefix],
+[b4_complain_at(b4_percent_define_get_loc([api.prefix]),
+ [['%s' and '%s' cannot be used together]],
+ [%name-prefix],
+ [%define api.prefix])])])