[antlr-interest] ANTLR crashing ...

Terence Parr parrt at jguru.com
Tue Mar 25 07:24:22 PST 2003


On Tuesday, March 25, 2003, at 04:00  AM, Anthony Youngman wrote:

> BUMMER!
>
> "class 'java.util.HashSet' not found" :-(
>
> And I looked - the release notes merely say it needs 1.1 ...
>

Yeah, how did HashSet get in there!  Very strange...i didn't do 
that...i'll look at the code...hang on...

Rats.  Alright.  I've removed it and made it a Hashtable.  Simple 
change if you want to make them on your end.  Just change HashSet to 
Hashtable in JavaCodeGenerator, CppCodeGenerator, CSharpCodeGenerator 
and change the ref of

         declaredASTVariables.add(el);

to

         declaredASTVariables.put(el,el);

You are all set.

Ter

> Off to www.suse.com to see if I can get an update :-(
>
> Cheers,
> Wol
>
> -----Original Message-----
> From: Robert Colquhoun [mailto:rjc at trump.net.au]
> Sent: 25 March 2003 12:01
> To: 'antlr-interest at yahoogroups.com'
> Subject: Re: [antlr-interest] ANTLR crashing ...
>
>
> 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/
>
>
>
> This transmission is intended for the named recipient only. It may 
> contain private and confidential information. If this has come to you 
> in error you must not act on anything disclosed in it, nor must you 
> copy it, modify it, disseminate it in any way, or show it to anyone. 
> Please e-mail the sender to inform us of the transmission error or 
> telephone ECA International immediately and delete the e-mail from 
> your information system.
>
> Telephone numbers for ECA International offices are: Sydney +61 (0)2 
> 9911 7799, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and 
> New York +1 212 582 2333.
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco


 

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



More information about the antlr-interest mailing list