Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] Stuck turning a complex gramamr action to a primitive trasnform
From: Eric Niebler (eric_at_[hidden])
Date: 2009-10-28 15:41:27


joel wrote:
> I tried to turn a complex grammar transform
> :
> struct grammar :
> or_< ...
>
> ,bp::when< bp::nary_expr< bp::_, bp::vararg< grammar > >
> , bp::_default< grammar >
> (
>
> _bp::functional::unpack_expr<bp::tag::function>(
> push_front( bp::_
> , bp::_make_terminal
> (
> some_type<
> bp::tag_of<bp::_> >()
> )
> )
> )
> )
> >
>
> into a single primitive transform but I end up stuck cause it seems some
> of those transform (make_terminal) don't follow
> the classic proto::result_of/proto namespace acces to compute it's
> return type and calling it.

I don't know what you mean. Are you referring to the fact that
_make_terminal is not a primitive transform? It is a callable function
object. Unfortunately, the _make_terminal name follows Proto's naming
conventions for primitive transforms, even though it isn't. Is that what
has thrown you off?

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net