If you're trying to parse SQL, try using org.teiid.query.parser.QueryParser instead. It returns an AST in a different object hierarchy than the AST used in translators but there are similar visitors for traversing and manipulating the parse tree. Look at the org.teiid.query.sql package. There's lots of good stuff in there and we use it often to programatically manipulate SQL.
The class names between the two hierarchies are often the same so it can be a little confusing.
Only note to above comment is that you can use "org.teiid.query.sql", however it is not public api from Teiid. So, use it knowing that it may change.
Can you describe your scenario more fully? Where are you handling the insert? Is this at the translator layer such that your starting with the language object form, or somewhere else?
Steve - I am handling the insert at the translator layer, very similar to how the other translators of Teiid are setup (MongoDB, Google etc.). I used the SQLStringVisitor to handle Select Statements, and it works well and was very easy to implement. Looking at the Update Visitors in MongoDB and others, it looks a little more complex and was just trying to find the best route to choose for developing an update visitor. Thank you for your quick response!
Mark/Ramesh - I am reading the org.teiid.query.parser/sql now, I didn't know that it existed it is very interesting. I will read more and maybe choose to use that!
Thanks guys for all your input!