Using MySQL parser separately

Asked by bittomix

Hello!
I'am working on bachelor thesis and I neet do parse incoming SQL queries. Writing SQL parser is a long term task and it will never exactly reflect the logic used in native parser.
I found out that MySQL has a lexical analyzer with main source file sql/sql_lex.cc and a syntax analyzer built with bison from sql/sql_yacc.y. I am really interested in reuse of these robust solutions.

I was wondering if It is possible to reuse the MySQL parser (lexical+syntax analyzer) to get the structure of SQL query in some logical form e.g. syntactic tree. Would it be possible? are there some related text, tutorials or projects?

Thanks

Question information

Language:
English Edit question
Status:
Expired
For:
MySQL Server Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.