I want to parse and store the columns and values of a SQL DML (INSERT, UPDATE, DELETE) statement in C. Need the URL of the open source code or a library with which I can lin
What is µSQL ?
µSQL is a SQL parser engine for C++ to develop SQL based applications easily, and it supports other SQL like domain specific languages such as UnQL and GQL too. Because µSQL is written only in old standard C++ library such as STL with ANTLR, then you can use it with many C++ compilers and platforms.
Repo on Github
See the Chapter "Parsing SQL" in "Lex & Yacc"(O'Reilly) in google books http://books.google.fr/books?id=YrzpxNYegEkC&lpg=PT1&dq=bison%20flex%20sql%20grammar&client=firefox-a&hl=en&pg=PA109
The standalone SQL parser of the Hyrise database system is open source and, even though it is written in C++, it can be accessed from C and is easy to understand and modify. It utilizes bison and flex.