[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
c++: always issue the "generated by" message
From: |
Akim Demaille |
Subject: |
c++: always issue the "generated by" message |
Date: |
Mon, 29 Oct 2018 19:54:13 +0100 |
commit db6147989f24504a0a28708d239fc12b72b7e737
Author: Akim Demaille <address@hidden>
Date: Mon Oct 29 18:44:54 2018 +0100
c++: always issue the "generated by" message
Some users rely on this sentence to know that the file can be ignored.
Reported by Alexandre Duret-Lutz.
* data/bison.m4 (b4_generated_by): New.
(b4_copyright): Use it.
* data/location.cc, data/stack.hh: Use it too, for the stub files
(position.hh and stack.hh).
diff --git a/data/bison.m4 b/data/bison.m4
index ede25627..d2db2c86 100644
--- a/data/bison.m4
+++ b/data/bison.m4
@@ -22,12 +22,17 @@
## Identification. ##
## ---------------- ##
+# b4_generated_by
+# ---------------
+m4_define([b4_generated_by],
+[b4_comment([A Bison parser, made by GNU Bison b4_version.])
+])
+
# b4_copyright(TITLE, [YEARS])
# ----------------------------
# If YEARS are not defined, use b4_copyright_years.
m4_define([b4_copyright],
-[b4_comment([A Bison parser, made by GNU Bison b4_version.])
-
+[b4_generated_by
b4_comment([$1
]m4_dquote(m4_text_wrap([Copyright (C)
diff --git a/data/location.cc b/data/location.cc
index 60756dc0..b5b76552 100644
--- a/data/location.cc
+++ b/data/location.cc
@@ -322,6 +322,8 @@ m4_define([b4_location_define],
m4_ifdef([b4_position_file], [[
]b4_output_begin([b4_dir_prefix], [b4_position_file])[
+b4_generated_by
+
// Starting with Bison 3.2, this file is useless: the structure it
// used to define is now defined in "]b4_location_file[".
//
diff --git a/data/stack.hh b/data/stack.hh
index 0f1b502e..4e659359 100644
--- a/data/stack.hh
+++ b/data/stack.hh
@@ -148,6 +148,8 @@ m4_define([b4_stack_define],
m4_ifdef([b4_stack_file],
[b4_output_begin([b4_dir_prefix], [b4_stack_file])[
+b4_generated_by
+
// Starting with Bison 3.2, this file is useless: the structure it
// used to define is now defined with the parser itself.
//
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- c++: always issue the "generated by" message,
Akim Demaille <=