I was working on a SQL query generator, and was wondering what'd be the best way to parse SQL using ANSI C.
Right now what i do is:
Tokenize the query based on spaces.
Determine which SQL statement it is based on these tokens.
Evaluate it accordingly.I have different syntax check mechanisms for different statements,
I dont think this is the best way to do it.
What would be a better,faster method of parsing SQL?