|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59291 - in branches/quickbook-1.5-spirit2: . detail
From: daniel_james_at_[hidden]
Date: 2010-01-27 16:59:59
Author: danieljames
Date: 2010-01-27 16:59:58 EST (Wed, 27 Jan 2010)
New Revision: 59291
URL: http://svn.boost.org/trac/boost/changeset/59291
Log:
skip_initial_spaces isn't used anywhere so get rid of it.
Text files modified:
branches/quickbook-1.5-spirit2/block.hpp | 31 +++++++++++--------------------
branches/quickbook-1.5-spirit2/detail/actions.cpp | 2 +-
branches/quickbook-1.5-spirit2/detail/block.cpp | 3 +--
branches/quickbook-1.5-spirit2/grammars.hpp | 2 +-
4 files changed, 14 insertions(+), 24 deletions(-)
Modified: branches/quickbook-1.5-spirit2/block.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block.hpp (original)
+++ branches/quickbook-1.5-spirit2/block.hpp 2010-01-27 16:59:58 EST (Wed, 27 Jan 2010)
@@ -27,8 +27,8 @@
namespace qi = boost::spirit::qi;
namespace ph = boost::phoenix;
- template <typename Iterator, typename Actions, bool skip_initial_spaces>
- struct block_grammar<Iterator, Actions, skip_initial_spaces>::rules
+ template <typename Iterator, typename Actions>
+ struct block_grammar<Iterator, Actions>::rules
{
rules(Actions& actions_);
@@ -51,31 +51,22 @@
qi::rule<Iterator, boost::optional<std::string>()> element_id, element_id_1_5;
};
- template <typename Iterator, typename Actions, bool skip_initial_spaces>
- block_grammar<Iterator, Actions, skip_initial_spaces>::block_grammar(Actions& actions_)
+ template <typename Iterator, typename Actions>
+ block_grammar<Iterator, Actions>::block_grammar(Actions& actions_)
: block_grammar::base_type(start, "block")
, rules_pimpl(new rules(actions_))
, start(rules_pimpl->start_) {}
- template <typename Iterator, typename Actions, bool skip_initial_spaces>
- block_grammar<Iterator, Actions, skip_initial_spaces>::~block_grammar() {}
+ template <typename Iterator, typename Actions>
+ block_grammar<Iterator, Actions>::~block_grammar() {}
- template <typename Iterator, typename Actions, bool skip_initial_spaces>
- block_grammar<Iterator, Actions, skip_initial_spaces>::rules::rules(Actions& actions_)
+ template <typename Iterator, typename Actions>
+ block_grammar<Iterator, Actions>::rules::rules(Actions& actions_)
: actions(actions_), no_eols(true), common(actions, no_eols)
{
- if (skip_initial_spaces)
- {
- start_ =
- *(qi::space | comment) >> blocks >> blank
- ;
- }
- else
- {
- start_ =
- blocks >> blank
- ;
- }
+ start_ =
+ blocks >> blank
+ ;
blocks =
+( block_markup
Modified: branches/quickbook-1.5-spirit2/detail/actions.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/actions.cpp (original)
+++ branches/quickbook-1.5-spirit2/detail/actions.cpp 2010-01-27 16:59:58 EST (Wed, 27 Jan 2010)
@@ -739,7 +739,7 @@
}
else
{
- block_grammar<iterator, quickbook::actions, false> block_p(actions);
+ block_grammar<iterator, quickbook::actions> block_p(actions);
// do a block level parse
// ensure that we have enough trailing newlines to eliminate
Modified: branches/quickbook-1.5-spirit2/detail/block.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/block.cpp (original)
+++ branches/quickbook-1.5-spirit2/detail/block.cpp 2010-01-27 16:59:58 EST (Wed, 27 Jan 2010)
@@ -5,7 +5,6 @@
{
void instantiate_phrase(actions& a)
{
- block_grammar<iterator, quickbook::actions, false> bg1(a);
- block_grammar<iterator, quickbook::actions, true> bg2(a);
+ block_grammar<iterator, quickbook::actions> bg1(a);
}
}
\ No newline at end of file
Modified: branches/quickbook-1.5-spirit2/grammars.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/grammars.hpp (original)
+++ branches/quickbook-1.5-spirit2/grammars.hpp 2010-01-27 16:59:58 EST (Wed, 27 Jan 2010)
@@ -46,7 +46,7 @@
simple_phrase_grammar& operator=(simple_phrase_grammar const&);
};
- template <typename Iterator, typename Actions, bool skip_initial_spaces = false>
+ template <typename Iterator, typename Actions>
struct block_grammar : qi::grammar<Iterator>
{
block_grammar(Actions& actions);
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