m4_include(b4_pkgdatadir/[c.m4])
+b4_push_if([
+m4_fatal([Non-deterministic push parsers are not yet supported])])
+
## ---------------- ##
## Default values. ##
## ---------------- ##
# We do want M4 expansion after # for CPP macros.
m4_changecom()
m4_divert(0)dnl
-@output @output_parser_name@
+@output b4_parser_file_name
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
[2002, 2003, 2004, 2005, 2006])
[
#define yylloc b4_prefix[]lloc])[
/* Copy the first part of user declarations. */
-]b4_pre_prologue
+]b4_user_pre_prologue
dnl # b4_shared_declarations
dnl # ----------------------
dnl # Declaration that might either go into the header (if --defines)
dnl # or open coded in the parser body.
m4_define([b4_shared_declarations],
-[m4_ifdef([b4_start_header],
-[[/* Copy the %start-header blocks. */
-]b4_start_header])[]dnl
+[m4_ifdef([b4_requires],
+[[/* Copy the %requires blocks. */
+]b4_user_requires])[]dnl
b4_token_enums(b4_tokens)
# define YYLTYPE_IS_TRIVIAL 1
#endif
-]m4_ifdef([b4_end_header],
-[[/* Copy the %end-header blocks. */
-]b4_end_header])[]dnl
+]m4_ifdef([b4_provides],
+[[/* Copy the %provides blocks. */
+]b4_user_provides])[]dnl
])
-b4_defines_if([#include @output_header_name@],
+b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
[b4_shared_declarations])[
/* Enabling traces. */
]
b4_epilogue
-b4_defines_if(
-[@output @output_header_name@
+dnl
+dnl glr.cc produces its own header.
+dnl
+m4_if(b4_skeleton, ["glr.c"],
+[b4_defines_if(
+[@output b4_spec_defines_file
b4_copyright([Skeleton interface for Bison GLR parsers in C],
[2002, 2003, 2004, 2005, 2006])
b4_locations_if([b4_pure_if([],
[extern YYLTYPE b4_prefix[]lloc;])
])
-])
+])])