public static void parseDDL (Hashtable tables, Hashtable views, Hashtable types, String ddl) {
try {
Regex regex = new Regex("\\sgo\\s|;",Regex.CASE_INSENSITIVE_MASK);
List commands = regex.split(ddl);
for (Iterator it = commands.iterator(); it.hasNext(); ) {
String command = (String) it.next();
if (debug == 0) System.out.print(".");
if ((new Regex("create table",Regex.CASE_INSENSITIVE_MASK)).contains(command)) {
createTable(types, tables, command);
continue;
}
if ((new Regex("create view",Regex.CASE_INSENSITIVE_MASK)).contains(command)) {
createView(tables, views, command);
continue;
}
if ((new Regex("alter table",Regex.CASE_INSENSITIVE_MASK)).contains(command)) {
alterTable(tables, command);
continue;
}
}