Re: Attribute ignored in first rule of alternatives

Seth <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
On 06-12-17 16:41, Søren Enevoldsen wrote:
>
> auto const bound = rule<Bound>("bound")
>     = (x3::lit("[") >> x3::lit("<=") > uint_ > x3::lit("]"))
>     | (x3::lit("[") >> x3::lit("<") > uint_[bound_dec1] > x3::lit("]"))
>     ; 

Semantic actions inhibit propagation. Your rule doesn't even declare an
attribute type, so it's unclear what you thought would happen without a
semantic action. However, assuming things:

    x3::rule<struct _tag_type, unsigned int, true>

The last template param (`true`) indicates auto-propagation is forced,
like with Qi's `operator%=`


Seth

------------------------------------------------------------------------------
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.