|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76643 - branches/quickbook-dev/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2012-01-22 18:06:21
Author: danieljames
Date: 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
New Revision: 76643
URL: http://svn.boost.org/trac/boost/changeset/76643
Log:
Quickbook: Don't include `actions.hpp` from `actions_class.hpp`.
Text files modified:
branches/quickbook-dev/tools/quickbook/src/actions.cpp | 9 ++++-----
branches/quickbook-dev/tools/quickbook/src/actions.hpp | 18 +++---------------
branches/quickbook-dev/tools/quickbook/src/actions_class.cpp | 5 +++++
branches/quickbook-dev/tools/quickbook/src/actions_class.hpp | 7 ++++++-
branches/quickbook-dev/tools/quickbook/src/block_element_grammar.cpp | 1 +
branches/quickbook-dev/tools/quickbook/src/code_snippet.cpp | 1 +
branches/quickbook-dev/tools/quickbook/src/doc_info_actions.cpp | 1 +
branches/quickbook-dev/tools/quickbook/src/doc_info_grammar.cpp | 1 +
branches/quickbook-dev/tools/quickbook/src/fwd.hpp | 1 +
branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp | 1 +
branches/quickbook-dev/tools/quickbook/src/parsers.hpp | 1 +
branches/quickbook-dev/tools/quickbook/src/phrase_element_grammar.cpp | 1 +
branches/quickbook-dev/tools/quickbook/src/quickbook.cpp | 1 +
branches/quickbook-dev/tools/quickbook/src/syntax_highlight.cpp | 2 ++
14 files changed, 29 insertions(+), 21 deletions(-)
Modified: branches/quickbook-dev/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/actions.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/actions.cpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -37,11 +37,6 @@
namespace quickbook
{
- char const* quickbook_get_date = "__quickbook_get_date__";
- char const* quickbook_get_time = "__quickbook_get_time__";
-
- unsigned qbk_version_n = 0; // qbk_major_version * 100 + qbk_minor_version
-
namespace {
void write_anchors(quickbook::actions& actions, collector& tgt)
{
@@ -79,6 +74,10 @@
}
}
+ bool quickbook_range::in_range() const {
+ return qbk_version_n >= min_ && qbk_version_n < max_;
+ }
+
void explicit_list_action(quickbook::actions&, value);
void header_action(quickbook::actions&, value);
void begin_section_action(quickbook::actions&, value);
Modified: branches/quickbook-dev/tools/quickbook/src/actions.hpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/actions.hpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/actions.hpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -13,35 +13,26 @@
#include <string>
#include <vector>
#include "fwd.hpp"
-#include "template_stack.hpp"
#include "utils.hpp"
#include "values.hpp"
#include "scoped.hpp"
-#include "symbols.hpp"
#include <boost/spirit/include/classic_parser.hpp>
namespace quickbook
{
namespace cl = boost::spirit::classic;
- extern unsigned qbk_version_n; // qbk_major_version * 100 + qbk_minor_version
-
struct quickbook_range : cl::parser<quickbook_range> {
quickbook_range(unsigned min_, unsigned max_)
: min_(min_), max_(max_) {}
+
+ bool in_range() const;
template <typename ScannerT>
typename cl::parser_result<quickbook_range, ScannerT>::type
parse(ScannerT const& scan) const
{
- if (qbk_version_n >= min_ && qbk_version_n < max_)
- {
- return scan.empty_match();
- }
- else
- {
- return scan.no_match();
- }
+ return in_range() ? scan.empty_match() : scan.no_match();
}
unsigned min_, max_;
@@ -187,9 +178,6 @@
std::vector<std::string> anchors;
};
- extern char const* quickbook_get_date;
- extern char const* quickbook_get_time;
-
struct do_macro_action
{
// Handles macro substitutions
Modified: branches/quickbook-dev/tools/quickbook/src/actions_class.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/actions_class.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/actions_class.cpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -20,6 +20,11 @@
namespace quickbook
{
+ char const* quickbook_get_date = "__quickbook_get_date__";
+ char const* quickbook_get_time = "__quickbook_get_time__";
+
+ unsigned qbk_version_n = 0; // qbk_major_version * 100 + qbk_minor_version
+
actions::actions(fs::path const& filein_, fs::path const& xinclude_base_,
string_stream& out_, id_manager& ids)
: grammar_()
Modified: branches/quickbook-dev/tools/quickbook/src/actions_class.hpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/actions_class.hpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/actions_class.hpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -11,10 +11,11 @@
#define BOOST_SPIRIT_ACTIONS_CLASS_HPP
#include <boost/scoped_ptr.hpp>
-#include "actions.hpp"
#include "parsers.hpp"
#include "values_parse.hpp"
#include "collector.hpp"
+#include "template_stack.hpp"
+#include "symbols.hpp"
namespace quickbook
{
@@ -83,6 +84,10 @@
std::string add_callout(value);
std::string end_callouts();
};
+
+ extern unsigned qbk_version_n; // qbk_major_version * 100 + qbk_minor_version
+ extern char const* quickbook_get_date;
+ extern char const* quickbook_get_time;
}
#endif // BOOST_SPIRIT_ACTIONS_CLASS_HPP
Modified: branches/quickbook-dev/tools/quickbook/src/block_element_grammar.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/block_element_grammar.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/block_element_grammar.cpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -10,6 +10,7 @@
#include "utils.hpp"
#include "actions_class.hpp"
+#include "actions.hpp"
#include "grammar_impl.hpp"
#include "block_tags.hpp"
#include "template_tags.hpp"
Modified: branches/quickbook-dev/tools/quickbook/src/code_snippet.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/code_snippet.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/code_snippet.cpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -16,6 +16,7 @@
#include "block_tags.hpp"
#include "template_stack.hpp"
#include "actions.hpp"
+#include "actions_class.hpp"
#include "values.hpp"
#include "files.hpp"
#include "input_path.hpp"
Modified: branches/quickbook-dev/tools/quickbook/src/doc_info_actions.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/doc_info_actions.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/doc_info_actions.cpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -18,6 +18,7 @@
#include "files.hpp"
#include "input_path.hpp"
#include "actions_class.hpp"
+#include "actions.hpp"
#include "doc_info_tags.hpp"
#include "id_manager.hpp"
Modified: branches/quickbook-dev/tools/quickbook/src/doc_info_grammar.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/doc_info_grammar.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/doc_info_grammar.cpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -20,6 +20,7 @@
#include <boost/spirit/include/phoenix1_operators.hpp>
#include "grammar_impl.hpp"
#include "actions_class.hpp"
+#include "actions.hpp"
#include "doc_info_tags.hpp"
#include "phrase_tags.hpp"
Modified: branches/quickbook-dev/tools/quickbook/src/fwd.hpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/fwd.hpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/fwd.hpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -22,6 +22,7 @@
struct id_manager;
struct section_info;
struct file;
+ struct template_symbol;
typedef boost::intrusive_ptr<file> file_ptr;
typedef std::string::const_iterator string_iterator;
Modified: branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -10,6 +10,7 @@
#include "grammar_impl.hpp"
#include "actions_class.hpp"
+#include "actions.hpp"
#include "utils.hpp"
#include "template_tags.hpp"
#include "block_tags.hpp"
Modified: branches/quickbook-dev/tools/quickbook/src/parsers.hpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/parsers.hpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/parsers.hpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -17,6 +17,7 @@
#include <boost/spirit/include/phoenix1_primitives.hpp>
#include <boost/spirit/include/phoenix1_tuples.hpp>
#include <boost/spirit/include/phoenix1_binders.hpp>
+#include "fwd.hpp"
namespace quickbook {
namespace cl = boost::spirit::classic;
Modified: branches/quickbook-dev/tools/quickbook/src/phrase_element_grammar.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/phrase_element_grammar.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/phrase_element_grammar.cpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -10,6 +10,7 @@
#include "grammar_impl.hpp"
#include "actions_class.hpp"
+#include "actions.hpp"
#include "utils.hpp"
#include "phrase_tags.hpp"
#include <boost/spirit/include/classic_core.hpp>
Modified: branches/quickbook-dev/tools/quickbook/src/quickbook.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/quickbook.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/quickbook.cpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -10,6 +10,7 @@
#include "grammar.hpp"
#include "quickbook.hpp"
#include "actions_class.hpp"
+#include "actions.hpp"
#include "post_process.hpp"
#include "utils.hpp"
#include "files.hpp"
Modified: branches/quickbook-dev/tools/quickbook/src/syntax_highlight.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/syntax_highlight.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/syntax_highlight.cpp 2012-01-22 18:06:17 EST (Sun, 22 Jan 2012)
@@ -15,6 +15,8 @@
#include "grammar.hpp"
#include "grammar_impl.hpp" // Just for context stuff. Should move?
#include "actions_class.hpp"
+#include "actions.hpp"
+#include "utils.hpp"
#include "files.hpp"
#include "input_path.hpp"
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk