Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69165 - branches/quickbook-filenames/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2011-02-22 15:28:18


Author: danieljames
Date: 2011-02-22 15:28:10 EST (Tue, 22 Feb 2011)
New Revision: 69165
URL: http://svn.boost.org/trac/boost/changeset/69165

Log:
Use values for headings, sections and some phrase elements.
Added:
   branches/quickbook-filenames/tools/quickbook/src/block_tags.hpp (contents, props changed)
      - copied, changed from r69164, /branches/quickbook-filenames/tools/quickbook/src/table_tags.hpp
Removed:
   branches/quickbook-filenames/tools/quickbook/src/table_tags.hpp
Text files modified:
   branches/quickbook-filenames/tools/quickbook/src/actions.cpp | 147 +++++++++++++++++++++++----------------
   branches/quickbook-filenames/tools/quickbook/src/actions.hpp | 59 ++-------------
   branches/quickbook-filenames/tools/quickbook/src/actions_class.cpp | 34 ++------
   branches/quickbook-filenames/tools/quickbook/src/actions_class.hpp | 31 ++-----
   branches/quickbook-filenames/tools/quickbook/src/block_element_grammar.cpp | 71 +++++++++++++++---
   branches/quickbook-filenames/tools/quickbook/src/block_tags.hpp | 10 ++
   branches/quickbook-filenames/tools/quickbook/src/main_grammar.cpp | 11 ++
   branches/quickbook-filenames/tools/quickbook/src/phrase_element_grammar.cpp | 48 +++++++-----
   8 files changed, 222 insertions(+), 189 deletions(-)

Modified: branches/quickbook-filenames/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/actions.cpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/actions.cpp 2011-02-22 15:28:10 EST (Tue, 22 Feb 2011)
@@ -24,7 +24,7 @@
 #include "grammar.hpp"
 #include "input_path.hpp"
 #include "template_tags.hpp"
-#include "table_tags.hpp"
+#include "block_tags.hpp"
 
 namespace quickbook
 {
@@ -160,26 +160,55 @@
     {
         if(actions.suppress) return;
 
- std::string str;
- phrase.swap(str);
-
         value_consumer values = actions.values.get();
+ value heading_list = values.consume();
+ assert(!values.is());
+
+ values = heading_list;
+
+ bool generic = heading_list.get_tag() == block_tags::generic_heading;
+ value element_id = values.optional_consume(general_tags::element_id);
+ value content = values.consume();
+ assert(!values.is());
+
+ int level;
+
+ if (generic)
+ {
+ level = section_level + 2; // section_level is zero-based. We need to use a
+ // one-based heading which is one greater
+ // than the current. Thus: section_level + 2.
+ if (level > 6 ) // The max is h6, clip it if it goes
+ level = 6; // further than that
+ }
+ else
+ {
+ level = heading_list.get_tag() - block_tags::heading1 + 1;
+ }
 
         std::string anchor;
+ std::string linkend;
 
- if (qbk_version_n < 103) // version 1.2 and below
+ if (!generic && qbk_version_n < 103) // version 1.2 and below
         {
+ std::string id_base = content.get_boostbook();
+
             anchor = section_id + '.' +
- detail::make_identifier(str.begin(), str.end());
+ detail::make_identifier(id_base.begin(), id_base.end());
         }
         else
         {
+ std::string id_base =
+ qbk_version_n >= 106 ?
+ content.get_quickbook() :
+ content.get_boostbook();
+
             std::string id =
- values.is(general_tags::element_id) ? values.consume().get_quickbook() :
- qbk_version_n >= 106 ? detail::make_identifier(first, last) :
- detail::make_identifier(str.begin(), str.end());
+ !element_id.is_empty() ?
+ element_id.get_quickbook() :
+ detail::make_identifier(id_base.begin(), id_base.end());
 
- anchor =
+ linkend = anchor =
                 fully_qualified_id(library_id, qualified_section_id, id);
         }
 
@@ -188,38 +217,7 @@
         actions.anchors.push_back(anchor);
         actions.output_pre(out);
         
- std::string linkend = qbk_version_n < 103 ? std::string() : anchor;
- write_bridgehead(out, level, str, anchor + "-heading", linkend);
- }
-
- void generic_header_action::operator()(iterator first, iterator last) const
- {
- if(actions.suppress) return;
-
- int level_ = section_level + 2; // section_level is zero-based. We need to use a
- // one-based heading which is one greater
- // than the current. Thus: section_level + 2.
- if (level_ > 6) // The max is h6, clip it if it goes
- level_ = 6; // further than that
- std::string str;
- phrase.swap(str);
-
- value_consumer values = actions.values.get();
-
- std::string id =
- values.is(general_tags::element_id) ? values.consume().get_quickbook() :
- qbk_version_n >= 106 ? detail::make_identifier(first, last) :
- detail::make_identifier(str.begin(), str.end());
-
- std::string anchor =
- fully_qualified_id(library_id, qualified_section_id, id);
-
- actions.output_pre(out);
- actions.anchors.swap(actions.saved_anchors);
- actions.anchors.push_back(anchor);
- actions.output_pre(out);
-
- write_bridgehead(out, level_, str, anchor + "-heading", anchor);
+ write_bridgehead(out, level, content.get_boostbook(), anchor + "-heading", linkend);
     }
 
     void simple_phrase_action::operator()(iterator first, iterator last) const
@@ -240,17 +238,15 @@
         out << post;
     }
 
