From 771dc643242bf582944be05d2d3566aac21887d5 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 4 Jul 2012 09:57:40 +0200 Subject: [PATCH] c++: fewer #includes in the headers. * data/lalr1.cc: Define YY_NULL in the *.cc file, it is not needed in the header. * data/location.cc: iosfwd suffices. --- data/lalr1.cc | 14 +++++++------- data/location.cc | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/lalr1.cc b/data/lalr1.cc index afff0a51..5e83ee32 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -55,8 +55,6 @@ b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++], ]b4_percent_define_ifdef([[location_type]], [], [[#include "location.hh"]])[ -]b4_null_define[ - ]b4_YYDEBUG_define[ ]b4_namespace_open[ @@ -277,16 +275,18 @@ m4_if(b4_prefix, [yy], [], #define yylex b4_prefix[]lex])[ /* First part of user declarations. */ -]b4_user_pre_prologue +]b4_user_pre_prologue[ -b4_defines_if([[ +]b4_defines_if([[ #include "@basename(]b4_spec_defines_file[@)"]])[ /* User implementation prologue. */ -]b4_user_post_prologue -b4_percent_code_get[]dnl +]b4_user_post_prologue[ +]b4_percent_code_get[ + +]b4_null_define[ -[#ifndef YY_ +#ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* FIXME: INFRINGES ON USER NAME SPACE */ diff --git a/data/location.cc b/data/location.cc index f45f634e..b7383d65 100644 --- a/data/location.cc +++ b/data/location.cc @@ -29,9 +29,9 @@ b4_copyright([Positions for Bison parsers in C++], ]b4_cpp_guard_open([b4_dir_prefix[]position.hh])[ -# include +# include // std::max +# include # include -# include ]b4_null_define[ -- 2.50.0