public MysqlForeignKey parseForeignKey() {
accept(Token.FOREIGN);
accept(Token.KEY);
MysqlForeignKey fk = new MysqlForeignKey();
if (lexer.token() != Token.LPAREN) {
SQLName indexName = name();
fk.setIndexName(indexName);
}
accept(Token.LPAREN);
this.names(fk.getReferencingColumns());
accept(Token.RPAREN);
accept(Token.REFERENCES);
fk.setReferencedTableName(this.name());
accept(Token.LPAREN);
this.names(fk.getReferencedColumns());
accept(Token.RPAREN);
return fk;
}