Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57772 - in branches/quickbook-1.5-spirit2: . detail
From: daniel_james_at_[hidden]
Date: 2009-11-18 18:10:15


Author: danieljames
Date: 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
New Revision: 57772
URL: http://svn.boost.org/trac/boost/changeset/57772

Log:
Change 'using namespace boost::spirit::classic' to 'using namespace boost::spirit'.
Text files modified:
   branches/quickbook-1.5-spirit2/block.hpp | 136 ++++++++++++++--------------
   branches/quickbook-1.5-spirit2/code_snippet.hpp | 79 ++++++++--------
   branches/quickbook-1.5-spirit2/detail/actions.cpp | 2
   branches/quickbook-1.5-spirit2/detail/actions.hpp | 6
   branches/quickbook-1.5-spirit2/detail/actions_class.hpp | 2
   branches/quickbook-1.5-spirit2/detail/post_process.cpp | 39 ++++----
   branches/quickbook-1.5-spirit2/detail/quickbook.cpp | 8
   branches/quickbook-1.5-spirit2/doc_info.hpp | 70 ++++++++------
   branches/quickbook-1.5-spirit2/grammars.hpp | 52 +++++-----
   branches/quickbook-1.5-spirit2/phrase.hpp | 187 ++++++++++++++++++++-------------------
   branches/quickbook-1.5-spirit2/syntax_highlight.hpp | 136 ++++++++++++++--------------
   11 files changed, 371 insertions(+), 346 deletions(-)

Modified: branches/quickbook-1.5-spirit2/block.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block.hpp (original)
+++ branches/quickbook-1.5-spirit2/block.hpp 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -22,7 +22,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ using namespace boost::spirit;
 
     template <typename Actions, bool skip_initial_spaces>
     template <typename Scanner>
@@ -37,7 +37,7 @@
         if (skip_initial_spaces)
         {
             start_ =
- *(space_p | comment) >> blocks >> blank
+ *(classic::space_p | comment) >> blocks >> blank
                 ;
         }
         else
@@ -59,39 +59,40 @@
             ;
 
         space =
- *(space_p | comment)
+ *(classic::space_p | comment)
             ;
 
         blank =
- *(blank_p | comment)
+ *(classic::blank_p | comment)
             ;
 
- eol = blank >> eol_p
+ eol = blank >> classic::eol_p
             ;
 
         phrase_end =
             ']' |
- if_p(var(no_eols))
+ classic::if_p(var(no_eols))
             [
                 eol >> eol // Make sure that we don't go
             ] // past a single block, except
             ; // when preformatted.
 
         hard_space =
- (eps_p - (alnum_p | '_')) >> space // must not be preceded by
+ (classic::eps_p - (classic::alnum_p | '_')) >> space
+ // must not be preceded by
             ; // alpha-numeric or underscore
 
         comment =
- "[/" >> *(dummy_block | (anychar_p - ']')) >> ']'
+ "[/" >> *(dummy_block | (classic::anychar_p - ']')) >> ']'
             ;
 
         dummy_block =
- '[' >> *(dummy_block | (anychar_p - ']')) >> ']'
+ '[' >> *(dummy_block | (classic::anychar_p - ']')) >> ']'
             ;
 
         hr =
- str_p("----")
- >> *(anychar_p - eol)
+ classic::str_p("----")
+ >> *(classic::anychar_p - eol)
>> +eol
             ;
 
@@ -113,7 +114,7 @@
                 | template_
                 )
>> ( (space >> ']' >> +eol)
- | eps_p [actions.error]
+ | classic::eps_p [actions.error]
                 )
             ;
         
@@ -121,20 +122,21 @@
                 ':'
>>
                 (
- if_p(qbk_since(105u)) [space]
- >> (+(alnum_p | '_')) [assign_a(actions.element_id)]
- | eps_p [actions.element_id_warning]
- [assign_a(actions.element_id)]
+ classic::if_p(qbk_since(105u))
+ [space]
+ >> (+(classic::alnum_p | '_')) [classic::assign_a(actions.element_id)]
+ | classic::eps_p [actions.element_id_warning]
+ [classic::assign_a(actions.element_id)]
                 )
- | eps_p [assign_a(actions.element_id)]
+ | classic::eps_p [classic::assign_a(actions.element_id)]
             ;
         
         element_id_1_5 =
- if_p(qbk_since(105u)) [
+ classic::if_p(qbk_since(105u)) [
                     element_id
                 ]
                 .else_p [
- eps_p [assign_a(actions.element_id)]
+ classic::eps_p [classic::assign_a(actions.element_id)]
                 ]
                 ;
 
@@ -146,7 +148,7 @@
             ;
 
         end_section =
- str_p("endsect") [actions.end_section]
+ classic::str_p("endsect") [actions.end_section]
             ;
 
         headings =
@@ -174,7 +176,7 @@
         blurb =
             "blurb" >> hard_space
>> inside_paragraph [actions.blurb]
- >> eps_p
+ >> classic::eps_p
             ;
 
         blockquote =
@@ -200,13 +202,13 @@
             ;
 
         preformatted =
- "pre" >> hard_space [assign_a(no_eols, false_)]
+ "pre" >> hard_space [classic::assign_a(no_eols, false_)]
>> !eol >> phrase [actions.preformatted]
- >> eps_p [assign_a(no_eols, true_)]
+ >> classic::eps_p [classic::assign_a(no_eols, true_)]
             ;
 
         macro_identifier =
- +(anychar_p - (space_p | ']'))
+ +(classic::anychar_p - (classic::space_p | ']'))
             ;
 
         def_macro =
@@ -216,21 +218,21 @@
             ;
 
         identifier =
- (alpha_p | '_') >> *(alnum_p | '_')
+ (classic::alpha_p | '_') >> *(classic::alnum_p | '_')
             ;
 
         template_id =
- identifier | (punct_p - (ch_p('[') | ']'))
+ identifier | (classic::punct_p - (classic::ch_p('[') | ']'))
             ;
 
         template_ =
             "template"
- >> hard_space >> template_id [push_back_a(actions.template_info)]
+ >> hard_space >> template_id [classic::push_back_a(actions.template_info)]
>>
             !(
                 space >> '['
>> *(
- space >> template_id [push_back_a(actions.template_info)]
+ space >> template_id [classic::push_back_a(actions.template_info)]
                     )
>> space >> ']'
             )
@@ -238,112 +240,112 @@
             ;
 
         template_body =
- *(('[' >> template_body >> ']') | (anychar_p - ']'))
- >> space >> eps_p(']')
+ *(('[' >> template_body >> ']') | (classic::anychar_p - ']'))
+ >> space >> classic::eps_p(']')
             ;
 
         variablelist =
             "variablelist"
- >> (eps_p(*blank_p >> eol_p) | hard_space)
- >> (*(anychar_p - eol)) [assign_a(actions.table_title)]
+ >> (classic::eps_p(*classic::blank_p >> classic::eol_p) | hard_space)
+ >> (*(classic::anychar_p - eol)) [classic::assign_a(actions.table_title)]
>> +eol
>> *varlistentry
- >> eps_p [actions.variablelist]
+ >> classic::eps_p [actions.variablelist]
             ;
 
         varlistentry =
             space
- >> ch_p('[') [actions.start_varlistentry]
+ >> classic::ch_p('[') [actions.start_varlistentry]
>>
             (
                 (
                     varlistterm
>> +varlistitem
- >> ch_p(']') [actions.end_varlistentry]
+ >> classic::ch_p(']') [actions.end_varlistentry]
>> space
                 )
- | eps_p [actions.error]
+ | classic::eps_p [actions.error]
             )
             ;
 
         varlistterm =
             space
- >> ch_p('[') [actions.start_varlistterm]
+ >> classic::ch_p('[') [actions.start_varlistterm]
>>
             (
                 (
                     phrase
- >> ch_p(']') [actions.end_varlistterm]
+ >> classic::ch_p(']') [actions.end_varlistterm]
>> space
                 )
- | eps_p [actions.error]
+ | classic::eps_p [actions.error]
             )
             ;
 
         varlistitem =
             space
- >> ch_p('[') [actions.start_varlistitem]
+ >> classic::ch_p('[') [actions.start_varlistitem]
>>
             (
                 (
                     inside_paragraph
- >> ch_p(']') [actions.end_varlistitem]
+ >> classic::ch_p(']') [actions.end_varlistitem]
>> space
                 )
- | eps_p [actions.error]
+ | classic::eps_p [actions.error]
             )
             ;
 
         table =
             "table"
- >> (eps_p(*blank_p >> eol_p) | hard_space)
+ >> (classic::eps_p(*classic::blank_p >> classic::eol_p) | hard_space)
>> element_id_1_5
- >> (eps_p(*blank_p >> eol_p) | space)
- >> (*(anychar_p - eol)) [assign_a(actions.table_title)]
+ >> (classic::eps_p(*classic::blank_p >> classic::eol_p) | space)
+ >> (*(classic::anychar_p - eol)) [classic::assign_a(actions.table_title)]
>> +eol
>> *table_row
- >> eps_p [actions.table]
+ >> classic::eps_p [actions.table]
             ;
 
         table_row =
             space
- >> ch_p('[') [actions.start_row]
+ >> classic::ch_p('[') [actions.start_row]
>>
             (
                 (
                     *table_cell
- >> ch_p(']') [actions.end_row]
+ >> classic::ch_p(']') [actions.end_row]
>> space
                 )
- | eps_p [actions.error]
+ | classic::eps_p [actions.error]
             )
             ;
 
         table_cell =
             space
- >> ch_p('[') [actions.start_cell]
+ >> classic::ch_p('[') [actions.start_cell]
>>
             (
                 (
                     inside_paragraph
- >> ch_p(']') [actions.end_cell]
+ >> classic::ch_p(']') [actions.end_cell]
>> space
                 )
- | eps_p [actions.error]
+ | classic::eps_p [actions.error]
             )
             ;
 
         xinclude =
                "xinclude"
>> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     phrase_end)) [actions.xinclude]
             ;
 
         import =
                "import"
>> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     phrase_end)) [actions.import]
             ;
 
@@ -353,10 +355,10 @@
>>
            !(
                 ':'
- >> (*((alnum_p | '_') - space_p))[assign_a(actions.include_doc_id)]
+ >> (*((classic::alnum_p | '_') - classic::space_p))[classic::assign_a(actions.include_doc_id)]
>> space
             )
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     phrase_end)) [actions.include]
             ;
 
@@ -369,24 +371,24 @@
             ;
 
         code_line =
- ((ch_p(' ') | '\t'))
- >> *(anychar_p - eol) >> eol
+ ((classic::ch_p(' ') | '\t'))
+ >> *(classic::anychar_p - eol) >> eol
             ;
 
         list =
- eps_p(ch_p('*') | '#') >>
+ classic::eps_p(classic::ch_p('*') | '#') >>
            +(
- (*blank_p
- >> (ch_p('*') | '#')) [actions.list_format]
- >> *blank_p
+ (*classic::blank_p
+ >> (classic::ch_p('*') | '#')) [actions.list_format]
+ >> *classic::blank_p
>> list_item
             ) [actions.list_item]
             ;
 
         list_item =
            *( common
- | (anychar_p -
- ( eol_p >> *blank_p >> eps_p(ch_p('*') | '#')
+ | (classic::anychar_p -
+ ( classic::eol_p >> *classic::blank_p >> classic::eps_p(classic::ch_p('*') | '#')
                     | (eol >> eol)
                     )
                 ) [actions.plain_char]
@@ -407,17 +409,17 @@
 
         paragraph =
            *( common
- | (anychar_p - // Make sure we don't go past
+ | (classic::anychar_p - // Make sure we don't go past
                     paragraph_end // a single block.
                 ) [actions.plain_char]
             )
- >> (eps_p('[') | +eol)
+ >> (classic::eps_p('[') | +eol)
             ;
 
         phrase =
            *( common
             | comment
- | (anychar_p -
+ | (classic::anychar_p -
                     phrase_end) [actions.plain_char]
             )
             ;

Modified: branches/quickbook-1.5-spirit2/code_snippet.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/code_snippet.hpp (original)
+++ branches/quickbook-1.5-spirit2/code_snippet.hpp 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -26,18 +26,18 @@
     
         start_ =
             +(
- snippet [boost::bind(&actions_type::compile, &actions, _1, _2)]
- | anychar_p
+ snippet [boost::bind(&actions_type::compile, &actions, _1, _2)]
+ | classic::anychar_p
             )
             ;
 
         identifier =
- (alpha_p | '_') >> *(alnum_p | '_')
+ (classic::alpha_p | '_') >> *(classic::alnum_p | '_')
             ;
 
         snippet =
- "#[" >> *space_p
- >> identifier [assign_a(actions.id)]
+ "#[" >> *classic::space_p
+ >> identifier [classic::assign_a(actions.id)]
>> (*(code_elements - "#]"))
>> "#]"
             ;
@@ -45,27 +45,28 @@
         code_elements =
                 escaped_comment
             | ignore
- | (anychar_p - "#]") [boost::bind(&actions_type::pass_thru, &actions, _1, _2)]
+ | (classic::anychar_p - "#]") [boost::bind(&actions_type::pass_thru, &actions, _1, _2)]
             ;
 
         ignore =
- *blank_p >> "#<-"
- >> (*(anychar_p - "#->"))
- >> "#->" >> *blank_p >> eol_p
+ *classic::blank_p >> "#<-"
+ >> (*(classic::anychar_p - "#->"))
+ >> "#->" >> *classic::blank_p >> classic::eol_p
             | "\"\"\"<-\"\"\""
- >> (*(anychar_p - "\"\"\"->\"\"\""))
+ >> (*(classic::anychar_p - "\"\"\"->\"\"\""))
>> "\"\"\"->\"\"\""
             | "\"\"\"<-"
- >> (*(anychar_p - "->\"\"\""))
+ >> (*(classic::anychar_p - "->\"\"\""))
>> "->\"\"\""
             ;
 
         escaped_comment =
- *space_p >> "#`"
- >> ((*(anychar_p - eol_p))
- >> eol_p) [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)]
- | *space_p >> "\"\"\"`"
- >> (*(anychar_p - "\"\"\"")) [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)]
+ *classic::space_p >> "#`"
+ >> ((*(classic::anychar_p - classic::eol_p))
+ >> classic::eol_p) [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)]
+ | *classic::space_p >> "\"\"\"`"
+ >> (*(classic::anychar_p - "\"\"\""))
+ [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)]
>> "\"\"\""
             ;
     }
@@ -78,24 +79,24 @@
     
         start_ =
             +(
- snippet [boost::bind(&actions_type::compile, &actions, _1, _2)]
- | anychar_p
+ snippet [boost::bind(&actions_type::compile, &actions, _1, _2)]
+ | classic::anychar_p
             )
             ;
 
         identifier =
- (alpha_p | '_') >> *(alnum_p | '_')
+ (classic::alpha_p | '_') >> *(classic::alnum_p | '_')
             ;
 
         snippet =
- "//[" >> *space_p
- >> identifier [assign_a(actions.id)]
+ "//[" >> *classic::space_p
+ >> identifier [classic::assign_a(actions.id)]
>> (*(code_elements - "//]"))
>> "//]"
             |
- "/*[" >> *space_p
- >> identifier [assign_a(actions.id)]
- >> *space_p >> "*/"
+ "/*[" >> *classic::space_p
+ >> identifier [classic::assign_a(actions.id)]
+ >> *classic::space_p >> "*/"
>> (*(code_elements - "/*]*"))
>> "/*]*/"
             ;
@@ -105,40 +106,42 @@
             | ignore
             | line_callout
             | inline_callout
- | (anychar_p - "//]" - "/*]*/") [boost::bind(&actions_type::pass_thru, &actions, _1, _2)]
+ | (classic::anychar_p - "//]" - "/*]*/")
+ [boost::bind(&actions_type::pass_thru, &actions, _1, _2)]
             ;
 
         inline_callout =
             "/*<"
