I guess I was not clear enough with my question.
I need to parse a text line containing the query (in SQL syntax) and then search my data structure.
The query is pretty much standard SQL, limited to one table (no joins), but possibly with many conditions.
I hope it's clearer now?