Le 12 juil. 2012 21:40, "Aaron Patterson" <[email protected]> a écrit : > > Hi, > > I would like to build an AST of a SQL statement using SQLite3. I've > been reading through sqlite3RunParser as well as the grammar. It > *looks* like the grammar is building some sort of structure before the > statement is compiled to byte code, but I'm getting lost. > > Is it possible to get an AST out of the parser without major surgery? > If so, can someone point me in the right direction? >
I don't know if this is what you are looking for, but Libgda ( http://www.gnome-db.org) includes a parser which takes and SQL string and builds a abstract tree, see http://developer-next.gnome.org/libgda/stable/GdaSqlParser.html and http://developer-next.gnome.org/libgda/stable/libgda-5.0-GdaSqlStatement.html . If this is what you're looking for, you can either use Libgda or copy the bits you want. Regards, Vivien _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

