Zebediah Figura (@zfigura) commented about dlls/msado15/filter.l:
+ memcpy(yylval->sval, yytext+1, strlen(yytext)-2); + yylval->sval[strlen(yytext)-2] = '\0'; + return T_STRING; + } + +\n { return T_NEWLINE;} +"(" { /* Ignored for now */ } +")" { /* Ignored for now */ } + +"=" { return (yylval->operation = TOKEN_EQ); } +">" { return (yylval->operation = TOKEN_GREATER); } +"<" { return (yylval->operation = TOKEN_LESS); } +"<>" { return (yylval->operation = TOKEN_NOT_EQ); } +">=" { return (yylval->operation = TOKEN_GREATER_EQ); } +"<=" { return (yylval->operation = TOKEN_LESS_EQ); } +like { return TOKEN_LIKE; } This bothers me, firstly because it's redundant [we're both returning a TOKEN_* vaue and setting its interior value to the same thing] and secondly because it's inconsistent (LIKE is an operation but we don't handle it the same way). I'd argue we should either:
(1) just return token values from the lexer, and then set the operation value accordingly from the parser, or (2) return a single token value like TOKEN_OPERATION from the lexer, and set its operation enum like now. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2498#note_32780