Re: [Boost-users] Request to know about "dynamic expression evaluation"
Hi, You recommended checking the "expression templates". However, expression templates (xpressive) provides the means of parsing the input expressions in to tokens. It does not have the support for evaluating these expressions. --- please correct me if I'm wrong. Thanks, Ganesh
_____________________________________________ From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org mailto:boost-users-bounces@lists.boost.org ] On Behalf Of boost-users-request@lists.boost.org Sent: 24 October 2007 02:29 To: boost-users@lists.boost.org Subject: Boost-users Digest, Vol 1428, Issue 3
Send Boost-users mailing list submissions to boost-users@lists.boost.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.boost.org/mailman/listinfo.cgi/boost-users http://lists.boost.org/mailman/listinfo.cgi/boost-users or, via email, send a message with subject or body 'help' to boost-users-request@lists.boost.org
You can reach the person managing the list at boost-users-owner@lists.boost.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Boost-users digest..."
Today's Topics:
1. Re: Request to know about "dynamic expression evaluation" (Robert Ramey) 2. seeding a boost::random number generator...? (Graham Reitz) 3. Thread Library Problem (Andres Herrera) 4. boost::serialization Is there any way to get rid of compiler warnings(C4103, ...) on VC++ 2005? (Oleg Udovenko)
----------------------------------------------------------------------
Message: 1 Date: Tue, 23 Oct 2007 09:15:17 -0700 From: "Robert Ramey"
Subject: Re: [Boost-users] Request to know about "dynamic expression evaluation" To: boost-users@lists.boost.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" Request to know about "dynamic expression evaluation"Look for "expression templates"
Robert Ramey "Borse, Ganesh"
wrote in message news:F444CAE5E62A714C9F45AA292785BED327C3BE87@esng11p33001.sg.csfb.com news:F444CAE5E62A714C9F45AA292785BED327C3BE87@esng11p33001.sg.csfb.com ... Hi, I would like to perform the dynamic expression evaluation in my c++ application. The dynamic expressions are like the SQL queries. Since the expressions could be nested & hence the parsing & evaluation of such expressions is reducing the performance of my application. May I please know, whether BOOST provides a support for such dynamic expression evaluation in C++? Please guide.
Thanks in advance for the guidance.
Regards, Ganesh
============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ==============================================================================
------------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users http://lists.boost.org/mailman/listinfo.cgi/boost-users
Ganesh, it's not 100% clear (at least to me) what you want to do. The main question is, do you know the expression you want to evaluate at compile-time, or run-time? If it's compile-time, you can use compile-time expression templates, like this: http://www.ddj.com/cpp/184401627 If you're expression is constructed at run-time, it's more difficult and you get into things like expression tree traversal and bytecode generation. Some of the serious C++ template experts might be able to offer some further advice. Damien Borse, Ganesh wrote:
Hi, You recommended checking the "expression templates". However, expression templates (xpressive) provides the means of parsing the input expressions in to tokens. It does not have the support for evaluating these expressions. --- please correct me if I'm wrong. Thanks, Ganesh __________
Damien Hocking wrote:
If your expression is constructed at run-time, it's more difficult and you get into things like expression tree traversal and bytecode generation. Some of the serious C++ template experts might be able to offer some further advice.
Alternatively, you might consider embedding the Python interpreter? http://boost.org/libs/python/doc/tutorial/doc/html/python/embedding.html
participants (3)
-
Borse, Ganesh
-
Damien Hocking
-
Nat Goodspeed