|
Boost-Commit : |
From: hartmut.kaiser_at_[hidden]
Date: 2008-06-27 15:35:03
Author: hkaiser
Date: 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
New Revision: 46791
URL: http://svn.boost.org/trac/boost/changeset/46791
Log:
Spirit: Fixed most of the inspect errors
Text files modified:
branches/release/boost/spirit/home/classic/core/non_terminal/impl/static.hpp | 4
branches/release/boost/spirit/home/karma/detail/output_iterator.hpp | 12
branches/release/boost/spirit/home/lex/lexer/lexertl/lexertl_generate_static.hpp | 554 ++++++++++++++++++++--------------------
branches/release/boost/spirit/home/phoenix/detail/type_deduction.hpp | 2
branches/release/boost/spirit/home/phoenix/statement/detail/switch.hpp | 6
branches/release/boost/spirit/home/phoenix/statement/for.hpp | 2
branches/release/boost/spirit/home/phoenix/stl/container/container.hpp | 16
branches/release/boost/spirit/home/qi/stream/detail/match_manip.hpp | 4
branches/release/boost/spirit/home/support/char_class/iso8859_1.hpp | 3
branches/release/boost/spirit/home/support/detail/integer/endian.hpp | 10
branches/release/libs/spirit/classic/test/grammar_def_test.cpp | 2
branches/release/libs/spirit/classic/test/mix_and_match_trees.cpp | 2
branches/release/libs/spirit/classic/test/negated_eps_p_test.cpp | 2
branches/release/libs/spirit/phoenix/test/container/container_tests.hpp | 16
branches/release/libs/spirit/phoenix/test/container/container_tests1a.cpp | 2
branches/release/libs/spirit/phoenix/test/container/container_tests3a.cpp | 6
branches/release/libs/spirit/phoenix/test/container/container_tests3b.cpp | 4
branches/release/libs/spirit/phoenix/test/container/container_tests6b.cpp | 6
18 files changed, 328 insertions(+), 325 deletions(-)
Modified: branches/release/boost/spirit/home/classic/core/non_terminal/impl/static.hpp
==============================================================================
--- branches/release/boost/spirit/home/classic/core/non_terminal/impl/static.hpp (original)
+++ branches/release/boost/spirit/home/classic/core/non_terminal/impl/static.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -1,5 +1,5 @@
/*=============================================================================
- Copyright (c) 2006 João Abecasis
+ Copyright (c) 2006 Joao Abecasis
http://spirit.sourceforge.net/
Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -34,7 +34,7 @@
// Requirements:
// T is default constructible
// (There's an alternate implementation that relaxes this
- // requirement -- João Abecasis)
+ // requirement -- Joao Abecasis)
// T::T() MUST not throw!
// this is a requirement of boost::call_once.
//
Modified: branches/release/boost/spirit/home/karma/detail/output_iterator.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/detail/output_iterator.hpp (original)
+++ branches/release/boost/spirit/home/karma/detail/output_iterator.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -152,11 +152,11 @@
return buffer ? buffer->buffer_size() : 0;
}
- private:
+ private:
std::size_t width;
abstract_container<OutputIterator> *buffer;
};
-
+
///////////////////////////////////////////////////////////////////////////
// forward declaration only
///////////////////////////////////////////////////////////////////////////
@@ -321,16 +321,16 @@
output_iterator<ostream_iterator<T, Elem, Traits>, int>
base_type;
typedef ostream_iterator<T, Elem, Traits> base_iterator_type;
- typedef std::basic_ostream<Elem, Traits> ostream_type;
-
+ typedef std::basic_ostream<Elem, Traits> ostream_type;
+
public:
output_iterator(base_iterator_type& sink)
: base_type(sink)
{}
-
+
ostream_type& get_ostream() { return this->sink.get_ostream(); }
};
-
+
///////////////////////////////////////////////////////////////////////////
// Helper class for exception safe enabling of character counting in the
// output iterator
Modified: branches/release/boost/spirit/home/lex/lexer/lexertl/lexertl_generate_static.hpp
==============================================================================
--- branches/release/boost/spirit/home/lex/lexer/lexertl/lexertl_generate_static.hpp (original)
+++ branches/release/boost/spirit/home/lex/lexer/lexertl/lexertl_generate_static.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -30,36 +30,36 @@
{
// we need to re-sort the state names in ascending order if the state
// ids, filling possible gaps in between later
- typedef typename
- boost::lexer::basic_rules<Char>::string_size_t_map::const_iterator
- state_iterator;
- typedef std::map<std::size_t, char const*> reverse_state_map_type;
-
+ typedef typename
+ boost::lexer::basic_rules<Char>::string_size_t_map::const_iterator
+ state_iterator;
+ typedef std::map<std::size_t, char const*> reverse_state_map_type;
+
reverse_state_map_type reverse_state_map;
- state_iterator send = rules_.statemap().end();
- for (state_iterator sit = rules_.statemap().begin(); sit != send; ++sit)
- {
- typedef typename reverse_state_map_type::value_type value_type;
- reverse_state_map.insert(value_type((*sit).second, (*sit).first.c_str()));
- }
+ state_iterator send = rules_.statemap().end();
+ for (state_iterator sit = rules_.statemap().begin(); sit != send; ++sit)
+ {
+ typedef typename reverse_state_map_type::value_type value_type;
+ reverse_state_map.insert(value_type((*sit).second, (*sit).first.c_str()));
+ }
+
+ os_ << "// this table defines the names of the lexer states\n";
+ os_ << "char const* const lexer_state_names" << name_suffix
+ << "[" << rules_.statemap().size() << "] = \n{\n";
+
+ typedef typename reverse_state_map_type::iterator iterator;
+ iterator rend = reverse_state_map.end();
+ std::size_t last_id = 0;
+ for (iterator rit = reverse_state_map.begin(); rit != rend; ++rit)
+ {
+ for (/**/; last_id < (*rit).first; ++last_id)
+ {
+ os_ << " 0, // \"<undefined state>\"\n";
+ }
+ os_ << " \"" << (*rit).second << "\",\n";
+ }
+ os_ << "};\n\n";
- os_ << "// this table defines the names of the lexer states\n";
- os_ << "char const* const lexer_state_names" << name_suffix
- << "[" << rules_.statemap().size() << "] = \n{\n";
-
- typedef typename reverse_state_map_type::iterator iterator;
- iterator rend = reverse_state_map.end();
- std::size_t last_id = 0;
- for (iterator rit = reverse_state_map.begin(); rit != rend; ++rit)
- {
- for (/**/; last_id < (*rit).first; ++last_id)
- {
- os_ << " 0, // \"<undefined state>\"\n";
- }
- os_ << " \"" << (*rit).second << "\",\n";
- }
- os_ << "};\n\n";
-
return true;
}
@@ -75,16 +75,16 @@
if (sm_._lookup->empty())
return false;
- std::size_t const dfas_ = sm_._dfa->size();
- std::size_t const lookups_ = sm_._lookup->front()->size();
+ std::size_t const dfas_ = sm_._dfa->size();
+ std::size_t const lookups_ = sm_._lookup->front()->size();
- os_ << "// Copyright (c) 2008 Ben Hanson\n";
- os_ << "//\n";
- os_ << "// Distributed under the Boost Software License, "
- "Version 1.0. (See accompanying\n";
- os_ << "// file licence_1_0.txt or copy at "
- "http://www.boost.org/LICENSE_1_0.txt)\n\n";
- os_ << "// Auto-generated by boost::lexer\n";
+ os_ << "// Copyright (c) 2008 Ben Hanson\n";
+ os_ << "//\n";
+ os_ << "// Distributed under the Boost Software License, "
+ "Version 1.0. (See accompanying\n";
+ os_ << "// file licence_1_0.txt or copy at "
+ "http://www.boost.org/LICENSE_1_0.txt)\n\n";
+ os_ << "// Auto-generated by boost::lexer\n";
std::string guard(__DATE__ "_" __TIME__);
std::string::size_type p = guard.find_first_of(": ");
@@ -94,32 +94,32 @@
p = guard.find_first_of(": ", p);
}
- os_ << "#if !defined(BOOST_SPIRIT_LEXER_NEXT_TOKEN_" << guard << ")\n";
- os_ << "#define BOOST_SPIRIT_LEXER_NEXT_TOKEN_" << guard << "\n\n";
-
- os_ << "#include <boost/detail/iterator.hpp>\n";
- os_ << "#include <boost/spirit/home/support/detail/lexer/char_traits.hpp>\n\n";
-
- os_ << "// the generated table of state names and the tokenizer have to be\n"
- "// defined in the boost::spirit::lex::static namespace\n";
- os_ << "namespace boost { namespace spirit { namespace lex { "
- "namespace static_ {\n\n";
+ os_ << "#if !defined(BOOST_SPIRIT_LEXER_NEXT_TOKEN_" << guard << ")\n";
+ os_ << "#define BOOST_SPIRIT_LEXER_NEXT_TOKEN_" << guard << "\n\n";
+
+ os_ << "#include <boost/detail/iterator.hpp>\n";
+ os_ << "#include <boost/spirit/home/support/detail/lexer/char_traits.hpp>\n\n";
+
+ os_ << "// the generated table of state names and the tokenizer have to be\n"
+ "// defined in the boost::spirit::lex::static namespace\n";
+ os_ << "namespace boost { namespace spirit { namespace lex { "
+ "namespace static_ {\n\n";
// generate the table containing state names
if (!generate_cpp_state_names(rules_, os_, name_suffix))
return false;
- os_ << "template<typename Iterator>\n";
- os_ << "std::size_t next_token" << name_suffix << " (";
+ os_ << "template<typename Iterator>\n";
+ os_ << "std::size_t next_token" << name_suffix << " (";
if (dfas_ > 1 || !optimize_parameters)
{
- os_ << "std::size_t &start_state_, ";
+ os_ << "std::size_t &start_state_, ";
}
if (sm_._seen_BOL_assertion || !optimize_parameters)
{
- os_ << "Iterator const& start_, ";
+ os_ << "Iterator const& start_, ";
}
if (dfas_ > 1 || sm_._seen_BOL_assertion || !optimize_parameters)
@@ -127,26 +127,26 @@
os_ << "\n ";
}
- os_ << "Iterator &start_token_, Iterator const& end_)\n";
- os_ << "{\n";
- os_ << " enum {end_state_index, id_index, state_index, bol_index, "
- "eol_index,\n";
- os_ << " dead_state_index, dfa_offset};\n";
- os_ << " static const std::size_t npos = static_cast"
- "<std::size_t>(~0);\n";
+ os_ << "Iterator &start_token_, Iterator const& end_)\n";
+ os_ << "{\n";
+ os_ << " enum {end_state_index, id_index, state_index, bol_index, "
+ "eol_index,\n";
+ os_ << " dead_state_index, dfa_offset};\n";
+ os_ << " static const std::size_t npos = static_cast"
+ "<std::size_t>(~0);\n";
- if (dfas_ > 1)
- {
+ if (dfas_ > 1)
+ {
for (std::size_t state_ = 0; state_ < dfas_; ++state_)
{
std::size_t i_ = 0;
std::size_t j_ = 1;
std::size_t count_ = lookups_ / 8;
- std::size_t const* lookup_ = &sm_._lookup[state_]->front ();
- std::size_t const* dfa_ = &sm_._dfa[state_]->front ();
+ std::size_t const* lookup_ = &sm_._lookup[state_]->front ();
+ std::size_t const* dfa_ = &sm_._dfa[state_]->front ();
- os_ << " static const std::size_t lookup" << state_
- << "_[" << lookups_ << "] = {";
+ os_ << " static const std::size_t lookup" << state_
+ << "_[" << lookups_ << "] = {";
for (/**/; i_ < count_; ++i_)
{
@@ -246,19 +246,19 @@
}
os_ << "};\n";
- }
- else
- {
- std::size_t const* lookup_ = &sm_._lookup[0]->front();
- std::size_t const* dfa_ = &sm_._dfa[0]->front();
+ }
+ else
+ {
+ std::size_t const* lookup_ = &sm_._lookup[0]->front();
+ std::size_t const* dfa_ = &sm_._dfa[0]->front();
std::size_t i_ = 0;
std::size_t j_ = 1;
std::size_t count_ = lookups_ / 8;
- os_ << " static const std::size_t lookup_[";
- os_ << sm_._lookup[0]->size() << "] = {";
+ os_ << " static const std::size_t lookup_[";
+ os_ << sm_._lookup[0]->size() << "] = {";
- for (; i_ < count_; ++i_)
+ for (; i_ < count_; ++i_)
{
const std::size_t index_ = i_ * 8;
@@ -277,11 +277,11 @@
j_ = 1;
}
- os_ << "};\n";
- os_ << " static const std::size_t dfa_alphabet_ = " <<
- sm_._dfa_alphabet.front () << ";\n";
- os_ << " static const std::size_t dfa_[" <<
- sm_._dfa[0]->size () << "] = {";
+ os_ << "};\n";
+ os_ << " static const std::size_t dfa_alphabet_ = " <<
+ sm_._dfa_alphabet.front () << ";\n";
+ os_ << " static const std::size_t dfa_[" <<
+ sm_._dfa[0]->size () << "] = {";
count_ = sm_._dfa[0]->size () / 8;
for (i_ = 0; i_ < count_; ++i_)
@@ -321,145 +321,145 @@
}
os_ << "};\n";
- }
+ }
+
+ os_ << "\n if (start_token_ == end_) return 0;\n\n";
+
+ if (dfas_ > 1)
+ {
+ os_ << "again:\n";
+ os_ << " const std::size_t * lookup_ = lookup_arr_[start_state_];\n";
+ os_ << " std::size_t dfa_alphabet_ = dfa_alphabet_arr_[start_state_];\n";
+ os_ << " const std::size_t *dfa_ = dfa_arr_[start_state_];\n";
+ }
+
+ os_ << " const std::size_t *ptr_ = dfa_ + dfa_alphabet_;\n";
+ os_ << " Iterator curr_ = start_token_;\n";
+ os_ << " bool end_state_ = *ptr_ != 0;\n";
+ os_ << " std::size_t id_ = *(ptr_ + id_index);\n";
+ os_ << " Iterator end_token_ = start_token_;\n";
+ os_ << '\n';
+ os_ << " while (curr_ != end_)\n";
+ os_ << " {\n";
+
+ if (sm_._seen_BOL_assertion)
+ {
+ os_ << " std::size_t const BOL_state_ = ptr_[bol_index];\n";
+ }
+
+ if (sm_._seen_EOL_assertion)
+ {
+ os_ << " std::size_t const EOL_state_ = ptr_[eol_index];\n";
+ }
+
+ if (sm_._seen_BOL_assertion || sm_._seen_EOL_assertion)
+ {
+ os_ << '\n';
+ }
+
+ if (sm_._seen_BOL_assertion && sm_._seen_EOL_assertion)
+ {
+ os_ << " if (BOL_state_ && (start_token_ == start_ ||\n";
+ os_ << " *(start_token_ - 1) == '\\n'))\n";
+ os_ << " {\n";
+ os_ << " ptr_ = &dfa_[BOL_state_ * dfa_alphabet_];\n";
+ os_ << " }\n";
+ os_ << " else if (EOL_state_ && *curr_ == '\\n')\n";
+ os_ << " {\n";
+ os_ << " ptr_ = &dfa_[EOL_state_ * dfa_alphabet_];\n";
+ os_ << " }\n";
+ os_ << " else\n";
+ os_ << " {\n";
+ os_ << " std::size_t const state_ =\n";
+
+ if (lookups_ == 256)
+ {
+ os_ << " ptr_[lookup_[<typename Traits::index_type>"
+ "(*curr_++)]];\n";
+ }
+ else
+ {
+ os_ << " ptr_[lookup_[*curr_++]];\n";
+ }
+
+ os_ << '\n';
+ os_ << " if (state_ == 0) break;\n";
+ os_ << '\n';
+ os_ << " ptr_ = &dfa_[state_ * dfa_alphabet_];\n";
+ os_ << " }\n";
+ }
+ else if (sm_._seen_BOL_assertion)
+ {
+ os_ << " if (BOL_state_ && (start_token_ == start_ ||\n";
+ os_ << " *(start_token_ - 1) == '\\n'))\n";
+ os_ << " {\n";
+ os_ << " ptr_ = &dfa_[BOL_state_ * dfa_alphabet_];\n";
+ os_ << " }\n";
+ os_ << " else\n";
+ os_ << " {\n";
+ os_ << " std::size_t const state_ =\n";
+
+ if (lookups_ == 256)
+ {
+ os_ << " ptr_[lookup_[static_cast<unsigned char>\n";
+ os_ << " (*curr_++)]];\n";
+ }
+ else
+ {
+ os_ << " ptr_[lookup_[*curr_++]];\n";
+ }
- os_ << "\n if (start_token_ == end_) return 0;\n\n";
+ os_ << '\n';
+ os_ << " if (state_ == 0) break;\n";
+ os_ << '\n';
+ os_ << " ptr_ = &dfa_[state_ * dfa_alphabet_];\n";
+ os_ << " }\n";
+ }
+ else if (sm_._seen_EOL_assertion)
+ {
+ os_ << " if (EOL_state_ && *curr_ == '\\n')\n";
+ os_ << " {\n";
+ os_ << " ptr_ = &dfa_[EOL_state_ * dfa_alphabet_];\n";
+ os_ << " }\n";
+ os_ << " else\n";
+ os_ << " {\n";
+ os_ << " std::size_t const state_ =\n";
- if (dfas_ > 1)
- {
- os_ << "again:\n";
- os_ << " const std::size_t * lookup_ = lookup_arr_[start_state_];\n";
- os_ << " std::size_t dfa_alphabet_ = dfa_alphabet_arr_[start_state_];\n";
- os_ << " const std::size_t *dfa_ = dfa_arr_[start_state_];\n";
- }
-
- os_ << " const std::size_t *ptr_ = dfa_ + dfa_alphabet_;\n";
- os_ << " Iterator curr_ = start_token_;\n";
- os_ << " bool end_state_ = *ptr_ != 0;\n";
- os_ << " std::size_t id_ = *(ptr_ + id_index);\n";
- os_ << " Iterator end_token_ = start_token_;\n";
- os_ << '\n';
- os_ << " while (curr_ != end_)\n";
- os_ << " {\n";
-
- if (sm_._seen_BOL_assertion)
- {
- os_ << " std::size_t const BOL_state_ = ptr_[bol_index];\n";
- }
-
- if (sm_._seen_EOL_assertion)
- {
- os_ << " std::size_t const EOL_state_ = ptr_[eol_index];\n";
- }
-
- if (sm_._seen_BOL_assertion || sm_._seen_EOL_assertion)
- {
- os_ << '\n';
- }
-
- if (sm_._seen_BOL_assertion && sm_._seen_EOL_assertion)
- {
- os_ << " if (BOL_state_ && (start_token_ == start_ ||\n";
- os_ << " *(start_token_ - 1) == '\\n'))\n";
- os_ << " {\n";
- os_ << " ptr_ = &dfa_[BOL_state_ * dfa_alphabet_];\n";
- os_ << " }\n";
- os_ << " else if (EOL_state_ && *curr_ == '\\n')\n";
- os_ << " {\n";
- os_ << " ptr_ = &dfa_[EOL_state_ * dfa_alphabet_];\n";
- os_ << " }\n";
- os_ << " else\n";
- os_ << " {\n";
- os_ << " std::size_t const state_ =\n";
-
- if (lookups_ == 256)
- {
- os_ << " ptr_[lookup_[<typename Traits::index_type>"
- "(*curr_++)]];\n";
- }
- else
- {
- os_ << " ptr_[lookup_[*curr_++]];\n";
- }
-
- os_ << '\n';
- os_ << " if (state_ == 0) break;\n";
- os_ << '\n';
- os_ << " ptr_ = &dfa_[state_ * dfa_alphabet_];\n";
- os_ << " }\n";
- }
- else if (sm_._seen_BOL_assertion)
- {
- os_ << " if (BOL_state_ && (start_token_ == start_ ||\n";
- os_ << " *(start_token_ - 1) == '\\n'))\n";
- os_ << " {\n";
- os_ << " ptr_ = &dfa_[BOL_state_ * dfa_alphabet_];\n";
- os_ << " }\n";
- os_ << " else\n";
- os_ << " {\n";
- os_ << " std::size_t const state_ =\n";
-
- if (lookups_ == 256)
- {
- os_ << " ptr_[lookup_[static_cast<unsigned char>\n";
- os_ << " (*curr_++)]];\n";
- }
- else
- {
- os_ << " ptr_[lookup_[*curr_++]];\n";
- }
-
- os_ << '\n';
- os_ << " if (state_ == 0) break;\n";
- os_ << '\n';
- os_ << " ptr_ = &dfa_[state_ * dfa_alphabet_];\n";
- os_ << " }\n";
- }
- else if (sm_._seen_EOL_assertion)
- {
- os_ << " if (EOL_state_ && *curr_ == '\\n')\n";
- os_ << " {\n";
- os_ << " ptr_ = &dfa_[EOL_state_ * dfa_alphabet_];\n";
- os_ << " }\n";
- os_ << " else\n";
- os_ << " {\n";
- os_ << " std::size_t const state_ =\n";
-
- if (lookups_ == 256)
- {
- os_ << " ptr_[lookup_[static_cast<unsigned char>\n";
- os_ << " (*curr_++)]];\n";
- }
- else
- {
- os_ << " ptr_[lookup_[*curr_++]];\n";
- }
-
- os_ << '\n';
- os_ << " if (state_ == 0) break;\n";
- os_ << '\n';
- os_ << " ptr_ = &dfa_[state_ * dfa_alphabet_];\n";
- os_ << " }\n";
- }
- else
- {
- os_ << " std::size_t const state_ =\n";
-
- if (lookups_ == 256)
- {
- os_ << " ptr_[lookup_[static_cast<unsigned char>\n";
- os_ << " (*curr_++)]];\n";
- }
- else
- {
- os_ << " ptr_[lookup_[*curr_++]];\n";
- }
-
- os_ << '\n';
- os_ << " if (state_ == 0) break;\n";
- os_ << '\n';
- os_ << " ptr_ = &dfa_[state_ * dfa_alphabet_];\n";
- }
+ if (lookups_ == 256)
+ {
+ os_ << " ptr_[lookup_[static_cast<unsigned char>\n";
+ os_ << " (*curr_++)]];\n";
+ }
+ else
+ {
+ os_ << " ptr_[lookup_[*curr_++]];\n";
+ }
+
+ os_ << '\n';
+ os_ << " if (state_ == 0) break;\n";
+ os_ << '\n';
+ os_ << " ptr_ = &dfa_[state_ * dfa_alphabet_];\n";
+ os_ << " }\n";
+ }
+ else
+ {
+ os_ << " std::size_t const state_ =\n";
+
+ if (lookups_ == 256)
+ {
+ os_ << " ptr_[lookup_[static_cast<unsigned char>\n";
+ os_ << " (*curr_++)]];\n";
+ }
+ else
+ {
+ os_ << " ptr_[lookup_[*curr_++]];\n";
+ }
+
+ os_ << '\n';
+ os_ << " if (state_ == 0) break;\n";
+ os_ << '\n';
+ os_ << " ptr_ = &dfa_[state_ * dfa_alphabet_];\n";
+ }
os_ << '\n';
os_ << " if (*ptr_)\n";
@@ -467,71 +467,71 @@
os_ << " end_state_ = true;\n";
os_ << " id_ = *(ptr_ + id_index);\n";
- if (dfas_ > 1)
- {
- os_ << " start_state_ = *(ptr_ + state_index);\n";
- }
-
- os_ << " end_token_ = curr_;\n";
- os_ << " }\n";
- os_ << " }\n";
- os_ << '\n';
-
- if (sm_._seen_EOL_assertion)
- {
- os_ << " const std::size_t EOL_state_ = ptr_[eol_index];\n";
- os_ << '\n';
- os_ << " if (EOL_state_ && curr_ == end_)\n";
- os_ << " {\n";
- os_ << " ptr_ = &dfa_[EOL_state_ * dfa_alphabet_];\n";
- os_ << '\n';
- os_ << " if (*ptr_)\n";
- os_ << " {\n";
- os_ << " end_state_ = true;\n";
- os_ << " id_ = *(ptr_ + id_index);\n";
-
- if (dfas_ > 1)
- {
- os_ << " start_state_ = *(ptr_ + state_index);\n";
- }
-
- os_ << " end_token_ = curr_;\n";
- os_ << " }\n";
- os_ << " }\n";
- os_ << '\n';
- }
-
- os_ << " if (end_state_)\n";
- os_ << " {\n";
- os_ << " // return longest match\n";
- os_ << " start_token_ = end_token_;\n";
-
- if (dfas_ > 1)
- {
- os_ << '\n';
- os_ << " if (id_ == 0) goto again;\n";
- }
-
- os_ << " }\n";
- os_ << " else\n";
- os_ << " {\n";
-
- if (skip_on_nomatch)
- {
- os_ << " // No match causes char to be skipped\n";
- os_ << " ++start_token_;\n";
+ if (dfas_ > 1)
+ {
+ os_ << " start_state_ = *(ptr_ + state_index);\n";
+ }
+
+ os_ << " end_token_ = curr_;\n";
+ os_ << " }\n";
+ os_ << " }\n";
+ os_ << '\n';
+
+ if (sm_._seen_EOL_assertion)
+ {
+ os_ << " const std::size_t EOL_state_ = ptr_[eol_index];\n";
+ os_ << '\n';
+ os_ << " if (EOL_state_ && curr_ == end_)\n";
+ os_ << " {\n";
+ os_ << " ptr_ = &dfa_[EOL_state_ * dfa_alphabet_];\n";
+ os_ << '\n';
+ os_ << " if (*ptr_)\n";
+ os_ << " {\n";
+ os_ << " end_state_ = true;\n";
+ os_ << " id_ = *(ptr_ + id_index);\n";
+
+ if (dfas_ > 1)
+ {
+ os_ << " start_state_ = *(ptr_ + state_index);\n";
+ }
+
+ os_ << " end_token_ = curr_;\n";
+ os_ << " }\n";
+ os_ << " }\n";
+ os_ << '\n';
+ }
+
+ os_ << " if (end_state_)\n";
+ os_ << " {\n";
+ os_ << " // return longest match\n";
+ os_ << " start_token_ = end_token_;\n";
+
+ if (dfas_ > 1)
+ {
+ os_ << '\n';
+ os_ << " if (id_ == 0) goto again;\n";
+ }
+
+ os_ << " }\n";
+ os_ << " else\n";
+ os_ << " {\n";
+
+ if (skip_on_nomatch)
+ {
+ os_ << " // No match causes char to be skipped\n";
+ os_ << " ++start_token_;\n";
}
- os_ << " id_ = npos;\n";
- os_ << " }\n";
- os_ << '\n';
- os_ << " return id_;\n";
- os_ << "}\n\n";
-
- os_ << "}}}} // namespace boost::spirit::lex::static_\n\n";
-
- os_ << "#endif\n";
-
+ os_ << " id_ = npos;\n";
+ os_ << " }\n";
+ os_ << '\n';
+ os_ << " return id_;\n";
+ os_ << "}\n\n";
+
+ os_ << "}}}} // namespace boost::spirit::lex::static_\n\n";
+
+ os_ << "#endif\n";
+
return os_.good();
}
Modified: branches/release/boost/spirit/home/phoenix/detail/type_deduction.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/detail/type_deduction.hpp (original)
+++ branches/release/boost/spirit/home/phoenix/detail/type_deduction.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -459,7 +459,7 @@
\
BOOST_STATIC_CONSTANT(int, index = (size / sizeof(char)) - 1); \
\
- typedef typename mpl::at_c< \
+ typedef typename mpl::at_c< \
typename base_type::types, index>::type id; \
typedef typename id::type type; \
};
Modified: branches/release/boost/spirit/home/phoenix/statement/detail/switch.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/statement/detail/switch.hpp (original)
+++ branches/release/boost/spirit/home/phoenix/statement/detail/switch.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -74,21 +74,21 @@
is_default_case<Case>
, fusion::result_of::push_front<Seq const, actor<Case> >
, fusion::result_of::push_back<Seq const, actor<Case> >
- >::type>::type
+ >::type>::type
type;
static type
eval(Seq const& seq, Case const& case_, mpl::false_)
{
return fusion::as_vector(
- fusion::push_back(seq, actor<Case>(case_)));
+ fusion::push_back(seq, actor<Case>(case_)));
}
static type
eval(Seq const& seq, Case const& case_, mpl::true_)
{
return fusion::as_vector(
- fusion::push_front(seq, actor<Case>(case_)));
+ fusion::push_front(seq, actor<Case>(case_)));
}
static type
Modified: branches/release/boost/spirit/home/phoenix/statement/for.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/statement/for.hpp (original)
+++ branches/release/boost/spirit/home/phoenix/statement/for.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -27,7 +27,7 @@
, typename Init, typename Cond, typename Step, typename Do>
static void
eval(
- Env const& env
+ Env const& env
, Init& init, Cond& cond, Step& step, Do& do_)
{
for (init.eval(env); cond.eval(env); step.eval(env))
Modified: branches/release/boost/spirit/home/phoenix/stl/container/container.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/stl/container/container.hpp (original)
+++ branches/release/boost/spirit/home/phoenix/stl/container/container.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -37,17 +37,17 @@
// Lazy functions are provided for all of the member functions of the
// following containers:
//
-// deque · list · map · multimap · vector.
+// deque - list - map - multimap - vector.
//
// Indeed, should *your* class have member functions with the same names
// and signatures as those listed below, then it will automatically be
// supported. To summarize, lazy functions are provided for member
// functions:
//
-// assign · at · back · begin · capacity · clear · empty · end ·
-// erase · front · get_allocator · insert · key_comp · max_size ·
-// pop_back · pop_front · push_back · push_front · rbegin · rend ·
-// reserve · resize . size · splice · value_comp.
+// assign - at - back - begin - capacity - clear - empty - end -
+// erase - front - get_allocator - insert - key_comp - max_size -
+// pop_back - pop_front - push_back - push_front - rbegin - rend -
+// reserve - resize . size - splice - value_comp.
//
// The lazy functions' names are the same as the corresponding member
// function. Sample usage:
@@ -322,7 +322,7 @@
template <typename C>
struct result
{
- typedef typename allocator_type_of<C>::type type;
+ typedef typename allocator_type_of<C>::type type;
};
template <typename C>
@@ -392,7 +392,7 @@
typedef typename
boost::mpl::eval_if<
- boost::is_same<Arg2, fusion::void_>
+ boost::is_same<Arg2, fusion::void_>
, choice_1
, choice_2
>::type
@@ -403,7 +403,7 @@
typename result<C, Arg1>::type
operator()(C& c, Arg1 const& arg1) const
{
- return c.insert(arg1);
+ return c.insert(arg1);
}
template <typename C, typename Arg1, typename Arg2>
Modified: branches/release/boost/spirit/home/qi/stream/detail/match_manip.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/stream/detail/match_manip.hpp (original)
+++ branches/release/boost/spirit/home/qi/stream/detail/match_manip.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -1,7 +1,7 @@
// Copyright (c) 2001-2008 Hartmut Kaiser
//
-// Distributed under the Boist Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boist.org/LICENSE_1_0.txt)
+// Distributed under 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_FORMAT_MANIP_MAY_05_2007_1203PM)
#define BOOST_SPIRIT_FORMAT_MANIP_MAY_05_2007_1203PM
Modified: branches/release/boost/spirit/home/support/char_class/iso8859_1.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/char_class/iso8859_1.hpp (original)
+++ branches/release/boost/spirit/home/support/char_class/iso8859_1.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -30,6 +30,9 @@
///////////////////////////////////////////////////////////////////////////
// ISO 8859-1 character classification table
+ //
+ // the comments intentionally contain non-ascii characters
+ // boostinspect:noascii
///////////////////////////////////////////////////////////////////////////
const unsigned char iso8859_1_char_types[] =
{
Modified: branches/release/boost/spirit/home/support/detail/integer/endian.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/detail/integer/endian.hpp (original)
+++ branches/release/boost/spirit/home/support/detail/integer/endian.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -151,7 +151,7 @@
operator T() const
{ return detail::load_big_endian<T, n_bits/8>(bytes); }
private:
- char bytes[n_bits/8];
+ char bytes[n_bits/8];
};
template <typename T, std::size_t n_bits>
@@ -166,7 +166,7 @@
operator T() const
{ return detail::load_little_endian<T, n_bits/8>(bytes); }
private:
- char bytes[n_bits/8];
+ char bytes[n_bits/8];
};
template <typename T, std::size_t n_bits>
@@ -187,7 +187,7 @@
{ return detail::load_little_endian<T, n_bits/8>(bytes); }
# endif
private:
- char bytes[n_bits/8];
+ char bytes[n_bits/8];
};
// Specializations that mimic built-in integer types.
@@ -211,7 +211,7 @@
{ return detail::load_big_endian<T, sizeof(T)>(&integer); }
#endif
private:
- T integer;
+ T integer;
};
template <typename T, std::size_t n_bits>
@@ -233,7 +233,7 @@
{ return detail::load_little_endian<T, sizeof(T)>(&integer); }
#endif
private:
- T integer;
+ T integer;
};
// naming convention typedefs --------------------------------------------//
Modified: branches/release/libs/spirit/classic/test/grammar_def_test.cpp
==============================================================================
--- branches/release/libs/spirit/classic/test/grammar_def_test.cpp (original)
+++ branches/release/libs/spirit/classic/test/grammar_def_test.cpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2005 João Abecasis
+// Copyright (c) 2005 Joao Abecasis
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
Modified: branches/release/libs/spirit/classic/test/mix_and_match_trees.cpp
==============================================================================
--- branches/release/libs/spirit/classic/test/mix_and_match_trees.cpp (original)
+++ branches/release/libs/spirit/classic/test/mix_and_match_trees.cpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2006 João Abecasis
+// Copyright (c) 2006 Joao Abecasis
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
Modified: branches/release/libs/spirit/classic/test/negated_eps_p_test.cpp
==============================================================================
--- branches/release/libs/spirit/classic/test/negated_eps_p_test.cpp (original)
+++ branches/release/libs/spirit/classic/test/negated_eps_p_test.cpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -1,5 +1,5 @@
/*=============================================================================
- Copyright (c) 2004 João Abecasis
+ Copyright (c) 2004 Joao Abecasis
Copyright (c) 2004 Joel de Guzman
http://spirit.sourceforge.net/
Modified: branches/release/libs/spirit/phoenix/test/container/container_tests.hpp
==============================================================================
--- branches/release/libs/spirit/phoenix/test/container/container_tests.hpp (original)
+++ branches/release/libs/spirit/phoenix/test/container/container_tests.hpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -85,8 +85,8 @@
assign(arg1, arg2, arg3)(c, first, last);
if (test(c.size() != size)) {
cerr << "Failed " << typeid(Container).name()
- << " test_assign2 1\n"
- << "size == " << c.size() << '\n';
+ << " test_assign2 1\n"
+ << "size == " << c.size() << '\n';
return;
}
@@ -313,7 +313,7 @@
{
test_erase(c);
if (boost::report_errors() != 0)
- return;
+ return;
using phx::arg_names::arg1;
using phx::arg_names::arg2;
@@ -322,7 +322,7 @@
typename Container::value_type const value = *c.begin();
typename Container::key_type const key = value.first;
typename Container::size_type const removed =
- erase(arg1, arg2)(c, key);
+ erase(arg1, arg2)(c, key);
if (test(removed != 1)) {
cerr << "Failed " << typeid(Container).name() << " test_map_erase 1\n";
return;
@@ -433,7 +433,7 @@
// pair<iterator, bool> insert(const value_type& val);
Map::value_type const value2(1400, 2200);
std::pair<Map::iterator, bool> result =
- phx::insert(arg1, arg2)(c, value2);
+ phx::insert(arg1, arg2)(c, value2);
if (test(!result.second)) {
cerr << "Failed " << typeid(Map).name() << " test_map_insert 2\n";
return;
@@ -468,7 +468,7 @@
if (test(it != c.begin() || *it != *(++it))) {
cerr << "Failed " << typeid(Multimap).name()
- << " test_multimap_insert 1\n";
+ << " test_multimap_insert 1\n";
return;
}
@@ -478,7 +478,7 @@
it = phx::insert(arg1, arg2)(c, value2);
if (test(it == c.end())) {
cerr << "Failed " << typeid(Multimap).name()
- << " test_multimap_insert 2\n";
+ << " test_multimap_insert 2\n";
return;
}
@@ -490,7 +490,7 @@
phx::insert(arg1, const_c.begin(), const_c.end())(c);
if (test(c.size() != size + const_c.size())) {
cerr << "Failed " << typeid(Multimap).name()
- << " test_multimap_insert 3\n";
+ << " test_multimap_insert 3\n";
return;
}
}
Modified: branches/release/libs/spirit/phoenix/test/container/container_tests1a.cpp
==============================================================================
--- branches/release/libs/spirit/phoenix/test/container/container_tests1a.cpp (original)
+++ branches/release/libs/spirit/phoenix/test/container/container_tests1a.cpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -28,7 +28,7 @@
int_vector::iterator it = data.begin();
int_vector::iterator const end = data.end();
for (; it != end; ++it)
- *it += size;
+ *it += size;
return data;
}
Modified: branches/release/libs/spirit/phoenix/test/container/container_tests3a.cpp
==============================================================================
--- branches/release/libs/spirit/phoenix/test/container/container_tests3a.cpp (original)
+++ branches/release/libs/spirit/phoenix/test/container/container_tests3a.cpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -17,8 +17,8 @@
int_vector::const_iterator it = data.begin();
int_vector::const_iterator const end = data.end();
for (; it != end; ++it) {
- int const value = *it;
- result[value] = 100 * value;
+ int const value = *it;
+ result[value] = 100 * value;
}
return result;
}
@@ -39,7 +39,7 @@
int_vector::iterator it = data.begin();
int_vector::iterator const end = data.end();
for (; it != end; ++it)
- *it += size;
+ *it += size;
return data;
}
Modified: branches/release/libs/spirit/phoenix/test/container/container_tests3b.cpp
==============================================================================
--- branches/release/libs/spirit/phoenix/test/container/container_tests3b.cpp (original)
+++ branches/release/libs/spirit/phoenix/test/container/container_tests3b.cpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -17,8 +17,8 @@
int_vector::const_iterator it = data.begin();
int_vector::const_iterator const end = data.end();
for (; it != end; ++it) {
- int const value = *it;
- result[value] = 100 * value;
+ int const value = *it;
+ result[value] = 100 * value;
}
return result;
}
Modified: branches/release/libs/spirit/phoenix/test/container/container_tests6b.cpp
==============================================================================
--- branches/release/libs/spirit/phoenix/test/container/container_tests6b.cpp (original)
+++ branches/release/libs/spirit/phoenix/test/container/container_tests6b.cpp 2008-06-27 15:35:01 EDT (Fri, 27 Jun 2008)
@@ -17,8 +17,8 @@
int_vector::const_iterator it = data.begin();
int_vector::const_iterator const end = data.end();
for (; it != end; ++it) {
- int const value = *it;
- result[value] = 100 * value;
+ int const value = *it;
+ result[value] = 100 * value;
}
return result;
}
@@ -47,7 +47,7 @@
int_vector::iterator it = data.begin();
int_vector::iterator const end = data.end();
for (; it != end; ++it)
- *it += size;
+ *it += size;
return data;
}
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