[antlr-interest] lexer doesn't see super constructor & inherited variable

Raphael Reitzig r_reitzi at cs.uni-kl.de
Tue Jul 22 00:31:52 PDT 2008


"Johan Grande" <johan.grande at crans.org> wrote (Mon Jul 21 23:35:35 2008):

> I first tried antlr-3.0.1 . But I found a bug in it [...] and in my  
> case the generated parser didn't compile.
Uh, so why did 3.0.1 work for me? That bugs _me_ o.o

> How can javac see a class but not a constructor in it ?
Usually, if there is no such construcor or it is hidden.

Wait. What package is the superclass in and which modifier got the  
constructor in question? Your parser will for sure be in another  
package. Thus, if constructors are package local, you may get those  
errors.

> I think I can assume the .class included in antlr correspond to the  
> .java provided ...
You should. However, if the distributor if the package did something  
wrong, weird stuff can happen. But since we both downloaded from  
antlr.org, I suppose, that cannot be the case.

> I don't know all the subtleties of Java, but it would be great if  
> you could explain me how the bug can just exist.
I can only think of Classpath and compatibility issues.

Do you run a MAC? Do you use some JDK _not_ from SUN? (I suppose both  
questions will be answered with 'no', for javac -version should have  
looked somehow different (?), but just to be sure)

Please send me both the gramar file and the jar you use. I want to try  
exactly this combination here...

Regards

Raphael


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: PGP Digital Signature
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080722/d0eeaee6/attachment.bin 


More information about the antlr-interest mailing list