glr.cc, lalr1.cc: define b4_shared_declarations

* data/glr.cc, data/lalr1.cc: here.
The name is no longer right, but at least it is consistent with
the other skeletons.
This commit is contained in:
Akim Demaille
2012-07-30 15:30:31 +02:00
parent 34904c575a
commit d27c5e6534
3 changed files with 44 additions and 24 deletions

View File

@@ -223,16 +223,13 @@ m4_defn([b4_parse_param]))],
m4_include(b4_pkgdatadir/[glr.c])
m4_popdef([b4_parse_param])
m4_divert_push(0)
@output(b4_spec_defines_file@)@
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
[2002-2012])[
/* C++ GLR parser skeleton written by Akim Demaille. */
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_percent_code_get([[requires]])[
# b4_shared_declarations
# ----------------------
# Declaration that might either go into the header (if --defines)
# or open coded in the parser body.
m4_define([b4_shared_declarations],
[b4_percent_code_get([[requires]])[
#include <stdexcept>
#include <string>
@@ -312,5 +309,16 @@ b4_percent_define_flag_if([[global_tokens_and_yystype]],
]b4_namespace_close[
]b4_percent_code_get([[provides]])[
]])
m4_divert_push(0)
@output(b4_spec_defines_file@)@
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
[2002-2012])[
/* C++ GLR parser skeleton written by Akim Demaille. */
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_shared_declarations[
]b4_cpp_guard_close([b4_spec_defines_file])[
]m4_divert_pop(0)