use of com.dat3m.dartagnan.parsers.XMLLexer in project Dat3M by hernanponcedeleon.
the class ParserWitness method parse.
public WitnessGraph parse(CharStream charStream) {
XMLLexer lexer = new XMLLexer(charStream);
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
XMLParser parser = new XMLParser(tokenStream);
parser.addErrorListener(new ParserErrorListener());
ParserRuleContext parserEntryPoint = parser.document();
VisitorXML visitor = new VisitorXML();
WitnessGraph graph = (WitnessGraph) parserEntryPoint.accept(visitor);
if (graph.hasAttributed("producer")) {
logger.info("Witness graph produced by " + graph.getAttributed("producer"));
}
logger.info("Witness graph stats: #Nodes " + graph.getNodes().size());
logger.info("Witness graph stats: #Edges " + graph.getEdges().size());
return graph;
}
Aggregations