use of com.yahoo.document.predicate.parser.PredicateParser in project vespa by vespa-engine.
the class Predicate method fromString.
public static Predicate fromString(String str) {
ANTLRStringStream input = new ANTLRStringStream(str);
PredicateLexer lexer = new PredicateLexer(input);
CommonTokenStream tokens = new CommonTokenStream(lexer);
PredicateParser parser = new PredicateParser(tokens);
try {
return parser.predicate();
} catch (RecognitionException e) {
throw new IllegalArgumentException(e);
}
}
Aggregations