Search in sources :

Example 1 with InstExpVar

use of catdata.aql.exp.InstExp.InstExpVar in project fql by CategoricalData.

the class CombinatorParser method instExp.

@SuppressWarnings({ "unchecked", "rawtypes" })
private static void instExp() {
    Parser<InstExpCoProdFull> l2 = Parsers.tuple(token("coproduct"), ident.sepBy(token("+")), token(":"), sch_ref.lazy(), options.between(token("{"), token("}")).optional()).map(x -> new InstExpCoProdFull(x.b, x.d, Util.newIfNull(x.e)));
    Parser<InstExp<?, ?, ?, ?, ?, ?, ?, ?, ?>> var = ident.map(InstExpVar::new), empty = Parsers.tuple(token("empty"), token(":"), sch_ref.get()).map(x -> new InstExpEmpty<>(x.c)), pi = Parsers.tuple(token("pi"), map_ref.lazy(), inst_ref.lazy(), options.between(token("{"), token("}")).optional()).map(x -> new InstExpPi(x.b, x.c, x.d == null ? new HashMap<>() : Util.toMapSafely(x.d))), sigma = Parsers.tuple(token("sigma"), map_ref.lazy(), inst_ref.lazy(), options.between(token("{"), token("}")).optional()).map(x -> new InstExpSigma(x.b, x.c, x.d == null ? new HashMap<>() : Util.toMapSafely(x.d))), sigma_chase = Parsers.tuple(token("sigma_chase"), map_ref.lazy(), inst_ref.lazy(), options.between(token("{"), token("}")).optional()).map(x -> new InstExpSigmaChase(x.b, x.c, x.d == null ? new HashMap<>() : Util.toMapSafely(x.d))), frozen = Parsers.tuple(token("frozen"), query_ref.lazy(), ident).map(x -> new InstExpFrozen(x.b, new En(x.c))), delta = Parsers.tuple(token("delta"), map_ref.lazy(), inst_ref.lazy()).map(x -> new InstExpDelta(x.b, x.c)), distinct = Parsers.tuple(token("distinct"), inst_ref.lazy()).map(x -> new InstExpDistinct(x.b)), anon = Parsers.tuple(token("anonymize"), inst_ref.lazy()).map(x -> new InstExpAnonymize(x.b)), eval = Parsers.tuple(token("eval"), query_ref.lazy(), inst_ref.lazy(), options.between(token("{"), token("}")).optional()).map(x -> new InstExpEval(x.b, x.c, x.d == null ? new LinkedList<>() : x.d)), dom = Parsers.tuple(token("src"), trans_ref.lazy()).map(x -> new InstExpDom(x.b)), cod = Parsers.tuple(token("dst"), trans_ref.lazy()).map(x -> new InstExpCod(x.b)), chase = Parsers.tuple(token("chase"), edsExp(), inst_ref.lazy(), options.between(token("{"), token("}")).optional()).map(x -> new InstExpChase(x.b, x.c, x.d == null ? new LinkedList<>() : x.d)), coeval = Parsers.tuple(token("coeval"), query_ref.lazy(), inst_ref.lazy(), options.between(token("{"), token("}")).optional()).map(x -> new InstExpCoEval(x.b, x.c, x.d == null ? new LinkedList<>() : x.d));
    Parser ret = Parsers.or(sigma_chase, l2, pi, frozen, instExpCsvQuot(), instExpJdbcQuot(), instExpCoProd(), instExpRand(), instExpCoEq(), instExpJdbcAll(), chase, instExpJdbc(), empty, instExpRaw(), var, sigma, delta, distinct, eval, colimInstExp(), dom, anon, cod, instExpCsv(), coeval, parens(inst_ref), instExpQuotient());
    inst_ref.set(ret);
}
Also used : InstExpAnonymize(catdata.aql.exp.InstExp.InstExpAnonymize) InstExpCoProdFull(catdata.aql.exp.InstExp.InstExpCoProdFull) InstExpCod(catdata.aql.exp.InstExp.InstExpCod) InstExpSigma(catdata.aql.exp.InstExp.InstExpSigma) En(catdata.aql.exp.SchExpRaw.En) InstExpFrozen(catdata.aql.exp.InstExp.InstExpFrozen) InstExpDom(catdata.aql.exp.InstExp.InstExpDom) Parser(org.jparsec.Parser) InstExpVar(catdata.aql.exp.InstExp.InstExpVar) InstExpDelta(catdata.aql.exp.InstExp.InstExpDelta) InstExpPi(catdata.aql.exp.InstExp.InstExpPi) InstExpDistinct(catdata.aql.exp.InstExp.InstExpDistinct) InstExpEval(catdata.aql.exp.InstExp.InstExpEval) InstExpSigmaChase(catdata.aql.exp.InstExp.InstExpSigmaChase) InstExpChase(catdata.aql.exp.InstExp.InstExpChase) InstExpCoEval(catdata.aql.exp.InstExp.InstExpCoEval)

Aggregations

InstExpAnonymize (catdata.aql.exp.InstExp.InstExpAnonymize)1 InstExpChase (catdata.aql.exp.InstExp.InstExpChase)1 InstExpCoEval (catdata.aql.exp.InstExp.InstExpCoEval)1 InstExpCoProdFull (catdata.aql.exp.InstExp.InstExpCoProdFull)1 InstExpCod (catdata.aql.exp.InstExp.InstExpCod)1 InstExpDelta (catdata.aql.exp.InstExp.InstExpDelta)1 InstExpDistinct (catdata.aql.exp.InstExp.InstExpDistinct)1 InstExpDom (catdata.aql.exp.InstExp.InstExpDom)1 InstExpEval (catdata.aql.exp.InstExp.InstExpEval)1 InstExpFrozen (catdata.aql.exp.InstExp.InstExpFrozen)1 InstExpPi (catdata.aql.exp.InstExp.InstExpPi)1 InstExpSigma (catdata.aql.exp.InstExp.InstExpSigma)1 InstExpSigmaChase (catdata.aql.exp.InstExp.InstExpSigmaChase)1 InstExpVar (catdata.aql.exp.InstExp.InstExpVar)1 En (catdata.aql.exp.SchExpRaw.En)1 Parser (org.jparsec.Parser)1