Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50125 - in trunk/tools/quickbook: . detail
From: joel_at_[hidden]
Date: 2008-12-04 21:14:01


Author: djowel
Date: 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
New Revision: 50125
URL: http://svn.boost.org/trac/boost/changeset/50125

Log:
updated to use "classic" spirit includes and namespace
Text files modified:
   trunk/tools/quickbook/block.hpp | 14 +++++++-------
   trunk/tools/quickbook/code_snippet.hpp | 4 ++--
   trunk/tools/quickbook/detail/actions.cpp | 32 ++++++++++++++++----------------
   trunk/tools/quickbook/detail/actions.hpp | 2 +-
   trunk/tools/quickbook/detail/actions_class.hpp | 2 +-
   trunk/tools/quickbook/detail/post_process.cpp | 4 ++--
   trunk/tools/quickbook/detail/quickbook.cpp | 4 ++--
   trunk/tools/quickbook/detail/template_stack.cpp | 6 +++---
   trunk/tools/quickbook/detail/template_stack.hpp | 26 +++++++++++++-------------
   trunk/tools/quickbook/detail/utils.cpp | 2 +-
   trunk/tools/quickbook/doc_info.hpp | 10 +++++-----
   trunk/tools/quickbook/phrase.hpp | 12 ++++++------
   trunk/tools/quickbook/syntax_highlight.hpp | 12 ++++++------
   13 files changed, 65 insertions(+), 65 deletions(-)

Modified: trunk/tools/quickbook/block.hpp
==============================================================================
--- trunk/tools/quickbook/block.hpp (original)
+++ trunk/tools/quickbook/block.hpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -12,16 +12,16 @@
 
 #include "./detail/utils.hpp"
 #include "./phrase.hpp"
