}
public MySqlCommitStatement parseCommit() throws ParserException {
acceptIdentifier("COMMIT");
MySqlCommitStatement stmt = new MySqlCommitStatement();
if (identifierEquals("WORK")) {
lexer.nextToken();
stmt.setWork(true);
}
if (lexer.token() == Token.AND) {
lexer.nextToken();
if (lexer.token() == Token.NOT) {
lexer.nextToken();
acceptIdentifier("CHAIN");
stmt.setChain(Boolean.FALSE);
} else {
acceptIdentifier("CHAIN");
stmt.setChain(Boolean.TRUE);
}
}
return stmt;
}