Boost logo

Boost Users :

Subject: Re: [Boost-users] [spirit] Compile error when using qi::locals<>
From: Michael Caisse (mcaisse-lists_at_[hidden])
Date: 2013-06-05 18:03:01


On 06/05/2013 09:12 AM, Simon wrote:
> Hi there,
> I'm pretty new to spirit and I need a semantic action to construct an
> object (that's fine) using a vector<double>, the vector is the problem.
> I'd really appreciate help with this error, or perhaps I'm not using
> the right technique, in which case, I'd need suggestions on how to proceed.
>
> Even if I don't use it anywhere, just adding the following to my
> grammar base class template parameter and adding the same to the rule
> declaration I need it for, it gives the monster error below.
>
> boost::spirit::qi::locals<std::vector<hs::Language::AX*> >
>

Hi Simon -

It will be easier to help if you have a minimal example of what you are
trying to do. qi::locals are typically used when needing to store and
pass state within grammars (rules). If you are trying to "return" a
value from a parser, that is called synthesis and you can use compatible
attributes to do that.

Perhaps a description of what you are solving and your rule(s) might
allow us to provide better information.

michael

-- 
Michael Caisse
ciere consulting
ciere.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