Update of /cvsroot/boost/boost/boost/xpressive/detail/static
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16029/detail/static
Modified Files:
compile.hpp is_pure.hpp width_of.hpp
Log Message:
handle some complemented terminals, misc bug fixes
Index: compile.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/static/compile.hpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- compile.hpp 3 Feb 2007 00:14:32 -0000 1.10
+++ compile.hpp 6 Apr 2007 02:07:10 -0000 1.11
@@ -26,6 +26,8 @@
#include <boost/xpressive/detail/static/productions/visitor.hpp>
#include <boost/xpressive/detail/static/productions/domain_tags.hpp>
+//#include <boost/xpressive/detail/static/transforms/transform.hpp>
+
namespace boost { namespace xpressive { namespace detail
{
@@ -40,7 +42,9 @@
// "compile" the regex and wrap it in an xpression_adaptor.
xpression_visitor<BidiIter, mpl::false_, Traits> visitor(traits, impl);
intrusive_ptr<matchable_ex<BidiIter> const> adxpr =
make_adaptor<matchable_ex<BidiIter> >(
- proto::compile(xpr, end_xpression(), visitor, seq_tag()));
+ //detail::transform(xpr, visitor)
+ proto::compile(xpr, end_xpression(), visitor, seq_tag())
+ );
// Link and optimize the regex
common_compile(adxpr, *impl, visitor.traits());
Index: is_pure.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/static/is_pure.hpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- is_pure.hpp 5 Apr 2007 01:25:40 -0000 1.15
+++ is_pure.hpp 6 Apr 2007 02:07:10 -0000 1.16
@@ -35,28 +35,33 @@
///////////////////////////////////////////////////////////////////////////////
// is_terminal_pure
//
- template<typename Expr>
+ template<typename Expr, bool IsXpr = is_xpr<Expr>::value>
struct is_terminal_pure
+ : mpl::bool_<Expr::pure> // xpression types
+ {};
+
+ template<typename Expr>
+ struct is_terminal_pure<Expr, false>
: mpl::true_ // char literals
{};
template<typename Expr>
- struct is_terminal_pure<Expr *>
+ struct is_terminal_pure<Expr *, false>
: mpl::true_ // string literals
{};
template<typename Char, std::size_t N>
- struct is_terminal_pure<Char (&) [N]>
+ struct is_terminal_pure<Char (&) [N], false>
: mpl::true_ // string literals
{};
template<typename Char, std::size_t N>
- struct is_terminal_pure<Char const (&) [N]>
+ struct is_terminal_pure<Char const (&) [N], false>
: mpl::true_ // string literals
{};
template<typename BidiIter>
- struct is_terminal_pure<tracking_ptr<regex_impl<BidiIter> > >
+ struct is_terminal_pure<tracking_ptr<regex_impl<BidiIter> >, false>
: mpl::false_ // basic_regex
{};
@@ -185,34 +190,6 @@
{};
///////////////////////////////////////////////////////////////////////////////
- // use_simple_repeat_terminal
- //
- template<typename Char>
- struct use_simple_repeat_terminal
- : mpl::true_ // char literals
- {};
-
- template<typename Char>
- struct use_simple_repeat_terminal<Char *>
- : mpl::true_ // string literals
- {};
-
- template<typename Char, std::size_t N>
- struct use_simple_repeat_terminal<Char (&) [N]>
- : mpl::true_ // string literals
- {};
-
- template<typename Char, std::size_t N>
- struct use_simple_repeat_terminal<Char const (&) [N]>
- : mpl::true_ // string literals
- {};
-
- template<typename BidiIter>
- struct use_simple_repeat_terminal<tracking_ptr<regex_impl<BidiIter> > >
- : mpl::false_ // basic_regex
- {};
-
-
///////////////////////////////////////////////////////////////////////////////
// use_simple_repeat
//
template<typename Expr, typename Tag>
@@ -223,12 +200,6 @@
BOOST_MPL_ASSERT_RELATION(0, !=, width_of<Expr>::value);
};
- template<typename Expr>
- struct use_simple_repeat<Expr, proto::tag::terminal>
- : use_simple_repeat_terminal<typename proto::result_of::arg<Expr>::type>
- {
- };
-
}}} // namespace boost::xpressive::detail
#endif
Index: width_of.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/static/width_of.hpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- width_of.hpp 12 Mar 2007 22:11:29 -0000 1.14
+++ width_of.hpp 6 Apr 2007 02:07:10 -0000 1.15
@@ -55,28 +55,33 @@
///////////////////////////////////////////////////////////////////////////////
// width_of_terminal
//
- template<typename Expr>
+ template<typename Expr, bool IsXpr = is_xpr<Expr>::value>
struct width_of_terminal
+ : mpl::size_t<Expr::width> // char literals
+ {};
+
+ template<typename Expr>
+ struct width_of_terminal<Expr, false>
: mpl::size_t<1> // char literals
{};
template<typename Expr>
- struct width_of_terminal<Expr *>
+ struct width_of_terminal<Expr *, false>
: unknown_width // string literals
{};
template<typename Char, std::size_t N>
- struct width_of_terminal<Char (&) [N]>
+ struct width_of_terminal<Char (&) [N], false>
: mpl::size_t<N-1> // string literals
{};
template<typename Char, std::size_t N>
- struct width_of_terminal<Char const (&) [N]>
+ struct width_of_terminal<Char const (&) [N], false>
: mpl::size_t<N-1> // string literals
{};
template<typename BidiIter>
- struct width_of_terminal<tracking_ptr<regex_impl<BidiIter> > >
+ struct width_of_terminal<tracking_ptr<regex_impl<BidiIter> >, false>
: unknown_width // basic_regex
{};
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs