【发布时间】:2017-05-13 21:19:37
【问题描述】:
我一直在阅读有关语义操作的信息,并且我有一个如下所示的规则:
property_rule %=
identifier_rule % ','
>> lit(L":")
>> type_specification_rule
>> -(lit(L":=") >> +(alnum - ';'))
>> lit(L";");
property_rule 定义为
qi::rule<Iterator, property(), space_type> property_rule;
现在,我也想支持运营商≡ 所以我想要的是将规则更改为类似
...
>> -(( lit(L":=") || lit(L"≡")[SEMANTIC_ACTION_HERE]) >> +(alnum - ';'))
...
在语义动作中,我想更改正在解析的property,具体是将其字段is_constant设置为true。该属性已适应融合。我该怎么做?
【问题讨论】:
标签: boost-spirit boost-spirit-qi