Search in sources :

Example 1 with CompileBinderImpl0

use of suite.lp.compile.impl.CompileBinderImpl0 in project suite by stupidsing.

the class BinderFactoryTest method test.

private void test(String pattern, String match) {
    for (BinderFactory bf : new BinderFactory[] { // 
    new CompileBinderImpl0(), // 
    new CompileBinderImpl(), new SewingBinderImpl() }) {
        Node node = new Generalizer().generalize(Suite.parse(pattern));
        Bind_ p = bf.binder(node);
        BindEnv be = new BindEnv(bf.mapper().env());
        assertTrue(p.test(be, Suite.parse(match)));
    }
}
Also used : Bind_(suite.lp.doer.BinderFactory.Bind_) BindEnv(suite.lp.doer.BinderFactory.BindEnv) Node(suite.node.Node) SewingBinderImpl(suite.lp.sewing.impl.SewingBinderImpl) CompileBinderImpl(suite.lp.compile.impl.CompileBinderImpl) CompileBinderImpl0(suite.lp.compile.impl.CompileBinderImpl0)

Aggregations

CompileBinderImpl (suite.lp.compile.impl.CompileBinderImpl)1 CompileBinderImpl0 (suite.lp.compile.impl.CompileBinderImpl0)1 BindEnv (suite.lp.doer.BinderFactory.BindEnv)1 Bind_ (suite.lp.doer.BinderFactory.Bind_)1 SewingBinderImpl (suite.lp.sewing.impl.SewingBinderImpl)1 Node (suite.node.Node)1