Re: How to force attribute propagation in x3 when using semantic actions

Alberto Luaces <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
Mike Gresens writes:

>> Am 15.12.2017 um 16:34 schrieb:
>>> [Sorry for addressing you directly, but your post did not came through
>>> gmane yet.]
>>>
>>> Mike Gresens writes:
>>>
>>>> Hi,
>>>>
>>>> Could be that
>>>>
>>>>    auto const complist_def = mycomp >> "," >> mycomp
>>>>
>>>> want to parse exact 2 mycomp (as tuple<mycomp, mycomp>).
>>>> So try
>>>>
>>>>    auto const complist_def = mycomp % ',';
>>>>
>>>> to get N mycomp separated by ',' (as vector<mycomp>)
>>> Yes, that solves the compilation errors, but unfortunately the
>>> std::vector comes up empty.
>>
>> Thanks!
>
>
> Yes. Same for
>
> auto const complist_def = *mycomp;
>
> So what's the problem with defining rules with attribute types?

My fear is that I have to carry the attribute type definitions in the
whole rule hierarchy just for the sake of using only one rule where
semantic actions are used.

-- 
Alberto


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.