Update of /cvsroot/boost/boost/boost/xpressive
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv823
Modified Files:
basic_regex.hpp regex_compiler.hpp
Log Message:
still more work to support non-char data
Index: basic_regex.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/basic_regex.hpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- basic_regex.hpp 27 May 2007 08:06:46 -0000 1.18
+++ basic_regex.hpp 30 May 2007 08:34:03 -0000 1.19
@@ -138,7 +138,7 @@
/// Factory method for building a regex object from a string.
/// Equivalent to regex_compiler\< BidiIter \>().compile(str, flags);
///
- /// \param str The std::basic_string containing the regular expression.
+ /// \param str The string containing the regular expression.
/// \param flags Optional bitmask of type syntax_option_type to control
how str is interpreted.
static basic_regex<BidiIter> compile(string_type const &str, flag_type
flags = regex_constants::ECMAScript)
{
Index: regex_compiler.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/regex_compiler.hpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- regex_compiler.hpp 24 May 2007 23:25:40 -0000 1.16
+++ regex_compiler.hpp 30 May 2007 08:34:03 -0000 1.17
@@ -17,6 +17,7 @@
#include <map>
#include <stdexcept>
+#include <boost/next_prior.hpp>
#include <boost/xpressive/basic_regex.hpp>
#include <boost/xpressive/detail/dynamic/parser.hpp>
#include <boost/xpressive/detail/dynamic/parse_charset.hpp>
@@ -60,7 +61,6 @@
, rules_()
{
this->upper_ = lookup_classname(this->rxtraits(), "upper");
- BOOST_ASSERT(0 != this->upper_);
}
///////////////////////////////////////////////////////////////////////////
@@ -73,7 +73,6 @@
{
locale_type oldloc = this->traits_.imbue(loc);
this->upper_ = lookup_classname(this->rxtraits(), "upper");
- BOOST_ASSERT(0 != this->upper_);
return oldloc;
}
@@ -468,7 +467,7 @@
return detail::make_posix_charset_xpression<BidiIter>
(
esc.class_
- , this->rxtraits().isctype(*begin++, this->upper_)
+ , this->is_upper_(*begin++)
, this->traits_.flags()
, this->rxtraits()
);
@@ -579,7 +578,7 @@
if(literal.size() != 1)
{
begin = prev;
- literal.erase(literal.size() - 1);
+ literal.erase(boost::prior(literal.end()));
}
return literal;
}
@@ -588,10 +587,10 @@
case token_escape:
esc = this->parse_escape(tmp, end);
if(detail::escape_char != esc.type_) return literal;
- literal += esc.ch_;
+ literal.insert(literal.end(), esc.ch_);
break;
case token_literal:
- literal += *tmp++;
+ literal.insert(literal.end(), *tmp++);
break;
default:
return literal;
@@ -649,6 +648,11 @@
return detail::parse_escape(begin, end, this->traits_);
}
+ bool is_upper_(char_type ch) const
+ {
+ return 0 != this->upper_ && this->rxtraits().isctype(ch, this->upper_);
+ }
+
std::size_t mark_count_;
std::size_t hidden_mark_count_;
CompilerTraits traits_;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs