The CommonTreeNodeStream constructor fails to pass 'adaptor' into the
TreeIterator:

        public CommonTreeNodeStream(TreeAdaptor adaptor, Object tree) {
        super(adaptor.create(Token.EOF, "EOF")); // set EOF
                this.root = tree;
                this.adaptor = adaptor;
        it = new TreeIterator(root);
        it.eof = this.eof; // make sure tree iterator returns the EOF we want
        }

This results in the following constructor being called:

    public TreeIterator(Object tree) {
        this(new CommonTreeAdaptor(),tree);
    }

Which results in the UP, DOWN, and EOF tokens not being of the correct
class as created by the other TreeIterator constructor:

    public TreeIterator(TreeAdaptor adaptor, Object tree) {
        this.adaptor = adaptor;
        this.tree = tree;
        this.root = tree;
        nodes = new FastQueue();
        down = adaptor.create(Token.DOWN, "DOWN");
        up = adaptor.create(Token.UP, "UP");
        eof = adaptor.create(Token.EOF, "EOF");
    }

Thanks.

--
Kaleb Pederson

Blog - http://kalebpederson.com
Twitter - http://twitter.com/kalebpederson

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to