{if (true) return subSelect;}
throw new Error("Missing return statement in function");
}
final public CreateTable CreateTable() throws ParseException {
CreateTable createTable = new CreateTable();
Table table = null;
ArrayList columnDefinitions = new ArrayList();
List columnSpecs = null;
List tableOptions = new ArrayList();
Token columnName;
Token tk = null;
Token tk2 = null;
Token tk3 = null;
ColDataType colDataType = null;
String stringList = null;
ColumnDefinition coldef = null;
List indexes = new ArrayList();
List colNames = null;
Index index = null;
String parameter = null;
jj_consume_token(K_CREATE);
label_27:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case K_KEY:
case K_NOT:
case K_NULL:
case K_PRIMARY:
case S_DOUBLE:
case S_INTEGER:
case S_IDENTIFIER:
case S_CHAR_LITERAL:
case 77:
case 79:
;
break;
default:
jj_la1[136] = jj_gen;
break label_27;
}
CreateParameter();
}
jj_consume_token(K_TABLE);
table = Table();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 79:
jj_consume_token(79);
columnName = jj_consume_token(S_IDENTIFIER);
colDataType = ColDataType();
columnSpecs = new ArrayList();
label_28:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case K_KEY:
case K_NOT:
case K_NULL:
case K_PRIMARY:
case S_DOUBLE:
case S_INTEGER:
case S_IDENTIFIER:
case S_CHAR_LITERAL:
case 77:
case 79:
;
break;
default:
jj_la1[137] = jj_gen;
break label_28;
}
parameter = CreateParameter();
columnSpecs.add(parameter);
}
coldef = new ColumnDefinition();
coldef.setColumnName(columnName.image);
coldef.setColDataType(colDataType);
if (columnSpecs.size() > 0)
coldef.setColumnSpecStrings(columnSpecs);
columnDefinitions.add(coldef);
label_29:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 78:
;
break;
default:
jj_la1[138] = jj_gen;
break label_29;
}
jj_consume_token(78);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case K_INDEX:
tk = jj_consume_token(K_INDEX);
tk3 = jj_consume_token(S_IDENTIFIER);
colNames = ColumnsNamesList();
index = new Index();
index.setType(tk.image);
index.setName(tk3.image);
index.setColumnsNames(colNames);
indexes.add(index);
break;
case K_PRIMARY:
tk = jj_consume_token(K_PRIMARY);
tk2 = jj_consume_token(K_KEY);
colNames = ColumnsNamesList();
index = new Index();
index.setType(tk.image + " "+ tk2.image);
index.setColumnsNames(colNames);
indexes.add(index);
break;
case K_KEY:
tk = jj_consume_token(K_KEY);
tk3 = jj_consume_token(S_IDENTIFIER);
colNames = ColumnsNamesList();
index = new Index();
index.setType(tk.image);
index.setName(tk3.image);
index.setColumnsNames(colNames);
indexes.add(index);
break;
case S_IDENTIFIER:
columnName = jj_consume_token(S_IDENTIFIER);
colDataType = ColDataType();
columnSpecs = new ArrayList();
label_30:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case K_KEY:
case K_NOT:
case K_NULL:
case K_PRIMARY:
case S_DOUBLE:
case S_INTEGER:
case S_IDENTIFIER:
case S_CHAR_LITERAL:
case 77:
case 79:
;
break;
default:
jj_la1[139] = jj_gen;
break label_30;
}
parameter = CreateParameter();
columnSpecs.add(parameter);
}
coldef = new ColumnDefinition();
coldef.setColumnName(columnName.image);
coldef.setColDataType(colDataType);
if (columnSpecs.size() > 0)
coldef.setColumnSpecStrings(columnSpecs);
columnDefinitions.add(coldef);
break;
default:
jj_la1[140] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
jj_consume_token(80);
label_31:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case K_KEY:
case K_NOT:
case K_NULL:
case K_PRIMARY:
case S_DOUBLE:
case S_INTEGER:
case S_IDENTIFIER:
case S_CHAR_LITERAL:
case 77:
case 79:
;
break;
default:
jj_la1[141] = jj_gen;
break label_31;
}
parameter = CreateParameter();
tableOptions.add(parameter);
}
break;
default:
jj_la1[142] = jj_gen;
;
}
createTable.setTable(table);
if (indexes.size() > 0)
createTable.setIndexes(indexes);
if (tableOptions.size() > 0)
createTable.setTableOptionsStrings(tableOptions);
if (columnDefinitions.size() > 0)
createTable.setColumnDefinitions(columnDefinitions);
{if (true) return createTable;}
throw new Error("Missing return statement in function");
}