示例#1
0
 @Test
 public void split5() {
   List<String> tokens = parser.split("a and b AND(((a>=c AND b> d) OR (x <> y )) ) OR t>u");
   assertEquals(
       Arrays.asList(
           "a", "and", "b", "AND", "(", "(", "(", "a", ">=", "c", "AND", "b", ">", "d", ")", "OR",
           "(", "x", "<>", "y", ")", ")", ")", "OR", "t", ">", "u"),
       tokens);
 }
示例#2
0
 @Test
 public void split3() {
   List<String> tokens = parser.split("((a and b))");
   assertEquals(Arrays.asList("(", "(", "a", "and", "b", ")", ")"), tokens);
 }
示例#3
0
 @Test
 public void split1() {
   List<String> tokens = parser.split("a and b");
   assertEquals(Arrays.asList("a", "and", "b"), tokens);
 }