{
LOG.debug("Compiling DISPEL for used object: " + object);
}
if (object.getDispel() == null)
{
CompilationException exc = new CompilationException();
exc.initCause(new NoDispelException(object));
throw exc;
}
DISPELCompiler compiler = new DISPELCompiler();
DISPELGraphBuilder builder = new DISPELGraphBuilder(registry, optimiser);
compiler.setRequestBuilder(builder);
builder.setCompiler(compiler);
SimpleErrorListener listener = new SimpleErrorListener();
compiler.addErrorListener(listener);
compiler.parse(object.getDispel());
if (listener.getError() != null)
{
CompilationException exc = new CompilationException();
exc.initCause(listener.getError());
throw exc;
}
LOG.debug("Compilation complete for object: " + object.getName());
// Write the functions obtained to our function store