|
Boost Users : |
Subject: Re: [Boost-users] [Boost.Spirit] Synthesised attributes and sub-rules
From: Vitaly Budovski (vbudovski+news_at_[hidden])
Date: 2010-10-20 02:06:01
On 14 October 2010 22:36, Hartmut Kaiser <hartmut.kaiser_at_[hidden]> wrote:
> That should be easy, see below.
>
>
> Â Â start = a_rule | b_rule | c_rule;
>
<snip>
> Â Â qi::rule<Iterator, std::vector<int>()> a_rule;
> Â Â qi::rule<Iterator, std::vector<int>()> b_rule;
> Â Â qi::rule<Iterator, std::vector<int>()> c_rule;
>
> Â Â qi::rule<Iterator, std::vector<int>()> start;
Hi Hartmut,
Thanks for your help. I've upgraded my version of Spirit to the one
from Boost 1.44, so things work better now. However, I'm still unable
to compile when I change my rule to something like: start = a_rule |
*b_rule. The * and + operators cause the compiler to generate the
following error: boost/spirit/home/qi/detail/assign_to.hpp:109: error:
invalid static_cast from type âconst std::vector<int,
std::allocator<int> >â to type âint'.
Any ideas?
Thanks,
Vitaly
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