@Override public int _handleToken(ParseContext ctx) throws InvalidQueryException { Token token = ctx.getTokens()[ctx.getCurrentTokensIndex()]; LogicalOperator logicalOp = LogicalOperatorFactory.createOperator(token.getValue(), ctx.getPrecedenceLevel()); ctx.updateMaxPrecedence(logicalOp.getPrecedence()); ctx.addExpression(LogicalExpressionFactory.createLogicalExpression(logicalOp)); return 1; }