-#include <boost/spirit/core.hpp>
-#include <boost/spirit/utility/confix.hpp>
-#include <boost/spirit/utility/chset.hpp>
-#include <boost/spirit/actor/assign_actor.hpp>
-#include <boost/spirit/dynamic/if.hpp>
-#include <boost/spirit/symbols/symbols.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_confix.hpp>
+#include <boost/spirit/include/classic_chset.hpp>
+#include <boost/spirit/include/classic_assign_actor.hpp>
+#include <boost/spirit/include/classic_if.hpp>
+#include <boost/spirit/include/classic_symbols.hpp>
 
 namespace quickbook
 {
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
 
     template <typename Actions, bool skip_initial_spaces = false>
     struct block_grammar : grammar<block_grammar<Actions> >

Modified: trunk/tools/quickbook/code_snippet.hpp
==============================================================================
--- trunk/tools/quickbook/code_snippet.hpp (original)
+++ trunk/tools/quickbook/code_snippet.hpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -9,8 +9,8 @@
 #if !defined(BOOST_SPIRIT_QUICKBOOK_CODE_SNIPPET_HPP)
 #define BOOST_SPIRIT_QUICKBOOK_CODE_SNIPPET_HPP
 
-#include <boost/spirit/core.hpp>
-#include <boost/spirit/actor.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_actor.hpp>
 #include "./detail/template_stack.hpp"
 
 namespace quickbook

Modified: trunk/tools/quickbook/detail/actions.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.cpp (original)
+++ trunk/tools/quickbook/detail/actions.cpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -27,7 +27,7 @@
     // Handles line-breaks (DEPRECATED!!!)
     void break_action::operator()(iterator first, iterator) const
     {
- boost::spirit::file_position const pos = first.get_position();
+ boost::spirit::classic::file_position const pos = first.get_position();
         detail::outwarn(pos.file,pos.line) << "in column:" << pos.column << ", "
             << "[br] and \\n are deprecated" << ".\n";
         phrase << break_mark;
@@ -35,7 +35,7 @@
 
     void error_action::operator()(iterator first, iterator /*last*/) const
     {
- boost::spirit::file_position const pos = first.get_position();
+ boost::spirit::classic::file_position const pos = first.get_position();
         detail::outerr(pos.file,pos.line)
             << "Syntax Error near column " << pos.column << ".\n";
         ++error_count;
@@ -225,7 +225,7 @@
 
         if (mark != list_marks.top().first) // new_indent == list_indent
         {
- boost::spirit::file_position const pos = first.get_position();
+ boost::spirit::classic::file_position const pos = first.get_position();
             detail::outerr(pos.file,pos.line)
                 << "Illegal change of list style near column " << pos.column << ".\n";
             detail::outwarn(pos.file,pos.line)
@@ -483,7 +483,7 @@
         BOOST_ASSERT(actions.template_info.size());
         if (actions.templates.find_top_scope(actions.template_info[0]))
         {
- boost::spirit::file_position const pos = first.get_position();
+ boost::spirit::classic::file_position const pos = first.get_position();
             detail::outerr(pos.file,pos.line)
                 << "Template Redefinition: " << actions.template_info[0] << std::endl;
             ++actions.error_count;
@@ -501,7 +501,7 @@
         bool break_arguments(
             std::vector<std::string>& template_info
           , std::vector<std::string> const& template_
- , boost::spirit::file_position const& pos
+ , boost::spirit::classic::file_position const& pos
         )
         {
             if (template_.size()-1 != template_info.size())
@@ -545,7 +545,7 @@
         get_arguments(
             std::vector<std::string>& template_info
           , std::vector<std::string> const& template_
- , boost::spirit::file_position const& pos
+ , boost::spirit::classic::file_position const& pos
           , quickbook::actions& actions
         )
         {
@@ -579,7 +579,7 @@
         bool parse_template(
             std::string& body
           , std::string& result
- , boost::spirit::file_position const& template_pos
+ , boost::spirit::classic::file_position const& template_pos
           , quickbook::actions& actions
         )
         {
@@ -610,7 +610,7 @@
                 iterator first(body.begin(), body.end(), actions.filename.native_file_string().c_str());
                 first.set_position(template_pos);
                 iterator last(body.end(), body.end());
- r = boost::spirit::parse(first, last, phrase_p).full;
+ r = boost::spirit::classic::parse(first, last, phrase_p).full;
                 actions.phrase.swap(result);
             }
             else
@@ -625,7 +625,7 @@
                 iterator first(iter, body.end(), actions.filename.native_file_string().c_str());
                 first.set_position(template_pos);
                 iterator last(body.end(), body.end());
- r = boost::spirit::parse(first, last, block_p).full;
+ r = boost::spirit::classic::parse(first, last, block_p).full;
                 actions.out.swap(result);
             }
             return r;
@@ -634,7 +634,7 @@
 
     void do_template_action::operator()(iterator first, iterator) const
     {
- boost::spirit::file_position const pos = first.get_position();
+ boost::spirit::classic::file_position const pos = first.get_position();
         ++actions.template_depth;
         if (actions.template_depth > actions.max_template_depth)
         {
@@ -653,7 +653,7 @@
             BOOST_ASSERT(symbol);
 
             std::vector<std::string> template_ = boost::get<0>(*symbol);
- boost::spirit::file_position template_pos = boost::get<1>(*symbol);
+ boost::spirit::classic::file_position template_pos = boost::get<1>(*symbol);
 
             std::vector<std::string> template_info;
             std::swap(template_info, actions.template_info);
@@ -690,7 +690,7 @@
 
             if (!parse_template(body, result, template_pos, actions))
             {
- boost::spirit::file_position const pos = first.get_position();
+ boost::spirit::classic::file_position const pos = first.get_position();
                 detail::outerr(pos.file,pos.line)
                     << "Expanding template:" << template_info[0] << std::endl
                     << "------------------begin------------------" << std::endl
@@ -894,7 +894,7 @@
         --section_level;
         if (section_level < 0)
         {
- boost::spirit::file_position const pos = first.get_position();
+ boost::spirit::classic::file_position const pos = first.get_position();
             detail::outerr(pos.file,pos.line)
                 << "Mismatched [endsect] near column " << pos.column << ".\n";
             ++error_count;
@@ -1069,7 +1069,7 @@
 
         cpp_code_snippet_grammar g(storage, doc_id);
         // TODO: Should I check that parse succeeded?
- boost::spirit::parse(first, last, g);
+ boost::spirit::classic::parse(first, last, g);
 
         return 0;
     }
@@ -1118,7 +1118,7 @@
             std::string tname = boost::get<0>(ts)[0];
             if (actions.templates.find_top_scope(tname))
             {
- boost::spirit::file_position const pos = boost::get<1>(ts);
+ boost::spirit::classic::file_position const pos = boost::get<1>(ts);
                 detail::outerr(pos.file, pos.line)
                     << "Template Redefinition: " << tname << std::endl;
                 ++actions.error_count;
@@ -1158,7 +1158,7 @@
         }
 
         // update the __FILENAME__ macro
- *boost::spirit::find(actions.macro, "__FILENAME__") = actions.filename.native_file_string();
+ *boost::spirit::classic::find(actions.macro, "__FILENAME__") = actions.filename.native_file_string();
 
         // parse the file
         quickbook::parse(actions.filename.native_file_string().c_str(), actions, true);

Modified: trunk/tools/quickbook/detail/actions.hpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.hpp (original)
+++ trunk/tools/quickbook/detail/actions.hpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -16,7 +16,7 @@
 #include <vector>
 #include <stack>
 #include <algorithm>
-#include <boost/spirit/iterator/position_iterator.hpp>
+#include <boost/spirit/include/classic_iterator.hpp>
 #include <boost/filesystem/operations.hpp>
 #include <boost/foreach.hpp>
 #include <boost/tuple/tuple.hpp>

Modified: trunk/tools/quickbook/detail/actions_class.hpp
==============================================================================
--- trunk/tools/quickbook/detail/actions_class.hpp (original)
+++ trunk/tools/quickbook/detail/actions_class.hpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -15,7 +15,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
     namespace fs = boost::filesystem;
 
     struct actions

Modified: trunk/tools/quickbook/detail/post_process.cpp
==============================================================================
--- trunk/tools/quickbook/detail/post_process.cpp (original)
+++ trunk/tools/quickbook/detail/post_process.cpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -8,7 +8,7 @@
 =============================================================================*/
 #include "./post_process.hpp"
 #include "./utils.hpp"
-#include <boost/spirit/core.hpp>
+#include <boost/spirit/include/classic_core.hpp>
 #include <boost/bind.hpp>
 #include <set>
 #include <stack>
@@ -16,7 +16,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
     using boost::bind;
     typedef std::string::const_iterator iter_type;
 

Modified: trunk/tools/quickbook/detail/quickbook.cpp
==============================================================================
--- trunk/tools/quickbook/detail/quickbook.cpp (original)
+++ trunk/tools/quickbook/detail/quickbook.cpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -12,7 +12,7 @@
 #include "../doc_info.hpp"
 #include "./post_process.hpp"
 #include "./utils.hpp"
-#include <boost/spirit/iterator/position_iterator.hpp>
+#include <boost/spirit/include/classic_iterator.hpp>
 #include <boost/program_options.hpp>
 #include <boost/filesystem/path.hpp>
 #include <boost/filesystem/operations.hpp>
@@ -31,7 +31,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
     namespace fs = boost::filesystem;
     tm* current_time; // the current time
     tm* current_gm_time; // the current UTC time

Modified: trunk/tools/quickbook/detail/template_stack.cpp
==============================================================================
--- trunk/tools/quickbook/detail/template_stack.cpp (original)
+++ trunk/tools/quickbook/detail/template_stack.cpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -25,7 +25,7 @@
     {
         for (deque::const_iterator i = scopes.begin(); i != scopes.end(); ++i)
         {
- if (template_symbol* ts = boost::spirit::find(*i, symbol.c_str()))
+ if (template_symbol* ts = boost::spirit::classic::find(*i, symbol.c_str()))
                 return ts;
         }
         return 0;
@@ -33,7 +33,7 @@
 
     template_symbol* template_stack::find_top_scope(std::string const& symbol) const
     {
- return boost::spirit::find(scopes.front(), symbol.c_str());
+ return boost::spirit::classic::find(scopes.front(), symbol.c_str());
     }
 
     template_symbols const& template_stack::top() const
@@ -45,7 +45,7 @@
     void template_stack::add(std::string const& symbol, template_symbol const& ts)
     {
         BOOST_ASSERT(!scopes.empty());
- boost::spirit::add(scopes.front(), symbol.c_str(), ts);
+ boost::spirit::classic::add(scopes.front(), symbol.c_str(), ts);
     }
     
     void template_stack::push()

Modified: trunk/tools/quickbook/detail/template_stack.hpp
==============================================================================
--- trunk/tools/quickbook/detail/template_stack.hpp (original)
+++ trunk/tools/quickbook/detail/template_stack.hpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -14,9 +14,9 @@
 #include <vector>
 #include <boost/tuple/tuple.hpp>
 #include <boost/assert.hpp>
-#include <boost/spirit/iterator/position_iterator.hpp>
-#include <boost/spirit/utility/functor_parser.hpp>
-#include <boost/spirit/symbols/symbols.hpp>
+#include <boost/spirit/include/classic_position_iterator.hpp>
+#include <boost/spirit/include/classic_functor_parser.hpp>
+#include <boost/spirit/include/classic_symbols.hpp>
 #include <boost/next_prior.hpp>
 
 namespace quickbook
@@ -26,16 +26,16 @@
     // template name
     // template param name[0]
     // template param name[1]
- // ...
+ // ...
     // template param name[N]
     // template body
 
     typedef boost::tuple<
             std::vector<std::string>
- , boost::spirit::file_position>
+ , boost::spirit::classic::file_position>
     template_symbol;
 
- typedef boost::spirit::symbols<template_symbol> template_symbols;
+ typedef boost::spirit::classic::symbols<template_symbol> template_symbols;
 
     struct template_stack
     {
@@ -43,8 +43,8 @@
 
         struct parser
         {
- typedef boost::spirit::nil_t result_t;
-
+ typedef boost::spirit::classic::nil_t result_t;
+
             parser(template_stack& ts)
                 : ts(ts) {}
 
@@ -58,7 +58,7 @@
                 for (template_stack::deque::const_iterator i = ts.scopes.begin();
                     i != ts.scopes.end(); ++i)
                 {
- boost::spirit::match<> m = i->parse(scan);
+ boost::spirit::classic::match<> m = i->parse(scan);
                     if (m.length() > len)
                         len = m.length();
                     scan.first = f;
@@ -67,7 +67,7 @@
                     scan.first = boost::next(f, len);
                 return len;
             }
-
+
             template_stack& ts;
         };
 
@@ -78,11 +78,11 @@
         void add(std::string const& symbol, template_symbol const& ts);
         void push();
         void pop();
-
- boost::spirit::functor_parser<parser> scope;
+
+ boost::spirit::classic::functor_parser<parser> scope;
 
     private:
-
+
         friend struct parser;
         deque scopes;
     };

Modified: trunk/tools/quickbook/detail/utils.cpp
==============================================================================
--- trunk/tools/quickbook/detail/utils.cpp (original)
+++ trunk/tools/quickbook/detail/utils.cpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -8,7 +8,7 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 #include "./utils.hpp"
-#include <boost/spirit/core.hpp>
+#include <boost/spirit/include/classic_core.hpp>
 
 #include <cctype>
 #include <cstring>

Modified: trunk/tools/quickbook/doc_info.hpp
==============================================================================
--- trunk/tools/quickbook/doc_info.hpp (original)
+++ trunk/tools/quickbook/doc_info.hpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -11,14 +11,14 @@
 #define BOOST_SPIRIT_QUICKBOOK_DOC_INFO_HPP
 
 #include "./phrase.hpp"
-#include <boost/spirit/core.hpp>
-#include <boost/spirit/actor.hpp>
-#include <boost/spirit/utility/loops.hpp>
-#include <boost/spirit/symbols/symbols.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_actor.hpp>
+#include <boost/spirit/include/classic_loops.hpp>
+#include <boost/spirit/include/classic_symbols.hpp>
 
 namespace quickbook
 {
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
     extern unsigned qbk_major_version;
     extern unsigned qbk_minor_version;
 

Modified: trunk/tools/quickbook/phrase.hpp
==============================================================================
--- trunk/tools/quickbook/phrase.hpp (original)
+++ trunk/tools/quickbook/phrase.hpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -11,15 +11,15 @@
 #define BOOST_SPIRIT_QUICKBOOK_PHRASE_HPP
 
 #include "detail/utils.hpp"
-#include <boost/spirit/core.hpp>
-#include <boost/spirit/utility/confix.hpp>
-#include <boost/spirit/utility/chset.hpp>
-#include <boost/spirit/actor/assign_actor.hpp>
-#include <boost/spirit/dynamic/if.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_confix.hpp>
+#include <boost/spirit/include/classic_chset.hpp>
+#include <boost/spirit/include/classic_assign_actor.hpp>
+#include <boost/spirit/include/classic_if.hpp>
 
 namespace quickbook
 {
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
 
     template <typename Rule, typename Action>
     inline void

Modified: trunk/tools/quickbook/syntax_highlight.hpp
==============================================================================
--- trunk/tools/quickbook/syntax_highlight.hpp (original)
+++ trunk/tools/quickbook/syntax_highlight.hpp 2008-12-04 21:13:59 EST (Thu, 04 Dec 2008)
@@ -10,16 +10,16 @@
 #if !defined(BOOST_SPIRIT_QUICKBOOK_SYNTAX_HIGHLIGHT_HPP)
 #define BOOST_SPIRIT_QUICKBOOK_SYNTAX_HIGHLIGHT_HPP
 
-#include <boost/spirit/core.hpp>
-#include <boost/spirit/utility/confix.hpp>
-#include <boost/spirit/utility/chset.hpp>
-#include <boost/spirit/symbols/symbols.hpp>
-#include <boost/spirit/utility/escape_char.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_confix.hpp>
+#include <boost/spirit/include/classic_chset.hpp>
+#include <boost/spirit/include/classic_symbols.hpp>
+#include <boost/spirit/include/classic_escape_char.hpp>
 #include "./phrase.hpp"
 
 namespace quickbook
 {
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
 
     // Grammar for C++ highlighting
     template <


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