* data/bison.c++: Copy the prologue of bison.simple to fetch

useful M4 definitions, such as b4_header_guard.
This commit is contained in:
Akim Demaille
2002-02-28 11:41:00 +00:00
parent dc2546ac9f
commit a75c057f10
2 changed files with 51 additions and 17 deletions

View File

@@ -1,7 +1,13 @@
2002-02-28 Akim Demaille <akim@epita.fr>
* data/bison.c++: Copy the prologue of bison.simple to fetch
useful M4 definitions, such as b4_header_guard.
2002-02-25 Akim Demaille <akim@epita.fr>
* src/getargs.c (version): Give the name of the authors, and use a
translator friendly scheme for the copyright notice.
translator friendly scheme for the bgr
copyright notice.
2002-02-25 Akim Demaille <akim@epita.fr>

View File

@@ -1,3 +1,31 @@
m4_divert(-1)
# m4_define_default(MACRO, VALUE)
# -------------------------------
# Define MACRO to VALUE, unless already defined.
m4_define([m4_define_default],
[m4_ifdef([$1], [], [m4_define($@)])])
m4_define_default([b4_input_suffix], [.y])
m4_define_default([b4_output_parser_suffix],
[m4_translit(b4_input_suffix, [yY], [cC])])
m4_define_default([b4_output_parser_name],
[b4_output_prefix[]b4_output_infix[]b4_output_parser_suffix[]])
m4_define_default([b4_output_header_suffix],
[m4_translit(b4_input_suffix, [yY], [hH])])
m4_define_default([b4_output_header_name],
[b4_output_prefix[]b4_output_infix[]b4_output_header_suffix[]])
m4_define_default([b4_header_guard],
[m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name),
[[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])])
m4_divert(0)dnl
#output "b4_output_prefix[]b4_output_infix[]-class.hh"
/* -*- C++ -*- */