|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63163 - branches/quickbook-1.5-spirit2
From: daniel_james_at_[hidden]
Date: 2010-06-20 16:31:01
Author: danieljames
Date: 2010-06-20 16:30:59 EDT (Sun, 20 Jun 2010)
New Revision: 63163
URL: http://svn.boost.org/trac/boost/changeset/63163
Log:
Clean up the various phrase rules.
Text files modified:
branches/quickbook-1.5-spirit2/block_grammar.cpp | 15 ---------------
branches/quickbook-1.5-spirit2/block_markup_grammar.cpp | 4 ++--
branches/quickbook-1.5-spirit2/block_section_grammar.cpp | 2 +-
branches/quickbook-1.5-spirit2/block_table_grammar.cpp | 2 +-
branches/quickbook-1.5-spirit2/doc_info_grammar.cpp | 11 ++++++-----
branches/quickbook-1.5-spirit2/grammar_impl.hpp | 1 -
6 files changed, 10 insertions(+), 25 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-06-20 16:30:59 EDT (Sun, 20 Jun 2010)
@@ -188,21 +188,6 @@
)
;
- phrase_attr =
- qi::eps [actions.phrase_push]
- >> *( common
- | comment
- | (qi::char_ - phrase_end) [actions.process]
- )
- >> qi::eps [actions.phrase_pop]
- ;
-
- // Make sure that we don't go past a single block, except when
- // preformatted.
- phrase_end =
- ']' | qi::eps(ph::ref(no_eols)) >> eol >> *qi::blank >> qi::eol
- ;
-
// Identifiers
qi::rule<iterator, raw_string()>& element_id_part = store_.create();
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-06-20 16:30:59 EDT (Sun, 20 Jun 2010)
@@ -67,7 +67,7 @@
space [ph::ref(no_eols) = false]
[member_assign(&quickbook::block_formatted::type, "preformatted")]
>> -eol
- >> phrase_attr [member_assign(&quickbook::block_formatted::content)]
+ >> phrase [member_assign(&quickbook::block_formatted::content)]
>> qi::eps [ph::ref(no_eols) = true]
;
@@ -81,7 +81,7 @@
space
>> macro_identifier [member_assign(&quickbook::def_macro::macro_identifier)]
>> blank
- >> phrase_attr [member_assign(&quickbook::def_macro::content)]
+ >> phrase [member_assign(&quickbook::def_macro::content)]
;
// xinclude
Modified: branches/quickbook-1.5-spirit2/block_section_grammar.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block_section_grammar.cpp (original)
+++ branches/quickbook-1.5-spirit2/block_section_grammar.cpp 2010-06-20 16:30:59 EDT (Sun, 20 Jun 2010)
@@ -74,7 +74,7 @@
title_phrase =
qi::raw[
- phrase_attr [member_assign(&quickbook::title::content)]
+ phrase [member_assign(&quickbook::title::content)]
] [member_assign(&quickbook::title::raw)]
;
}
Modified: branches/quickbook-1.5-spirit2/block_table_grammar.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block_table_grammar.cpp (original)
+++ branches/quickbook-1.5-spirit2/block_table_grammar.cpp 2010-06-20 16:30:59 EDT (Sun, 20 Jun 2010)
@@ -112,7 +112,7 @@
;
varlistterm_body =
- phrase_attr [member_assign(&quickbook::block_formatted::content)]
+ phrase [member_assign(&quickbook::block_formatted::content)]
[member_assign(&quickbook::block_formatted::type, "varlistterm")]
;
Modified: branches/quickbook-1.5-spirit2/doc_info_grammar.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/doc_info_grammar.cpp (original)
+++ branches/quickbook-1.5-spirit2/doc_info_grammar.cpp 2010-06-20 16:30:59 EDT (Sun, 20 Jun 2010)
@@ -53,7 +53,6 @@
{
qi::symbols<char>& doc_types = store_.create();
qi::rule<iterator>& quickbook_version = store_.create();
- qi::rule<iterator, std::string()>& phrase = store_.create();
qi::rule<iterator, raw_source()>& doc_version = store_.create();
qi::rule<iterator, raw_source()>& doc_id = store_.create();
qi::rule<iterator, raw_source()>& doc_dirname = store_.create();
@@ -65,7 +64,9 @@
qi::rule<iterator, doc_info::copyright_entry()>& doc_copyright = store_.create();
qi::rule<iterator, doc_info::author_list()>& doc_authors = store_.create();
qi::rule<iterator, doc_info::author()>& doc_author = store_.create();
+
qi::rule<iterator, quickbook::raw_string()>& raw_phrase = store_.create();
+ qi::rule<iterator, std::string()>& doc_info_phrase = store_.create();
typedef qi::uint_parser<int, 10, 1, 2> uint2_t;
@@ -137,7 +138,7 @@
"purpose" >> hard_space
>> (
qi::eps(qbk_before(103)) >> raw_phrase |
- qi::eps(qbk_since(103)) >> phrase
+ qi::eps(qbk_since(103)) >> doc_info_phrase
)
;
@@ -157,7 +158,7 @@
"license" >> hard_space
>> (
qi::eps(qbk_before(103)) >> raw_phrase |
- qi::eps(qbk_since(103)) >> phrase
+ qi::eps(qbk_since(103)) >> doc_info_phrase
)
;
@@ -171,10 +172,10 @@
;
raw_phrase =
- qi::raw[phrase] [qi::_val = qi::_1]
+ qi::raw[doc_info_phrase] [qi::_val = qi::_1]
;
- phrase =
+ doc_info_phrase =
qi::eps [actions.phrase_push]
>> *( common
| comment
Modified: branches/quickbook-1.5-spirit2/grammar_impl.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/grammar_impl.hpp (original)
+++ branches/quickbook-1.5-spirit2/grammar_impl.hpp 2010-06-20 16:30:59 EDT (Sun, 20 Jun 2010)
@@ -42,7 +42,6 @@
qi::symbols<char, qi::rule<iterator> > block_keyword_rules;
qi::symbols<char, qi::rule<iterator> > block_symbol_rules;
qi::rule<iterator> error;
- qi::rule<iterator, std::string()> phrase_attr;
qi::rule<iterator, std::string()> inside_paragraph;
qi::rule<iterator, boost::optional<raw_string>()> element_id;
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