Update of /cvsroot/boost/boost/libs/xpressive/proto/doc
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4813/libs/xpressive/proto/doc
Modified Files:
calculator.qbk extensibility.qbk grammars.qbk transforms.qbk
Log Message:
major renames for proto to conform with <functional>
Index: calculator.qbk
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/doc/calculator.qbk,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- calculator.qbk 15 Apr 2007 06:46:57 -0000 1.8
+++ calculator.qbk 29 Apr 2007 03:38:49 -0000 1.9
@@ -126,28 +126,28 @@
// Handle addition:
template< typename Left, typename Right >
- double operator()(proto::tag::add, Left const &left, Right const
&right) const
+ double operator()(proto::tag::plus, Left const &left, Right const
&right) const
{
return proto::eval(left, *this) + proto::eval(right, *this);
}
// Handle subtraction:
template< typename Left, typename Right >
- double operator()(proto::tag::subtract, Left const &left, Right const
&right) const
+ double operator()(proto::tag::minus, Left const &left, Right const
&right) const
{
return proto::eval(left, *this) - proto::eval(right, *this);
}
// Handle multiplication:
template< typename Left, typename Right >
- double operator()(proto::tag::multiply, Left const &left, Right const
&right) const
+ double operator()(proto::tag::multiplies, Left const &left, Right
const &right) const
{
return proto::eval(left, *this) * proto::eval(right, *this);
}
// Handle division:
template< typename Left, typename Right >
- double operator()(proto::tag::divide, Left const &left, Right const
&right) const
+ double operator()(proto::tag::divides, Left const &left, Right const
&right) const
{
return proto::eval(left, *this) / proto::eval(right, *this);
}
Index: extensibility.qbk
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/doc/extensibility.qbk,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- extensibility.qbk 17 Apr 2007 23:19:41 -0000 1.6
+++ extensibility.qbk 29 Apr 2007 03:38:49 -0000 1.7
@@ -330,8 +330,8 @@
struct LazyVectorGrammar
: proto::or_<
proto::terminal< std::vector<_> >
- , proto::add< LazyVectorGrammar, LazyVectorGrammar>
- , proto::subtract< LazyVectorGrammar, LazyVectorGrammar>
+ , proto::plus< LazyVectorGrammar, LazyVectorGrammar>
+ , proto::minus< LazyVectorGrammar, LazyVectorGrammar>
>
{};
Index: grammars.qbk
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/doc/grammars.qbk,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- grammars.qbk 15 Apr 2007 06:46:57 -0000 1.7
+++ grammars.qbk 29 Apr 2007 03:38:49 -0000 1.8
@@ -398,20 +398,20 @@
the operators must themselves conform to the `CalculatorGrammar` that we
forward-declared above.
- struct Add
- : add< CalculatorGrammar, CalculatorGrammar >
+ struct Plus
+ : plus< CalculatorGrammar, CalculatorGrammar >
{};
- struct Subtract
- : subtract< CalculatorGrammar, CalculatorGrammar >
+ struct Minus
+ : minus< CalculatorGrammar, CalculatorGrammar >
{};
- struct Multiply
- : multiply< CalculatorGrammar, CalculatorGrammar >
+ struct Multiplies
+ : multiplies< CalculatorGrammar, CalculatorGrammar >
{};
- struct Divide
- : divide< CalculatorGrammar, CalculatorGrammar >
+ struct Divides
+ : divides< CalculatorGrammar, CalculatorGrammar >
{};
Now that we've defined all the parts of the grammar, we can define
@@ -420,10 +420,10 @@
struct CalculatorGrammar
: or_<
Terminal
- , Add
- , Subtract
- , Multiply
- , Divide
+ , Plus
+ , Minus
+ , Multiplies
+ , Divides
>
{};
Index: transforms.qbk
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/proto/doc/transforms.qbk,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- transforms.qbk 15 Apr 2007 06:46:57 -0000 1.3
+++ transforms.qbk 29 Apr 2007 03:38:49 -0000 1.4
@@ -149,14 +149,14 @@
So, to put a few things together, consider the calculator expression `+ _1`,
which would have the following type:
- expr< tag::unary_plus, arg1<
+ expr< tag::posit, arg1<
expr< tag::terminal, arg1< placeholder1 > >
> >
If we executed the `unary_expr< _, CalculatorGrammar >` transform on this
expression, we would expect to get:
- expr< tag::unary_plus, arg1<
+ expr< tag::posit, arg1<
mpl::int_<1>
> >
-------------------------------------------------------------------------
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