commit
df0bbf42e1
|
@ -55,6 +55,23 @@
|
||||||
<sourceDirectory>src</sourceDirectory>
|
<sourceDirectory>src</sourceDirectory>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.antlr</groupId>
|
||||||
|
<artifactId>antlr4-maven-plugin</artifactId>
|
||||||
|
<version>4.1</version>
|
||||||
|
<configuration>
|
||||||
|
<sourceDirectory>src</sourceDirectory>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>antlr4</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -188,9 +188,9 @@ public class Trees {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ParseTree> findAllNodes(ParseTree t, int index, boolean findTokens) {
|
public static List<ParseTree> findAllNodes(ParseTree t, int index, boolean findTokens) {
|
||||||
List<? super ParseTree> nodes = new ArrayList<ParseTree>();
|
List<ParseTree> nodes = new ArrayList<ParseTree>();
|
||||||
_findAllNodes(t, index, findTokens, nodes);
|
_findAllNodes(t, index, findTokens, nodes);
|
||||||
return (List<ParseTree>)nodes;
|
return nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void _findAllNodes(ParseTree t, int index, boolean findTokens,
|
public static void _findAllNodes(ParseTree t, int index, boolean findTokens,
|
||||||
|
|
|
@ -543,11 +543,11 @@ public abstract class BaseTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class<? extends Lexer> loadLexerClassFromTempDir(String name) throws Exception {
|
public Class<? extends Lexer> loadLexerClassFromTempDir(String name) throws Exception {
|
||||||
return (Class<? extends Lexer>)loadClassFromTempDir(name);
|
return loadClassFromTempDir(name).asSubclass(Lexer.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class<? extends Parser> loadParserClassFromTempDir(String name) throws Exception {
|
public Class<? extends Parser> loadParserClassFromTempDir(String name) throws Exception {
|
||||||
return (Class<? extends Parser>)loadClassFromTempDir(name);
|
return loadClassFromTempDir(name).asSubclass(Parser.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String execParser(String grammarFileName,
|
protected String execParser(String grammarFileName,
|
||||||
|
|
Loading…
Reference in New Issue