Open nIxedoahz opened 1 year ago
Flex regex doesn't support Unicode escape sequences. You can construct rules or patterns for code points a byte at a time using hex escape sequences.
The range character class constructor assumes the operands are bytes, so it's not going to work correctly with wide characters. That's what you're seeing.
[\u4e00-\u9fa5]+ { yylval->sval = strdup(yytext); return string; }
error: warning that the character range [0-u] is ambiguous in a scanner where case is not required