Closed romange closed 1 year ago
Sure that is possible.
Assuming the string match is consumed with str()
or wstr()
in your lexer rules, you can then use std::towlower
for example in a loop over the string to construct a new string with lower case text.
If you use str()
to consume UTF-8, then the loop should loop over UTF-8 multi-bytes.
There are some C++ examples on the web on lower/upper case C++ string conversion.
We already use RE-flex as a unicode lexer. Now we need another functionality: we would like to perform unicode lowercase/uppercase conversion of a string. Is there a way to hack it with RE-flex?