use of org.apache.jena.shacl.compact.reader.parser.ParseException in project jena by apache.
the class ShaclcParser method parse$.
private static void parse$(ShaclCompactParserJJ parser, StreamRDF stream, String baseURI, Context context) {
ParserProfile profile = new ParserProfileStd(RiotLib.factoryRDF(), ErrorHandlerFactory.errorHandlerStd, IRIxResolver.create(baseURI).build(), PrefixMapFactory.create(), context, false, false);
SHACLC.addStandardPrefixes(profile.getPrefixMap());
stream.start();
parser.setDest(stream);
parser.setProfile(profile);
parser.start();
try {
parser.Unit();
} catch (ParseException ex) {
throw new ShaclcParseException(ex.getMessage(), ex.currentToken.beginLine, ex.currentToken.beginColumn);
} catch (TokenMgrError tErr) {
int col = parser.token.endColumn;
int line = parser.token.endLine;
throw new ShaclcParseException(tErr.getMessage(), line, col);
}
parser.finish();
stream.finish();
}
Aggregations