I saw some hint that ANTLR can generate a tree of custom objects instead of CommonTree by creating a custom TreeAdapter. I have done that, but I see that in the generated parser code, it includes CommonTree, so I get ClassCastExceptions. Is there some way around this? Thanks.