@Commit public void build() throws PersistenceException { try { if (filenameBackgroundProgram != null) { backgroundKnowledge = ASPParser.parseProgram(new FileReader(filenameBackgroundProgram)); } } catch (FileNotFoundException | ParseException e) { throw new PersistenceException( "Cannot parse background program in '" + filenameBackgroundProgram + "' - " + e.getMessage()); } }
@Override public DLPAtom read(String value) throws Exception { ASPParser parser = new ASPParser(new StringReader(value)); return (DLPAtom) new InstantiateVisitor().visit(parser.Atom(), null); }