use of com.dat3m.dartagnan.parsers.BoogieParser in project Dat3M by hernanponcedeleon.
the class ParserBoogie method parse.
@Override
public Program parse(CharStream charStream) {
BoogieLexer lexer = new BoogieLexer(charStream);
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
BoogieParser parser = new BoogieParser(tokenStream);
parser.addErrorListener(new ParserErrorListener());
ProgramBuilder pb = new ProgramBuilder(SourceLanguage.BOOGIE);
ParserRuleContext parserEntryPoint = parser.main();
VisitorBoogie visitor = new VisitorBoogie(pb);
Program program = (Program) parserEntryPoint.accept(visitor);
return program;
}
Aggregations