StringSource source = new StringSource(statement);
ParsingResult result = parser.parse(source);
if (!result.success()) {
throw new LajaException("Could not parse statement \"" + statement + "\"");
}
TemplateFactory templateFactory = (TemplateFactory)parser.getFactory();
return templateFactory.getBaseTemplate();
}