|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60140 - branches/quickbook-1.5-spirit2
From: daniel_james_at_[hidden]
Date: 2010-03-03 18:31:20
Author: danieljames
Date: 2010-03-03 18:31:19 EST (Wed, 03 Mar 2010)
New Revision: 60140
URL: http://svn.boost.org/trac/boost/changeset/60140
Log:
get_position is now only used in misc_rules.cpp so move it there.
Text files modified:
branches/quickbook-1.5-spirit2/block_grammar.cpp | 1 -
branches/quickbook-1.5-spirit2/block_markup_grammar.cpp | 1 -
branches/quickbook-1.5-spirit2/misc_rules.cpp | 11 +++++++++--
branches/quickbook-1.5-spirit2/parse_utils.hpp | 14 +-------------
branches/quickbook-1.5-spirit2/post_process.cpp | 1 -
5 files changed, 10 insertions(+), 18 deletions(-)
Modified: branches/quickbook-1.5-spirit2/block_grammar.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block_grammar.cpp (original)
+++ branches/quickbook-1.5-spirit2/block_grammar.cpp 2010-03-03 18:31:19 EST (Wed, 03 Mar 2010)
@@ -16,7 +16,6 @@
#include "block_grammar.hpp"
#include "template.hpp"
#include "actions.hpp"
-#include "parse_utils.hpp"
#include "code.hpp"
#include "misc_rules.hpp"
Modified: branches/quickbook-1.5-spirit2/block_markup_grammar.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block_markup_grammar.cpp (original)
+++ branches/quickbook-1.5-spirit2/block_markup_grammar.cpp 2010-03-03 18:31:19 EST (Wed, 03 Mar 2010)
@@ -19,7 +19,6 @@
#include "block_grammar.hpp"
#include "template.hpp"
#include "actions.hpp"
-#include "parse_utils.hpp"
#include "code.hpp"
#include "misc_rules.hpp"
Modified: branches/quickbook-1.5-spirit2/misc_rules.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/misc_rules.cpp (original)
+++ branches/quickbook-1.5-spirit2/misc_rules.cpp 2010-03-03 18:31:19 EST (Wed, 03 Mar 2010)
@@ -12,7 +12,6 @@
#include <boost/spirit/include/qi_eps.hpp>
#include <boost/spirit/include/qi_eol.hpp>
#include "misc_rules.hpp"
-#include "parse_utils.hpp"
namespace quickbook
{
@@ -27,6 +26,14 @@
qi::rule<iterator> eol;
qi::rule<iterator, file_position()> position;
+ struct get_position
+ {
+ template <typename Range, typename Context>
+ void operator()(Range const& it, Context& c, bool& x) const {
+ boost::spirit::_val(it, c, x) = it.begin().get_position();
+ }
+ };
+
void init_misc_rules() {
macro_identifier =
+(qi::char_ - (qi::space | ']'))
@@ -59,6 +66,6 @@
;
position =
- qi::raw[qi::eps] [get_position];
+ qi::raw[qi::eps] [get_position()];
}
}
Modified: branches/quickbook-1.5-spirit2/parse_utils.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/parse_utils.hpp (original)
+++ branches/quickbook-1.5-spirit2/parse_utils.hpp 2010-03-03 18:31:19 EST (Wed, 03 Mar 2010)
@@ -14,7 +14,7 @@
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_bind.hpp>
-#include <boost/spirit/include/qi_core.hpp>
+#include <boost/spirit/include/qi_nonterminal.hpp>
#include <string>
namespace quickbook
@@ -22,18 +22,6 @@
namespace spirit = boost::spirit;
namespace ph = boost::phoenix;
- struct get_position_impl
- {
- template <typename Range, typename Context>
- void operator()(Range const& it, Context& c, bool& x) const {
- boost::spirit::_val(it, c, x) = it.begin().get_position();
- }
- };
-
- namespace {
- get_position_impl get_position;
- }
-
// member_assign - action to assign the attribute to a member of the
// rule's attributte.
Modified: branches/quickbook-1.5-spirit2/post_process.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/post_process.cpp (original)
+++ branches/quickbook-1.5-spirit2/post_process.cpp 2010-03-03 18:31:19 EST (Wed, 03 Mar 2010)
@@ -8,7 +8,6 @@
=============================================================================*/
#include "post_process.hpp"
#include "utils.hpp"
-#include "parse_utils.hpp"
#include <boost/spirit/include/qi_core.hpp>
#include <boost/spirit/include/qi_lexeme.hpp>
#include <boost/spirit/include/qi_char_.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