- void cond_phrase_action_pre::operator()(iterator first, iterator last) const
- {
- std::string str(first, last);
- condition = find(macro, str.c_str());
- }
-
     cond_phrase_push::cond_phrase_push(quickbook::actions& actions)
         : actions(actions)
         , saved_suppress(actions.suppress)
     {
- actions.suppress = actions.suppress || !actions.condition;
+ value_consumer values = actions.values.get();
+ bool condition = find(actions.macro,
+ values.consume().get_quickbook().c_str());
+
+ actions.suppress = actions.suppress || !condition;
     }
     
     cond_phrase_push::~cond_phrase_push()
@@ -1292,20 +1288,31 @@
         }
     }
 
- void begin_section_action::operator()(iterator first, iterator last) const
+ void begin_section_action::operator()(iterator, iterator) const
     {
         if(actions.suppress) return;
 
         value_consumer values = actions.values.get();
+ value begin_section_list = values.consume(block_tags::begin_section);
+ assert(!values.is());
 
- section_id = values.is(general_tags::element_id) ?
- values.consume().get_quickbook() :
- detail::make_identifier(first, last);
+ values = begin_section_list;
+
+ value element_id = values.optional_consume(general_tags::element_id);
+ value content = values.consume();
+ assert(!values.is());
+
+ std::string qbk_src = content.get_quickbook();
+
+ section_id = !element_id.is_empty() ?
+ element_id.get_quickbook() :
+ detail::make_identifier(qbk_src.begin(), qbk_src.end());
 
         if (section_level != 0)
             qualified_section_id += '.';
         else
             BOOST_ASSERT(qualified_section_id.empty());
+
         qualified_section_id += section_id;
         ++section_level;
 
@@ -1321,35 +1328,37 @@
             out << "\n<section id=\"" << library_id
                 << "." << qualified_section_id << "\">\n";
         }
- std::string str;
- phrase.swap(str);
 
         actions.anchors.swap(actions.saved_anchors);
         actions.output_pre(out);
 
         if (qbk_version_n < 103) // version 1.2 and below
         {
- out << "<title>" << str << "</title>\n";
+ out << "<title>" << content.get_boostbook() << "</title>\n";
         }
         else // version 1.3 and above
         {
             out << "<title>"
                 << "<link linkend=\"" << library_id
                     << "." << qualified_section_id << "\">"
- << str
+ << content.get_boostbook()
                 << "</link>"
                 << "</title>\n"
                 ;
         }
     }
 
