[antlr-interest] CommonTreeNodeStream.size() get "streams are of unknown size" exception
Shaoting Cai
caishaoting at gmail.com
Mon Mar 23 15:51:38 PDT 2009
Hi,
I was using CommonTreeNodeStream.size() and it worked in antlr-3.1.1.
After I switch to 3.1.3, I get "streams are of unknown size" runtime
exception.
Is there any changes in the CommonTreeNodeStream class?
here's how I create the CommonTreeNodeStream:
....
this.ast = (CommonTree) r.getTree();
System.out.println(ast.toStringTree()); // <-- i can see the
tree string
CommonTreeNodeStream nodes = new CommonTreeNodeStream(ast);
System.out.println(nodes.size()); // <-- get exception here
....
Thanks in advance for any clue :)
Shaoting
More information about the antlr-interest
mailing list