parser.setTreeAdaptor(new CommonTreeAdaptor(){
public Object create(Token payload){
return new CommonTree(payload);
}
});
project_return result = parser.project();
if (parser.getNumberOfSyntaxErrors() > 0){
MessageConsole console = ToolModelActivator.findConsole(ToolModelActivator.TOOL_PARSER_OUTPUT);
MessageConsoleStream msgStream = console.newMessageStream();
msgStream.println(parser.getNumberOfSyntaxErrors() + " Syntax error in project " + file.getName() + "\n"
+ parseErrors.toString());
} else {
tree = (CommonTree) result.getTree();
CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
nodes.setTokenStream(tokens);
ForteAST walker = new ForteAST(file, nodes);
ToolPlan plan = walker.project();
plan.document = document;