X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/90b1335aed1edcbead0b50446b85c9a32d7c295f..a37131cc63607b8fa59ba58296dd0b1682ec54d5:/data/location.cc
diff --git a/data/location.cc b/data/location.cc
index 0673f4c2..58182a34 100644
--- a/data/location.cc
+++ b/data/location.cc
@@ -15,10 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-# We do want M4 expansion after # for CPP macros.
-m4_changecom()
-m4_divert_push(0)dnl
-@output(b4_dir_prefix[]position.hh@)@
+
+b4_output_begin([b4_dir_prefix[]position.hh])
b4_copyright([Positions for Bison parsers in C++],
[2002-2007, 2009-2012])[
@@ -87,7 +85,7 @@ b4_copyright([Positions for Bison parsers in C++],
};
/// Add and assign a position.
- inline const position&
+ inline position&
operator+= (position& res, const int width)
{
res.columns (width);
@@ -103,7 +101,7 @@ b4_copyright([Positions for Bison parsers in C++],
}
/// Add and assign a position.
- inline const position&
+ inline position&
operator-= (position& res, const int width)
{
return res += -width;
@@ -148,7 +146,10 @@ b4_copyright([Positions for Bison parsers in C++],
]b4_namespace_close[
]b4_cpp_guard_close([b4_dir_prefix[]position.hh])
-@output(b4_dir_prefix[]location.hh@)@
+b4_output_end()
+
+
+b4_output_begin([b4_dir_prefix[]location.hh])
b4_copyright([Locations for Bison parsers in C++],
[2002-2007, 2009-2012])[
@@ -159,8 +160,6 @@ b4_copyright([Locations for Bison parsers in C++],
]b4_cpp_guard_open([b4_dir_prefix[]location.hh])[
-# include
-# include
# include "position.hh"
]b4_namespace_open[
@@ -294,5 +293,4 @@ b4_copyright([Locations for Bison parsers in C++],
]b4_namespace_close[
]b4_cpp_guard_close([b4_dir_prefix[]location.hh])
-m4_divert_pop(0)
-m4_changecom([#])
+b4_output_end()