// we only continue if a meaningful syntax tree has been built
if(tree.getChildCount() > 0) {
// rewrite the tree (temporary fix for http://www.antlr.org/jira/browse/ANTLR-427)
CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
TreeRewrite s = new TreeRewrite(nodes);
tree = (CommonTree)s.downup(tree);
// and walk it
nodes = new CommonTreeNodeStream(tree);
nodes.setTokenStream(stream);
DateWalker walker = new DateWalker(nodes);