- >> (*(anychar_p - ">*/")) [boost::bind(&actions_type::inline_callout, &actions, _1, _2)]
+ >> (*(classic::anychar_p - ">*/")) [boost::bind(&actions_type::inline_callout, &actions, _1, _2)]
>> ">*/"
             ;
 
         line_callout =
             "/*<<"
- >> (*(anychar_p - ">>*/")) [boost::bind(&actions_type::line_callout, &actions, _1, _2)]
+ >> (*(classic::anychar_p - ">>*/")) [boost::bind(&actions_type::line_callout, &actions, _1, _2)]
>> ">>*/"
- >> *space_p
+ >> *classic::space_p
             ;
 
         ignore =
- *blank_p >> "//<-"
- >> (*(anychar_p - "//->"))
- >> "//->" >> *blank_p >> eol_p
+ *classic::blank_p >> "//<-"
+ >> (*(classic::anychar_p - "//->"))
+ >> "//->" >> *classic::blank_p >> classic::eol_p
             | "/*<-*/"
- >> (*(anychar_p - "/*->*/"))
+ >> (*(classic::anychar_p - "/*->*/"))
>> "/*->*/"
             | "/*<-"
- >> (*(anychar_p - "->*/"))
+ >> (*(classic::anychar_p - "->*/"))
>> "->*/"
             ;
 
         escaped_comment =
- *space_p >> "//`"
- >> ((*(anychar_p - eol_p))
- >> eol_p) [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)]
- | *space_p >> "/*`"
- >> (*(anychar_p - "*/")) [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)]
+ *classic::space_p >> "//`"
+ >> ((*(classic::anychar_p - classic::eol_p))
+ >> classic::eol_p) [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)]
+ | *classic::space_p >> "/*`"
+ >> (*(classic::anychar_p - "*/"))
+ [boost::bind(&actions_type::escaped_comment, &actions, _1, _2)]
>> "*/"
             ;
     }

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 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -1216,7 +1216,7 @@
         if (err != 0)
             return err; // return early on error
 
- typedef position_iterator<std::string::const_iterator> iterator_type;
+ typedef classic::position_iterator<std::string::const_iterator> iterator_type;
         iterator_type first(code.begin(), code.end(), file);
         iterator_type last(code.end(), code.end());
 

Modified: branches/quickbook-1.5-spirit2/detail/actions.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/actions.hpp (original)
+++ branches/quickbook-1.5-spirit2/detail/actions.hpp 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -32,11 +32,11 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ using namespace boost::spirit;
 
     namespace fs = boost::filesystem;
- typedef position_iterator<std::string::const_iterator> iterator;
- typedef symbols<std::string> string_symbols;
+ typedef classic::position_iterator<std::string::const_iterator> iterator;
+ typedef classic::symbols<std::string> string_symbols;
     typedef std::map<std::string, std::string> attribute_map;
 
     struct actions;

Modified: branches/quickbook-1.5-spirit2/detail/actions_class.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/actions_class.hpp (original)
+++ branches/quickbook-1.5-spirit2/detail/actions_class.hpp 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -15,7 +15,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ using namespace boost::spirit;
     namespace fs = boost::filesystem;
 
     struct actions

Modified: branches/quickbook-1.5-spirit2/detail/post_process.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/post_process.cpp (original)
+++ branches/quickbook-1.5-spirit2/detail/post_process.cpp 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -16,7 +16,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ using namespace boost::spirit;
     using boost::bind;
     typedef std::string::const_iterator iter_type;
 
@@ -254,7 +254,7 @@
         std::string current_tag;
     };
 
