parser.setTreeAdaptor(new CommonTreeAdaptor(){
public Object create(Token payload){
return new CommonTree(payload);
}
});
classFile_return result = parser.classFile();
if (parser.getNumberOfSyntaxErrors() > 0){
MessageConsole console = ToolModelActivator.findConsole(ToolModelActivator.TOOL_PARSER_OUTPUT);
MessageConsoleStream msgStream = console.newMessageStream();
msgStream.println(parser.getNumberOfSyntaxErrors() + " Syntax error(s) in class " + file.getName() + "\n"
+ parseErrors.toString());
}
tree = (CommonTree) result.getTree();
System.out.println(tree.toStringTree());
CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
nodes.setTokenStream(tokens);
ForteCDFTree walker = new ForteCDFTree(file, nodes);
ToolClass toolClass = walker.classDeclaration().toolClass;