}
}
if (null != parserHome) {
if (!parserHome.isDirectory()) {
throw new ParserException("Execution directory does not exist: " + parserHome);
} else if (!parserHome.canRead()) {
throw new ParserException("Execution directory is not readable: " + parserHome);
}
} else {
LOGGER.warn("No parser home directory specified");
}
final ParsingResult<File> result = executeParser(parserHome, blueprintFile, outputFormat);
LOGGER.debug("AST file: {}", result.getAst().getAbsolutePath());
return result;
} catch (Exception e) {
throw new ParserException("Error parsing blueprint file to AST file: " + blueprintFile, e);
}
}