sqlBabel
sqlBabel is an SQL slang translation engine. In other words it translates SQL from one flavor of SQL to another.
It currently doesn't do anything, although you can Download what we have so far if you want. As always, if you're interested in working on this or giving us mad dollars (or just props) to finish, email us.
History
sqlBabel was written by me (Stou) after spending a good hour porting Oracle schema code to PostgreSQL, using the substitution command in VI. I figured since I had recently taken a compiler class it wouldn't be that difficult to create a quick program that can parse the Oracle SQL code and generate an AST that I can subsequently translate into PostgreSQL schema code.
At first I tried PyParsing, which I had used before for the DohGL hook generator... but it didn't really create Abstract Syntax Trees, so after a quick search I found SPARK
SPARK
SPARK is a tool for writing "simple compilers" in Python.
Normally when writing a compiler one would use lex and yacc to create the scanner and parser then compile the compiler and run it against the code.
With SPARK, the Scanner and the Parser are both written as sub-classes of SPARK classes, one provides BNF style rules inside the comments of the class methods... Each method inside the parser has a structure similar to that of yacc. Using these rules SPARK builds an internal representation of the target language and performs analysis on the code.
Design
sqlBabel works in a similar way to a compiler, the SQL source is first tokenized and an Abstract Syntax Tree is created from it. Then the source is transformed into something close to SQL92, from there a code generator walks the AST and emits code in the target SQL Slang, be it PostgreSQL, Oracle.
Status
I have not had any time to work on it lately... or to actually get it to translate... it can generate a dot graph from some simple SQL schema and that's it... for now.