@Test public void testOperatorPriorityLikeQc() { Node node = ExpressionParser.parse("<a OR >=b AND c"); Assert.assertEquals("((< a OR >= b) AND c)", ExpressionBuilder.build(node)); node = ExpressionParser.parse("<a OR (>=b AND c)"); Assert.assertEquals("(< a OR (>= b AND c))", ExpressionBuilder.build(node)); node = ExpressionParser.parse("<a AND >=b OR c"); Assert.assertEquals("((< a AND >= b) OR c)", ExpressionBuilder.build(node)); node = ExpressionParser.parse("<a AND (>=b OR c)"); Assert.assertEquals("(< a AND (>= b OR c))", ExpressionBuilder.build(node)); node = ExpressionParser.parse("(a AND b AND c) OR (x AND y AND z)"); Assert.assertEquals("(((a AND b) AND c) OR ((x AND y) AND z))", ExpressionBuilder.build(node)); }
public static Node parse(String expr) { Lexer lexer = new Lexer(expr); return matchExpr(lexer); }
ExpressionParser { public static Node parse(String expr) { Lexer lexer = new Lexer(expr); return matchExpr(lexer); } }
ExpressionParser { public static Node parse(String expr) { Lexer lexer = new Lexer(expr); return matchExpr(lexer); }  }
ExpressionParser { public static Node parse(String expr) { Lexer lexer = new Lexer(expr); return matchExpr(lexer); }  static Node parse(String expr); }
ExpressionParser { public static Node parse(String expr) { Lexer lexer = new Lexer(expr); return matchExpr(lexer); }  static Node parse(String expr);  }