From: Akim Demaille Date: Wed, 4 Jul 2012 07:57:40 +0000 (+0200) Subject: c++: fewer #includes in the headers. X-Git-Tag: v2.6~35 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/771dc643242bf582944be05d2d3566aac21887d5?ds=inline;hp=--cc 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. --- 771dc643242bf582944be05d2d3566aac21887d5 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[