Writing your own analyzer should be fairly simple, at least looking at the syntax. But the parser is not the hard part - the real work begins with translating the query expressions into equivalent syntax in other data sources.
If I was tasked with finding a solution here, then I would investigate the following approach:
- Write CQL parser
- Create a translation layer to enable LINQ
- Additional LINQ libraries (LINQ for SQL, LINQ for objects, LINQ for yada-yada-yada)
As always, your mileage may vary.
source share