Skip to content

Commit

Permalink
Removed BailErrorStrategy Error handler to generate better error mess…
Browse files Browse the repository at this point in the history
…ages when parsing LLVM IR.
  • Loading branch information
ThomasHaas committed Aug 21, 2023
1 parent 34b6612 commit f7b0ded
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.dat3m.dartagnan.parsers.LLVMIRParser;
import com.dat3m.dartagnan.parsers.program.visitors.VisitorLlvm;
import com.dat3m.dartagnan.program.Program;
import org.antlr.v4.runtime.BailErrorStrategy;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.ParserRuleContext;
Expand All @@ -17,7 +16,6 @@ public Program parse(CharStream charStream) {
CommonTokenStream tokenStream = new CommonTokenStream(lexer);

LLVMIRParser parser = new LLVMIRParser(tokenStream);
parser.setErrorHandler(new BailErrorStrategy());
ParserRuleContext parserEntryPoint = parser.compilationUnit();
VisitorLlvm visitor = new VisitorLlvm();

Expand All @@ -27,3 +25,4 @@ public Program parse(CharStream charStream) {
return visitor.buildProgram();
}
}

0 comments on commit f7b0ded

Please sign in to comment.