Boost logo

Boost :

From: Korcan Hussein (korcan_h_at_[hidden])
Date: 2005-10-23 12:12:09


"Joel de Guzman" <joel_at_[hidden]> wrote in message
news:djg9et$55i$1_at_sea.gmane.org...
>
> That quote pertains to (type-erased rules) not subrules.
> Subrules in Spirit are completely static.

Yes sorry about that i already sent a message explain i made a mistake.

> I'm quite interested if you have a better alternative. For example,
> how do you write the Spirit calculator using your scheme:
>
> rule<> group, factor, term, expression;
>
> group = '(' >> expression >> ')';
> factor = integer | group;
> term = factor >> *(('*' >> factor) | ('/' >> factor));
> expression = term >> *(('+' >> term) | ('-' >> term));
>
> ?
>

I'll get back to you on that one, for the time being i have uploaded the
example i have been writing about, it is in the vault here:
http://www.boost-consulting.com/vault/index.php?action=downloadfile&filename=expr_test.cpp&directory=Template%20Metaprogramming&

In the example program you should see something similar, take note however
this isn't a library in any form it is just a (very) rough example of the
technique, it has (as of yet) not been fully generalized but it should not
be to diffcult. It should be enough to give people an idea to discuss about
and consider a possibility.


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