bruns added inline comments. INLINE COMMENTS
> michaelh wrote in advancedqueryparser.cpp:55 > // Parentheses delimit tokens, and are tokens by themselves Why choose a different wording here? Also, the important aspect here is the "end", which commits the current token to the list. > michaelh wrote in advancedqueryparser.cpp:69 > ':' means `Term::Contains` and '=' means `Term::Equal` so ':=' is a little > ambigous. > Unless you have a particular reason to interpret ':=' as '=' we should take > it as ':'. > It may be better to have and extra `If` for '=' and ':' and simply drop any > second "=" so we come out with ':' or '=' as token. > > The `parse()` function checks the second char only in case of '<' or '>'. So > ':=' will become ':'. The > 2-char tokens should to be added to the `switch` in `parse()` which then also > could be simplified. The distinction between '>' and '>=' is the lexer's job, > right? ":=" and "==" are added as is, and the parser interprets both dependent on the first character only, i.e. ":" and "=". The behaviour for these two combinations is unchanged with this patch. The lexer should not handle ">" and ">=" differently, both are (valid) tokens, and should be returned as such. Adding e.g. ">=" to the switch statement is not possible, as it works on QChar's. REPOSITORY R293 Baloo REVISION DETAIL https://phabricator.kde.org/D11888 To: bruns, #baloo, michaelh Cc: #frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, alexeymin