[antlr-interest] Why was dupTree() removed from BaseTree

Terence Parr parrt at cs.usfca.edu
Sat Sep 27 11:27:51 PDT 2008


On Sep 27, 2008, at 11:01 AM, Oliver B. Fischer wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello Ter,
>
> Yes, this is a solution for me. Not the best one, since I wrote a base
> class for me my parser and the method getTreeAdapter() will be defined
> in the final parser class, but this is not an real issue.

I think you could just define dupTree to invoke your adapter.

> But might it be, that the error recovering also changed a little  
> bit? I
> had to overwrite the recoverFromMismatchedToken() method to force my
> parser to fail if it finds an unexpected token.

To properly handle insertion of missing tokens, I had to change the  
interface of match and so on. I was hoping that most people were not  
overriding the basic functionality. doh! I can help you update things  
on your side. Just let me know how I can help, such as answering these  
questions :)

Ter


More information about the antlr-interest mailing list