- void end_section_action::operator()(iterator first, iterator last) const
+ void end_section_action::operator()(iterator, iterator) const
     {
         if(!actions.output_pre(out)) return;
 
+ value_consumer values = actions.values.get();
+ value end_section = values.consume(block_tags::end_section);
+ assert(!values.is());
+
         if (section_level <= min_section_level)
         {
- file_position const pos = first.get_position();
+ file_position const pos = end_section.get_position();
             detail::outerr(actions.filename, pos.line)
                 << "Mismatched [endsect] near column " << pos.column << ".\n";
             ++error_count;
@@ -1645,11 +1654,29 @@
 
     void scoped_block_push::success_impl()
     {
- actions.inside_paragraph();
         actions.values.builder.insert(
             bbk_value(actions.out.str(), actions.values.builder.release_tag()));
     }
 
+ scoped_phrase_push::scoped_phrase_push(quickbook::actions& actions)
+ : actions(actions)
+ {
+ actions.out.push();
+ actions.phrase.push();
+ }
+
+ scoped_phrase_push::~scoped_phrase_push()
+ {
+ actions.phrase.pop();
+ actions.out.pop();
+ }
+
+ void scoped_phrase_push::success_impl()
+ {
+ actions.values.builder.insert(
+ bbk_value(actions.phrase.str(), actions.values.builder.release_tag()));
+ }
+
     set_no_eols_scoped::set_no_eols_scoped(quickbook::actions& actions)
         : actions(actions), saved_no_eols(actions.no_eols)
     {

Modified: branches/quickbook-filenames/tools/quickbook/src/actions.hpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/actions.hpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/actions.hpp 2011-02-22 15:28:10 EST (Tue, 22 Feb 2011)
@@ -190,40 +190,9 @@
 
     struct header_action
     {
- // Handles paragraph, h1, h2, h3, h4, h5, h6,
-
- header_action(
- collector& out,
- collector& phrase,
- std::string const& library_id,
- std::string const& section_id,
- std::string const& qualified_section_id,
- int level,
- quickbook::actions& actions)
- : out(out)
- , phrase(phrase)
- , library_id(library_id)
- , section_id(section_id)
- , qualified_section_id(qualified_section_id)
- , level(level)
- , actions(actions) {}
-
- void operator()(iterator first, iterator last) const;
-
- collector& out;
- collector& phrase;
- std::string const& library_id;
- std::string const& section_id;
- std::string const& qualified_section_id;
- int level;
- quickbook::actions& actions;
- };
-
- struct generic_header_action
- {
         // Handles h
 
- generic_header_action(
+ header_action(
             collector& out,
             collector& phrase,
             std::string const& library_id,
@@ -275,22 +244,6 @@
         quickbook::actions& actions;
     };
 
- struct cond_phrase_action_pre
- {
- // Handles conditional phrases
-
- cond_phrase_action_pre(
- bool& condition
- , string_symbols const& macro)
- : condition(condition)
- , macro(macro) {}
-
- void operator()(iterator first, iterator last) const;
-
- bool& condition;
- string_symbols const& macro;
- };
-
     struct cond_phrase_push : scoped_action_base
     {
         cond_phrase_push(quickbook::actions&);
@@ -854,6 +807,16 @@
         quickbook::actions& actions;
     };
 
+ struct scoped_phrase_push : scoped_action_base
+ {
+ scoped_phrase_push(quickbook::actions&);
+ ~scoped_phrase_push();
+ template <typename T> void success(T const&) { this->success_impl(); }
+ void success_impl();
+
+ quickbook::actions& actions;
+ };
+
     struct set_no_eols_scoped : scoped_action_base
     {
         set_no_eols_scoped(quickbook::actions&);

Modified: branches/quickbook-filenames/tools/quickbook/src/actions_class.cpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/actions_class.cpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/actions_class.cpp 2011-02-22 15:28:10 EST (Tue, 22 Feb 2011)
@@ -67,17 +67,12 @@
     // actions
         , error(*this)
         , scoped_block(*this)
+ , scoped_phrase(*this)
         , code(out, phrase, *this)
         , code_block(phrase, phrase, *this)
         , inline_code(phrase, *this)
         , inside_paragraph(out, phrase, paragraph_pre, paragraph_post, *this)
- , h(out, phrase, doc_id, section_id, qualified_section_id, section_level, *this)
- , h1(out, phrase, doc_id, section_id, qualified_section_id, 1, *this)
- , h2(out, phrase, doc_id, section_id, qualified_section_id, 2, *this)
- , h3(out, phrase, doc_id, section_id, qualified_section_id, 3, *this)
- , h4(out, phrase, doc_id, section_id, qualified_section_id, 4, *this)
- , h5(out, phrase, doc_id, section_id, qualified_section_id, 5, *this)
- , h6(out, phrase, doc_id, section_id, qualified_section_id, 6, *this)
+ , heading(out, phrase, doc_id, section_id, qualified_section_id, section_level, *this)
         , hr(out, hr_, *this)
         , blurb(out, blurb_pre, blurb_post, *this)
         , blockquote(out, blockquote_pre, blockquote_post, *this)
@@ -93,7 +88,6 @@
         , raw_char(phrase, *this)
         , escape_unicode(phrase, *this)
         , image(phrase, *this)
- , cond_phrase_pre(condition, macro)
         , scoped_cond_phrase(*this)
 
         , list(out, list_buffer, list_indent, list_marks, *this)
@@ -117,22 +111,14 @@
         , globalref_pre(phrase, globalref_pre_, *this)
         , globalref_post(phrase, globalref_post_, *this)
 
- , bold_pre(phrase, bold_pre_, *this)
- , bold_post(phrase, bold_post_, *this)
- , italic_pre(phrase, italic_pre_, *this)
- , italic_post(phrase, italic_post_, *this)
- , underline_pre(phrase, underline_pre_, *this)
- , underline_post(phrase, underline_post_, *this)
- , teletype_pre(phrase, teletype_pre_, *this)
- , teletype_post(phrase, teletype_post_, *this)
- , strikethrough_pre(phrase, strikethrough_pre_, *this)
- , strikethrough_post(phrase, strikethrough_post_, *this)
- , quote_pre(phrase, quote_pre_, *this)
- , quote_post(phrase, quote_post_, *this)
- , replaceable_pre(phrase, replaceable_pre_, *this)
- , replaceable_post(phrase, replaceable_post_, *this)
- , footnote_pre(phrase, footnote_pre_, *this)
- , footnote_post(phrase, footnote_post_, *this)
+ , bold(phrase, bold_pre_, bold_post_, *this)
+ , italic(phrase, italic_pre_, italic_post_, *this)
+ , underline(phrase, underline_pre_, underline_post_, *this)
+ , teletype(phrase, teletype_pre_, teletype_post_, *this)
+ , strikethrough(phrase, strikethrough_pre_, strikethrough_post_, *this)
+ , quote(phrase, quote_pre_, quote_post_, *this)
+ , replaceable(phrase, replaceable_pre_, replaceable_post_, *this)
+ , footnote(phrase, footnote_pre_, footnote_post_, *this)
 
         , simple_bold(phrase, bold_pre_, bold_post_, macro, *this)
         , simple_italic(phrase, italic_pre_, italic_post_, macro, *this)

Modified: branches/quickbook-filenames/tools/quickbook/src/actions_class.hpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/actions_class.hpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/actions_class.hpp 2011-02-22 15:28:10 EST (Tue, 22 Feb 2011)
@@ -85,7 +85,6 @@
         std::string macro_id;
         std::stack<mark_type> list_marks;
         int list_indent;
- bool condition;
         int template_depth;
         template_stack templates;
         int error_count;
@@ -108,13 +107,14 @@
 
         scoped_parser<scoped_block_push>
                                 scoped_block;
+ scoped_parser<scoped_phrase_push>
+ scoped_phrase;
 
         code_action code;
         code_action code_block;
         inline_code_action inline_code;
         implicit_paragraph_action inside_paragraph;
- generic_header_action h;
- header_action h1, h2, h3, h4, h5, h6;
+ header_action heading;
         markup_action hr;
         tagged_action blurb, blockquote;
         scoped_parser<set_no_eols_scoped>
@@ -126,7 +126,6 @@
         raw_char_action raw_char;
         escape_unicode_action escape_unicode;
         image_action image;
- cond_phrase_action_pre cond_phrase_pre;
         scoped_parser<cond_phrase_push>
                                 scoped_cond_phrase;
 
@@ -151,22 +150,14 @@
         link_action globalref_pre;
         markup_action globalref_post;
 
- markup_action bold_pre;
- markup_action bold_post;
- markup_action italic_pre;
- markup_action italic_post;
- markup_action underline_pre;
- markup_action underline_post;
- markup_action teletype_pre;
- markup_action teletype_post;
- markup_action strikethrough_pre;
- markup_action strikethrough_post;
- markup_action quote_pre;
- markup_action quote_post;
- markup_action replaceable_pre;
- markup_action replaceable_post;
- markup_action footnote_pre;
- markup_action footnote_post;
+ tagged_action bold;
+ tagged_action italic;
+ tagged_action underline;
+ tagged_action teletype;
+ tagged_action strikethrough;
+ tagged_action quote;
+ tagged_action replaceable;
+ tagged_action footnote;
 
         simple_phrase_action simple_bold;
         simple_phrase_action simple_italic;

Modified: branches/quickbook-filenames/tools/quickbook/src/block_element_grammar.cpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/block_element_grammar.cpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/block_element_grammar.cpp 2011-02-22 15:28:10 EST (Tue, 22 Feb 2011)
@@ -11,7 +11,7 @@
 #include "utils.hpp"
 #include "actions_class.hpp"
 #include "grammar_impl.hpp"
-#include "table_tags.hpp"
+#include "block_tags.hpp"
 #include "template_tags.hpp"
 #include <boost/spirit/include/classic_assign_actor.hpp>
 #include <boost/spirit/include/classic_if.hpp>
@@ -24,7 +24,8 @@
     struct block_element_grammar_local
     {
         cl::rule<scanner>
- h, h1, h2, h3, h4, h5, h6, blurb, blockquote,
+ h, h1, h2, h3, h4, h5, h6, heading,
+ blurb, blockquote,
                         warning, caution, important, note, tip,
                         inner_phrase, def_macro,
                         table, table_row, variablelist,
@@ -69,14 +70,17 @@
             ;
 
         local.begin_section =
- space
+ actions.values.scoped(block_tags::begin_section)
+ [ space
>> local.element_id
>> space
- >> local.inner_phrase [actions.begin_section]
+ >> local.inner_phrase
+ ] [actions.begin_section]
             ;
 
         local.end_section =
- cl::eps_p [actions.end_section]
+ cl::eps_p [actions.values.entry(block_tags::end_section)]
+ [actions.end_section]
             ;
 
         elements.add
@@ -89,13 +93,52 @@
             ("h6", element_info(element_info::block, &local.h6))
             ;
 
- local.h = space >> local.element_id_1_6 >> space >> local.inner_phrase [actions.h];
- local.h1 = space >> local.element_id_1_6 >> space >> local.inner_phrase [actions.h1];
- local.h2 = space >> local.element_id_1_6 >> space >> local.inner_phrase [actions.h2];
- local.h3 = space >> local.element_id_1_6 >> space >> local.inner_phrase [actions.h3];
- local.h4 = space >> local.element_id_1_6 >> space >> local.inner_phrase [actions.h4];
- local.h5 = space >> local.element_id_1_6 >> space >> local.inner_phrase [actions.h5];
- local.h6 = space >> local.element_id_1_6 >> space >> local.inner_phrase [actions.h6];
+ local.heading
+ = actions.values.scoped
+ [ space
+ >> local.element_id_1_6
+ >> space
+ >> local.inner_phrase
+ ] [actions.heading]
+ ;
+
+ // This looks verbose now, but it'll eventually be replaced with a
+ // more automatic version (see how doc_info works).
+
+ local.h
+ = cl::eps_p [actions.values.tag(block_tags::generic_heading)]
+ >> local.heading
+ ;
+
+ local.h1
+ = cl::eps_p [actions.values.tag(block_tags::heading1)]
+ >> local.heading
+ ;
+
+ local.h2
+ = cl::eps_p [actions.values.tag(block_tags::heading2)]
+ >> local.heading
+ ;
+
+ local.h3
+ = cl::eps_p [actions.values.tag(block_tags::heading3)]
+ >> local.heading
+ ;
+
+ local.h4
+ = cl::eps_p [actions.values.tag(block_tags::heading4)]
+ >> local.heading
+ ;
+
+ local.h5
+ = cl::eps_p [actions.values.tag(block_tags::heading5)]
+ >> local.heading
+ ;
+
+ local.h6
+ = cl::eps_p [actions.values.tag(block_tags::heading6)]
+ >> local.heading
+ ;
         
         elements.add("blurb", element_info(element_info::block, &local.blurb));
 
@@ -317,9 +360,11 @@
             ;
 
         local.inner_phrase =
- cl::eps_p [actions.inner_phrase_pre]
+ actions.values.save
+ [ cl::eps_p [actions.inner_phrase_pre]
>> phrase
>> cl::eps_p [actions.inner_phrase_post]
+ ] [actions.docinfo_value]
             ;
     }
 }

Copied: branches/quickbook-filenames/tools/quickbook/src/block_tags.hpp (from r69164, /branches/quickbook-filenames/tools/quickbook/src/table_tags.hpp)
==============================================================================
--- /branches/quickbook-filenames/tools/quickbook/src/table_tags.hpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/block_tags.hpp 2011-02-22 15:28:10 EST (Tue, 22 Feb 2011)
@@ -13,7 +13,13 @@
 
 namespace quickbook
 {
- QUICKBOOK_VALUE_TAGS(table_tags, 0x200,
+ QUICKBOOK_VALUE_TAGS(block_tags, 0x200,
+ (begin_section)(end_section)
+ (generic_heading)
+ (heading1)(heading2)(heading3)(heading4)(heading5)(heading6)
+ )
+
+ QUICKBOOK_VALUE_TAGS(table_tags, 0x250,
         (title)(row)(cell)
     )
 
@@ -23,4 +29,4 @@
 
 }
 
-#endif
\ No newline at end of file
+#endif

Modified: branches/quickbook-filenames/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/main_grammar.cpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/main_grammar.cpp 2011-02-22 15:28:10 EST (Tue, 22 Feb 2011)
@@ -351,17 +351,19 @@
         simple_markup(local.simple_teletype,
             '=', actions.simple_teletype, local.simple_phrase_end);
 
- phrase =
+ phrase = actions.values.save[
            *( common
             | (cl::anychar_p - phrase_end) [actions.plain_char]
             )
+ ]
             ;
 
- extended_phrase =
+ extended_phrase = actions.values.save[
            *( local.extended_phrase_element
             | common
             | (cl::anychar_p - phrase_end) [actions.plain_char]
             )
+ ]
             ;
 
         inside_paragraph =
@@ -380,6 +382,7 @@
>> space
>> ( local.element
>> cl::eps_p(local.check_element(element_info::in_phrase))
+ [actions.values.reset]
>> local.element_rule
                 | local.template_
                 | cl::str_p("br") [actions.break_]
@@ -392,6 +395,7 @@
>> local.element
>> cl::eps_p(local.check_element(element_info::in_conditional))
                                                 [actions.inside_paragraph]
+ [actions.values.reset]
>> ( local.element_rule
>> ( (space >> ']')
                     | cl::eps_p [actions.error]
@@ -427,10 +431,11 @@
         // Simple phrase grammar
         //
 
- simple_phrase =
+ simple_phrase = actions.values.save[
            *( common
             | (cl::anychar_p - ']') [actions.plain_char]
             )
+ ]
             ;
 
         //

Modified: branches/quickbook-filenames/tools/quickbook/src/phrase_element_grammar.cpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/phrase_element_grammar.cpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/phrase_element_grammar.cpp 2011-02-22 15:28:10 EST (Tue, 22 Feb 2011)
@@ -30,7 +30,7 @@
                         anchor, link,
                         source_mode_cpp, source_mode_python, source_mode_teletype,
                         quote, footnote, replaceable,
- cond_phrase
+ cond_phrase, inner_phrase
                         ;
     };
 
@@ -46,7 +46,7 @@
 
         local.cond_phrase =
                 blank
- >> macro_identifier [actions.cond_phrase_pre]
+ >> macro_identifier [actions.values.entry]
>> actions.scoped_cond_phrase[extended_phrase]
             ;
 
@@ -55,7 +55,7 @@
             ;
 
         local.image =
- blank [actions.values.reset]
+ blank
>> cl::if_p(qbk_since(105u)) [
                         (+(
                             *cl::space_p
@@ -197,38 +197,38 @@
             ;
 
         local.bold =
- blank [actions.bold_pre]
- >> phrase [actions.bold_post]
+ blank
+ >> local.inner_phrase [actions.bold]
             ;
 
         local.italic =
- blank [actions.italic_pre]
- >> phrase [actions.italic_post]
+ blank
+ >> local.inner_phrase [actions.italic]
             ;
 
         local.underline =
- blank [actions.underline_pre]
- >> phrase [actions.underline_post]
+ blank
+ >> local.inner_phrase [actions.underline]
             ;
 
         local.teletype =
- blank [actions.teletype_pre]
- >> phrase [actions.teletype_post]
+ blank
+ >> local.inner_phrase [actions.teletype]
             ;
 
         local.strikethrough =
- blank [actions.strikethrough_pre]
- >> phrase [actions.strikethrough_post]
+ blank
+ >> local.inner_phrase [actions.strikethrough]
             ;
 
         local.quote =
- blank [actions.quote_pre]
- >> phrase [actions.quote_post]
+ blank
+ >> local.inner_phrase [actions.quote]
             ;
 
         local.replaceable =
- blank [actions.replaceable_pre]
- >> phrase [actions.replaceable_post]
+ blank
+ >> local.inner_phrase [actions.replaceable]
             ;
 
         elements.add
@@ -246,8 +246,18 @@
             ;
 
         local.footnote =
- blank [actions.footnote_pre]
- >> phrase [actions.footnote_post]
+ blank
+ >> local.inner_phrase [actions.footnote]
+ ;
+
+ local.inner_phrase =
+ actions.scoped_phrase[
+ actions.values.save
+ [ cl::eps_p [actions.inner_phrase_pre]
+ >> phrase
+ >> cl::eps_p [actions.inner_phrase_post]
+ ] [actions.phrase_value]
+ ]
             ;
     }
 }

Deleted: branches/quickbook-filenames/tools/quickbook/src/table_tags.hpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/table_tags.hpp 2011-02-22 15:28:10 EST (Tue, 22 Feb 2011)
+++ (empty file)
@@ -1,26 +0,0 @@
-/*=============================================================================
- Copyright (c) 2011 Daniel James
-
- Use, modification and distribution is subject to the Boost Software
- License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-=============================================================================*/
-
-#if !defined(BOOST_SPIRIT_QUICKBOOK_TABLE_TAGS_HPP)
-#define BOOST_SPIRIT_QUICKBOOK_TABLE_TAGS_HPP
-
-#include "value_tags.hpp"
-
-namespace quickbook
-{
- QUICKBOOK_VALUE_TAGS(table_tags, 0x200,
- (title)(row)(cell)
- )
-
- QUICKBOOK_VALUE_TAGS(general_tags, 0x300,
- (element_id)
- )
-
-}
-
-#endif
\ No newline at end of file


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