|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49741 - trunk/boost/spirit/home/support/detail/lexer/parser/tokeniser
From: jamin.hanson_at_[hidden]
Date: 2008-11-14 10:04:13
Author: ben_hanson
Date: 2008-11-14 10:04:12 EST (Fri, 14 Nov 2008)
New Revision: 49741
URL: http://svn.boost.org/trac/boost/changeset/49741
Log:
icase/dot_not_newline changes.
Text files modified:
trunk/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_helper.hpp | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
Modified: trunk/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_helper.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_helper.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_helper.hpp 2008-11-14 10:04:12 EST (Fri, 14 Nov 2008)
@@ -1,5 +1,5 @@
// tokeniser_helper.hpp
-// Copyright (c) 2007 Ben Hanson (http://www.benhanson.net/)
+// Copyright (c) 2007-2008 Ben Hanson (http://www.benhanson.net/)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -92,8 +92,7 @@
if (chset_)
{
state temp_state_ (str_ + 1, str_ + str_len_,
- state_._case_sensitive, state_._locale,
- state_._dot_not_newline);
+ state_._flags, state_._locale);
string temp_chars_;
bool temp_negated_ = false;
@@ -104,7 +103,7 @@
std::ostringstream ss_;
ss_ << "Mismatch in charset negation preceding "
- "index " << state_._index - 1 << '.';
+ "index " << state_.index () - 1 << '.';
throw runtime_error (ss_.str ().c_str ());
}
@@ -139,7 +138,7 @@
}
else if (!chset_)
{
- if (!state_._case_sensitive &&
+ if ((state_._flags & icase) &&
(std::isupper (prev_, state_._locale) ||
std::islower (prev_, state_._locale)))
{
@@ -373,7 +372,7 @@
std::ostringstream ss_;
ss_ << "Invalid control char at index " <<
- state_._index - 1 << '.';
+ state_.index () - 1 << '.';
throw runtime_error (ss_.str ().c_str ());
}
}
@@ -401,7 +400,7 @@
std::ostringstream ss_;
ss_ << "Illegal char following \\x at index " <<
- state_._index - 1 << '.';
+ state_.index () - 1 << '.';
throw runtime_error (ss_.str ().c_str ());
}
@@ -454,7 +453,7 @@
std::ostringstream ss_;
ss_ << "Charset cannot form start of range preceding "
- "index " << state_._index - 1 << '.';
+ "index " << state_.index () - 1 << '.';
throw runtime_error (ss_.str ().c_str ());
}
@@ -478,7 +477,7 @@
std::ostringstream ss_;
ss_ << "Charset cannot form end of range preceding index "
- << state_._index << '.';
+ << state_.index () << '.';
throw runtime_error (ss_.str ().c_str ());
}
}
@@ -488,7 +487,7 @@
std::ostringstream ss_;
ss_ << "POSIX char class cannot form end of range at "
- "index " << state_._index - 1 << '.';
+ "index " << state_.index () - 1 << '.';
throw runtime_error (ss_.str ().c_str ());
}
*/
@@ -516,7 +515,7 @@
std::ostringstream ss_;
ss_ << "Invalid range in charset preceding index " <<
- state_._index - 1 << '.';
+ state_.index () - 1 << '.';
throw runtime_error (ss_.str ().c_str ());
}
@@ -526,7 +525,7 @@
{
CharT ch_ = static_cast<CharT> (start_);
- if (!state_._case_sensitive &&
+ if ((state_._flags & icase) &&
(std::isupper (ch_, state_._locale) ||
std::islower (ch_, state_._locale)))
{
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