private Start tryParse(Parser parser) throws InvalidQuerySyntaxException {
try {
return parser.parse();
} catch (ParserException e) {
throw new InvalidQuerySyntaxException(INVALID_QUERY_MESSAGE + " token: [" + e.getToken() + "]", e);
} catch (LexerException e) {
throw new InvalidQuerySyntaxException(INVALID_QUERY_MESSAGE, e);
} catch (IOException e) {
throw new InvalidQuerySyntaxException(INVALID_QUERY_MESSAGE, e);
} finally {
parserFactory.close();
}
}