Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59551 - branches/quickbook-1.5-spirit2
From: daniel_james_at_[hidden]
Date: 2010-02-07 04:07:11


Author: danieljames
Date: 2010-02-07 04:07:09 EST (Sun, 07 Feb 2010)
New Revision: 59551
URL: http://svn.boost.org/trac/boost/changeset/59551

Log:
Better handling of single member structs.
Text files modified:
   branches/quickbook-1.5-spirit2/block.cpp | 12 ++++--------
   branches/quickbook-1.5-spirit2/block.hpp | 4 ----
   branches/quickbook-1.5-spirit2/code_snippet_grammar.cpp | 8 ++++----
   branches/quickbook-1.5-spirit2/code_snippet_types.hpp | 2 --
   branches/quickbook-1.5-spirit2/phrase.cpp | 8 +++-----
   branches/quickbook-1.5-spirit2/phrase.hpp | 2 --
   6 files changed, 11 insertions(+), 25 deletions(-)

Modified: branches/quickbook-1.5-spirit2/block.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block.cpp (original)
+++ branches/quickbook-1.5-spirit2/block.cpp 2010-02-07 04:07:09 EST (Sun, 07 Feb 2010)
@@ -30,7 +30,6 @@
 BOOST_FUSION_ADAPT_STRUCT(
     quickbook::paragraph,
     (std::string, content)
- (char const*, dummy)
 )
 
 BOOST_FUSION_ADAPT_STRUCT(
@@ -56,7 +55,6 @@
 BOOST_FUSION_ADAPT_STRUCT(
     quickbook::end_section,
     (quickbook::file_position, position)
- (char const*, dummy)
 )
 
 BOOST_FUSION_ADAPT_STRUCT(
@@ -95,13 +93,11 @@
 BOOST_FUSION_ADAPT_STRUCT(
     quickbook::xinclude,
     (std::string, path)
- (char const*, dummy)
 )
 
 BOOST_FUSION_ADAPT_STRUCT(
     quickbook::import,
     (std::string, path)
- (char const*, dummy)
 )
 
 BOOST_FUSION_ADAPT_STRUCT(
@@ -230,7 +226,7 @@
         end_section =
                 position
>> "endsect"
- >> qi::attr("dummy")
+ >> qi::attr(nothing())
             ;
 
         heading = heading_symbol >> hard_space >> title_phrase;
@@ -362,7 +358,7 @@
                 "xinclude"
>> hard_space
>> *(qi::char_ - phrase_end)
- >> qi::attr("dummy")
+ >> qi::attr(nothing())
             ;
 
         include =
@@ -380,7 +376,7 @@
                 "import"
>> hard_space
>> *(qi::char_ - phrase_end)
- >> qi::attr("dummy")
+ >> qi::attr(nothing())
             ;
 
         define_template =
@@ -462,7 +458,7 @@
             ] >> qi::attr(quickbook::hr())
             ;
 
- paragraph = paragraph_content >> qi::attr("dummy");
+ paragraph = paragraph_content >> qi::attr(nothing());
 
         paragraph_content =
                 qi::eps [actions.phrase_push]

Modified: branches/quickbook-1.5-spirit2/block.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block.hpp (original)
+++ branches/quickbook-1.5-spirit2/block.hpp 2010-02-07 04:07:09 EST (Sun, 07 Feb 2010)
@@ -25,7 +25,6 @@
     struct paragraph
     {
         std::string content;
- char const* dummy;
     };
 
     struct list_item
@@ -53,7 +52,6 @@
     struct end_section
     {
         quickbook::file_position position;
- char const* dummy;
     };
 
     struct heading
@@ -89,13 +87,11 @@
     struct xinclude
     {
         std::string path;
- char const* dummy;
     };
 
     struct import
     {
         std::string path;
- char const* dummy;
     };
     
     struct include

Modified: branches/quickbook-1.5-spirit2/code_snippet_grammar.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/code_snippet_grammar.cpp (original)
+++ branches/quickbook-1.5-spirit2/code_snippet_grammar.cpp 2010-02-07 04:07:09 EST (Sun, 07 Feb 2010)
@@ -102,13 +102,13 @@
                         *(qi::char_ - qi::eol)
>> qi::eol
                     )
- >> qi::attr("dummy")
+ >> qi::attr(nothing())
             | qi::omit[*qi::space >> "\"\"\"`"]
>> (
                         *(qi::char_ - "\"\"\"")
                     )
>> "\"\"\""
- >> qi::attr("dummy")
+ >> qi::attr(nothing())
             ;
     }
 
@@ -212,14 +212,14 @@
                     (*(qi::char_ - qi::eol))
>> qi::eol
                 )
- >> qi::attr("dummy")
+ >> qi::attr(nothing())
             | qi::omit[*qi::space]
>> "/*`"
>> (
                     *(qi::char_ - "*/")
                 )
>> "*/"
- >> qi::attr("dummy")
+ >> qi::attr(nothing())
             ;
     }
 }

Modified: branches/quickbook-1.5-spirit2/code_snippet_types.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/code_snippet_types.hpp (original)
+++ branches/quickbook-1.5-spirit2/code_snippet_types.hpp 2010-02-07 04:07:09 EST (Sun, 07 Feb 2010)
@@ -37,7 +37,6 @@
     struct escaped_comment
     {
         std::string content;
- char const* dummy;
     };
 }
 
@@ -56,7 +55,6 @@
 BOOST_FUSION_ADAPT_STRUCT(
     quickbook::escaped_comment,
     (std::string, content)
- (char const*, dummy)
 )
 
 namespace quickbook

Modified: branches/quickbook-1.5-spirit2/phrase.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/phrase.cpp (original)
+++ branches/quickbook-1.5-spirit2/phrase.cpp 2010-02-07 04:07:09 EST (Sun, 07 Feb 2010)
@@ -29,7 +29,6 @@
 BOOST_FUSION_ADAPT_STRUCT(
     quickbook::anchor,
     (std::string, id)
- (char const*, dummy)
 )
 
 BOOST_FUSION_ADAPT_STRUCT(
@@ -48,7 +47,6 @@
 BOOST_FUSION_ADAPT_STRUCT(
     quickbook::break_,
     (quickbook::file_position, position)
- (char const*, dummy)
 )
 
 BOOST_FUSION_ADAPT_STRUCT(
@@ -247,7 +245,7 @@
         escape_break =
                 position
>> "\\n"
- >> qi::attr("dummy")
+ >> qi::attr(nothing())
             ;
 
         escape_punct =
@@ -358,7 +356,7 @@
                 '#'
>> blank
>> *(qi::char_ - phrase_end)
- >> qi::attr("dummy")
+ >> qi::attr(nothing())
             ;
 
         source_mode.add
@@ -428,7 +426,7 @@
         break_ =
                 position
>> "br"
- >> qi::attr("dummy")
+ >> qi::attr(nothing())
             ;
 
         space =

Modified: branches/quickbook-1.5-spirit2/phrase.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/phrase.hpp (original)
+++ branches/quickbook-1.5-spirit2/phrase.hpp 2010-02-07 04:07:09 EST (Sun, 07 Feb 2010)
@@ -33,7 +33,6 @@
     };
 
     struct anchor {
- char const* dummy;
         std::string id;
     };
     
@@ -54,7 +53,6 @@
     };
     
     struct break_ {
- const char* dummy;
         file_position position;
     };
     


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