mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
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.
This commit is contained in:
@@ -55,8 +55,6 @@ b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
|||||||
]b4_percent_define_ifdef([[location_type]], [],
|
]b4_percent_define_ifdef([[location_type]], [],
|
||||||
[[#include "location.hh"]])[
|
[[#include "location.hh"]])[
|
||||||
|
|
||||||
]b4_null_define[
|
|
||||||
|
|
||||||
]b4_YYDEBUG_define[
|
]b4_YYDEBUG_define[
|
||||||
|
|
||||||
]b4_namespace_open[
|
]b4_namespace_open[
|
||||||
@@ -277,16 +275,18 @@ m4_if(b4_prefix, [yy], [],
|
|||||||
#define yylex b4_prefix[]lex])[
|
#define yylex b4_prefix[]lex])[
|
||||||
|
|
||||||
/* First part of user declarations. */
|
/* 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[@)"]])[
|
#include "@basename(]b4_spec_defines_file[@)"]])[
|
||||||
|
|
||||||
/* User implementation prologue. */
|
/* User implementation prologue. */
|
||||||
]b4_user_post_prologue
|
]b4_user_post_prologue[
|
||||||
b4_percent_code_get[]dnl
|
]b4_percent_code_get[
|
||||||
|
|
||||||
[#ifndef YY_
|
]b4_null_define[
|
||||||
|
|
||||||
|
#ifndef YY_
|
||||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||||
# if ENABLE_NLS
|
# if ENABLE_NLS
|
||||||
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ b4_copyright([Positions for Bison parsers in C++],
|
|||||||
|
|
||||||
]b4_cpp_guard_open([b4_dir_prefix[]position.hh])[
|
]b4_cpp_guard_open([b4_dir_prefix[]position.hh])[
|
||||||
|
|
||||||
# include <iostream>
|
# include <algorithm> // std::max
|
||||||
|
# include <iosfwd>
|
||||||
# include <string>
|
# include <string>
|
||||||
# include <algorithm>
|
|
||||||
|
|
||||||
]b4_null_define[
|
]b4_null_define[
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user