public static Expression valueOf(String expression, Map parameters) { OQLParser p = new OQLParser(new StringReader(expression), parameters); try { return p.expression(); } catch (ParseException e) { throw new Error(expression, e); } catch (TokenMgrError e) { throw new Error(expression, e);
public static Expression valueOf(Path path) { if (path.getParent() == null) { return new Variable(path.getName()); } else { return new Get(valueOf(path.getParent()), path.getName());
    public static Expression valueOf(String expression, Map parameters) {        OQLParser p = new OQLParser(new StringReader(expression), parameters);        try {            return p.expression();        } catch (ParseException e) {            throw new Error(expression, e);        } catch (TokenMgrError e) {            throw new Error(expression, e);        }    }