ExpressionParser { static Parser<Expression> in(Parser<Expression> expr) { return Parsers.sequence( expr, term("in").next(tuple(expr)), (e, t) -> new BinaryExpression(e, Op.IN, t)); }    }
@Test public void testIn() { TerminalParserTest.assertParser(ExpressionParser.in(NUMBER), "1 in (2)", new BinaryExpression(number(1), Op.IN, TupleExpression.of(number(2)))); TerminalParserTest.assertParser(ExpressionParser.in(NUMBER), "1 in (2, 3)", new BinaryExpression(number(1), Op.IN, TupleExpression.of(number(2), number(3)))); }