Boost logo

Boost :

From: Maurizio Vitale (maurizio.vitale_at_[hidden])
Date: 2007-05-20 17:29:17


On May 20, 2007, at 4:37 PM, Eric Niebler wrote:

>
>
> Maurizio Vitale wrote:
>> Eric Niebler <eric_at_[hidden]> writes:
>>
>>> Right. I should have suggested that in the first place. I tend to
>>> think
>>> this approach (declaring an empty terminal and using its operator
>>> ()())
>>> is nicer because it reuses more of proto's machinery, but the two
>>> approaches are equivalent.
>>>
>>> There are cases where this approach doesn't work, however. For
>>> example,
>>> in xpressive, there is a repeat<>() function, for repeating
>>> sub-expressions. For instance:
>>>
>>> repeat<3,6>('a')
>>>
>>
>> But even there you could have had repeat< > return a
>> proto::terminal and
>> then let the generic overloading of operator()() take care of the
>> rest.
>
> Are you sure about that? :-)

Oh, I see now.

        Maurizio


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk