summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip
swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0. Updated our update.sh script to stop on error. Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to missing include of <iostream> with newer Boost. Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp')
-rw-r--r--3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp
index 49bea2f..daa06e7 100644
--- a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp
+++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp
@@ -12,6 +12,7 @@
#include "partition/charset.hpp"
#include "partition/equivset.hpp"
#include <memory>
+#include <limits>
#include "parser/tree/node.hpp"
#include "parser/parser.hpp"
#include "containers/ptr_list.hpp"
@@ -185,10 +186,10 @@ protected:
while (regex_iter_ != regex_iter_end_)
{
// re-declare var, otherwise we perform an assignment..!
- const typename rules::string &regex_ = *regex_iter_;
+ const typename rules::string &regex2_ = *regex_iter_;
- root_ = parser::parse (regex_.c_str (),
- regex_.c_str () + regex_.size (), *ids_iter_,
+ root_ = parser::parse (regex2_.c_str (),
+ regex2_.c_str () + regex2_.size (), *ids_iter_,
*unique_ids_iter_, *states_iter_, rules_.flags (),
rules_.locale (), node_ptr_vector_, macromap_, token_map_,
internals_._seen_BOL_assertion,
@@ -336,16 +337,16 @@ protected:
equiv_end_ = equivset_->_index_vector.end ();
equiv_iter_ != equiv_end_; ++equiv_iter_)
{
- const std::size_t index_ = *equiv_iter_;
+ const std::size_t equiv_index_ = *equiv_iter_;
- if (index_ == bol_token)
+ if (equiv_index_ == bol_token)
{
if (ptr_[eol_index] == 0)
{
ptr_[bol_index] = transition_;
}
}
- else if (index_ == eol_token)
+ else if (equiv_index_ == eol_token)
{
if (ptr_[bol_index] == 0)
{
@@ -354,7 +355,7 @@ protected:
}
else
{
- ptr_[index_ + dfa_offset] = transition_;
+ ptr_[equiv_index_ + dfa_offset] = transition_;
}
}
}
@@ -560,7 +561,12 @@ protected:
if (token_._negated)
{
- CharT curr_char_ = sizeof (CharT) == 1 ? -128 : 0;
+ // $$$ FIXME JDG July 2014 $$$
+ // this code is problematic on platforms where wchar_t is signed
+ // with min generating negative numbers. This crashes with BAD_ACCESS
+ // because of the vector index below:
+ // ptr_[static_cast<typename Traits::index_type>(curr_char_)]
+ CharT curr_char_ = 0; // (std::numeric_limits<CharT>::min)();
std::size_t i_ = 0;
while (curr_ < chars_end_)