use of com.dat3m.dartagnan.parsers.program.visitors.VisitorLitmusAArch64 in project Dat3M by hernanponcedeleon.
the class ParserLitmusAArch64 method parse.
@Override
public Program parse(CharStream charStream) {
LitmusAArch64Lexer lexer = new LitmusAArch64Lexer(charStream);
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
LitmusAArch64Parser parser = new LitmusAArch64Parser(tokenStream);
parser.addErrorListener(new DiagnosticErrorListener(true));
parser.addErrorListener(new ParserErrorListener());
ProgramBuilder pb = new ProgramBuilder(SourceLanguage.LITMUS);
ParserRuleContext parserEntryPoint = parser.main();
VisitorLitmusAArch64 visitor = new VisitorLitmusAArch64(pb);
Program program = (Program) parserEntryPoint.accept(visitor);
program.setArch(Arch.ARM8);
return program;
}
Aggregations