merge from master into release branch
This commit is contained in:
commit
958f2fdf6e
|
@ -40,8 +40,9 @@ public class Generator {
|
||||||
configs.put("Python2", readPython2Dir()); // generated Python2 tests
|
configs.put("Python2", readPython2Dir()); // generated Python2 tests
|
||||||
configs.put("Python3", readPython3Dir()); // generated Python3 tests
|
configs.put("Python3", readPython3Dir()); // generated Python3 tests
|
||||||
configs.put("NodeJS", readNodeJSDir()); // generated NodeJS tests
|
configs.put("NodeJS", readNodeJSDir()); // generated NodeJS tests
|
||||||
// configs.put("Safari", readSafariDir()); // generated Firefox tests
|
configs.put("Safari", readSafariDir()); // generated Safari tests
|
||||||
// configs.put("Firefox", readFirefoxDir()); // generated Firefox tests
|
configs.put("Firefox", readFirefoxDir()); // generated Firefox tests
|
||||||
|
configs.put("Chrome", readChromeDir()); // generated Chrome tests
|
||||||
return configs;
|
return configs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,6 +85,11 @@ public class Generator {
|
||||||
return new File("/Users/ericvergnaud/Development/antlr4/antlr/antlr4-javascript/tool/test/org/antlr/v4/test/rt/js/firefox");
|
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 {
|
private static File readGrammarDir() throws Exception {
|
||||||
File parent = readThisDir();
|
File parent = readThisDir();
|
||||||
return new File(parent, "grammars");
|
return new File(parent, "grammars");
|
||||||
|
|
|
@ -733,11 +733,14 @@ public abstract class BaseTest {
|
||||||
if ( parserName!=null ) {
|
if ( parserName!=null ) {
|
||||||
files.add(parserName+".java");
|
files.add(parserName+".java");
|
||||||
Set<String> optionsSet = new HashSet<String>(Arrays.asList(extraOptions));
|
Set<String> optionsSet = new HashSet<String>(Arrays.asList(extraOptions));
|
||||||
|
String grammarName = grammarFileName.substring(0, grammarFileName.lastIndexOf('.'));
|
||||||
if (!optionsSet.contains("-no-listener")) {
|
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")) {
|
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()]));
|
boolean allIsWell = compile(files.toArray(new String[files.size()]));
|
||||||
|
|
Loading…
Reference in New Issue