P
Paul Johnson
I'm building an example from the ANTLR distribution, which apparently
works fine when compiled with javac. However, I've currently only got
gcj, so I'm using 'gcj -C' instead of javac. The problem is that the
compile fails with an ambiguous class error.
Disclaimer: I know no Java at all, and I'm hoping that I've given
enough information here to make it obvious whether or not there's a
problem. AFAIK, you can only get an ambiguous class error for two
classes with the same name, and that isn't the case here.
An auto-generated file has these imports:
but these classes have different names. CToken extends
antlr.CommonToken, antlr.CommonToken extends antlr.Token. If I comment
out 'import antlr.Token' the compiler segfaults. This is gcj 3.3,
Linux RH7.2.
Any ideas?
Thanks -
PJ
works fine when compiled with javac. However, I've currently only got
gcj, so I'm using 'gcj -C' instead of javac. The problem is that the
compile fails with an ambiguous class error.
Disclaimer: I know no Java at all, and I'm hoping that I've given
enough information here to make it obvious whether or not there's a
problem. AFAIK, you can only get an ambiguous class error for two
classes with the same name, and that isn't the case here.
An auto-generated file has these imports:
import antlr.Token;
import CToken; // line 27
gcj --classpath .:/eda/antlr/antlr-2.7.5/lib/antlr.jar -C StdCLexer.java
StdCLexer.java:27: error: Ambiguous class: `CToken' and `antlr.Token'.
import CToken;
^
but these classes have different names. CToken extends
antlr.CommonToken, antlr.CommonToken extends antlr.Token. If I comment
out 'import antlr.Token' the compiler segfaults. This is gcj 3.3,
Linux RH7.2.
Any ideas?
Thanks -
PJ