Beispiel #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);
 }
Beispiel #2
0
 @Test
 public void split3() {
   List<String> tokens = parser.split("((a and b))");
   assertEquals(Arrays.asList("(", "(", "a", "and", "b", ")", ")"), tokens);
 }
Beispiel #3
0
 @Test
 public void split1() {
   List<String> tokens = parser.split("a and b");
   assertEquals(Arrays.asList("a", "and", "b"), tokens);
 }