[antlr-interest] Getting rid of class cast exceptions to CommonTree
Terence Parr
parrt at cs.usfca.edu
Thu May 22 08:54:55 PDT 2008
hi. what line exactly is giving the issue? Perhaps we can avoid the
cast.
Ter
On May 22, 2008, at 7:04 AM, Felix Dorner wrote:
> Hi,
>
> I use a lot of semantic predicates in my tree grammar. When a
> FailedPredicateException is thrown, I sometimes end up with a
> ClassCast exception, because Antlr tries to cast an "UP" or a "DOWN"
> node, to my custom AST type. It seems that UP/DOWN are always
> CommonTrees.
>
> I don't know where things get messed up, for now I'd just like to
> get rid of the class cast exception.
>
> Felix
More information about the antlr-interest
mailing list