Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-05-03 22:19:36


"Joel de Guzman" <joel_at_[hidden]> wrote

> I'd rather want to see:
>
> BOOST_AUTO(fun, _1 > 15 && _2 < 20);
>
> That would be very nifty for Spirit parsers:
>
> BOOST_AUTO(my_rule, int_p >> *(',' >> int_p));

This is just a naming issue (no wonder -- I got the idea from the Spirit
documentation), and your suggestion does look nicer.

> I would love to incorporate this stuff into Spirit !!!
> 1) It would simplify grammars a lot. 2) It would give
> a significant performance boost 3) It would reduce the
> generated code size by as much as 80%.

Just out of curiousity, why would performance be affected?

> Spirit would definitely benifit from Arkadiy's typeof. I'd like to
> offer this challenge to Arkadiy. If you can easily retrofit Spirit
> with a generic typeof/auto facility, I would love to make it an
> integral part of the library.

I accept. I would first have to get better acqainted with Spirit, though.
May I ask a few preliminary questions:

1) Does Spirit operate exclusively on the library-defined classes/templates
or some user-defined types are also involved (ease of use issue)?
2) Do Spirit templates usualy accept type template parameters or integral
values are often used as well (ease of registration issue)?
3) If we wanted to represent a spirit expression as a tree, where each node
would be a type (leaf) or a template, what would be a reasonable amount of
nodes, default template parameters excluded (limitations/compile speed
issue)?
4) How many typeofs would be reasonable to expect per translation unit
(compile speed issue)?

Considering my current schedule, I am not expecting to be ready by tomorrow
:) May take me a week or two to produce some result. Is this OK?

Regards,
Arkadiy


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