Search code examples
c++boost-spirit

Boost Spirit v2 equivalent to classic as_lower_d


Spirit Classic had as_lower_d[], which was very helpful if you wanted to match a keyword case-insensitive.

I am unable to find a similar parser in Spirit v2 / Qi.

What would be "the correct way" to do the following in Qi?

rule = as_lower_d[ "keyword" ] >> "=" ...

Solution

  • I think you want the no_case directive:

    http://www.boost.org/doc/libs/1_59_0/libs/spirit/doc/html/spirit/qi/reference/directive/no_case.html