use of catdata.mpl.Mpl.MplExp.MplVar in project fql by CategoricalData.
the class MplParser method toExp.
private static MplExp<String, String> toExp(Object o) {
if (o instanceof String) {
return new MplVar<>((String) o);
}
if (o instanceof Tuple3) {
Tuple3 t = (Tuple3) o;
return new MplEval<>((String) t.b, toTerm(t.c));
}
if (o instanceof org.jparsec.functors.Pair) {
org.jparsec.functors.Pair p = (org.jparsec.functors.Pair) o;
if (p.a.toString().equals("theory")) {
return toTheory(p.b);
}
MplEval<String, String> ret = new MplEval<>((String) p.a, toTerm(p.b));
return ret;
}
throw new RuntimeException();
// }
// return toTheory(o);
}