Search in sources :

Example 1 with OplChaseExp

use of catdata.opl.OplExp.OplChaseExp in project fql by CategoricalData.

the class OplParser method toChase.

private static OplExp toChase(Tuple5 t) {
    // Parser<?> chase = Parsers.tuple(term("chase"), ident(), Parsers.tuple(term("with"), term("{"), ident().sepBy(term(","), term("}")), term("max"), ident()));
    String I = (String) t.b;
    // t.c is (with { ... })
    Integer i0 = Integer.parseInt((String) t.e);
    Tuple4 x = (Tuple4) t.c;
    List<String> l = (List<String>) x.c;
    return new OplChaseExp(i0, I, new LinkedList<>(l));
}
Also used : Tuple4(org.jparsec.functors.Tuple4) OplChaseExp(catdata.opl.OplExp.OplChaseExp) List(java.util.List) LinkedList(java.util.LinkedList)

Aggregations

OplChaseExp (catdata.opl.OplExp.OplChaseExp)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Tuple4 (org.jparsec.functors.Tuple4)1