return parseFilterString(filterExpression, false);
}
public FilterExpression parseFilterString(final String filterExpression, final boolean allowOnlyBinary)
throws ExpressionParserException, ExpressionParserInternalError {
CommonExpression node = null;
curExpression = filterExpression;
try {
// Throws TokenizerException and FilterParserException. FilterParserException is caught somewhere above
tokenList = new Tokenizer(filterExpression).tokenize();
if (!tokenList.hasTokens()) {
return new FilterExpressionImpl(filterExpression);
}
} catch (TokenizerException tokenizerException) {
// Tested with TestParserExceptions.TestPMparseFilterString
throw FilterParserExceptionImpl.createERROR_IN_TOKENIZER(tokenizerException, curExpression);
}
try {
CommonExpression nodeLeft = readElement(null);
node = readElements(nodeLeft, 0);
} catch (ExpressionParserException filterParserException) {
// Add empty filterTree to Exception
// Tested for original throw point
filterParserException.setFilterTree(new FilterExpressionImpl(filterExpression));