On Wed, Jan 26, 2011 at 10:40 PM, Ching <[email protected]> wrote: > Can anyone tell me why I got this exception? My output is AST. Thanks. > > Err, that error is pretty self-explanatory: you're trying to cast a org.antlr.runtime.CommonToken to a org.antlr.runtime.tree.Tree, which is illegal. As you can see from ANTLR's class hierarchy: http://www.antlr.org/api/Java/hierarchy.html the two can't be cast (either CommonToken->Tree or Tree->CommonToken).
Perhaps you don't understand where this happens in your grammar? In that case, please show your grammar as well. Regards, Bart. 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.
