CommonTreeNodeStream nodes = new CommonTreeNodeStream( resultTree );
// AST nodes have payload that point into token stream
nodes.setTokenStream( tokenStream );
// Create a tree walker attached to the nodes stream
NodeTestDSLTree walker = new NodeTestDSLTree( nodes );
walker.compilation_unit();
return walker.getTestCase();
}
private static NodeTestDSLParser getParser(final Reader reader) throws IOException {
NodeTestDSLLexer lexer = new NodeTestDSLLexer( new ANTLRReaderStream( reader ) );