forked from jasder/antlr
Don't run compiler if tool reported error(s)
This commit is contained in:
parent
7082590240
commit
d054a358a4
|
@ -503,7 +503,10 @@ public abstract class BaseTest {
|
|||
{
|
||||
boolean allIsWell =
|
||||
antlr(grammarFileName, grammarFileName, grammarStr, defaultListener, extraOptions);
|
||||
boolean ok;
|
||||
if (!allIsWell) {
|
||||
return false;
|
||||
}
|
||||
|
||||
List<String> files = new ArrayList<String>();
|
||||
if ( lexerName!=null ) {
|
||||
files.add(lexerName+".java");
|
||||
|
@ -521,8 +524,7 @@ public abstract class BaseTest {
|
|||
files.add(grammarFileName.substring(0, grammarFileName.lastIndexOf('.'))+"BaseParseListener.java");
|
||||
}
|
||||
}
|
||||
ok = compile(files.toArray(new String[files.size()]));
|
||||
if ( !ok ) { allIsWell = false; }
|
||||
allIsWell = compile(files.toArray(new String[files.size()]));
|
||||
return allIsWell;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue