[antlr-interest] ANTLR crashing ...

Robert Colquhoun rjc at trump.net.au
Tue Mar 25 04:00:33 PST 2003


At 11:19 AM 25/03/2003 +0000, Anthony Youngman wrote:

>Just been trying to do tree walking, and noticed I've got 2.7.0 - bit 
>surprised at that!
>
>So I install 2.7.2 (just untar the .tar.gz and change my classpath).
>
>I now get the following error when I try to "compile" my grammar :-(
>
> > java antlr.Tool BASIC.g
>ANTLR Parser Generator   Version 2.7.2   1989-2003 jGuru.com
>java.lang.NoClassDefFoundError: java/util/HashSet
>         at antlr.JavaCodeGenerator.<init>(JavaCodeGenerator.java:54)
>         at antlr.Tool.doEverything(Tool.java:250)
>         at antlr.Tool.main(Tool.java:399)
>
>Note that I'm running the default java on SuSE 7.2, ie version 1.1.8.
>
>Has 2.7.2 been updated since it was released? I've noticed comments on the 
>list, and my download is datestamped mid January.

Antlr now requires java 1.2 or above.

In the above it is looking for one of the collections classes 
"java.util.HashSet".

To quickly see if this is available in your jdk you can type:
         javap java.util.HashSet
and if present should output all the method prototypes for the object.

If you are stuck on 1.1, you could modify the antlr source and replace 
"java.util.HashSet" with "java.util.Hashtable" and recompile antlr.

 From memory there is some other 1.2+ methods in the "make depend" type 
functionality...i think some methods of java.io.File are used which are not 
present in 1.1...not sure how to fix this short of removing all the 
dependency checking code.

  - Robert


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list