Boost logo

Boost :

Subject: Re: [boost] Boost.SQL?
From: Roland Bock (rbock_at_[hidden])
Date: 2010-09-15 15:50:42

On 09/15/2010 07:38 PM, Eric Niebler wrote:
> On 9/15/2010 1:38 AM, Roland Bock wrote:
>> On 09/15/2010 06:09 AM, Eric Niebler wrote:
>>> Also, see the series of articles about Proto I'm currently publishing on
>>> Here's the latest:
>> Very nicely written! I'll definitely try to replace the current
>> implementation of the WHERE expression, especially since Joel has
>> offered to help with it :-)
>> I probably also should use proto to build sequences of query building
>> blocks like WHERE, GROUP_BY, ORDER_BY, LIMIT. I guess I could employ
>> boost::mpl::less to make sure that a WHERE can be followed by a GROUP_BY
>> expression, but not vice versa.
> No, you'd write the grammar of your DSEL using Proto. See the docs for
> Proto grammars. The article series hasn't gotten around to talking about
> that yet.
Ah, it is beginning to dawn on me :-) , see attached code. I admit, it
took some time to sort it out, but wow, even after just peeking inside,
I say: Proto is pretty cool!

Would you have defined the Grammar in a similar way? My solution seems a
bit counter-intuitive to me because it describes the allowed c++-code
from right to left...



Boost list run by bdawes at, gregod at, cpdaniel at, john at