merge from master into release branch

This commit is contained in:
Terence Parr 2014-11-22 10:47:29 -08:00
commit 958f2fdf6e
2 changed files with 13 additions and 4 deletions

View File

@ -40,8 +40,9 @@ public class Generator {
configs.put("Python2", readPython2Dir()); // generated Python2 tests
configs.put("Python3", readPython3Dir()); // generated Python3 tests
configs.put("NodeJS", readNodeJSDir()); // generated NodeJS tests
// configs.put("Safari", readSafariDir()); // generated Firefox tests
// configs.put("Firefox", readFirefoxDir()); // generated Firefox tests
configs.put("Safari", readSafariDir()); // generated Safari tests
configs.put("Firefox", readFirefoxDir()); // generated Firefox tests
configs.put("Chrome", readChromeDir()); // generated Chrome tests
return configs;
}
@ -83,6 +84,11 @@ public class Generator {
// TODO read from env variable
return new File("/Users/ericvergnaud/Development/antlr4/antlr/antlr4-javascript/tool/test/org/antlr/v4/test/rt/js/firefox");
}
private static File readChromeDir() {
// TODO read from env variable
return new File("/Users/ericvergnaud/Development/antlr4/antlr/antlr4-javascript/tool/test/org/antlr/v4/test/rt/js/firefox");
}
private static File readGrammarDir() throws Exception {
File parent = readThisDir();

View File

@ -733,11 +733,14 @@ public abstract class BaseTest {
if ( parserName!=null ) {
files.add(parserName+".java");
Set<String> optionsSet = new HashSet<String>(Arrays.asList(extraOptions));
String grammarName = grammarFileName.substring(0, grammarFileName.lastIndexOf('.'));
if (!optionsSet.contains("-no-listener")) {
files.add(grammarFileName.substring(0, grammarFileName.lastIndexOf('.'))+"BaseListener.java");
files.add(grammarName+"Listener.java");
files.add(grammarName+"BaseListener.java");
}
if (optionsSet.contains("-visitor")) {
files.add(grammarFileName.substring(0, grammarFileName.lastIndexOf('.'))+"BaseVisitor.java");
files.add(grammarName+"Visitor.java");
files.add(grammarName+"BaseVisitor.java");
}
}
boolean allIsWell = compile(files.toArray(new String[files.size()]));