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