Boost logo

Boost :

From: Pavel Chikulaev (pavel.chikulaev_at_[hidden])
Date: 2005-03-06 15:17:30


"Larry Evans" <cppljevans_at_[hidden]> wrote in message
news:d0fmqa$tfu$1_at_sea.gmane.org...
> Maybe. If "aliasing" can convert (a+b+c)*x to a*x+b*x+c*x then maybe
> it can be used to "normalize" a grammar:
    It can convert it easily.
> In addition to the above, I'd also like to see if the value
> of a matrix multiplication and addition can be computed at compile
> time. If so, then I'm guessing that, given enough resources,
> a spirit grammar (normalized as described above) can be analyzed at
> compile time and used to generate a parser with compile-time generated
> look-ahead sets.
>
> OK, maybe that's dreaming, but that's me :)
    With some restrictions it can be done.
    For example:
        template<
            template<int A11, int A12, int A13>, //As far as I know we can
emit the typename name, don't we?
            template<int A21, int A22, int A23>,
            template<int A31, int A32, int A33>,
>
    class compile_time_matrix;
    for compile_time_matrix we can do that. But is what really what you
need?

    Actually the purpose of the library is to choose best algorithm at
compile-time, and then apply
    it at run-time.


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