- struct tidy_grammar : grammar<tidy_grammar>
+ struct tidy_grammar : classic::grammar<tidy_grammar>
     {
         tidy_grammar(tidy_compiler& state, int indent)
             : state(state), indent(indent) {}
@@ -264,11 +264,11 @@
         {
             definition(tidy_grammar const& self)
             {
- tag = (lexeme_d[+(alpha_p | '_' | ':')]) [bind(&tidy_grammar::do_tag, &self, _1, _2)];
+ tag = (classic::lexeme_d[+(classic::alpha_p | '_' | ':')]) [bind(&tidy_grammar::do_tag, &self, _1, _2)];
 
                 code =
                         "<programlisting>"
- >> *(anychar_p - "</programlisting>")
+ >> *(classic::anychar_p - "</programlisting>")
>> "</programlisting>"
                     ;
 
@@ -277,30 +277,30 @@
                 // otherwise consumed by the space_p skipper.
 
                 escape =
- str_p("<!--quickbook-escape-prefix-->") >>
- (*(anychar_p - str_p("<!--quickbook-escape-postfix-->")))
+ classic::str_p("<!--quickbook-escape-prefix-->") >>
+ (*(classic::anychar_p - classic::str_p("<!--quickbook-escape-postfix-->")))
                     [
                         bind(&tidy_grammar::do_escape, &self, _1, _2)
                     ]
- >> lexeme_d
+ >> classic::lexeme_d
                         [
- str_p("<!--quickbook-escape-postfix-->") >>
- (*space_p)
+ classic::str_p("<!--quickbook-escape-postfix-->") >>
+ (*classic::space_p)
                             [
                                 bind(&tidy_grammar::do_escape_post, &self, _1, _2)
                             ]
                         ]
                     ;
 
- start_tag = '<' >> tag >> *(anychar_p - '>') >> lexeme_d['>' >> *space_p];
+ start_tag = '<' >> tag >> *(classic::anychar_p - '>') >> classic::lexeme_d['>' >> *classic::space_p];
                 start_end_tag =
- '<' >> tag >> *(anychar_p - ("/>" | ch_p('>'))) >> lexeme_d["/>" >> *space_p]
- | "<?" >> tag >> *(anychar_p - '?') >> lexeme_d["?>" >> *space_p]
- | "<!--" >> *(anychar_p - "-->") >> lexeme_d["-->" >> *space_p]
- | "<!" >> tag >> *(anychar_p - '>') >> lexeme_d['>' >> *space_p]
+ '<' >> tag >> *(classic::anychar_p - ("/>" | classic::ch_p('>'))) >> classic::lexeme_d["/>" >> *classic::space_p]
+ | "<?" >> tag >> *(classic::anychar_p - '?') >> classic::lexeme_d["?>" >> *classic::space_p]
+ | "<!--" >> *(classic::anychar_p - "-->") >> classic::lexeme_d["-->" >> *classic::space_p]
+ | "<!" >> tag >> *(classic::anychar_p - '>') >> classic::lexeme_d['>' >> *classic::space_p]
                     ;
- content = lexeme_d[ +(anychar_p - '<') ];
- end_tag = "</" >> +(anychar_p - '>') >> lexeme_d['>' >> *space_p];
+ content = classic::lexeme_d[ +(classic::anychar_p - '<') ];
+ end_tag = "</" >> +(classic::anychar_p - '>') >> classic::lexeme_d['>' >> *classic::space_p];
 
                 markup =
                         escape
@@ -314,10 +314,11 @@
                 tidy = +markup;
             }
 
- rule<Scanner> const&
+ classic::rule<Scanner> const&
             start() { return tidy; }
 
- rule<Scanner> tidy, tag, start_tag, start_end_tag,
+ classic::rule<Scanner>
+ tidy, tag, start_tag, start_end_tag,
                             content, end_tag, markup, code, escape;
         };
 
@@ -433,7 +434,7 @@
             std::string tidy;
             tidy_compiler state(tidy, linewidth);
             tidy_grammar g(state, indent);
- parse_info<iter_type> r = parse(in.begin(), in.end(), g, space_p);
+ classic::parse_info<iter_type> r = parse(in.begin(), in.end(), g, classic::space_p);
             if (r.full)
             {
                 out << tidy;

Modified: branches/quickbook-1.5-spirit2/detail/quickbook.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/quickbook.cpp (original)
+++ branches/quickbook-1.5-spirit2/detail/quickbook.cpp 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -32,7 +32,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ using namespace boost::spirit;
     namespace fs = boost::filesystem;
     tm* current_time; // the current time
     tm* current_gm_time; // the current UTC time
@@ -62,12 +62,12 @@
             return err;
         }
 
- typedef position_iterator<std::string::const_iterator> iterator_type;
+ typedef classic::position_iterator<std::string::const_iterator> iterator_type;
         iterator_type first(storage.begin(), storage.end(), filein_);
         iterator_type last(storage.end(), storage.end());
 
         doc_info_grammar<actions> l(actor);
- parse_info<iterator_type> info = parse(first, last, l);
+ classic::parse_info<iterator_type> info = parse(first, last, l);
 
         if (info.hit || ignore_docinfo)
         {
@@ -83,7 +83,7 @@
 
         if (!info.full)
         {
- file_position const pos = info.stop.get_position();
+ classic::file_position const pos = info.stop.get_position();
             detail::outerr(pos.file,pos.line)
                 << "Syntax Error near column " << pos.column << ".\n";
             ++actor.error_count;

Modified: branches/quickbook-1.5-spirit2/doc_info.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/doc_info.hpp (original)
+++ branches/quickbook-1.5-spirit2/doc_info.hpp 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -19,7 +19,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ using namespace boost::spirit;
 
     template <typename Actions>
     template <typename Scanner>
@@ -38,12 +38,13 @@
         doc_info =
             space
>> '[' >> space
- >> (doc_types >> eps_p) [assign_a(actions.doc_type)]
+ >> (doc_types >> classic::eps_p)
+ [classic::assign_a(actions.doc_type)]
>> hard_space
- >> ( *(anychar_p -
- (ch_p('[') | ']' | eol_p)
+ >> ( *(classic::anychar_p -
+ (classic::ch_p('[') | ']' | classic::eol_p)
                     )
- ) [assign_a(actions.doc_title)]
+ ) [classic::assign_a(actions.doc_title)]
>> !(
                     space >> '[' >>
                         quickbook_version
@@ -56,7 +57,7 @@
                       doc_version
                     | doc_id
                     | doc_dirname
- | doc_copyright [push_back_a(actions.doc_copyrights, copyright)]
+ | doc_copyright [classic::push_back_a(actions.doc_copyrights, copyright)]
                     | doc_purpose [actions.extract_doc_purpose]
                     | doc_category
                     | doc_authors
@@ -64,105 +65,114 @@
                     | doc_last_revision
                     | doc_source_mode
                     )
- >> space >> ']' >> +eol_p
+ >> space >> ']' >> +classic::eol_p
                 )
- >> space >> ']' >> +eol_p
+ >> space >> ']' >> +classic::eol_p
             ;
 
         quickbook_version =
                 "quickbook" >> hard_space
- >> ( uint_p [assign_a(qbk_major_version)]
+ >> ( classic::uint_p [classic::assign_a(qbk_major_version)]
>> '.'
- >> uint2_t() [assign_a(qbk_minor_version)]
+ >> uint2_t() [classic::assign_a(qbk_minor_version)]
                 )
             ;
 
         doc_version =
                 "version" >> hard_space
- >> (*(anychar_p - ']')) [assign_a(actions.doc_version)]
+ >> (*(classic::anychar_p - ']'))
+ [classic::assign_a(actions.doc_version)]
             ;
 
         doc_id =
                 "id" >> hard_space
- >> (*(anychar_p - ']')) [assign_a(actions.doc_id)]
+ >> (*(classic::anychar_p - ']'))
+ [classic::assign_a(actions.doc_id)]
             ;
 
         doc_dirname =
                 "dirname" >> hard_space
- >> (*(anychar_p - ']')) [assign_a(actions.doc_dirname)]
+ >> (*(classic::anychar_p - ']'))
+ [classic::assign_a(actions.doc_dirname)]
             ;
 
         doc_copyright =
- "copyright" >> hard_space [clear_a(copyright.first)]
- >> +( repeat_p(4)[digit_p] [push_back_a(copyright.first)]
+ "copyright" >> hard_space [classic::clear_a(copyright.first)]
+ >> +( classic::repeat_p(4)[classic::digit_p]
+ [classic::push_back_a(copyright.first)]
>> space
                 )
>> space
- >> (*(anychar_p - ']')) [assign_a(copyright.second)]
+ >> (*(classic::anychar_p - ']'))
+ [classic::assign_a(copyright.second)]
             ;
 
         doc_purpose =
                 "purpose" >> hard_space
- >> phrase [assign_a(actions.doc_purpose_1_1)]
+ >> phrase [classic::assign_a(actions.doc_purpose_1_1)]
             ;
 
         doc_category =
                 "category" >> hard_space
- >> (*(anychar_p - ']')) [assign_a(actions.doc_category)]
+ >> (*(classic::anychar_p - ']'))
+ [classic::assign_a(actions.doc_category)]
             ;
 
         doc_author =
                 space
>> '[' >> space
- >> (*(anychar_p - ',')) [assign_a(name.second)] // surname
+ >> (*(classic::anychar_p - ','))
+ [classic::assign_a(name.second)] // surname
>> ',' >> space
- >> (*(anychar_p - ']')) [assign_a(name.first)] // firstname
+ >> (*(classic::anychar_p - ']'))
+ [classic::assign_a(name.first)] // firstname
>> ']'
             ;
 
         doc_authors =
                 "authors" >> hard_space
- >> doc_author [push_back_a(actions.doc_authors, name)]
+ >> doc_author [classic::push_back_a(actions.doc_authors, name)]
>> *( ','
- >> doc_author [push_back_a(actions.doc_authors, name)]
+ >> doc_author [classic::push_back_a(actions.doc_authors, name)]
                 )
             ;
 
         doc_license =
                 "license" >> hard_space
- >> phrase [assign_a(actions.doc_license_1_1)]
+ >> phrase [classic::assign_a(actions.doc_license_1_1)]
             ;
 
         doc_last_revision =
                 "last-revision" >> hard_space
- >> (*(anychar_p - ']')) [assign_a(actions.doc_last_revision)]
+ >> (*(classic::anychar_p - ']'))[classic::assign_a(actions.doc_last_revision)]
             ;
 
         doc_source_mode =
                 "source-mode" >> hard_space
>> (
- str_p("c++")
+ classic::str_p("c++")
                 | "python"
                 | "teletype"
- ) [assign_a(actions.source_mode)]
+ ) [classic::assign_a(actions.source_mode)]
             ;
 
         comment =
- "[/" >> *(anychar_p - ']') >> ']'
+ "[/" >> *(classic::anychar_p - ']') >> ']'
             ;
 
         space =
- *(space_p | comment)
+ *(classic::space_p | comment)
             ;
 
         hard_space =
- (eps_p - (alnum_p | '_')) >> space // must not be preceded by
+ (classic::eps_p - (classic::alnum_p | '_')) >> space
+ // must not be preceded by
             ; // alpha-numeric or underscore
 
         phrase =
            *( common
             | comment
- | (anychar_p - ']') [actions.plain_char]
+ | (classic::anychar_p - ']') [actions.plain_char]
             )
             ;
     }

Modified: branches/quickbook-1.5-spirit2/grammars.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/grammars.hpp (original)
+++ branches/quickbook-1.5-spirit2/grammars.hpp 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -17,10 +17,10 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ using namespace boost::spirit;
 
     template <typename Actions>
- struct phrase_grammar : grammar<phrase_grammar<Actions> >
+ struct phrase_grammar : classic::grammar<phrase_grammar<Actions> >
     {
         phrase_grammar(Actions& actions, bool& no_eols)
             : no_eols(no_eols), actions(actions) {}
@@ -30,7 +30,8 @@
         {
             definition(phrase_grammar const& self);
 
- rule<Scanner> space, blank, comment, phrase, phrase_markup, image,
+ classic::rule<Scanner>
+ space, blank, comment, phrase, phrase_markup, image,
                             phrase_end, bold, italic, underline, teletype,
                             strikethrough, escape, url, common, funcref, classref,
                             memberref, enumref, macroref, headerref, conceptref, globalref,
@@ -44,7 +45,7 @@
                             template_inner_arg_1_5, brackets_1_5
                             ;
 
- rule<Scanner> const&
+ classic::rule<Scanner> const&
             start() const { return common; }
         };
 
@@ -54,7 +55,7 @@
 
     template <typename Actions>
     struct simple_phrase_grammar
- : public grammar<simple_phrase_grammar<Actions> >
+ : public classic::grammar<simple_phrase_grammar<Actions> >
     {
         simple_phrase_grammar(Actions& actions)
             : actions(actions) {}
@@ -65,10 +66,10 @@
             definition(simple_phrase_grammar const& self);
 
             bool unused;
- rule<Scanner> phrase, comment, dummy_block;
+ classic::rule<Scanner> phrase, comment, dummy_block;
             phrase_grammar<Actions> common;
 
- rule<Scanner> const&
+ classic::rule<Scanner> const&
             start() const { return phrase; }
         };
 
@@ -76,7 +77,7 @@
     };
 
     template <typename Actions, bool skip_initial_spaces = false>
- struct block_grammar : grammar<block_grammar<Actions> >
+ struct block_grammar : classic::grammar<block_grammar<Actions> >
     {
         block_grammar(Actions& actions_)
             : actions(actions_) {}
@@ -88,7 +89,8 @@
 
             bool no_eols;
 
- rule<Scanner> start_, blocks, block_markup, code, code_line,
+ classic::rule<Scanner>
+ start_, blocks, block_markup, code, code_line,
                             paragraph, space, blank, comment, headings, h, h1, h2,
                             h3, h4, h5, h6, hr, blurb, blockquote, admonition,
                             phrase, list, phrase_end, ordered_list, def_macro,
@@ -100,11 +102,12 @@
                             template_body, identifier, dummy_block, import,
                             inside_paragraph, element_id, element_id_1_5;
 
- symbols<> paragraph_end_markups;
+ classic::symbols<>
+ paragraph_end_markups;
 
             phrase_grammar<Actions> common;
 
- rule<Scanner> const&
+ classic::rule<Scanner> const&
             start() const { return start_; }
         };
 
@@ -113,7 +116,7 @@
 
     template <typename Actions>
     struct doc_info_grammar
- : public grammar<doc_info_grammar<Actions> >
+ : public classic::grammar<doc_info_grammar<Actions> >
     {
         doc_info_grammar(Actions& actions)
             : actions(actions) {}
@@ -121,34 +124,33 @@
         template <typename Scanner>
         struct definition
         {
- typedef uint_parser<int, 10, 1, 2> uint2_t;
+ typedef classic::uint_parser<int, 10, 1, 2> uint2_t;
 
             definition(doc_info_grammar const& self);
             bool unused;
             std::pair<std::string, std::string> name;
             std::pair<std::vector<std::string>, std::string> copyright;
- rule<Scanner> doc_info, doc_title, doc_version, doc_id, doc_dirname,
+ classic::rule<Scanner>
+ doc_info, doc_title, doc_version, doc_id, doc_dirname,
                             doc_copyright, doc_purpose,doc_category, doc_authors,
                             doc_author, comment, space, hard_space, doc_license,
                             doc_last_revision, doc_source_mode, phrase, quickbook_version;
             phrase_grammar<Actions> common;
- symbols<> doc_types;
+ classic::symbols<> doc_types;
 
- rule<Scanner> const&
+ classic::rule<Scanner> const&
             start() const { return doc_info; }
         };
 
         Actions& actions;
     };
 
- // TODO: Duplice definition:
+ // TODO: Duplicate definition:
     
- typedef position_iterator<std::string::const_iterator> iterator;
-
     struct code_snippet_actions;
 
     struct python_code_snippet_grammar
- : grammar<python_code_snippet_grammar>
+ : classic::grammar<python_code_snippet_grammar>
     {
         typedef code_snippet_actions actions_type;
   
@@ -163,11 +165,11 @@
             
             definition(python_code_snippet_grammar const& self);
 
- rule<Scanner>
+ classic::rule<Scanner>
                 start_, snippet, identifier, code_elements, escaped_comment,
                 inline_callout, line_callout, ignore;
 
- rule<Scanner> const&
+ classic::rule<Scanner> const&
             start() const { return start_; }
         };
 
@@ -175,7 +177,7 @@
     };
 
     struct cpp_code_snippet_grammar
- : grammar<cpp_code_snippet_grammar>
+ : classic::grammar<cpp_code_snippet_grammar>
     {
         typedef code_snippet_actions actions_type;
   
@@ -188,11 +190,11 @@
         {
             definition(cpp_code_snippet_grammar const& self);
 
- rule<Scanner>
+ classic::rule<Scanner>
                 start_, snippet, identifier, code_elements, escaped_comment,
                 inline_callout, line_callout, ignore;
 
- rule<Scanner> const&
+ classic::rule<Scanner> const&
             start() const { return start_; }
         };
 

Modified: branches/quickbook-1.5-spirit2/phrase.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/phrase.hpp (original)
+++ branches/quickbook-1.5-spirit2/phrase.hpp 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -22,7 +22,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ using namespace boost::spirit;
 
     template <typename Rule, typename Action>
     inline void
@@ -37,20 +37,21 @@
             mark >>
             (
                 (
- graph_p // A single char. e.g. *c*
- >> eps_p(mark
- >> (space_p | punct_p | end_p))
+ classic::graph_p // A single char. e.g. *c*
+ >> classic::eps_p(mark
+ >> (classic::space_p | classic::punct_p | classic::end_p))
                                                 // space_p, punct_p or end_p
                 ) // must follow mark
             |
- ( graph_p >> // graph_p must follow mark
- *(anychar_p -
- ( (graph_p >> mark) // Make sure that we don't go
+ ( classic::graph_p >> // graph_p must follow mark
+ *(classic::anychar_p -
+ ( (classic::graph_p >> mark)
+ // Make sure that we don't go
                         | close // past a single block
                         )
- ) >> graph_p // graph_p must precede mark
- >> eps_p(mark
- >> (space_p | punct_p | end_p))
+ ) >> classic::graph_p // graph_p must precede mark
+ >> classic::eps_p(mark
+ >> (classic::space_p | classic::punct_p | classic::end_p))
                                                 // space_p, punct_p or end_p
                 ) // must follow mark
             ) [action]
@@ -67,34 +68,35 @@
         Actions& actions = self.actions;
 
         space =
- *(space_p | comment)
+ *(classic::space_p | comment)
             ;
 
         blank =
- *(blank_p | comment)
+ *(classic::blank_p | comment)
             ;
 
- eol = blank >> eol_p
+ eol = blank >> classic::eol_p
             ;
 
         phrase_end =
             ']' |
- if_p(var(self.no_eols))
+ classic::if_p(var(self.no_eols))
             [
                 eol >> eol // Make sure that we don't go
             ] // past a single block, except
             ; // when preformatted.
 
         hard_space =
- (eps_p - (alnum_p | '_')) >> space // must not be preceded by
+ (classic::eps_p - (classic::alnum_p | '_')) >> space
+ // must not be preceded by
             ; // alpha-numeric or underscore
 
         comment =
- "[/" >> *(dummy_block | (anychar_p - ']')) >> ']'
+ "[/" >> *(dummy_block | (classic::anychar_p - ']')) >> ']'
             ;
 
         dummy_block =
- '[' >> *(dummy_block | (anychar_p - ']')) >> ']'
+ '[' >> *(dummy_block | (classic::anychar_p - ']')) >> ']'
             ;
 
         common =
@@ -108,8 +110,9 @@
             ;
 
         macro =
- eps_p(actions.macro // must not be followed by
- >> (eps_p - (alpha_p | '_'))) // alpha or underscore
+ classic::eps_p(actions.macro // must not be followed by
+ // alpha or underscore
+ >> (classic::eps_p - (classic::alpha_p | '_')))
>> actions.macro [actions.do_macro]
             ;
 
@@ -118,28 +121,28 @@
 
         template_ =
             (
- ch_p('`') [assign_a(actions.template_escape,true_)]
+ classic::ch_p('`') [classic::assign_a(actions.template_escape,true_)]
                 |
- eps_p [assign_a(actions.template_escape,false_)]
+ classic::eps_p [classic::assign_a(actions.template_escape,false_)]
             )
>>
             ( (
- (eps_p(punct_p)
+ (classic::eps_p(classic::punct_p)
>> actions.templates.scope
- ) [push_back_a(actions.template_info)]
+ ) [classic::push_back_a(actions.template_info)]
>> !template_args
             ) | (
                 (actions.templates.scope
- >> eps_p
- ) [push_back_a(actions.template_info)]
+ >> classic::eps_p
+ ) [classic::push_back_a(actions.template_info)]
>> !(hard_space
>> template_args)
             ) )
- >> eps_p(']')
+ >> classic::eps_p(']')
             ;
 
         template_args =
- if_p(qbk_since(105u)) [
+ classic::if_p(qbk_since(105u)) [
                 template_args_1_5
             ].else_p [
                 template_args_1_4
@@ -147,14 +150,14 @@
             ;
 
         template_args_1_4 =
- template_arg_1_4 [push_back_a(actions.template_info)]
+ template_arg_1_4 [classic::push_back_a(actions.template_info)]
>> *(
- ".." >> template_arg_1_4 [push_back_a(actions.template_info)]
+ ".." >> template_arg_1_4 [classic::push_back_a(actions.template_info)]
                 )
             ;
 
         template_arg_1_4 =
- +(brackets_1_4 | (anychar_p - (str_p("..") | ']')))
+ +(brackets_1_4 | (classic::anychar_p - (classic::str_p("..") | ']')))
             ;
 
         brackets_1_4 =
@@ -162,18 +165,18 @@
             ;
 
         template_args_1_5 =
- template_arg_1_5 [push_back_a(actions.template_info)]
+ template_arg_1_5 [classic::push_back_a(actions.template_info)]
>> *(
- ".." >> template_arg_1_5 [push_back_a(actions.template_info)]
+ ".." >> template_arg_1_5 [classic::push_back_a(actions.template_info)]
                 )
             ;
 
         template_arg_1_5 =
- +(brackets_1_5 | ('\\' >> anychar_p) | (anychar_p - (str_p("..") | '[' | ']')))
+ +(brackets_1_5 | ('\\' >> classic::anychar_p) | (classic::anychar_p - (classic::str_p("..") | '[' | ']')))
             ;
 
         template_inner_arg_1_5 =
- +(brackets_1_5 | ('\\' >> anychar_p) | (anychar_p - (str_p('[') | ']')))
+ +(brackets_1_5 | ('\\' >> classic::anychar_p) | (classic::anychar_p - (classic::str_p('[') | ']')))
             ;
 
         brackets_1_5 =
@@ -183,11 +186,11 @@
         inline_code =
             '`' >>
             (
- *(anychar_p -
+ *(classic::anychar_p -
                     ( '`'
                     | (eol >> eol) // Make sure that we don't go
                     ) // past a single block
- ) >> eps_p('`')
+ ) >> classic::eps_p('`')
             ) [actions.inline_code]
>> '`'
             ;
@@ -196,16 +199,16 @@
                 (
                     "```" >>
                     (
- *(anychar_p - "```")
- >> eps_p("```")
+ *(classic::anychar_p - "```")
+ >> classic::eps_p("```")
                     ) [actions.code_block]
>> "```"
                 )
             | (
                     "``" >>
                     (
- *(anychar_p - "``")
- >> eps_p("``")
+ *(classic::anychar_p - "``")
+ >> classic::eps_p("``")
                     ) [actions.code_block]
>> "``"
                 )
@@ -230,7 +233,8 @@
         phrase =
            *( common
             | comment
- | (anychar_p - phrase_end) [actions.plain_char]
+ | (classic::anychar_p - phrase_end)
+ [actions.plain_char]
             )
             ;
 
@@ -259,24 +263,25 @@
                 | replaceable
                 | footnote
                 | template_ [actions.do_template]
- | str_p("br") [actions.break_]
+ | classic::str_p("br") [actions.break_]
                 )
>> ']'
             ;
 
         escape =
- str_p("\\n") [actions.break_]
+ classic::str_p("\\n") [actions.break_]
             | "\\ " // ignore an escaped char
- | '\\' >> punct_p [actions.raw_char]
+ | '\\' >> classic::punct_p [actions.raw_char]
             | (
                     ("'''" >> !eol) [actions.escape_pre]
- >> *(anychar_p - "'''") [actions.raw_char]
- >> str_p("'''") [actions.escape_post]
+ >> *(classic::anychar_p - "'''")
+ [actions.raw_char]
+ >> classic::str_p("'''") [actions.escape_post]
                 )
             ;
 
         macro_identifier =
- +(anychar_p - (space_p | ']'))
+ +(classic::anychar_p - (classic::space_p | ']'))
             ;
 
         cond_phrase =
@@ -286,43 +291,43 @@
             ;
 
         image =
- '$' >> blank [clear_a(actions.attributes)]
- >> if_p(qbk_since(105u)) [
+ '$' >> blank [classic::clear_a(actions.attributes)]
+ >> classic::if_p(qbk_since(105u)) [
                         (+(
- *space_p
- >> +(anychar_p - (space_p | phrase_end | '['))
- )) [assign_a(actions.image_fileref)]
+ *classic::space_p
+ >> +(classic::anychar_p - (classic::space_p | phrase_end | '['))
+ )) [classic::assign_a(actions.image_fileref)]
>> hard_space
>> *(
                             '['
- >> (*(alnum_p | '_')) [assign_a(actions.attribute_name)]
+ >> (*(classic::alnum_p | '_')) [classic::assign_a(actions.attribute_name)]
>> space
- >> (*(anychar_p - (phrase_end | '[')))
+ >> (*(classic::anychar_p - (phrase_end | '[')))
                                                 [actions.attribute]
>> ']'
>> space
                         )
                 ].else_p [
- (*(anychar_p -
- phrase_end)) [assign_a(actions.image_fileref)]
+ (*(classic::anychar_p -
+ phrase_end)) [classic::assign_a(actions.image_fileref)]
                 ]
- >> eps_p(']') [actions.image]
+ >> classic::eps_p(']') [actions.image]
             ;
             
         url =
                 '@'
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     (']' | hard_space))) [actions.url_pre]
- >> ( eps_p(']')
+ >> ( classic::eps_p(']')
                 | (hard_space >> phrase)
                 ) [actions.url_post]
             ;
 
         link =
                 "link" >> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     (']' | hard_space))) [actions.link_pre]
- >> ( eps_p(']')
+ >> ( classic::eps_p(']')
                 | (hard_space >> phrase)
                 ) [actions.link_post]
             ;
@@ -330,128 +335,128 @@
         anchor =
                 '#'
>> blank
- >> ( *(anychar_p -
+ >> ( *(classic::anychar_p -
                         phrase_end)
                 ) [actions.anchor]
             ;
 
         funcref =
             "funcref" >> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     (']' | hard_space))) [actions.funcref_pre]
- >> ( eps_p(']')
+ >> ( classic::eps_p(']')
                 | (hard_space >> phrase)
                 ) [actions.funcref_post]
             ;
 
         classref =
             "classref" >> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     (']' | hard_space))) [actions.classref_pre]
- >> ( eps_p(']')
+ >> ( classic::eps_p(']')
                 | (hard_space >> phrase)
                 ) [actions.classref_post]
             ;
 
         memberref =
             "memberref" >> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     (']' | hard_space))) [actions.memberref_pre]
- >> ( eps_p(']')
+ >> ( classic::eps_p(']')
                 | (hard_space >> phrase)
                 ) [actions.memberref_post]
             ;
 
         enumref =
             "enumref" >> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     (']' | hard_space))) [actions.enumref_pre]
- >> ( eps_p(']')
+ >> ( classic::eps_p(']')
                 | (hard_space >> phrase)
                 ) [actions.enumref_post]
             ;
 
         macroref =
             "macroref" >> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     (']' | hard_space))) [actions.macroref_pre]
- >> ( eps_p(']')
+ >> ( classic::eps_p(']')
                 | (hard_space >> phrase)
                 ) [actions.macroref_post]
             ;
 
         headerref =
             "headerref" >> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     (']' | hard_space))) [actions.headerref_pre]
- >> ( eps_p(']')
+ >> ( classic::eps_p(']')
                 | (hard_space >> phrase)
                 ) [actions.headerref_post]
             ;
 
         conceptref =
             "conceptref" >> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     (']' | hard_space))) [actions.conceptref_pre]
- >> ( eps_p(']')
+ >> ( classic::eps_p(']')
                 | (hard_space >> phrase)
                 ) [actions.conceptref_post]
             ;
 
         globalref =
             "globalref" >> hard_space
- >> (*(anychar_p -
+ >> (*(classic::anychar_p -
                     (']' | hard_space))) [actions.globalref_pre]
- >> ( eps_p(']')
+ >> ( classic::eps_p(']')
                 | (hard_space >> phrase)
                 ) [actions.globalref_post]
             ;
 
         bold =
- ch_p('*') [actions.bold_pre]
+ classic::ch_p('*') [actions.bold_pre]
>> blank >> phrase [actions.bold_post]
             ;
 
         italic =
- ch_p('\'') [actions.italic_pre]
+ classic::ch_p('\'') [actions.italic_pre]
>> blank >> phrase [actions.italic_post]
             ;
 
         underline =
- ch_p('_') [actions.underline_pre]
+ classic::ch_p('_') [actions.underline_pre]
>> blank >> phrase [actions.underline_post]
             ;
 
         teletype =
- ch_p('^') [actions.teletype_pre]
+ classic::ch_p('^') [actions.teletype_pre]
>> blank >> phrase [actions.teletype_post]
             ;
 
         strikethrough =
- ch_p('-') [actions.strikethrough_pre]
+ classic::ch_p('-') [actions.strikethrough_pre]
>> blank >> phrase [actions.strikethrough_post]
             ;
 
         quote =
- ch_p('"') [actions.quote_pre]
+ classic::ch_p('"') [actions.quote_pre]
>> blank >> phrase [actions.quote_post]
             ;
 
         replaceable =
- ch_p('~') [actions.replaceable_pre]
+ classic::ch_p('~') [actions.replaceable_pre]
>> blank >> phrase [actions.replaceable_post]
             ;
 
         source_mode =
             (
- str_p("c++")
+ classic::str_p("c++")
             | "python"
             | "teletype"
- ) [assign_a(actions.source_mode)]
+ ) [classic::assign_a(actions.source_mode)]
             ;
 
         footnote =
- str_p("footnote") [actions.footnote_pre]
+ classic::str_p("footnote") [actions.footnote_pre]
>> blank >> phrase [actions.footnote_post]
             ;
     }
@@ -467,16 +472,16 @@
         phrase =
            *( common
             | comment
- | (anychar_p - ']') [actions.plain_char]
+ | (classic::anychar_p - ']') [actions.plain_char]
             )
             ;
 
         comment =
- "[/" >> *(dummy_block | (anychar_p - ']')) >> ']'
+ "[/" >> *(dummy_block | (classic::anychar_p - ']')) >> ']'
             ;
 
         dummy_block =
- '[' >> *(dummy_block | (anychar_p - ']')) >> ']'
+ '[' >> *(dummy_block | (classic::anychar_p - ']')) >> ']'
             ;
     }
 }

Modified: branches/quickbook-1.5-spirit2/syntax_highlight.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/syntax_highlight.hpp (original)
+++ branches/quickbook-1.5-spirit2/syntax_highlight.hpp 2009-11-18 18:10:13 EST (Wed, 18 Nov 2009)
@@ -19,7 +19,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ using namespace boost::spirit;
 
     // Grammar for C++ highlighting
     template <
@@ -33,7 +33,7 @@
       , typename Unexpected
       , typename Out>
     struct cpp_highlight
- : public grammar<cpp_highlight<Process, Space, Macro, DoMacro, PreEscape, PostEscape, EscapeActions, Unexpected, Out> >
+ : public classic::grammar<cpp_highlight<Process, Space, Macro, DoMacro, PreEscape, PostEscape, EscapeActions, Unexpected, Out> >
     {
         cpp_highlight(Out& out, Macro const& macro, DoMacro do_macro, EscapeActions& escape_actions)
         : out(out), macro(macro), do_macro(do_macro), escape_actions(escape_actions) {}
@@ -47,7 +47,7 @@
             {
                 program
                     =
- *( (+space_p) [Space(self.out)]
+ *( (+classic::space_p) [Space(self.out)]
                     | macro
                     | escape
                     | preprocessor [Process("preprocessor", self.out)]
@@ -58,51 +58,51 @@
                     | string_ [Process("string", self.out)]
                     | char_ [Process("char", self.out)]
                     | number [Process("number", self.out)]
- | repeat_p(1)[anychar_p] [Unexpected(self.out)]
+ | classic::repeat_p(1)[classic::anychar_p] [Unexpected(self.out)]
                     )
                     ;
 
                 macro =
- eps_p(self.macro // must not be followed by
- >> (eps_p - (alpha_p | '_'))) // alpha or underscore
+ classic::eps_p(self.macro // must not be followed by
+ >> (classic::eps_p - (classic::alpha_p | '_'))) // alpha or underscore
>> self.macro [self.do_macro]
                     ;
 
                 qbk_phrase =
                    *( common
- | (anychar_p - str_p("``")) [self.escape_actions.plain_char]
+ | (classic::anychar_p - classic::str_p("``")) [self.escape_actions.plain_char]
                     )
                     ;
 
                 escape =
- str_p("``") [PreEscape(self.escape_actions, save)]
+ classic::str_p("``") [PreEscape(self.escape_actions, save)]
>>
                     (
                         (
                             (
- (+(anychar_p - "``") >> eps_p("``"))
+ (+(classic::anychar_p - "``") >> classic::eps_p("``"))
                                 & qbk_phrase
                             )
- >> str_p("``")
+ >> classic::str_p("``")
                         )
                         |
                         (
- eps_p [self.escape_actions.error]
- >> *anychar_p
+ classic::eps_p [self.escape_actions.error]
+ >> *classic::anychar_p
                         )
                     ) [PostEscape(self.out, self.escape_actions, save)]
                     ;
 
                 preprocessor
- = '#' >> *space_p >> ((alpha_p | '_') >> *(alnum_p | '_'))
+ = '#' >> *classic::space_p >> ((classic::alpha_p | '_') >> *(classic::alnum_p | '_'))
                     ;
 
                 comment
- = comment_p("//") | comment_p("/*", "*/")
+ = classic::comment_p("//") | classic::comment_p("/*", "*/")
                     ;
 
                 keyword
- = keyword_ >> (eps_p - (alnum_p | '_'))
+ = keyword_ >> (classic::eps_p - (classic::alnum_p | '_'))
                     ; // make sure we recognize whole words only
 
                 keyword_
@@ -123,43 +123,44 @@
                     ;
 
                 special
- = +chset_p("~!%^&*()+={[}]:;,<.>?/|\\-")
+ = +classic::chset_p("~!%^&*()+={[}]:;,<.>?/|\\-")
                     ;
 
- string_char = ('\\' >> anychar_p) | (anychar_p - '\\');
+ string_char = ('\\' >> classic::anychar_p) | (classic::anychar_p - '\\');
 
                 string_
- = !as_lower_d['l'] >> confix_p('"', *string_char, '"')
+ = !classic::as_lower_d['l'] >> classic::confix_p('"', *string_char, '"')
                     ;
 
                 char_
- = !as_lower_d['l'] >> confix_p('\'', *string_char, '\'')
+ = !classic::as_lower_d['l'] >> classic::confix_p('\'', *string_char, '\'')
                     ;
 
                 number
                     = (
- as_lower_d["0x"] >> hex_p
- | '0' >> oct_p
- | real_p
+ classic::as_lower_d["0x"] >> classic::hex_p
+ | '0' >> classic::oct_p
+ | classic::real_p
                         )
- >> *as_lower_d[chset_p("ldfu")]
+ >> *classic::as_lower_d[classic::chset_p("ldfu")]
                     ;
 
                 identifier
- = (alpha_p | '_') >> *(alnum_p | '_')
+ = (classic::alpha_p | '_') >> *(classic::alnum_p | '_')
                     ;
             }
 
- rule<Scanner> program, macro, preprocessor, comment, special, string_,
+ classic::rule<Scanner>
+ program, macro, preprocessor, comment, special, string_,
                             char_, number, identifier, keyword, qbk_phrase, escape,
                             string_char;
 
- symbols<> keyword_;
+ classic::symbols<> keyword_;
             phrase_grammar<EscapeActions> common;
             std::string save;
             bool unused;
 
- rule<Scanner> const&
+ classic::rule<Scanner> const&
             start() const { return program; }
         };
 
@@ -183,7 +184,7 @@
       , typename Unexpected
       , typename Out>
     struct python_highlight
- : public grammar<python_highlight<Process, Space, Macro, DoMacro, PreEscape, PostEscape, EscapeActions, Unexpected, Out> >
+ : public classic::grammar<python_highlight<Process, Space, Macro, DoMacro, PreEscape, PostEscape, EscapeActions, Unexpected, Out> >
     {
         python_highlight(Out& out, Macro const& macro, DoMacro do_macro, EscapeActions& escape_actions)
         : out(out), macro(macro), do_macro(do_macro), escape_actions(escape_actions) {}
@@ -197,7 +198,7 @@
             {
                 program
                     =
- *( (+space_p) [Space(self.out)]
+ *( (+classic::space_p) [Space(self.out)]
                     | macro
                     | escape
                     | comment [Process("comment", self.out)]
@@ -206,47 +207,47 @@
                     | special [Process("special", self.out)]
                     | string_ [Process("string", self.out)]
                     | number [Process("number", self.out)]
- | repeat_p(1)[anychar_p] [Unexpected(self.out)]
+ | classic::repeat_p(1)[classic::anychar_p] [Unexpected(self.out)]
                     )
                     ;
 
                 macro =
- eps_p(self.macro // must not be followed by
- >> (eps_p - (alpha_p | '_'))) // alpha or underscore
+ classic::eps_p(self.macro // must not be followed by
+ >> (classic::eps_p - (classic::alpha_p | '_'))) // alpha or underscore
>> self.macro [self.do_macro]
                     ;
 
                 qbk_phrase =
                    *( common
- | (anychar_p - str_p("``")) [self.escape_actions.plain_char]
+ | (classic::anychar_p - classic::str_p("``")) [self.escape_actions.plain_char]
                     )
                     ;
 
                 escape =
- str_p("``") [PreEscape(self.escape_actions, save)]
+ classic::str_p("``") [PreEscape(self.escape_actions, save)]
>>
                     (
                         (
                             (
- (+(anychar_p - "``") >> eps_p("``"))
+ (+(classic::anychar_p - "``") >> classic::eps_p("``"))
                                 & qbk_phrase
                             )
- >> str_p("``")
+ >> classic::str_p("``")
                         )
                         |
                         (
- eps_p [self.escape_actions.error]
- >> *anychar_p
+ classic::eps_p [self.escape_actions.error]
+ >> *classic::anychar_p
                         )
                     ) [PostEscape(self.out, self.escape_actions, save)]
                     ;
 
                 comment
- = comment_p("#")
+ = classic::comment_p("#")
                     ;
 
                 keyword
- = keyword_ >> (eps_p - (alnum_p | '_'))
+ = keyword_ >> (classic::eps_p - (classic::alnum_p | '_'))
                     ; // make sure we recognize whole words only
 
                 keyword_
@@ -266,55 +267,56 @@
                     ;
 
                 special
- = +chset_p("~!%^&*()+={[}]:;,<.>/|\\-")
+ = +classic::chset_p("~!%^&*()+={[}]:;,<.>/|\\-")
                     ;
 
                 string_prefix
- = as_lower_d[str_p("u") >> ! str_p("r")]
+ = classic::as_lower_d[classic::str_p("u") >> ! classic::str_p("r")]
                     ;
                 
                 string_
                     = ! string_prefix >> (long_string | short_string)
                     ;
 
- string_char = ('\\' >> anychar_p) | (anychar_p - '\\');
+ string_char = ('\\' >> classic::anychar_p) | (classic::anychar_p - '\\');
             
                 short_string
- = confix_p('\'', * string_char, '\'') |
- confix_p('"', * string_char, '"')
+ = classic::confix_p('\'', * string_char, '\'') |
+ classic::confix_p('"', * string_char, '"')
                     ;
             
                 long_string
                     // Note: the "str_p" on the next two lines work around
                     // an INTERNAL COMPILER ERROR when using VC7.1
- = confix_p(str_p("'''"), * string_char, "'''") |
- confix_p(str_p("\"\"\""), * string_char, "\"\"\"")
+ = classic::confix_p(classic::str_p("'''"), * string_char, "'''") |
+ classic::confix_p(classic::str_p("\"\"\""), * string_char, "\"\"\"")
                     ;
                 
                 number
                     = (
- as_lower_d["0x"] >> hex_p
- | '0' >> oct_p
- | real_p
+ classic::as_lower_d["0x"] >> classic::hex_p
+ | '0' >> classic::oct_p
+ | classic::real_p
                         )
- >> *as_lower_d[chset_p("lj")]
+ >> *classic::as_lower_d[classic::chset_p("lj")]
                     ;
 
                 identifier
- = (alpha_p | '_') >> *(alnum_p | '_')
+ = (classic::alpha_p | '_') >> *(classic::alnum_p | '_')
                     ;
             }
 
- rule<Scanner> program, macro, comment, special, string_, string_prefix,
+ classic::rule<Scanner>
+ program, macro, comment, special, string_, string_prefix,
                             short_string, long_string, number, identifier, keyword,
                             qbk_phrase, escape, string_char;
 
- symbols<> keyword_;
+ classic::symbols<> keyword_;
             phrase_grammar<EscapeActions> common;
             std::string save;
             bool unused;
 
- rule<Scanner> const&
+ classic::rule<Scanner> const&
             start() const { return program; }
         };
 
@@ -334,7 +336,7 @@
       , typename EscapeActions
       , typename Out>
     struct teletype_highlight
- : public grammar<teletype_highlight<CharProcess, Macro, DoMacro, PreEscape, PostEscape, EscapeActions, Out> >
+ : public classic::grammar<teletype_highlight<CharProcess, Macro, DoMacro, PreEscape, PostEscape, EscapeActions, Out> >
     {
         teletype_highlight(Out& out, Macro const& macro, DoMacro do_macro, EscapeActions& escape_actions)
         : out(out), macro(macro), do_macro(do_macro), escape_actions(escape_actions) {}
@@ -350,49 +352,49 @@
                     =
                     *( macro
                     | escape
- | repeat_p(1)[anychar_p] [CharProcess(self.out)]
+ | classic::repeat_p(1)[classic::anychar_p] [CharProcess(self.out)]
                     )
                     ;
 
                 macro =
- eps_p(self.macro // must not be followed by
- >> (eps_p - (alpha_p | '_'))) // alpha or underscore
+ classic::eps_p(self.macro // must not be followed by
+ >> (classic::eps_p - (classic::alpha_p | '_'))) // alpha or underscore
>> self.macro [self.do_macro]
                     ;
 
                 qbk_phrase =
                    *( common
- | (anychar_p - str_p("``")) [self.escape_actions.plain_char]
+ | (classic::anychar_p - classic::str_p("``")) [self.escape_actions.plain_char]
                     )
                     ;
 
                 escape =
- str_p("``") [PreEscape(self.escape_actions, save)]
+ classic::str_p("``") [PreEscape(self.escape_actions, save)]
>>
                     (
                         (
                             (
- (+(anychar_p - "``") >> eps_p("``"))
+ (+(classic::anychar_p - "``") >> classic::eps_p("``"))
                                 & qbk_phrase
                             )
- >> str_p("``")
+ >> classic::str_p("``")
                         )
                         |
                         (
- eps_p [self.escape_actions.error]
- >> *anychar_p
+ classic::eps_p [self.escape_actions.error]
+ >> *classic::anychar_p
                         )
                     ) [PostEscape(self.out, self.escape_actions, save)]
                     ;
             }
 
- rule<Scanner> program, macro, qbk_phrase, escape;
+ classic::rule<Scanner> program, macro, qbk_phrase, escape;
 
             phrase_grammar<EscapeActions> common;
             std::string save;
             bool unused;
 
- rule<Scanner> const&
+ classic::rule<Scanner> const&
             start() const { return program; }
         };
 


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