ToolSQLLexer lexer = new ToolSQLLexer(stream);
TokenStream tokens = new CommonTokenStream(lexer);
ForteParser parser = new ForteParser(tokens);
// parser.setErrorReporter(this);
parser.setTreeAdaptor(adaptor);
cursorDeclaration_return result = parser.cursorDeclaration();
if (parser.getNumberOfSyntaxErrors() > 0){
ToolPlugin.showError(parser.getNumberOfSyntaxErrors() + " Syntax error in cursor " + getFile().getName() + "\n"
+ this.parseErrors.toString(), null);
} else {
CommonTree tree = (CommonTree) result.getTree();
System.out.println(tree.toStringTree());
CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
nodes.setTokenStream(tokens);
// TODO write a tree walker
// FortePRXTree walker = new FortePRXTree(this, nodes);