Spirit Classic 有 as_lower_d[]
,如果您想匹配不区分大小写的关键字,这将非常有用。
我无法在 Spirit v2/Qi 中找到类似的解析器。
在 Qi 中执行以下操作的“正确方法”是什么?
rule = as_lower_d[ "keyword" ] >> "=" ...
最佳答案
我认为您需要 no_case
指令:
http://www.boost.org/doc/libs/1_59_0/libs/spirit/doc/html/spirit/qi/reference/directive/no_case.html
关于c++ - Boost Spirit v2 相当于经典的 as_lower_d,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32323515/