public void addNextTokenList(Sentence sentence) { switch (type) { case SCHEMA: addSchema(sentence); break; case TABLE: addTable(sentence); break; case NEW_TABLE_ALIAS: addNewTableAlias(sentence); break; case TABLE_ALIAS: addTableAlias(sentence); break; case COLUMN_ALIAS: // addColumnAlias(query, sentence); // break; case COLUMN: addColumn(sentence); break; default: } }
switch (type) { case SCHEMA: s = matchSchema(sentence); break; case TABLE: s = matchTable(sentence); break; case NEW_TABLE_ALIAS: s = matchTableAlias(sentence, true); break; case TABLE_ALIAS: s = matchTableAlias(sentence, false); break; case COLUMN_ALIAS: s = matchColumnAlias(sentence, false); break; case COLUMN: s = matchColumn(sentence); break; default:
void loadBnf() { try { Bnf newBnf = Bnf.getInstance(null); columnRule = new DbContextRule(contents, DbContextRule.COLUMN); newAliasRule = new DbContextRule(contents, DbContextRule.NEW_TABLE_ALIAS); aliasRule = new DbContextRule(contents, DbContextRule.TABLE_ALIAS); tableRule = new DbContextRule(contents, DbContextRule.TABLE); schemaRule = new DbContextRule(contents, DbContextRule.SCHEMA); columnAliasRule = new DbContextRule(contents, DbContextRule.COLUMN_ALIAS);