Update of /cvsroot/boost/boost/libs/xpressive/proto/test
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4813/libs/xpressive/proto/test
Modified Files:
calculator.cpp lambda.cpp matches.cpp toy_spirit.cpp
toy_spirit2.cpp
Log Message:
major renames for proto to conform with <functional>
Index: calculator.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/test/calculator.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- calculator.cpp 29 Mar 2007 22:19:39 -0000 1.6
+++ calculator.cpp 29 Apr 2007 03:38:49 -0000 1.7
@@ -33,25 +33,25 @@
}
template<typename Left, typename Right>
- int operator()(proto::tag::add, Left const &left, Right const &right) const
+ int operator()(proto::tag::plus, Left const &left, Right const &right)
const
{
return proto::eval(left, *this) + proto::eval(right, *this);
}
template<typename Left, typename Right>
- int operator()(proto::tag::subtract, Left const &left, Right const &right)
const
+ int operator()(proto::tag::minus, Left const &left, Right const &right)
const
{
return proto::eval(left, *this) - proto::eval(right, *this);
}
template<typename Left, typename Right>
- int operator()(proto::tag::multiply, Left const &left, Right const &right)
const
+ int operator()(proto::tag::multiplies, Left const &left, Right const
&right) const
{
return proto::eval(left, *this) * proto::eval(right, *this);
}
template<typename Left, typename Right>
- int operator()(proto::tag::divide, Left const &left, Right const &right)
const
+ int operator()(proto::tag::divides, Left const &left, Right const &right)
const
{
return proto::eval(left, *this) / proto::eval(right, *this);
}
@@ -68,7 +68,7 @@
functor(Expr const &expr)
: expr_(expr)
{}
-
+
template<typename T>
result_type operator()(T const &t) const
{
Index: lambda.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/test/lambda.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- lambda.cpp 4 Apr 2007 07:01:21 -0000 1.11
+++ lambda.cpp 29 Apr 2007 03:38:49 -0000 1.12
@@ -78,7 +78,7 @@
: LambdaGrammar::apply<Expr, mpl::int_<0>, mpl::void_>
{};
-// The lambda context is the same as the default context
+// The lambda context is the same as the default context
// with the addition of special handling for lambda placeholders
template<typename Tuple>
struct lambda_context
@@ -118,7 +118,7 @@
BOOST_PROTO_EXTENDS(T, lambda<T>, lambda_domain)
BOOST_PROTO_EXTENDS_ASSIGN(T, lambda<T>, lambda_domain)
BOOST_PROTO_EXTENDS_SUBSCRIPT(T, lambda<T>, lambda_domain)
-
+
// Careful not to evaluate the return type of the nullary function
// unless we have a nullary lambda!
typedef typename mpl::eval_if<
Index: matches.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/test/matches.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- matches.cpp 17 Apr 2007 16:32:33 -0000 1.5
+++ matches.cpp 29 Apr 2007 03:38:49 -0000 1.6
@@ -74,7 +74,7 @@
{};
template<>
-struct MyCases::case_<proto::tag::add>
+struct MyCases::case_<proto::tag::plus>
: proto::_
{};
Index: toy_spirit.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/test/toy_spirit.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- toy_spirit.cpp 29 Mar 2007 22:19:39 -0000 1.7
+++ toy_spirit.cpp 29 Apr 2007 03:38:49 -0000 1.8
@@ -247,7 +247,7 @@
return true;
}
- // parse function for complemented thingies (where thingies are
assumed
+ // parse function for complemented thingies (where thingies are assumed
// to be 1 character wide).
template<typename Expr>
bool operator()(proto::tag::complement, Expr const &expr)
@@ -283,7 +283,7 @@
// for *A, greedily match A as many times as possible.
template<typename Expr>
- bool operator()(proto::tag::unary_star, Expr const &expr)
+ bool operator()(proto::tag::dereference, Expr const &expr)
{
iterator where = this->first;
while(proto::eval(expr, *this))
@@ -295,7 +295,7 @@
// for +A, greedily match A one or more times.
template<typename Expr>
- bool operator()(proto::tag::unary_plus, Expr const &expr)
+ bool operator()(proto::tag::posit, Expr const &expr)
{
return proto::eval(expr, *this) && proto::eval(*expr, *this);
}
@@ -312,7 +312,7 @@
// for (A - B), matches when A but not B matches.
template<typename Left, typename Right>
- bool operator()(proto::tag::subtract, Left const &left, Right const
&right)
+ bool operator()(proto::tag::minus, Left const &left, Right const
&right)
{
iterator where = this->first;
return !proto::eval(right, *this) && proto::eval(left,
this->reset(where));
@@ -463,7 +463,7 @@
struct apply
{
typedef typename proto::right_shift<
- typename proto::unary_star<State>::type
+ typename proto::dereference<State>::type
, Expr
>::type type;
};
@@ -516,9 +516,9 @@
: proto::or_<
proto::bitwise_or< Grammar, Grammar >
, proto::right_shift< Grammar, Grammar >
- , proto::subtract< Grammar, Grammar >
- , proto::unary_star< Grammar >
- , proto::unary_plus< Grammar >
+ , proto::minus< Grammar, Grammar >
+ , proto::dereference< Grammar >
+ , proto::posit< Grammar >
, proto::logical_not< Grammar >
>
{};
@@ -606,7 +606,7 @@
// Transform the expression template to insert the skip parser
// in between all sequenced parsers. That is, transform (A >> B)
// to (*skip >> A >> *skip >> B). This has the advantage of making
- // it unnecessary to pass the scanner to all the parsers, which
+ // it unnecessary to pass the scanner to all the parsers, which
// means its type doesn't show up in function signatures, avoiding
// the Scanner Business.
// Recommendation:
Index: toy_spirit2.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/test/toy_spirit2.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- toy_spirit2.cpp 4 Apr 2007 06:42:26 -0000 1.10
+++ toy_spirit2.cpp 29 Apr 2007 03:38:49 -0000 1.11
@@ -102,7 +102,7 @@
// Composite parser that contains a Fusion cons-list of other parsers
// OR
- // A compiler that compiles an expression and wraps the result in
+ // A compiler that compiles an expression and wraps the result in
// a composite<> wrapper
template<typename Tag, typename List>
struct composite
@@ -264,7 +264,7 @@
template<typename Expr, typename State, typename Visitor>
static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ call(Expr const &expr, State const &state, Visitor &visitor)
{
return apply<Expr, State, Visitor>::call(Grammar::call(expr,
state, visitor));
}
@@ -306,7 +306,7 @@
proto::trans::arg< AnyChar >
, case_sensitive< proto::trans::arg< CharLiteral > >
, case_sensitive< proto::trans::arg< NTBSLiteral > >
- , case_sensitive<
+ , case_sensitive<
proto::trans::arg< proto::trans::arg_c< CharParser, 1 > > //
char_('a')
>
, case_sensitive<
-------------------------------------------------------------------------
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