Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59317 - in branches/quickbook-1.5-spirit2: . detail
From: daniel_james_at_[hidden]
Date: 2010-01-27 17:05:52


Author: danieljames
Date: 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
New Revision: 59317
URL: http://svn.boost.org/trac/boost/changeset/59317

Log:
Flatten the file hierarchy.

The division between detail and main wasn't making much sense.
Added:
   branches/quickbook-1.5-spirit2/actions.cpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/actions.cpp
   branches/quickbook-1.5-spirit2/actions.hpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/actions.hpp
   branches/quickbook-1.5-spirit2/actions_class.cpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/actions_class.cpp
   branches/quickbook-1.5-spirit2/actions_class.hpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/actions_class.hpp
   branches/quickbook-1.5-spirit2/collector.cpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/collector.cpp
   branches/quickbook-1.5-spirit2/collector.hpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/collector.hpp
   branches/quickbook-1.5-spirit2/input_path.cpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/input_path.cpp
   branches/quickbook-1.5-spirit2/input_path.hpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/input_path.hpp
   branches/quickbook-1.5-spirit2/markups.cpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/markups.cpp
   branches/quickbook-1.5-spirit2/markups.hpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/markups.hpp
   branches/quickbook-1.5-spirit2/post_process.cpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/post_process.cpp
   branches/quickbook-1.5-spirit2/post_process.hpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/post_process.hpp
   branches/quickbook-1.5-spirit2/quickbook.cpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/quickbook.cpp
   branches/quickbook-1.5-spirit2/quickbook.hpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/quickbook.hpp
   branches/quickbook-1.5-spirit2/syntax_highlight.cpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/syntax_highlight.cpp
   branches/quickbook-1.5-spirit2/template_stack.cpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/template_stack.cpp
   branches/quickbook-1.5-spirit2/template_stack.hpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/template_stack.hpp
   branches/quickbook-1.5-spirit2/utils.cpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/utils.cpp
   branches/quickbook-1.5-spirit2/utils.hpp (contents, props changed)
      - copied, changed from r59316, /branches/quickbook-1.5-spirit2/detail/utils.hpp
Removed:
   branches/quickbook-1.5-spirit2/detail/actions.cpp
   branches/quickbook-1.5-spirit2/detail/actions.hpp
   branches/quickbook-1.5-spirit2/detail/actions_class.cpp
   branches/quickbook-1.5-spirit2/detail/actions_class.hpp
   branches/quickbook-1.5-spirit2/detail/collector.cpp
   branches/quickbook-1.5-spirit2/detail/collector.hpp
   branches/quickbook-1.5-spirit2/detail/input_path.cpp
   branches/quickbook-1.5-spirit2/detail/input_path.hpp
   branches/quickbook-1.5-spirit2/detail/markups.cpp
   branches/quickbook-1.5-spirit2/detail/markups.hpp
   branches/quickbook-1.5-spirit2/detail/post_process.cpp
   branches/quickbook-1.5-spirit2/detail/post_process.hpp
   branches/quickbook-1.5-spirit2/detail/quickbook.cpp
   branches/quickbook-1.5-spirit2/detail/quickbook.hpp
   branches/quickbook-1.5-spirit2/detail/syntax_highlight.cpp
   branches/quickbook-1.5-spirit2/detail/template_stack.cpp
   branches/quickbook-1.5-spirit2/detail/template_stack.hpp
   branches/quickbook-1.5-spirit2/detail/utils.cpp
   branches/quickbook-1.5-spirit2/detail/utils.hpp
Text files modified:
   branches/quickbook-1.5-spirit2/Jamfile.v2 | 20 ++++++++++----------
   branches/quickbook-1.5-spirit2/actions.cpp | 12 ++++++------
   branches/quickbook-1.5-spirit2/actions.hpp | 6 +++---
   branches/quickbook-1.5-spirit2/actions_class.cpp | 4 ++--
   branches/quickbook-1.5-spirit2/actions_class.hpp | 2 +-
   branches/quickbook-1.5-spirit2/block.cpp | 14 +++++++-------
   branches/quickbook-1.5-spirit2/block.hpp | 4 ++--
   branches/quickbook-1.5-spirit2/block_actions.cpp | 12 ++++++------
   branches/quickbook-1.5-spirit2/block_list.cpp | 4 ++--
   branches/quickbook-1.5-spirit2/code_snippet.cpp | 10 +++++-----
   branches/quickbook-1.5-spirit2/code_snippet.hpp | 10 +++++-----
   branches/quickbook-1.5-spirit2/code_snippet_types.hpp | 4 ++--
   branches/quickbook-1.5-spirit2/collector.cpp | 2 +-
   branches/quickbook-1.5-spirit2/doc_info.cpp | 8 ++++----
   branches/quickbook-1.5-spirit2/grammars.hpp | 2 +-
   branches/quickbook-1.5-spirit2/input_path.cpp | 2 +-
   branches/quickbook-1.5-spirit2/markups.cpp | 2 +-
   branches/quickbook-1.5-spirit2/phrase.cpp | 14 +++++++-------
   branches/quickbook-1.5-spirit2/phrase.hpp | 6 +++---
   branches/quickbook-1.5-spirit2/phrase_actions.cpp | 6 +++---
   branches/quickbook-1.5-spirit2/phrase_image.cpp | 4 ++--
   branches/quickbook-1.5-spirit2/phrase_template.cpp | 8 ++++----
   branches/quickbook-1.5-spirit2/post_process.cpp | 6 +++---
   branches/quickbook-1.5-spirit2/quickbook.cpp | 10 +++++-----
   branches/quickbook-1.5-spirit2/syntax_highlight.cpp | 4 ++--
   branches/quickbook-1.5-spirit2/syntax_highlight.hpp | 6 +++---
   branches/quickbook-1.5-spirit2/template_stack.cpp | 2 +-
   branches/quickbook-1.5-spirit2/utils.cpp | 2 +-
   28 files changed, 93 insertions(+), 93 deletions(-)

Modified: branches/quickbook-1.5-spirit2/Jamfile.v2
==============================================================================
--- branches/quickbook-1.5-spirit2/Jamfile.v2 (original)
+++ branches/quickbook-1.5-spirit2/Jamfile.v2 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -19,15 +19,15 @@
 
 exe quickbook
     :
- detail/quickbook.cpp
- detail/actions.cpp
- detail/actions_class.cpp
- detail/utils.cpp
- detail/input_path.cpp
- detail/post_process.cpp
- detail/collector.cpp
- detail/template_stack.cpp
- detail/markups.cpp
+ quickbook.cpp
+ actions.cpp
+ actions_class.cpp
+ utils.cpp
+ input_path.cpp
+ post_process.cpp
+ collector.cpp
+ template_stack.cpp
+ markups.cpp
     phrase.cpp
     phrase_actions.cpp
     phrase_image.cpp
@@ -37,7 +37,7 @@
     block_list.cpp
     doc_info.cpp
     code_snippet.cpp
- detail/syntax_highlight.cpp
+ syntax_highlight.cpp
     /boost//program_options
     /boost//filesystem
     : #<define>QUICKBOOK_NO_DATES

Copied: branches/quickbook-1.5-spirit2/actions.cpp (from r59316, /branches/quickbook-1.5-spirit2/detail/actions.cpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/actions.cpp (original)
+++ branches/quickbook-1.5-spirit2/actions.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -15,12 +15,12 @@
 #include <boost/filesystem/convenience.hpp>
 #include <boost/filesystem/fstream.hpp>
 #include <boost/spirit/include/support_unused.hpp>
-#include "./quickbook.hpp"
-#include "./actions.hpp"
-#include "./utils.hpp"
-#include "./markups.hpp"
-#include "./actions_class.hpp"
-#include "../grammars.hpp"
+#include "quickbook.hpp"
+#include "actions.hpp"
+#include "utils.hpp"
+#include "markups.hpp"
+#include "actions_class.hpp"
+#include "grammars.hpp"
 
 namespace quickbook
 {

Copied: branches/quickbook-1.5-spirit2/actions.hpp (from r59316, /branches/quickbook-1.5-spirit2/detail/actions.hpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/actions.hpp (original)
+++ branches/quickbook-1.5-spirit2/actions.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -20,9 +20,9 @@
 #include <boost/filesystem/operations.hpp>
 #include <boost/foreach.hpp>
 #include <boost/tuple/tuple.hpp>
-#include "./collector.hpp"
-#include "./template_stack.hpp"
-#include "./utils.hpp"
+#include "collector.hpp"
+#include "template_stack.hpp"
+#include "utils.hpp"
 
 #ifdef BOOST_MSVC
 // disable copy/assignment could not be generated, unreferenced formal params

Copied: branches/quickbook-1.5-spirit2/actions_class.cpp (from r59316, /branches/quickbook-1.5-spirit2/detail/actions_class.cpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/actions_class.cpp (original)
+++ branches/quickbook-1.5-spirit2/actions_class.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -8,8 +8,8 @@
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
-#include "./actions_class.hpp"
-#include "./markups.hpp"
+#include "actions_class.hpp"
+#include "markups.hpp"
 
 #if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310))
 #pragma warning(disable:4355)

Copied: branches/quickbook-1.5-spirit2/actions_class.hpp (from r59316, /branches/quickbook-1.5-spirit2/detail/actions_class.hpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/actions_class.hpp (original)
+++ branches/quickbook-1.5-spirit2/actions_class.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -10,7 +10,7 @@
 #if !defined(BOOST_SPIRIT_ACTIONS_CLASS_HPP)
 #define BOOST_SPIRIT_ACTIONS_CLASS_HPP
 
-#include "./actions.hpp"
+#include "actions.hpp"
 #include <boost/tuple/tuple.hpp>
 
 namespace quickbook

Modified: branches/quickbook-1.5-spirit2/block.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block.cpp (original)
+++ branches/quickbook-1.5-spirit2/block.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -8,13 +8,13 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-#include "./grammars.hpp"
-#include "./block.hpp"
-#include "./detail/quickbook.hpp"
-#include "./detail/utils.hpp"
-#include "./detail/actions_class.hpp"
-#include "./parse_utils.hpp"
-#include "./detail/markups.hpp"
+#include "grammars.hpp"
+#include "block.hpp"
+#include "quickbook.hpp"
+#include "utils.hpp"
+#include "actions_class.hpp"
+#include "parse_utils.hpp"
+#include "markups.hpp"
 #include <boost/spirit/include/qi_core.hpp>
 #include <boost/spirit/include/qi_eol.hpp>
 #include <boost/spirit/include/qi_eps.hpp>

Modified: branches/quickbook-1.5-spirit2/block.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block.hpp (original)
+++ branches/quickbook-1.5-spirit2/block.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -14,8 +14,8 @@
 #include <vector>
 #include <boost/optional.hpp>
 #include <boost/spirit/include/classic_position_iterator.hpp>
-#include "./parse_types.hpp"
-#include "./code.hpp"
+#include "parse_types.hpp"
+#include "code.hpp"
 
 namespace quickbook
 {

Modified: branches/quickbook-1.5-spirit2/block_actions.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block_actions.cpp (original)
+++ branches/quickbook-1.5-spirit2/block_actions.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -8,12 +8,12 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-#include "./block.hpp"
-#include "./detail/actions_class.hpp"
-#include "./detail/markups.hpp"
-#include "./detail/quickbook.hpp"
-#include "./grammars.hpp"
-#include "./code_snippet_types.hpp"
+#include "block.hpp"
+#include "actions_class.hpp"
+#include "markups.hpp"
+#include "quickbook.hpp"
+#include "grammars.hpp"
+#include "code_snippet_types.hpp"
 #include <numeric>
 #include <boost/assert.hpp>
 #include <boost/filesystem/convenience.hpp>

Modified: branches/quickbook-1.5-spirit2/block_list.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block_list.cpp (original)
+++ branches/quickbook-1.5-spirit2/block_list.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -8,8 +8,8 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-#include "./block.hpp"
-#include "./detail/actions_class.hpp"
+#include "block.hpp"
+#include "actions_class.hpp"
 #include <boost/assert.hpp>
 
 namespace quickbook

Modified: branches/quickbook-1.5-spirit2/code_snippet.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/code_snippet.cpp (original)
+++ branches/quickbook-1.5-spirit2/code_snippet.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -15,11 +15,11 @@
 #include <algorithm>
 #include <iterator>
 #include <boost/lexical_cast.hpp>
-#include "./detail/utils.hpp"
-#include "./detail/markups.hpp"
-#include "./detail/actions_class.hpp"
-#include "./grammars.hpp"
-#include "./code_snippet.hpp"
+#include "utils.hpp"
+#include "markups.hpp"
+#include "actions_class.hpp"
+#include "grammars.hpp"
+#include "code_snippet.hpp"
 
 namespace quickbook
 {

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 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -16,11 +16,11 @@
 #include <boost/spirit/include/phoenix_core.hpp>
 #include <boost/spirit/include/phoenix_bind.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>
-#include "./code_snippet_types.hpp"
-#include "./grammars.hpp"
-#include "./parse_utils.hpp"
-#include "./detail/actions.hpp"
-#include "./detail/actions_class.hpp"
+#include "code_snippet_types.hpp"
+#include "grammars.hpp"
+#include "parse_utils.hpp"
+#include "actions.hpp"
+#include "actions_class.hpp"
 
 namespace quickbook
 {

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-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -15,8 +15,8 @@
 #include <vector>
 #include <string>
 #include <boost/fusion/include/adapt_struct.hpp>
-#include "./parse_types.hpp"
-#include "./detail/actions.hpp"
+#include "parse_types.hpp"
+#include "actions.hpp"
 
 namespace quickbook
 {

Copied: branches/quickbook-1.5-spirit2/collector.cpp (from r59316, /branches/quickbook-1.5-spirit2/detail/collector.cpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/collector.cpp (original)
+++ branches/quickbook-1.5-spirit2/collector.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -6,7 +6,7 @@
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
-#include "./collector.hpp"
+#include "collector.hpp"
 #include <boost/assert.hpp>
 
 namespace quickbook

Copied: branches/quickbook-1.5-spirit2/collector.hpp (from r59316, /branches/quickbook-1.5-spirit2/detail/collector.hpp)
==============================================================================

Deleted: branches/quickbook-1.5-spirit2/detail/actions.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/actions.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,259 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- Copyright (c) 2004 Eric Niebler
- Copyright (c) 2005 Thomas Guest
- http://spirit.sourceforge.net/
-
- 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)
-=============================================================================*/
-#include <numeric>
-#include <functional>
-#include <algorithm>
-#include <iterator>
-#include <boost/filesystem/convenience.hpp>
-#include <boost/filesystem/fstream.hpp>
-#include <boost/spirit/include/support_unused.hpp>
-#include "./quickbook.hpp"
-#include "./actions.hpp"
-#include "./utils.hpp"
-#include "./markups.hpp"
-#include "./actions_class.hpp"
-#include "../grammars.hpp"
-
-namespace quickbook
-{
- char const* quickbook_get_date = "__quickbook_get_date__";
- char const* quickbook_get_time = "__quickbook_get_time__";
- unsigned qbk_major_version = 0;
- unsigned qbk_minor_version = 0;
- unsigned qbk_version_n = 0; // qbk_major_version * 100 + qbk_minor_version
-
- namespace {
- std::string fully_qualified_id(std::string const& library_id,
- std::string const& qualified_section_id,
- std::string const& section_id)
- {
- std::string id = library_id;
- if(!id.empty() && !qualified_section_id.empty()) id += '.';
- id += qualified_section_id;
- if(!id.empty() && !section_id.empty()) id += '.';
- id += section_id;
- return id;
- }
- }
-
- void error_action::operator()(iterator_range x, unused_type, unused_type) const
- {
- boost::spirit::classic::file_position const pos = x.begin().get_position();
- detail::outerr(pos.file,pos.line)
- << "Syntax Error near column " << pos.column << ".\n";
- ++error_count;
- }
-
- void plain_char_action::operator()(char ch, unused_type, unused_type) const
- {
- detail::print_char(ch, phrase.get());
- }
-
- void plain_char_action::operator()(iterator_range x, unused_type, unused_type) const
- {
- detail::print_char(*x.begin(), phrase.get());
- }
-
- void element_id_warning_action::operator()(iterator_range x, unused_type, unused_type) const
- {
- boost::spirit::classic::file_position const pos = x.begin().get_position();
- detail::outwarn(pos.file,pos.line) << "Empty id.\n";
- }
-
- void xml_author::operator()(std::pair<std::string, std::string> const& author) const
- {
- out << " <author>\n"
- << " <firstname>" << author.first << "</firstname>\n"
- << " <surname>" << author.second << "</surname>\n"
- << " </author>\n";
- }
-
- void xml_copyright::operator()(std::pair<std::vector<std::string>, std::string> const& copyright) const
- {
- out << "\n" << " <copyright>\n";
-
- for_each(
- copyright.first.begin()
- , copyright.first.end()
- , xml_year(out));
-
- out << " <holder>" << copyright.second << "</holder>\n"
- << " </copyright>\n"
- << "\n"
- ;
- }
-
- void xml_year::operator()(std::string const &year) const
- {
- out << " <year>" << year << "</year>\n";
- }
-
- static void write_document_title(collector& out, doc_info& actions);
- static void write_document_info(collector& out, doc_info& actions);
-
- void pre(collector& out, quickbook::actions& actions, doc_info& info, bool ignore_docinfo)
- {
- // The doc_info in the file has been parsed. Here's what we'll do
- // *before* anything else.
-
- if (info.doc_id.empty())
- info.doc_id = detail::make_identifier(
- info.doc_title.begin(),info.doc_title.end());
-
- if (info.doc_dirname.empty() && info.doc_type == "library")
- info.doc_dirname = info.doc_id;
-
- if (info.doc_last_revision.empty())
- {
- // default value for last-revision is now
-
- char strdate[64];
- strftime(
- strdate, sizeof(strdate),
- (debug_mode ?
- "DEBUG MODE Date: %Y/%m/%d %H:%M:%S $" :
- "$" /* prevent CVS substitution */ "Date: %Y/%m/%d %H:%M:%S $"),
- current_gm_time
- );
- info.doc_last_revision = strdate;
- }
-
- if(!info.doc_id.empty()) actions.doc_id = info.doc_id;
-
- // if we're ignoring the document info, we're done.
- if (ignore_docinfo)
- {
- return;
- }
-
- out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- << "<!DOCTYPE library PUBLIC \"-//Boost//DTD BoostBook XML V1.0//EN\"\n"
- << " \"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd\">\n"
- << '<' << info.doc_type << "\n"
- << " id=\"" << info.doc_id << "\"\n";
-
- if(info.doc_type == "library")
- {
- out << " name=\"" << info.doc_title << "\"\n";
- }
-
- if(!info.doc_dirname.empty())
- {
- out << " dirname=\"" << info.doc_dirname << "\"\n";
- }
-
- out << " last-revision=\"" << info.doc_last_revision << "\" \n"
- << " xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n";
-
- if(info.doc_type == "library") {
- write_document_info(out, info);
- write_document_title(out, info);
- }
- else {
- write_document_title(out, info);
- write_document_info(out, info);
- }
- }
-
- void post(collector& out, quickbook::actions& actions, doc_info& info, bool ignore_docinfo)
- {
- // if we're ignoring the document info, do nothing.
- if (ignore_docinfo)
- {
- return;
- }
-
- // We've finished generating our output. Here's what we'll do
- // *after* everything else.
- out << "\n</" << info.doc_type << ">\n\n";
- }
-
- void write_document_title(collector& out, doc_info& info)
- {
- if (!info.doc_title.empty())
- {
- out<< " <title>" << info.doc_title;
- if (!info.doc_version.empty())
- out << ' ' << info.doc_version;
- out<< "</title>\n\n\n";
- }
- }
-
- void write_document_info(collector& out, doc_info& info)
- {
- out << " <" << info.doc_type << "info>\n";
-
- if(!info.doc_authors.empty())
- {
- out << " <authorgroup>\n";
- for_each(
- info.doc_authors.begin()
- , info.doc_authors.end()
- , xml_author(out));
- out << " </authorgroup>\n";
- }
-
- if (!info.doc_copyrights.empty())
- {
- for_each(
- info.doc_copyrights.begin()
- , info.doc_copyrights.end()
- , xml_copyright(out));
- }
-
- if (!info.doc_license.empty())
- {
- out << " <legalnotice>\n"
- << " <para>\n"
- << " " << info.doc_license << "\n"
- << " </para>\n"
- << " </legalnotice>\n"
- << "\n"
- ;
- }
-
- if (!info.doc_purpose.empty())
- {
- out << " <" << info.doc_type << "purpose>\n"
- << " " << info.doc_purpose
- << " </" << info.doc_type << "purpose>\n"
- << "\n"
- ;
- }
-
- if (!info.doc_category.empty())
- {
- out << " <" << info.doc_type << "category name=\"category:"
- << info.doc_category
- << "\"></" << info.doc_type << "category>\n"
- << "\n"
- ;
- }
-
- out << " </" << info.doc_type << "info>\n"
- << "\n"
- ;
- }
-
- void phrase_push_action::operator()(unused_type, unused_type, unused_type) const
- {
- phrase.push();
- }
-
- std::string phrase_pop_action::operator()() const
- {
- std::string out;
- phrase.swap(out);
- phrase.pop();
- return out;
- }
-}
-

Deleted: branches/quickbook-1.5-spirit2/detail/actions.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/actions.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,225 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- Copyright (c) 2004 Eric Niebler
- http://spirit.sourceforge.net/
-
- 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_ACTIONS_HPP)
-#define BOOST_SPIRIT_QUICKBOOK_ACTIONS_HPP
-
-#include <time.h>
-#include <map>
-#include <string>
-#include <vector>
-#include <stack>
-#include <algorithm>
-#include <boost/spirit/include/classic_iterator.hpp>
-#include <boost/filesystem/operations.hpp>
-#include <boost/foreach.hpp>
-#include <boost/tuple/tuple.hpp>
-#include "./collector.hpp"
-#include "./template_stack.hpp"
-#include "./utils.hpp"
-
-#ifdef BOOST_MSVC
-// disable copy/assignment could not be generated, unreferenced formal params
-#pragma warning (push)
-#pragma warning(disable : 4511 4512 4100)
-#endif
-
-namespace quickbook
-{
- namespace qi = boost::spirit::qi;
- namespace fs = boost::filesystem;
- using boost::spirit::unused_type;
-
- struct macro {
- macro() {}
- explicit macro(char const* x) : raw_markup(x) {};
- explicit macro(std::string const& x) : raw_markup(x) {};
-
- std::string raw_markup;
- };
-
- typedef qi::symbols<char, macro> macro_symbols;
-
- typedef boost::spirit::classic::position_iterator<
- std::string::const_iterator> iterator;
- typedef boost::spirit::classic::file_position file_position;
- typedef boost::iterator_range<iterator> iterator_range;
- typedef std::map<std::string, std::string> attribute_map;
-
- struct actions;
- extern tm* current_time; // the current time
- extern tm* current_gm_time; // the current UTC time
- extern bool debug_mode;
- extern std::vector<std::string> include_path;
-
- // forward declarations
- struct actions;
- int parse(char const* filein_, actions& actor, bool ignore_docinfo = false);
-
- struct error_action
- {
- // Prints an error message to std::cerr
-
- error_action(
- int& error_count)
- : error_count(error_count) {}
-
- void operator()(iterator_range, unused_type, unused_type) const;
-
- int& error_count;
- };
-
- extern char const* quickbook_get_date;
- extern char const* quickbook_get_time;
-
- struct plain_char_action
- {
- // Prints a single plain char.
- // Converts '<' to "&lt;"... etc See utils.hpp
-
- plain_char_action(collector& phrase)
- : phrase(phrase) {}
-
- void operator()(char ch, unused_type, unused_type) const;
- void operator()(iterator_range, unused_type, unused_type) const;
-
- collector& phrase;
- };
-
- struct syntax_highlight
- {
- syntax_highlight(
- std::string const& source_mode
- , actions& escape_actions)
- : source_mode(source_mode)
- , escape_actions(escape_actions)
- {
- }
-
- std::string operator()(iterator begin, iterator end) const;
-
- std::string const& source_mode;
- actions& escape_actions;
- };
-
- struct element_id_warning_action
- {
- void operator()(iterator_range, unused_type, unused_type) const;
- };
-
- struct xml_author
- {
- // Handles xml author
-
- xml_author(collector& out)
- : out(out) {}
-
- void operator()(std::pair<std::string, std::string> const& author) const;
-
- collector& out;
- };
-
- struct xml_year
- {
- // Handles xml year
-
- xml_year(collector& out)
- : out(out) {}
-
- void operator()(std::string const &year) const;
-
- collector& out;
- };
-
- struct xml_copyright
- {
- // Handles xml copyright
-
- xml_copyright(collector& out)
- : out(out) {}
-
- void operator()(std::pair<std::vector<std::string>, std::string> const &copyright) const;
-
- collector& out;
- };
-
- struct phrase_push_action
- {
- phrase_push_action(collector& phrase)
- : phrase(phrase) {}
-
- void operator()(unused_type, unused_type, unused_type) const;
-
- collector& phrase;
- };
-
- struct phrase_pop_action
- {
- phrase_pop_action(collector& phrase)
- : phrase(phrase) {}
-
- template <typename Context>
- void operator()(unused_type x1, Context& c, unused_type x2) const
- {
- boost::spirit::_val(x1, c, x2) = (*this)();
- }
-
- std::string operator()() const;
-
- collector& phrase;
- };
-
- struct doc_info;
-
- void pre(collector& out, quickbook::actions& actions, doc_info& info, bool ignore_docinfo = false);
- void post(collector& out, quickbook::actions& actions, doc_info& info, bool ignore_docinfo = false);
-
- struct process_action
- {
- process_action(quickbook::actions& actions)
- : actions(actions) {}
-
- typedef void result_type;
-
- template <typename Arg1, typename Arg2 = void, typename Arg3 = void>
- struct result { typedef void type; };
-
- template <typename Attrib, typename Context>
- void operator()(Attrib& a, Context& c, bool& pass) const {
- (*this)(a);
- }
-
- template <typename T>
- void operator()(boost::optional<T> const& x) const {
- if(x) (*this)(*x);
- }
-
- template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
- void operator()(boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& x) const {
- return boost::apply_visitor(*this, x);
- }
-
- void operator()(unused_type) const {
- }
-
- template <typename T>
- void operator()(T const& x) const {
- process(actions, x);
- }
-
- quickbook::actions& actions;
- };
-}
-
-#ifdef BOOST_MSVC
-#pragma warning (pop)
-#endif
-
-#endif // BOOST_SPIRIT_QUICKBOOK_ACTIONS_HPP
-

Deleted: branches/quickbook-1.5-spirit2/detail/actions_class.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/actions_class.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,98 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- Copyright (c) 2004 Eric Niebler
- Copyright (c) 2005 Thomas Guest
- http://spirit.sourceforge.net/
-
- 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)
-=============================================================================*/
-#include "./actions_class.hpp"
-#include "./markups.hpp"
-
-#if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310))
-#pragma warning(disable:4355)
-#endif
-
-namespace quickbook
-{
- actions::actions(char const* filein_, fs::path const& outdir_, string_stream& out_)
- // header info
- : doc_id()
-
- // main output stream
- , phrase(out_)
-
- // state
- , filename(fs::complete(fs::path(filein_, fs::native)))
- , outdir(outdir_)
- , macro()
- , section_level(0)
- , section_id()
- , qualified_section_id()
- , source_mode("c++")
-
- // temporary or global state
- , template_info()
- , template_depth(0)
- , templates()
- , error_count(0)
-
- // actions
- , process(*this)
- , phrase_push(phrase)
- , phrase_pop(phrase)
- , error(error_count)
-
- , syntax_p(source_mode, *this)
- , plain_char(phrase)
- {
- // turn off __FILENAME__ macro on debug mode = true
- std::string filename_str = debug_mode ?
- std::string("NO_FILENAME_MACRO_GENERATED_IN_DEBUG_MODE") :
- filename.native_file_string();
-
- // add the predefined macros
- macro.add
- ("__DATE__", quickbook::macro(quickbook_get_date))
- ("__TIME__", quickbook::macro(quickbook_get_time))
- ("__FILENAME__", quickbook::macro(filename_str))
- ;
- }
-
- void actions::push()
- {
- state_stack.push(
- boost::make_tuple(
- filename
- , outdir
- , macro
- , section_level
- , section_id
- , qualified_section_id
- , source_mode
- )
- );
-
- phrase.push();
- templates.push();
- }
-
- void actions::pop()
- {
- boost::tie(
- filename
- , outdir
- , macro
- , section_level
- , section_id
- , qualified_section_id
- , source_mode
- ) = state_stack.top();
- state_stack.pop();
-
- phrase.pop();
- templates.pop();
- }
-}

Deleted: branches/quickbook-1.5-spirit2/detail/actions_class.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/actions_class.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,85 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- Copyright (c) 2004 Eric Niebler
- http://spirit.sourceforge.net/
-
- 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_ACTIONS_CLASS_HPP)
-#define BOOST_SPIRIT_ACTIONS_CLASS_HPP
-
-#include "./actions.hpp"
-#include <boost/tuple/tuple.hpp>
-
-namespace quickbook
-{
- namespace qi = boost::spirit::qi;
- namespace fs = boost::filesystem;
-
- struct actions
- {
- actions(char const* filein_, fs::path const& outdir, string_stream& out_);
-
- ///////////////////////////////////////////////////////////////////////////
- // State
- ///////////////////////////////////////////////////////////////////////////
-
- typedef std::vector<std::string> string_list;
- typedef std::pair<char, int> mark_type;
- static int const max_template_depth = 100;
-
- std::string doc_id;
-
- // main output stream
- collector phrase;
-
- // state
- fs::path filename;
- fs::path outdir;
- macro_symbols macro;
- int section_level;
- std::string section_id;
- std::string qualified_section_id;
- std::string source_mode;
-
- typedef boost::tuple<
- fs::path
- , fs::path
- , macro_symbols
- , int
- , std::string
- , std::string
- , std::string>
- state_tuple;
-
- std::stack<state_tuple> state_stack;
-
- // temporary or global state
- string_list template_info;
- int template_depth;
- template_stack templates;
- int error_count;
-
- // push/pop the states and the streams
- void push();
- void pop();
-
- ///////////////////////////////////////////////////////////////////////////
- // actions
- ///////////////////////////////////////////////////////////////////////////
- process_action process;
- phrase_push_action phrase_push;
- phrase_pop_action phrase_pop;
- error_action error;
-
- syntax_highlight syntax_p;
- plain_char_action plain_char;
-
- element_id_warning_action element_id_warning;
- };
-}
-
-#endif // BOOST_SPIRIT_ACTIONS_CLASS_HPP
-

Deleted: branches/quickbook-1.5-spirit2/detail/collector.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/collector.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,67 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- http://spirit.sourceforge.net/
-
- 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)
-=============================================================================*/
-#include "./collector.hpp"
-#include <boost/assert.hpp>
-
-namespace quickbook
-{
- string_stream::string_stream()
- : buffer_ptr(new std::string())
- , stream_ptr(new ostream(boost::iostreams::back_inserter(*buffer_ptr.get())))
- {}
-
- string_stream::string_stream(string_stream const& other)
- : buffer_ptr(other.buffer_ptr)
- , stream_ptr(other.stream_ptr)
- {}
-
- string_stream&
- string_stream::operator=(string_stream const& other)
- {
- buffer_ptr = other.buffer_ptr;
- stream_ptr = other.stream_ptr;
- return *this;
- }
-
- collector::collector()
- : main(default_)
- , top(default_)
- {
- }
-
- collector::collector(string_stream& out)
- : main(out)
- , top(out)
- {
- }
-
- collector::~collector()
- {
- BOOST_ASSERT(streams.empty()); // assert there are no more pushes than pops!!!
- }
-
- void
- collector::push()
- {
- streams.push(string_stream());
- top = boost::ref(streams.top());
- }
-
- void
- collector::pop()
- {
- BOOST_ASSERT(!streams.empty());
- streams.pop();
-
- if (streams.empty())
- top = boost::ref(main);
- else
- top = boost::ref(streams.top());
- }
-}

Deleted: branches/quickbook-1.5-spirit2/detail/collector.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/collector.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,123 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- http://spirit.sourceforge.net/
-
- 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_COLLECTOR_HPP)
-#define BOOST_SPIRIT_QUICKBOOK_COLLECTOR_HPP
-
-#include <string>
-#include <stack>
-#include <boost/ref.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/iostreams/device/back_inserter.hpp>
-#include <boost/iostreams/filtering_stream.hpp>
-
-namespace quickbook
-{
- struct string_stream
- {
- typedef boost::iostreams::filtering_ostream ostream;
-
- string_stream();
- string_stream(string_stream const& other);
- string_stream& operator=(string_stream const& other);
-
- std::string const& str() const
- {
- stream_ptr->flush();
- return *buffer_ptr.get();
- }
-
- std::ostream& get() const
- {
- return *stream_ptr.get();
- }
-
- void clear()
- {
- buffer_ptr->clear();
- }
-
- void swap(std::string& other)
- {
- stream_ptr->flush();
- std::swap(other, *buffer_ptr.get());
- }
-
- void append(std::string const& other)
- {
- stream_ptr->flush();
- *buffer_ptr.get() += other;
- }
-
- private:
-
- boost::shared_ptr<std::string> buffer_ptr;
- boost::shared_ptr<ostream> stream_ptr;
- };
-
- struct collector : boost::noncopyable
- {
- collector();
- collector(string_stream& out);
- ~collector();
-
- void push();
- void pop();
-
- std::ostream& get() const
- {
- return top.get().get();
- }
-
- std::string const& str() const
- {
- return top.get().str();
- }
-
- void clear()
- {
- top.get().clear();
- }
-
- void swap(std::string& other)
- {
- top.get().swap(other);
- }
-
- void append(std::string const& other)
- {
- top.get().append(other);
- }
-
- private:
-
- std::stack<string_stream> streams;
- boost::reference_wrapper<string_stream> main;
- boost::reference_wrapper<string_stream> top;
- string_stream default_;
- };
-
- template <typename T>
- inline collector&
- operator<<(collector& out, T const& val)
- {
- out.get() << val;
- return out;
- }
-
- inline collector&
- operator<<(collector& out, std::string const& val)
- {
- out.append(val);
- return out;
- }
-}
-
-#endif // BOOST_SPIRIT_QUICKBOOK_COLLECTOR_HPP
-

Deleted: branches/quickbook-1.5-spirit2/detail/input_path.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/input_path.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,42 +0,0 @@
-/*=============================================================================
- Copyright (c) 2009 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)
-=============================================================================*/
-
-#include <boost/program_options.hpp>
-#include "./input_path.hpp"
-
-#if defined(__cygwin__) || defined(__CYGWIN__)
-#include <boost/filesystem/config.hpp>
-#include <windows.h>
-#include <sys/cygwin.h>
-#endif
-
-
-namespace quickbook { namespace detail
-{
- void validate(boost::any& v,
- const std::vector<std::string>& values,
- input_path*, int)
- {
- std::string path
- = boost::program_options::validators::get_single_string(values);
-
-#if !(defined(__cygwin__) || defined(__CYGWIN__))
- v = input_path(path);
-#elif defined(BOOST_WINDOWS_PATH)
- char result[MAX_PATH + 1];
- cygwin_conv_to_win32_path(path.c_str(), result);
- v = input_path(result);
-#elif defined(BOOST_POSIX_PATH)
- char result[MAX_PATH + 1];
- cygwin_conv_to_posix_path(path.c_str(), result);
- v = input_path(result);
-#else
-# error "Bosot filesystem path type doesn't seem to be set."
-#endif
- }
-}}

Deleted: branches/quickbook-1.5-spirit2/detail/input_path.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/input_path.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,39 +0,0 @@
-/*=============================================================================
- Copyright (c) 2009 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_QUICKBOOK_DETAIL_INPUT_PATH_HPP)
-#define BOOST_QUICKBOOK_DETAIL_INPUT_PATH_HPP
-
-#include <vector>
-#include <boost/any.hpp>
-#include <string>
-
-namespace quickbook { namespace detail
-{
- // Use this class with Boost.Program Options to convert paths to the format
- // the Boost.Filesystem expects. This is needed on cygwin to convert cygwin
- // paths to windows paths (or vice versa, depending on how filesystem is set
- // up).
- //
- // Note that we don't want to convert paths in quickbook files, as they
- // should be platform independent, and aren't necessarily relative to the
- // current directory.
-
- class input_path {
- std::string path_;
- public:
- explicit input_path(char const* c) : path_(c) {}
- explicit input_path(std::string const& c) : path_(c) {}
- operator std::string() const { return path_; }
-
- friend void validate(boost::any&, const std::vector<std::string>&,
- input_path*, int);
- };
-}}
-
-#endif

Deleted: branches/quickbook-1.5-spirit2/detail/markups.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/markups.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,101 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- Copyright (c) 2004 Eric Niebler
- http://spirit.sourceforge.net/
-
- 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)
-=============================================================================*/
-
-#include "./markups.hpp"
-
-namespace quickbook
-{
- const char* comment_pre = "<!--";
- const char* comment_post = "-->";
- const char* paragraph_pre = "<para>\n";
- const char* paragraph_post = "</para>\n";
- const char* h1_pre = "<bridgehead renderas=\"sect1\">";
- const char* h1_post = "</bridgehead>";
- const char* h2_pre = "<bridgehead renderas=\"sect2\">";
- const char* h2_post = "</bridgehead>";
- const char* h3_pre = "<bridgehead renderas=\"sect3\">";
- const char* h3_post = "</bridgehead>";
- const char* h4_pre = "<bridgehead renderas=\"sect4\">";
- const char* h4_post = "</bridgehead>";
- const char* h5_pre = "<bridgehead renderas=\"sect5\">";
- const char* h5_post = "</bridgehead>";
- const char* h6_pre = "<bridgehead renderas=\"sect6\">";
- const char* h6_post = "</bridgehead>";
- const char* hr_ = "<para/>";
- const char* blurb_pre = "<sidebar role=\"blurb\">\n";
- const char* blurb_post = "</sidebar>\n";
- const char* blockquote_pre = "<blockquote><para>";
- const char* blockquote_post = "</para></blockquote>";
- const char* preformatted_pre = "<programlisting>";
- const char* preformatted_post = "</programlisting>";
- const char* warning_pre = "<warning>";
- const char* warning_post = "</warning>";
- const char* caution_pre = "<caution>";
- const char* caution_post = "</caution>";
- const char* important_pre = "<important>";
- const char* important_post = "</important>";
- const char* note_pre = "<note>";
- const char* note_post = "</note>";
- const char* tip_pre = "<tip>";
- const char* tip_post = "</tip>";
- const char* list_item_pre = "<listitem>\n";
- const char* list_item_post = "\n</listitem>";
- const char* bold_pre_ = "<emphasis role=\"bold\">";
- const char* bold_post_ = "</emphasis>";
- const char* italic_pre_ = "<emphasis>";
- const char* italic_post_ = "</emphasis>";
- const char* underline_pre_ = "<emphasis role=\"underline\">";
- const char* underline_post_ = "</emphasis>";
- const char* teletype_pre_ = "<literal>";
- const char* teletype_post_ = "</literal>";
- const char* strikethrough_pre_ = "<emphasis role=\"strikethrough\">";
- const char* strikethrough_post_ = "</emphasis>";
- const char* quote_pre_ = "<quote>";
- const char* quote_post_ = "</quote>";
- const char* break_mark = "<sbr/>\n";
- const char* url_pre_ = "<ulink url=\"";
- const char* url_post_ = "</ulink>";
- const char* link_pre_ = "<link linkend=\"";
- const char* link_post_ = "</link>";
- const char* start_varlistentry_ = "<varlistentry>";
- const char* end_varlistentry_ = "</varlistentry>\n";
- const char* start_varlistterm_ = "<term>";
- const char* end_varlistterm_ = "</term>";
- const char* start_varlistitem_ = "<listitem>";
- const char* end_varlistitem_ = "</listitem>";
- const char* start_header_ = "<thead>";
- const char* end_header_ = "</thead>\n";
- const char* start_row_ = "<row>";
- const char* end_row_ = "</row>\n";
- const char* start_cell_ = "<entry>";
- const char* end_cell_ = "</entry>";
- const char* funcref_pre_ = "<functionname alt=\"";
- const char* funcref_post_ = "</functionname>";
- const char* classref_pre_ = "<classname alt=\"";
- const char* classref_post_ = "</classname>";
- const char* memberref_pre_ = "<methodname alt=\"";
- const char* memberref_post_ = "</methodname>";
- const char* enumref_pre_ = "<enumname alt=\"";
- const char* enumref_post_ = "</enumname>";
- const char* macroref_pre_ = "<macroname alt=\"";
- const char* macroref_post_ = "</macroname>";
- const char* headerref_pre_ = "<headername alt=\"";
- const char* headerref_post_ = "</headername>";
- const char* conceptref_pre_ = "<conceptname alt=\"";
- const char* conceptref_post_ = "</conceptname>";
- const char* globalref_pre_ = "<globalname alt=\"";
- const char* globalref_post_ = "</globalname>";
- const char* footnote_pre_ = "<footnote><para>";
- const char* footnote_post_ = "</para></footnote>";
- const char* escape_pre_ = "<!--quickbook-escape-prefix-->";
- const char* escape_post_ = "<!--quickbook-escape-postfix-->";
- const char* replaceable_pre_ = "<replaceable>";
- const char* replaceable_post_ = "</replaceable>";
-}

Deleted: branches/quickbook-1.5-spirit2/detail/markups.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/markups.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,104 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- Copyright (c) 2004 Eric Niebler
- http://spirit.sourceforge.net/
-
- 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_MARKUPS_HPP)
-#define BOOST_SPIRIT_MARKUPS_HPP
-
-namespace quickbook
-{
- extern const char* comment_pre;
- extern const char* comment_post;
- extern const char* paragraph_pre;
- extern const char* paragraph_post;
- extern const char* h1_pre;
- extern const char* h1_post;
- extern const char* h2_pre;
- extern const char* h2_post;
- extern const char* h3_pre;
- extern const char* h3_post;
- extern const char* h4_pre;
- extern const char* h4_post;
- extern const char* h5_pre;
- extern const char* h5_post;
- extern const char* h6_pre;
- extern const char* h6_post;
- extern const char* hr_;
- extern const char* blurb_pre;
- extern const char* blurb_post;
- extern const char* blockquote_pre;
- extern const char* blockquote_post;
- extern const char* preformatted_pre;
- extern const char* preformatted_post;
- extern const char* warning_pre;
- extern const char* warning_post;
- extern const char* caution_pre;
- extern const char* caution_post;
- extern const char* important_pre;
- extern const char* important_post;
- extern const char* note_pre;
- extern const char* note_post;
- extern const char* tip_pre;
- extern const char* tip_post;
- extern const char* list_item_pre;
- extern const char* list_item_post;
- extern const char* bold_pre_;
- extern const char* bold_post_;
- extern const char* italic_pre_;
- extern const char* italic_post_;
- extern const char* underline_pre_;
- extern const char* underline_post_;
- extern const char* teletype_pre_;
- extern const char* teletype_post_;
- extern const char* strikethrough_pre_;
- extern const char* strikethrough_post_;
- extern const char* quote_pre_;
- extern const char* quote_post_;
- extern const char* break_mark;
- extern const char* url_pre_;
- extern const char* url_post_;
- extern const char* link_pre_;
- extern const char* link_post_;
- extern const char* start_varlistentry_;
- extern const char* end_varlistentry_;
- extern const char* start_varlistterm_;
- extern const char* end_varlistterm_;
- extern const char* start_varlistitem_;
- extern const char* end_varlistitem_;
- extern const char* start_header_;
- extern const char* end_header_;
- extern const char* start_row_;
- extern const char* end_row_;
- extern const char* start_cell_;
- extern const char* end_cell_;
- extern const char* funcref_pre_;
- extern const char* funcref_post_;
- extern const char* classref_pre_;
- extern const char* classref_post_;
- extern const char* memberref_pre_;
- extern const char* memberref_post_;
- extern const char* enumref_pre_;
- extern const char* enumref_post_;
- extern const char* macroref_pre_;
- extern const char* macroref_post_;
- extern const char* headerref_pre_;
- extern const char* headerref_post_;
- extern const char* conceptref_pre_;
- extern const char* conceptref_post_;
- extern const char* globalref_pre_;
- extern const char* globalref_post_;
- extern const char* footnote_pre_;
- extern const char* footnote_post_;
- extern const char* escape_pre_;
- extern const char* escape_post_;
- extern const char* replaceable_pre_;
- extern const char* replaceable_post_;
-}
-
-#endif // BOOST_SPIRIT_MARKUPS_HPP
-

Deleted: branches/quickbook-1.5-spirit2/detail/post_process.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/post_process.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,474 +0,0 @@
-/*=============================================================================
- Copyright (c) 2005 2006 Joel de Guzman
- http://spirit.sourceforge.net/
-
- 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)
-=============================================================================*/
-#include "./post_process.hpp"
-#include "./utils.hpp"
-#include "../parse_utils.hpp"
-#include <boost/spirit/include/qi_core.hpp>
-#include <boost/spirit/include/qi_lexeme.hpp>
-#include <boost/spirit/include/qi_char_.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
-#include <boost/spirit/include/phoenix_bind.hpp>
-#include <set>
-#include <stack>
-#include <cctype>
-
-namespace quickbook
-{
- namespace qi = boost::spirit::qi;
- namespace ph = boost::phoenix;
- typedef std::string::const_iterator iter_type;
-
- struct printer
- {
- printer(std::string& out, int& current_indent, int linewidth)
- : prev(0), out(out), current_indent(current_indent) , column(0)
- , in_string(false), linewidth(linewidth) {}
-
- void indent()
- {
- BOOST_ASSERT(current_indent >= 0); // this should not happen!
- for (int i = 0; i < current_indent; ++i)
- out += ' ';
- column = current_indent;
- }
-
- void break_line()
- {
- out.erase(out.find_last_not_of(' ')+1); // trim trailing spaces
- out += '\n';
- indent();
- }
-
- bool line_is_empty() const
- {
- for (iter_type i = out.end()-(column-current_indent); i != out.end(); ++i)
- {
- if (*i != ' ')
- return false;
- }
- return true;
- }
-
- void align_indent()
- {
- // make sure we are at the proper indent position
- if (column != current_indent)
- {
- if (column > current_indent)
- {
- if (line_is_empty())
- {
- // trim just enough trailing spaces down to current_indent position
- out.erase(out.end()-(column-current_indent), out.end());
- column = current_indent;
- }
- else
- {
- // nope, line is not empty. do a hard CR
- break_line();
- }
- }
- else
- {
- // will this happen? (i.e. column <= current_indent)
- while (column != current_indent)
- {
- out += ' ';
- ++column;
- }
- }
- }
- }
-
- void print(char ch)
- {
- // Print a char. Attempt to break the line if we are exceeding
- // the target linewidth. The linewidth is not an absolute limit.
- // There are many cases where a line will exceed the linewidth
- // and there is no way to properly break the line. Preformatted
- // code that exceeds the linewidth are examples. We cannot break
- // preformatted code. We shall not attempt to be very strict with
- // line breaking. What's more important is to have a reproducable
- // output (i.e. processing two logically equivalent xml files
- // results in two lexically equivalent xml files). *** pretty
- // formatting is a secondary goal ***
-
- // Strings will occur only in tag attributes. Normal content
- // will have &quot; instead. We shall deal only with tag
- // attributes here.
- if (ch == '"')
- in_string = !in_string; // don't break strings!
-
- if (!in_string && std::isspace(static_cast<unsigned char>(ch)))
- {
- // we can break spaces if they are not inside strings
- if (!std::isspace(static_cast<unsigned char>(prev)))
- {
- if (column >= linewidth)
- {
- break_line();
- if (column == 0 && ch == ' ')
- {
- ++column;
- out += ' ';
- }
- }
- else
- {
- ++column;
- out += ' ';
- }
- }
- }
- else
- {
- // we can break tag boundaries and stuff after
- // delimiters if they are not inside strings
- // and *only-if* the preceding char is a space
- if (!in_string
- && column >= linewidth
- && (ch == '<' && std::isspace(static_cast<unsigned char>(prev))))
- break_line();
- out += ch;
- ++column;
- }
-
- prev = ch;
- }
-
- void
- print(iter_type f, iter_type l)
- {
- for (iter_type i = f; i != l; ++i)
- print(*i);
- }
-
- void
- print(std::string const& x)
- {
- print(x.begin(), x.end());
- }
-
- void
- print_tag(std::string const& str, bool is_flow_tag)
- {
- if (is_flow_tag)
- {
- print(str);
- }
- else
- {
- // This is not a flow tag, so, we're going to do a
- // carriage return anyway. Let us remove extra right
- // spaces.
- BOOST_ASSERT(!str.empty()); // this should not happen
- iter_type i = str.end();
- while (i != str.begin() && std::isspace(static_cast<unsigned char>(*(i-1))))
- --i;
- print(str.begin(), i);
- }
- }
-
- char prev;
- std::string& out;
- int& current_indent;
- int column;
- bool in_string;
- int linewidth;
- };
-
- char const* block_tags_[] =
- {
- "author"
- , "blockquote"
- , "bridgehead"
- , "caution"
- , "copyright"
- , "footnote"
- , "important"
- , "informaltable"
- , "itemizedlist"
- , "legalnotice"
- , "listitem"
- , "note"
- , "orderedlist"
- , "para"
- , "replaceable"
- , "row"
- , "section"
- , "tbody"
- , "textobject"
- , "tgroup"
- , "thead"
- , "tip"
- , "variablelist"
- , "warning"
- , "xml"
- , "xi:include"
- , "calloutlist"
- , "callout"
- };
-
- char const* doc_types_[] =
- {
- "book"
- , "article"
- , "library"
- , "chapter"
- , "part"
- , "appendix"
- , "preface"
- , "qandadiv"
- , "qandaset"
- , "reference"
- , "set"
- };
-
- struct tidy_compiler
- {
- tidy_compiler(std::string& out, int linewidth)
- : out(out), current_indent(0), printer_(out, current_indent, linewidth)
- {
- static int const n_block_tags = sizeof(block_tags_)/sizeof(char const*);
- for (int i = 0; i != n_block_tags; ++i)
- {
- block_tags.insert(block_tags_[i]);
- }
-
- static int const n_doc_types = sizeof(doc_types_)/sizeof(char const*);
- for (int i = 0; i != n_doc_types; ++i)
- {
- block_tags.insert(doc_types_[i]);
- block_tags.insert(doc_types_[i] + std::string("info"));
- block_tags.insert(doc_types_[i] + std::string("purpose"));
- }
- }
-
- bool is_flow_tag(std::string const& tag)
- {
- return block_tags.find(tag) == block_tags.end();
- }
-
- std::set<std::string> block_tags;
- std::stack<std::string> tags;
- std::string& out;
- int current_indent;
- printer printer_;
- std::string current_tag;
- };
-
- template <typename Iterator>
- struct tidy_grammar : qi::grammar<Iterator>
- {
- tidy_grammar(tidy_compiler& state, int indent)
- : tidy_grammar::base_type(tidy)
- , state(state), indent(indent)
- {
- tag = (qi::lexeme[+(qi::alpha | qi::char_("_:"))])
- [ph::bind(&tidy_grammar::do_tag, this, as_string(qi::_1))];
-
- code = qi::raw[
- "<programlisting>"
- >> *(qi::char_ - "</programlisting>")
- >> "</programlisting>"
- ];
-
- // What's the business of lexeme_d['>' >> *space]; ?
- // It is there to preserve the space after the tag that is
- // otherwise consumed by the space skipper.
-
- escape =
- qi::lit("<!--quickbook-escape-prefix-->") >>
- (*(qi::char_ - (qi::lit("<!--quickbook-escape-postfix-->"))))
- [
- ph::bind(&tidy_grammar::do_escape, this, as_string(qi::_1))
- ]
- >> qi::lexeme
- [
- qi::lit("<!--quickbook-escape-postfix-->") >>
- (*qi::space)
- [
- ph::bind(&tidy_grammar::do_escape_post, this, as_string(qi::_1))
- ]
- ]
- ;
-
- start_tag = qi::raw['<' >> tag >> *(qi::char_ - '>') >> qi::lexeme['>' >> *qi::space]];
- start_end_tag = qi::raw[
- '<' >> tag >> *(qi::char_ - ("/>" | qi::lit('>'))) >> qi::lexeme["/>" >> *qi::space]
- | "<?" >> tag >> *(qi::char_ - '?') >> qi::lexeme["?>" >> *qi::space]
- | "<!--" >> *(qi::char_ - "-->") >> qi::lexeme["-->" >> *qi::space]
- | "<!" >> tag >> *(qi::char_ - '>') >> qi::lexeme['>' >> *qi::space]
- ];
- content = qi::lexeme[ +(qi::char_ - '<') ];
- end_tag = qi::raw["</" >> +(qi::char_ - '>') >> qi::lexeme['>' >> *qi::space]];
-
- markup =
- escape
- | code [ph::bind(&tidy_grammar::do_code, this, qi::_1)]
- | start_end_tag [ph::bind(&tidy_grammar::do_start_end_tag, this, qi::_1)]
- | start_tag [ph::bind(&tidy_grammar::do_start_tag, this, qi::_1)]
- | end_tag [ph::bind(&tidy_grammar::do_end_tag, this, qi::_1)]
- | content [ph::bind(&tidy_grammar::do_content, this, qi::_1)]
- ;
-
- tidy = +markup;
- }
-
- void do_escape_post(std::string const& x) const
- {
- for (std::string::const_iterator i = x.begin(), l = x.end(); i != l; ++i)
- state.out += *i;
- }
-
- void do_escape(std::string const& x) const
- {
- std::string::const_iterator f = x.begin(), l = x.end();
- while (f != l && std::isspace(*f))
- ++f;
- while (f != l && std::isspace(*(l - 1)))
- --l;
- for (std::string::const_iterator i = f; i != l; ++i)
- state.out += *i;
- }
-
- void do_code(std::string const& x) const
- {
- state.out += '\n';
- // print the string taking care of line
- // ending CR/LF platform issues
- for (iter_type i = x.begin(), l = x.end(); i != l; ++i)
- {
- if (*i == '\n')
- {
- state.out += '\n';
- ++i;
- if (i != l && *i != '\r')
- state.out += *i;
- }
- else if (*i == '\r')
- {
- state.out += '\n';
- ++i;
- if (i != l && *i != '\n')
- state.out += *i;
- }
- else
- {
- state.out += *i;
- }
- }
- state.out += '\n';
- state.printer_.indent();
- }
-
- void do_tag(std::string const& x) const
- {
- state.current_tag = std::string(x.begin(), x.end());
- }
-
- void do_start_end_tag(std::string const& x) const
- {
- bool is_flow_tag = state.is_flow_tag(state.current_tag);
- if (!is_flow_tag)
- state.printer_.align_indent();
- state.printer_.print_tag(x, is_flow_tag);
- if (!is_flow_tag)
- state.printer_.break_line();
- }
-
- void do_start_tag(std::string const& x) const
- {
- state.tags.push(state.current_tag);
- bool is_flow_tag = state.is_flow_tag(state.current_tag);
- if (!is_flow_tag)
- state.printer_.align_indent();
- state.printer_.print_tag(x, is_flow_tag);
- if (!is_flow_tag)
- {
- state.current_indent += indent;
- state.printer_.break_line();
- }
- }
-
- void do_content(std::string const& x) const
- {
- state.printer_.print(x);
- }
-
- void do_end_tag(std::string const& x) const
- {
- bool is_flow_tag = state.is_flow_tag(state.tags.top());
- if (!is_flow_tag)
- {
- state.current_indent -= indent;
- state.printer_.align_indent();
- }
- state.printer_.print_tag(x, is_flow_tag);
- if (!is_flow_tag)
- state.printer_.break_line();
- state.tags.pop();
- }
-
- tidy_compiler& state;
- int indent;
-
- qi::rule<Iterator> tidy, tag,
- markup, escape;
- qi::rule<Iterator, std::string()>
- start_tag, start_end_tag,
- content, end_tag, code;
- };
-
- int post_process(
- std::string const& in
- , std::ostream& out
- , int indent
- , int linewidth)
- {
- if (indent == -1)
- indent = 2; // set default to 2
- if (linewidth == -1)
- linewidth = 80; // set default to 80
-
- try
- {
- std::string tidy;
- tidy_compiler state(tidy, linewidth);
- tidy_grammar<iter_type> g(state, indent);
- iter_type first = in.begin(), last = in.end();
- bool r = parse(first, last, g, qi::space);
- if (r && first == last)
- {
- out << tidy;
- return 0;
- }
- else
- {
- // fallback!
- ::quickbook::detail::outerr("")
- << "Warning: Post Processing Failed."
- << std::endl;
- out << in;
- return 1;
- }
- }
-
- catch(...)
- {
- // fallback!
- ::quickbook::detail::outerr("")
- << "Post Processing Failed."
- << std::endl;
- out << in;
- return 1;
- }
- }
-}
-

Deleted: branches/quickbook-1.5-spirit2/detail/post_process.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/post_process.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,25 +0,0 @@
-/*=============================================================================
- Copyright (c) 2005 2006 Joel de Guzman
- http://spirit.sourceforge.net/
-
- 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_POST_PROCESS_HPP)
-#define BOOST_SPIRIT_QUICKBOOK_POST_PROCESS_HPP
-
-#include <iostream>
-#include <string>
-
-namespace quickbook
-{
- int post_process(
- std::string const& in
- , std::ostream& out
- , int indent
- , int linewidth);
-}
-
-#endif // BOOST_SPIRIT_QUICKBOOK_POST_PROCESS_HPP
-

Deleted: branches/quickbook-1.5-spirit2/detail/quickbook.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/quickbook.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,296 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- Copyright (c) 2004 Eric Niebler
- http://spirit.sourceforge.net/
-
- 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)
-=============================================================================*/
-#include "./actions_class.hpp"
-#include "../grammars.hpp"
-#include "./post_process.hpp"
-#include "./utils.hpp"
-#include "./input_path.hpp"
-#include <boost/spirit/include/classic_iterator.hpp>
-#include <boost/program_options.hpp>
-#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/operations.hpp>
-#include <boost/ref.hpp>
-
-#include <stdexcept>
-#include <fstream>
-#include <iostream>
-#include <vector>
-
-#if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310))
-#pragma warning(disable:4355)
-#endif
-
-#define QUICKBOOK_VERSION "Quickbook Version 1.5"
-
-namespace quickbook
-{
- namespace qi = boost::spirit::qi;
- namespace fs = boost::filesystem;
- tm* current_time; // the current time
- tm* current_gm_time; // the current UTC time
- bool debug_mode; // for quickbook developers only
- bool ms_errors = false; // output errors/warnings as if for VS
- std::vector<std::string> include_path;
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // Parse a file
- //
- ///////////////////////////////////////////////////////////////////////////
- int
- parse(char const* filein_, actions& actor, bool ignore_docinfo)
- {
- using std::cerr;
- using std::vector;
- using std::string;
-
- std::string storage;
- int err = detail::load(filein_, storage);
- if (err != 0) {
- ++actor.error_count;
- return err;
- }
-
- iterator first(storage.begin(), storage.end(), filein_);
- iterator last(storage.end(), storage.end());
- iterator start = first;
-
- doc_info info;
- doc_info_grammar l(actor);
- bool success = parse(first, last, l, info);
-
- if (success || ignore_docinfo)
- {
- if(!success) first = start;
-
- pre(actor.phrase, actor, info, ignore_docinfo);
-
- block_grammar g(actor);
- success = parse(first, last, g);
- if (success && first == last)
- {
- post(actor.phrase, actor, info, ignore_docinfo);
- }
- }
- else {
- file_position const pos = first.get_position();
- detail::outerr(pos.file,pos.line)
- << "Doc Info error near column " << pos.column << ".\n";
- }
-
- if (!success || first != last)
- {
- file_position const pos = first.get_position();
- detail::outerr(pos.file,pos.line)
- << "Syntax Error near column " << pos.column << ".\n";
- ++actor.error_count;
- }
-
- if(actor.error_count)
- {
- detail::outerr(filein_)
- << "Error count: " << actor.error_count << ".\n";
- }
-
- return actor.error_count ? 1 : 0;
- }
-
- static int
- parse(char const* filein_, fs::path const& outdir, string_stream& out, bool ignore_docinfo = false)
- {
- actions actor(filein_, outdir, out);
- bool r = parse(filein_, actor);
- if (actor.section_level != 0)
- detail::outwarn(filein_)
- << "Warning missing [endsect] detected at end of file."
- << std::endl;
- return r;
- }
-
- static int
- parse(
- char const* filein_
- , char const* fileout_
- , int indent
- , int linewidth
- , bool pretty_print)
- {
- int result = 0;
- std::ofstream fileout(fileout_);
- fs::path outdir = fs::path(fileout_, fs::native).branch_path();
- if (outdir.empty())
- outdir = ".";
- if (pretty_print)
- {
- string_stream buffer;
- result = parse(filein_, outdir, buffer);
- if (result == 0)
- {
- result = post_process(buffer.str(), fileout, indent, linewidth);
- }
- }
- else
- {
- string_stream buffer;
- result = parse(filein_, outdir, buffer);
- fileout << buffer.str();
- }
- return result;
- }
-}
-
-///////////////////////////////////////////////////////////////////////////
-//
-// Main program
-//
-///////////////////////////////////////////////////////////////////////////
-int
-main(int argc, char* argv[])
-{
- try
- {
- using boost::program_options::options_description;
- using boost::program_options::variables_map;
- using boost::program_options::store;
- using boost::program_options::parse_command_line;
- using boost::program_options::command_line_parser;
- using boost::program_options::notify;
- using boost::program_options::value;
- using boost::program_options::positional_options_description;
-
- // First thing, the filesystem should record the current working directory.
- boost::filesystem::initial_path();
-
- options_description desc("Allowed options");
- desc.add_options()
- ("help", "produce help message")
- ("version", "print version string")
- ("no-pretty-print", "disable XML pretty printing")
- ("indent", value<int>(), "indent spaces")
- ("linewidth", value<int>(), "line width")
- ("input-file", value<quickbook::detail::input_path>(), "input file")
- ("output-file", value<quickbook::detail::input_path>(), "output file")
- ("debug", "debug mode (for developers)")
- ("ms-errors", "use Microsoft Visual Studio style error & warn message format")
- ("include-path,I", value< std::vector<quickbook::detail::input_path> >(), "include path")
- ;
-
- positional_options_description p;
- p.add("input-file", -1);
-
- variables_map vm;
- int indent = -1;
- int linewidth = -1;
- bool pretty_print = true;
- store(command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
- notify(vm);
-
- if (vm.count("help"))
- {
- std::cout << desc << "\n";
- return 0;
- }
-
- if (vm.count("version"))
- {
- std::cout << QUICKBOOK_VERSION << std::endl;
- return 0;
- }
-
- if (vm.count("ms-errors"))
- quickbook::ms_errors = true;
-
- if (vm.count("no-pretty-print"))
- pretty_print = false;
-
- if (vm.count("indent"))
- indent = vm["indent"].as<int>();
-
- if (vm.count("linewidth"))
- linewidth = vm["linewidth"].as<int>();
-
- if (vm.count("debug"))
- {
- static tm timeinfo;
- timeinfo.tm_year = 2000 - 1900;
- timeinfo.tm_mon = 12 - 1;
- timeinfo.tm_mday = 20;
- timeinfo.tm_hour = 12;
- timeinfo.tm_min = 0;
- timeinfo.tm_sec = 0;
- timeinfo.tm_isdst = -1;
- mktime(&timeinfo);
- quickbook::current_time = &timeinfo;
- quickbook::current_gm_time = &timeinfo;
- quickbook::debug_mode = true;
- }
- else
- {
- time_t t = std::time(0);
- static tm lt = *localtime(&t);
- static tm gmt = *gmtime(&t);
- quickbook::current_time = &lt;
- quickbook::current_gm_time = &gmt;
- quickbook::debug_mode = false;
- }
-
- if (vm.count("include-path"))
- {
- std::vector<quickbook::detail::input_path> paths
- = vm["include-path"].as<
- std::vector<quickbook::detail::input_path> >();
- quickbook::include_path
- = std::vector<std::string>(paths.begin(), paths.end());
- }
-
- if (vm.count("input-file"))
- {
- std::string filein
- = vm["input-file"].as<quickbook::detail::input_path>();
- std::string fileout;
-
- if (vm.count("output-file"))
- {
- fileout = vm["output-file"].as<quickbook::detail::input_path>();
- }
- else
- {
- fileout = quickbook::detail::remove_extension(filein.c_str());
- fileout += ".xml";
- }
-
- std::cout << "Generating Output File: "
- << fileout
- << std::endl;
-
- return quickbook::parse(filein.c_str(), fileout.c_str(), indent, linewidth, pretty_print);
- }
- else
- {
- quickbook::detail::outerr("") << "Error: No filename given\n\n"
- << desc << std::endl;
- return 1;
- }
- }
-
- catch(std::exception& e)
- {
- quickbook::detail::outerr("") << "Error: " << e.what() << "\n";
- return 1;
- }
-
- catch(...)
- {
- quickbook::detail::outerr("") << "Error: Exception of unknown type caught\n";
- return 1;
- }
-
- return 0;
-}

Deleted: branches/quickbook-1.5-spirit2/detail/quickbook.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/quickbook.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,47 +0,0 @@
-/*=============================================================================
- Copyright (c) 2009 Daniel James
- Copyright (c) 2002 2004 2006 Joel de Guzman
- Copyright (c) 2004 Eric Niebler
- http://spirit.sourceforge.net/
-
- 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_QUICKBOOK_HPP)
-#define BOOST_SPIRIT_QUICKBOOK_QUICKBOOK_HPP
-
-#include <boost/spirit/include/phoenix_function.hpp>
-
-namespace quickbook
-{
- extern unsigned qbk_major_version;
- extern unsigned qbk_minor_version;
- extern unsigned qbk_version_n; // qbk_major_version * 100 + qbk_minor_version
-
- struct quickbook_since_impl {
- template <typename Arg1>
- struct result { typedef bool type; };
-
- bool operator()(unsigned min_) const {
- return qbk_version_n >= min_;
- }
- };
-
- struct quickbook_before_impl {
- template <typename Arg1>
- struct result { typedef bool type; };
-
- bool operator()(unsigned max_) const {
- return qbk_version_n < max_;
- }
- };
-
- namespace {
- boost::phoenix::function<quickbook_since_impl> qbk_since;
- boost::phoenix::function<quickbook_before_impl> qbk_before;
- }
-}
-
-#endif

Deleted: branches/quickbook-1.5-spirit2/detail/syntax_highlight.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/syntax_highlight.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,37 +0,0 @@
-#include "../syntax_highlight.hpp"
-#include "./actions_class.hpp"
-
-namespace quickbook
-{
- std::string syntax_highlight::operator()(iterator first, iterator last) const
- {
- escape_actions.phrase.push();
-
- // print the code with syntax coloring
- if (source_mode == "c++")
- {
- cpp_highlight cpp_p(escape_actions);
- parse(first, last, cpp_p);
- }
- else if (source_mode == "python")
- {
- python_highlight python_p(escape_actions);
- parse(first, last, python_p);
- }
- else if (source_mode == "teletype")
- {
- teletype_highlight teletype_p(escape_actions);
- parse(first, last, teletype_p);
- }
- else
- {
- BOOST_ASSERT(0);
- }
-
- std::string str;
- escape_actions.phrase.swap(str);
- escape_actions.phrase.pop();
-
- return str;
- }
-}
\ No newline at end of file

Deleted: branches/quickbook-1.5-spirit2/detail/template_stack.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/template_stack.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,78 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- http://spirit.sourceforge.net/
-
- 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)
-=============================================================================*/
-#include "./template_stack.hpp"
-
-#ifdef BOOST_MSVC
-#pragma warning(disable : 4355)
-#endif
-
-namespace quickbook
-{
- template_stack::template_stack()
- : scope(template_stack::parser(*this))
- , scopes()
- {
- scopes.push_front(template_scope());
- }
-
- template_symbol const* template_stack::find(std::string const& symbol) const
- {
- for (template_scope const* i = &*scopes.begin(); i; i = i->parent_scope)
- {
- if (template_symbol const* ts = i->symbols.find(symbol.c_str()))
- return ts;
- }
- return 0;
- }
-
- template_symbol const* template_stack::find_top_scope(std::string const& symbol) const
- {
- return scopes.front().symbols.find(symbol.c_str());
- }
-
- template_symbols const& template_stack::top() const
- {
- BOOST_ASSERT(!scopes.empty());
- return scopes.front().symbols;
- }
-
- template_scope const& template_stack::top_scope() const
- {
- BOOST_ASSERT(!scopes.empty());
- return scopes.front();
- }
-
- // TODO: Should symbols defined by '[import]' use the current scope?
- void template_stack::add(std::string const& symbol, template_symbol const& ts)
- {
- BOOST_ASSERT(!scopes.empty());
- scopes.front().symbols.add(symbol.c_str(),
- boost::get<2>(ts) ? ts :
- template_symbol(boost::get<0>(ts), boost::get<1>(ts), &top_scope()));
- }
-
- void template_stack::push()
- {
- template_scope const& old_front = scopes.front();
- scopes.push_front(template_scope());
- set_parent_scope(old_front);
- }
-
- void template_stack::pop()
- {
- scopes.pop_front();
- }
-
- void template_stack::set_parent_scope(template_scope const& parent)
- {
- scopes.front().parent_scope = &parent;
- }
-}
-
-

Deleted: branches/quickbook-1.5-spirit2/detail/template_stack.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/template_stack.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,133 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- http://spirit.sourceforge.net/
-
- 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_TEMPLATE_STACK_HPP)
-#define BOOST_SPIRIT_QUICKBOOK_TEMPLATE_STACK_HPP
-
-#include <string>
-#include <deque>
-#include <vector>
-#include <boost/tuple/tuple.hpp>
-#include <boost/assert.hpp>
-#include <boost/spirit/include/classic_position_iterator.hpp>
-#include <boost/spirit/include/qi_symbols.hpp>
-#include <boost/spirit/include/qi_parse.hpp>
-#include <boost/spirit/include/support_attributes.hpp>
-#include <boost/next_prior.hpp>
-
-namespace quickbook
-{
- struct template_scope;
-
- // template symbols with N arguments are stored as follows:
- //
- // vector<std::string>
- // 0: template name
- // 1: template param name[0]
- // 2: template param name[1]
- // ...
- // N: template param name[N-1]
- // N+1: template body
- // file position
- // template scope (only used for 1.5+, 1.4- uses the dynamic scope)
-
- typedef boost::tuple<
- std::vector<std::string>
- , boost::spirit::classic::file_position
- , template_scope const*>
- template_symbol;
-
- typedef boost::spirit::qi::symbols<char, template_symbol> template_symbols;
-
- // template scope
- //
- // 1.4-: parent_scope is the previous scope on the stack
- // (the template's dynamic parent).
- // 1.5+: parent_scope is the template's lexical parent.
- //
- // This means that a search along the parent_scope chain will follow the
- // correct lookup chain for that version of quickboook.
- //
- // symbols contains the templates defined in this scope.
-
- struct template_scope
- {
- template_scope() : parent_scope() {}
- template_scope const* parent_scope;
- template_symbols symbols;
- };
-
- struct template_stack
- {
- typedef std::deque<template_scope> deque;
-
- struct parser : boost::spirit::qi::primitive_parser<parser>
- {
- template <typename Ctx, typename Itr>
- struct attribute {
- typedef template_symbol type;
- };
-
- parser(template_stack& ts)
- : ts(ts) {}
-
- template <typename Iterator, typename Context, typename Skipper, typename Attribute>
- bool parse(Iterator& first, Iterator const& last
- , Context& context, Skipper const& skipper, Attribute& attr) const
- {
- boost::spirit::qi::skip_over(first, last, skipper);
-
- // TODO: Is this right?
- template_symbol result_attr;
-
- // search all scopes for the longest matching symbol.
- Iterator f = first;
- std::ptrdiff_t len = -1;
- for (template_scope const* i = &*ts.scopes.begin(); i; i = i->parent_scope)
- {
- // TODO: Implement this without calling 'base'.
- if(i->symbols.parse(first, last, context, skipper, result_attr) && first.base() - f.base() > len)
- {
- boost::spirit::traits::assign_to(result_attr, attr);
- len = first.base() - f.base();
- }
- first = f;
- }
- if (len >= 0)
- first = boost::next(f, len);
- return len > 0;
- }
-
- template_stack& ts;
- };
-
- template_stack();
- template_symbol const* find(std::string const& symbol) const;
- template_symbol const* find_top_scope(std::string const& symbol) const;
- template_symbols const& top() const;
- template_scope const& top_scope() const;
- // Add the given template symbol to the current scope.
- // If it doesn't have a scope, sets the symbol's scope to the current scope.
- void add(std::string const& symbol, template_symbol const& ts);
- void push();
- void pop();
-
- // Set the current scope's parent.
- void set_parent_scope(template_scope const&);
-
- parser scope;
-
- private:
-
- friend struct parser;
- deque scopes;
- };
-}
-
-#endif // BOOST_SPIRIT_QUICKBOOK_TEMPLATE_STACK_HPP
-

Deleted: branches/quickbook-1.5-spirit2/detail/utils.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/utils.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,254 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- Copyright (c) 2004 Eric Niebler
- http://spirit.sourceforge.net/
-
- 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)
-=============================================================================*/
-#include "./utils.hpp"
-#include <boost/spirit/include/classic_core.hpp>
-
-#include <cctype>
-#include <cstring>
-#include <stdexcept>
-#include <fstream>
-#include <iostream>
-#include <map>
-
-namespace quickbook {
- extern bool ms_errors;
-}
-
-namespace quickbook { namespace detail
-{
- void print_char(char ch, std::ostream& out)
- {
- switch (ch)
- {
- case '<': out << "&lt;"; break;
- case '>': out << "&gt;"; break;
- case '&': out << "&amp;"; break;
- case '"': out << "&quot;"; break;
- default: out << ch; break;
- // note &apos; is not included. see the curse of apos:
- // http://fishbowl.pastiche.org/2003/07/01/the_curse_of_apos
- }
- }
-
- void print_string(std::basic_string<char> const& str, std::ostream& out)
- {
- for (std::string::const_iterator cur = str.begin();
- cur != str.end(); ++cur)
- {
- print_char(*cur, out);
- }
- }
-
- void print_space(char ch, std::ostream& out)
- {
- out << ch;
- }
-
- char filter_identifier_char(char ch)
- {
- if (!std::isalnum(static_cast<unsigned char>(ch)))
- ch = '_';
- return static_cast<char>(std::tolower(static_cast<unsigned char>(ch)));
- }
-
- // un-indent a code segment
- void unindent(std::string& program)
- {
- // Erase leading blank lines and newlines:
- std::string::size_type start = program.find_first_not_of(" \t");
- if (start != std::string::npos &&
- (program[start] == '\r' || program[start] == '\n'))
- {
- program.erase(0, start);
- }
- start = program.find_first_not_of("\r\n");
- program.erase(0, start);
-
- if (program.size() == 0)
- return; // nothing left to do
-
- // Get the first line indent
- std::string::size_type indent = program.find_first_not_of(" \t");
- std::string::size_type pos = 0;
- if (std::string::npos == indent)
- {
- // Nothing left to do here. The code is empty (just spaces).
- // We clear the program to signal the caller that it is empty
- // and return early.
- program.clear();
- return;
- }
-
- // Calculate the minimum indent from the rest of the lines
- do
- {
- pos = program.find_first_not_of("\r\n", pos);
- if (std::string::npos == pos)
- break;
-
- std::string::size_type n = program.find_first_not_of(" \t", pos);
- if (n != std::string::npos)
- {
- char ch = program[n];
- if (ch != '\r' && ch != '\n') // ignore empty lines
- indent = (std::min)(indent, n-pos);
- }
- }
- while (std::string::npos != (pos = program.find_first_of("\r\n", pos)));
-
- // Trim white spaces from column 0..indent
- pos = 0;
- program.erase(0, indent);
- while (std::string::npos != (pos = program.find_first_of("\r\n", pos)))
- {
- if (std::string::npos == (pos = program.find_first_not_of("\r\n", pos)))
- {
- break;
- }
-
- std::string::size_type next = program.find_first_of("\r\n", pos);
- program.erase(pos, (std::min)(indent, next-pos));
- }
- }
-
- // remove the extension from a filename
- std::string
- remove_extension(std::string const& filename)
- {
- std::string::size_type const n = filename.find_last_of('.');
- if(std::string::npos == n)
- {
- return filename;
- }
- else
- {
- return std::string(filename.begin(), filename.begin()+n);
- }
- }
-
- std::string escape_uri(std::string uri)
- {
- for (std::string::size_type n = 0; n < uri.size(); ++n)
- {
- static char const mark[] = "-_.!~*'()?\\/";
- if((!std::isalnum(static_cast<unsigned char>(uri[n])) || 127 < static_cast<unsigned char>(uri[n]))
- && 0 == std::strchr(mark, uri[n]))
- {
- static char const hex[] = "0123456789abcdef";
- char escape[] = { hex[uri[n] / 16], hex[uri[n] % 16] };
- uri.insert(n + 1, escape, 2);
- uri[n] = '%';
- n += 2;
- }
- }
- return uri;
- }
-
- std::ostream& outerr(std::string const& file, int line)
- {
- if (line >= 0)
- {
- if (ms_errors)
- return std::clog << file << "(" << line << "): error: ";
- else
- return std::clog << file << ":" << line << ": error: ";
- }
- else
- {
- return std::clog << file << ": error: ";
- }
- }
-
- std::ostream& outwarn(std::string const& file, int line)
- {
- if (line >= 0)
- {
- if (ms_errors)
- return std::clog << file << "(" << line << "): warning: ";
- else
- return std::clog << file << ":" << line << ": warning: ";
- }
- else
- {
- return std::clog << file << ": warning: ";
- }
- }
-
- // Copy a string, converting mac and windows style newlines to unix
- // newlines.
-
- template <class InputIterator, class OutputIterator>
- void normalize_newlines(InputIterator begin, InputIterator end,
- OutputIterator out)
- {
- while(begin != end) {
- if(*begin == '\r') {
- *out++ = '\n';
- ++begin;
- if(begin != end && *begin == '\n') ++begin;
- }
- else {
- *out++ = *begin++;
- }
- }
- }
-
- int load(std::string const& filename, std::string& storage)
- {
- using std::cerr;
- using std::endl;
- using std::ios;
- using std::ifstream;
- using std::istream_iterator;
-
- ifstream in(filename.c_str(), std::ios_base::in);
-
- if (!in)
- {
- outerr(filename) << "Could not open input file." << endl;
- return 1;
- }
-
- // Turn off white space skipping on the stream
- in.unsetf(ios::skipws);
-
- normalize_newlines(
- istream_iterator<char>(in),
- istream_iterator<char>(),
- std::back_inserter(storage));
-
- // ensure that we have enough trailing newlines to eliminate
- // the need to check for end of file in the grammar.
- storage.push_back('\n');
- storage.push_back('\n');
- return 0;
- }
-
- file_type get_file_type(std::string const& extension)
- {
- static std::map<std::string, file_type> ftypes;
- if (ftypes.empty())
- {
- // init the map of types
- ftypes["cpp"] = cpp_file;
- ftypes["hpp"] = cpp_file;
- ftypes["h"] = cpp_file;
- ftypes["c"] = cpp_file;
- ftypes["cxx"] = cpp_file;
- ftypes["hxx"] = cpp_file;
- ftypes["ipp"] = cpp_file;
- ftypes["py"] = python_file;
- }
- return ftypes[extension];
- }
-
-}}
-
-

Deleted: branches/quickbook-1.5-spirit2/detail/utils.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/detail/utils.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
+++ (empty file)
@@ -1,86 +0,0 @@
-/*=============================================================================
- Copyright (c) 2002 2004 2006 Joel de Guzman
- Copyright (c) 2004 Eric Niebler
- http://spirit.sourceforge.net/
-
- 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_UTILS_HPP)
-#define BOOST_SPIRIT_QUICKBOOK_UTILS_HPP
-
-#include <string>
-#include <iostream>
-#include <cctype>
-#include <boost/ref.hpp>
-#include <boost/assert.hpp>
-
-namespace quickbook { namespace detail
-{
- void print_char(char ch, std::ostream& out);
- void print_string(std::basic_string<char> const& str, std::ostream& out);
- void print_space(char ch, std::ostream& out);
- char filter_identifier_char(char ch);
-
- template <typename Iterator>
- inline std::string
- make_identifier(Iterator const& first, Iterator const& last)
- {
- std::string out_name;
- for (Iterator i = first; i != last; ++i)
- out_name += filter_identifier_char(*i);
- return out_name;
- }
-
- template <typename T>
- struct var_wrapper
- : public ::boost::reference_wrapper<T>
- {
- typedef ::boost::reference_wrapper<T> parent;
-
- explicit inline var_wrapper(T& t) : parent(t) {}
-
- inline T& operator()() const { return parent::get(); }
- };
-
- template <typename T>
- inline var_wrapper<T>
- var(T& t)
- {
- return var_wrapper<T>(t);
- }
-
- // un-indent a code segment
- void unindent(std::string& program);
-
- // remove the extension from a filename
- std::string remove_extension(std::string const& filename);
-
- std::string escape_uri(std::string uri);
-
- // Preformats an error/warning message so that it can be parsed by
- // common IDEs. Uses the ms_errors global to determine if VS format
- // or GCC format. Returns the stream to continue ouput of the verbose
- // error message.
- std::ostream & outerr(std::string const& file, int line = -1);
- std::ostream & outwarn(std::string const& file, int line = -1);
-
- // load file into memory with extra trailing newlines to eliminate
- // the need to check for end of file in the grammar.
- int load(std::string const& filename, std::string& storage);
-
- // given a file extension, return the type of the source file
- // we'll have an internal database for known file types.
-
- enum file_type
- {
- cpp_file
- , python_file
- };
-
- file_type get_file_type(std::string const& extension);
-}}
-
-#endif // BOOST_SPIRIT_QUICKBOOK_UTILS_HPP
-

Modified: branches/quickbook-1.5-spirit2/doc_info.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/doc_info.cpp (original)
+++ branches/quickbook-1.5-spirit2/doc_info.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -10,10 +10,10 @@
 #if !defined(BOOST_SPIRIT_QUICKBOOK_DOC_INFO_HPP)
 #define BOOST_SPIRIT_QUICKBOOK_DOC_INFO_HPP
 
-#include "./grammars.hpp"
-#include "./detail/quickbook.hpp"
-#include "./detail/actions_class.hpp"
-#include "./parse_utils.hpp"
+#include "grammars.hpp"
+#include "quickbook.hpp"
+#include "actions_class.hpp"
+#include "parse_utils.hpp"
 #include <boost/spirit/include/qi_core.hpp>
 #include <boost/spirit/include/qi_uint.hpp>
 #include <boost/spirit/include/qi_eol.hpp>

Modified: branches/quickbook-1.5-spirit2/grammars.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/grammars.hpp (original)
+++ branches/quickbook-1.5-spirit2/grammars.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -13,7 +13,7 @@
 #include <boost/spirit/include/qi_core.hpp>
 #include <boost/spirit/include/qi_symbols.hpp>
 #include <boost/scoped_ptr.hpp>
-#include "./detail/actions_class.hpp"
+#include "actions_class.hpp"
 
 namespace quickbook
 {

Copied: branches/quickbook-1.5-spirit2/input_path.cpp (from r59316, /branches/quickbook-1.5-spirit2/detail/input_path.cpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/input_path.cpp (original)
+++ branches/quickbook-1.5-spirit2/input_path.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -7,7 +7,7 @@
 =============================================================================*/
 
 #include <boost/program_options.hpp>
-#include "./input_path.hpp"
+#include "input_path.hpp"
 
 #if defined(__cygwin__) || defined(__CYGWIN__)
 #include <boost/filesystem/config.hpp>

Copied: branches/quickbook-1.5-spirit2/input_path.hpp (from r59316, /branches/quickbook-1.5-spirit2/detail/input_path.hpp)
==============================================================================

Copied: branches/quickbook-1.5-spirit2/markups.cpp (from r59316, /branches/quickbook-1.5-spirit2/detail/markups.cpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/markups.cpp (original)
+++ branches/quickbook-1.5-spirit2/markups.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -8,7 +8,7 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-#include "./markups.hpp"
+#include "markups.hpp"
 
 namespace quickbook
 {

Copied: branches/quickbook-1.5-spirit2/markups.hpp (from r59316, /branches/quickbook-1.5-spirit2/detail/markups.hpp)
==============================================================================

Modified: branches/quickbook-1.5-spirit2/phrase.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/phrase.cpp (original)
+++ branches/quickbook-1.5-spirit2/phrase.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -8,13 +8,13 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-#include "./phrase.hpp"
-#include "./grammars.hpp"
-#include "./detail/quickbook.hpp"
-#include "./detail/utils.hpp"
-#include "./detail/markups.hpp"
-#include "./detail/actions_class.hpp"
-#include "./parse_utils.hpp"
+#include "phrase.hpp"
+#include "grammars.hpp"
+#include "quickbook.hpp"
+#include "utils.hpp"
+#include "markups.hpp"
+#include "actions_class.hpp"
+#include "parse_utils.hpp"
 #include <map>
 #include <boost/spirit/include/qi_core.hpp>
 #include <boost/spirit/include/qi_auxiliary.hpp>

Modified: branches/quickbook-1.5-spirit2/phrase.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/phrase.hpp (original)
+++ branches/quickbook-1.5-spirit2/phrase.hpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -12,9 +12,9 @@
 
 #include <string>
 #include <map>
-#include "./parse_types.hpp"
-#include "./code.hpp"
-#include "./detail/template_stack.hpp"
+#include "parse_types.hpp"
+#include "code.hpp"
+#include "template_stack.hpp"
 
 namespace quickbook
 {

Modified: branches/quickbook-1.5-spirit2/phrase_actions.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/phrase_actions.cpp (original)
+++ branches/quickbook-1.5-spirit2/phrase_actions.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -8,9 +8,9 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-#include "./phrase.hpp"
-#include "./detail/actions_class.hpp"
-#include "./detail/markups.hpp"
+#include "phrase.hpp"
+#include "actions_class.hpp"
+#include "markups.hpp"
 #include <boost/assert.hpp>
 
 namespace quickbook

Modified: branches/quickbook-1.5-spirit2/phrase_image.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/phrase_image.cpp (original)
+++ branches/quickbook-1.5-spirit2/phrase_image.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -8,8 +8,8 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-#include "./phrase.hpp"
-#include "./detail/actions_class.hpp"
+#include "phrase.hpp"
+#include "actions_class.hpp"
 #include <boost/filesystem/convenience.hpp>
 #include <boost/filesystem/fstream.hpp>
 

Modified: branches/quickbook-1.5-spirit2/phrase_template.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/phrase_template.cpp (original)
+++ branches/quickbook-1.5-spirit2/phrase_template.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -8,10 +8,10 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-#include "./phrase.hpp"
-#include "./grammars.hpp"
-#include "./detail/actions_class.hpp"
-#include "./detail/quickbook.hpp"
+#include "phrase.hpp"
+#include "grammars.hpp"
+#include "actions_class.hpp"
+#include "quickbook.hpp"
 
 namespace quickbook
 {

Copied: branches/quickbook-1.5-spirit2/post_process.cpp (from r59316, /branches/quickbook-1.5-spirit2/detail/post_process.cpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/post_process.cpp (original)
+++ branches/quickbook-1.5-spirit2/post_process.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -6,9 +6,9 @@
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
-#include "./post_process.hpp"
-#include "./utils.hpp"
-#include "../parse_utils.hpp"
+#include "post_process.hpp"
+#include "utils.hpp"
+#include "parse_utils.hpp"
 #include <boost/spirit/include/qi_core.hpp>
 #include <boost/spirit/include/qi_lexeme.hpp>
 #include <boost/spirit/include/qi_char_.hpp>

Copied: branches/quickbook-1.5-spirit2/post_process.hpp (from r59316, /branches/quickbook-1.5-spirit2/detail/post_process.hpp)
==============================================================================

Copied: branches/quickbook-1.5-spirit2/quickbook.cpp (from r59316, /branches/quickbook-1.5-spirit2/detail/quickbook.cpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/quickbook.cpp (original)
+++ branches/quickbook-1.5-spirit2/quickbook.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -7,11 +7,11 @@
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
-#include "./actions_class.hpp"
-#include "../grammars.hpp"
-#include "./post_process.hpp"
-#include "./utils.hpp"
-#include "./input_path.hpp"
+#include "actions_class.hpp"
+#include "grammars.hpp"
+#include "post_process.hpp"
+#include "utils.hpp"
+#include "input_path.hpp"
 #include <boost/spirit/include/classic_iterator.hpp>
 #include <boost/program_options.hpp>
 #include <boost/filesystem/path.hpp>

Copied: branches/quickbook-1.5-spirit2/quickbook.hpp (from r59316, /branches/quickbook-1.5-spirit2/detail/quickbook.hpp)
==============================================================================

Copied: branches/quickbook-1.5-spirit2/syntax_highlight.cpp (from r59316, /branches/quickbook-1.5-spirit2/detail/syntax_highlight.cpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/syntax_highlight.cpp (original)
+++ branches/quickbook-1.5-spirit2/syntax_highlight.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -1,5 +1,5 @@
-#include "../syntax_highlight.hpp"
-#include "./actions_class.hpp"
+#include "syntax_highlight.hpp"
+#include "actions_class.hpp"
 
 namespace quickbook
 {

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 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -15,9 +15,9 @@
 #include <boost/spirit/include/qi_string.hpp>
 #include <boost/spirit/include/qi_directive.hpp>
 #include <boost/fusion/include/adapt_struct.hpp>
-#include "./parse_types.hpp"
-#include "./grammars.hpp"
-#include "./phrase.hpp"
+#include "parse_types.hpp"
+#include "grammars.hpp"
+#include "phrase.hpp"
 
 namespace quickbook
 {

Copied: branches/quickbook-1.5-spirit2/template_stack.cpp (from r59316, /branches/quickbook-1.5-spirit2/detail/template_stack.cpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/template_stack.cpp (original)
+++ branches/quickbook-1.5-spirit2/template_stack.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -6,7 +6,7 @@
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
-#include "./template_stack.hpp"
+#include "template_stack.hpp"
 
 #ifdef BOOST_MSVC
 #pragma warning(disable : 4355)

Copied: branches/quickbook-1.5-spirit2/template_stack.hpp (from r59316, /branches/quickbook-1.5-spirit2/detail/template_stack.hpp)
==============================================================================

Copied: branches/quickbook-1.5-spirit2/utils.cpp (from r59316, /branches/quickbook-1.5-spirit2/detail/utils.cpp)
==============================================================================
--- /branches/quickbook-1.5-spirit2/detail/utils.cpp (original)
+++ branches/quickbook-1.5-spirit2/utils.cpp 2010-01-27 17:05:45 EST (Wed, 27 Jan 2010)
@@ -7,7 +7,7 @@
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
-#include "./utils.hpp"
+#include "utils.hpp"
 #include <boost/spirit/include/classic_core.hpp>
 
 #include <cctype>

Copied: branches/quickbook-1.5-spirit2/utils.hpp (from r59316, /branches/quickbook-1.5-spirit2/detail/utils.hpp)
==============================================================================


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