if (antlr.errMgr.getNumErrors() > 0) {
antlr.exit(1);
}
antlr.exit(0);
}
The relevant code in Tool.java (line 207) is
if (antlr.errMgr.getNumErrors() > 0) {
antlr.exit(1);
}
antlr.exit(0);
}
The tool has an option ("-Werror") to treat warnings as errors.
On Wednesday, September 21, 2016 at 12:38:34 AM UTC-7, Mike Lischke wrote:The relevant code in Tool.java (line 207) is
if (antlr.errMgr.getNumErrors() > 0) {
antlr.exit(1);
}
antlr.exit(0);
}
Thanks Gerald, but somehow this isn't really at the core of the problem. In XCode I get a warning that a tool issued error messages but did not set the exit code to != 0 when I run ANTLR4 in a script. That seems to indicate that the exit code was still 0, even when there are errors.
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussion+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Is the script that is running the antlr tool capturing the antlr exit code and passing it on externally? I have not used XCode in a long time, but if the tool is being called via some kind of script harness and does not pass on the exit code, then this can happen. ANTLR exits with exit(1), the script captures that, but the script then just exits with 0. Just a thought.