I read semantic actions, and I have a rule that looks like this:
property_rule %=
identifier_rule % ','
>> lit(L":")
>> type_specification_rule
>> -(lit(L":=") >> +(alnum - ';'))
>> lit(L";");
property_rule defined as
qi::rule<Iterator, property(), space_type> property_rule;
Now I also want to support the operator ≡, so I want to change the rule to something like
...
>> -(( lit(L":=") || lit(L"≡")[SEMANTIC_ACTION_HERE]) >> +(alnum - ';'))
...
In semantic action, I want to change the analyzed property, in particular, setting its field is_constantto true. The property is adapted to Fusion. How to do it?
source
share