Customer wants to be able to write highly customized universal conditions for scheduled reports for his intranet website. Think about something similar to JIRA and Jira Query Language (JQL).
Is there any good, well documented library to provide a solid base for custom query language development? Some parser, lexer etc. and an option to easily visit the nodes and map to actual DB queries?
I did some internet search, but maybe I'm not good at using the right keywords because I could not find anything useful.
I'm aware that there are no completely universal tools because we will have to implement mappings from query to our SQL schema (to deal with situations when customer enters "user.role = 'Administrator'" and we have to map it to user.role_id = (SELECT from roles where name = 'Administrator' LIMIT 1)) and we might never reach full coverage, but we'll add support for more fields and search queries as we go. It would be great just to avoid writing custom parsers, lexers etc.