[antlr-interest] Antlr 2.7.2a2 Report

Robert Colquhoun rjc at trump.net.au
Fri Apr 26 17:52:40 PDT 2002


At 03:52 PM 25/04/2002 -0700, Terence Parr wrote:
>Robert...i'm working on a 2.7.2a3 release and will check into these.  At
>the moment I'm looking for the java grammar bugs people submitted so I
>can fix that.  I need to add a feature to jGuru that lets people search
>code for examples :)

Thanks, most are  only little things but would be nice if they could be fixed.

>Concerning your 1.4 temp file bug report...i'm discussing with Ric.


According to 1.4 doc:
"Deletion will be attempted only for normal termination of the virtual 
machine, as defined by the Java Language Specification (12.9)."

I am thinking the files are not deleted because antlr uses System.exit() to 
report exit codes.  The other problem is that deleteOnExit() only turns up 
on 1.2 or later VM's which means antlr will no longer run on 1.1.  ie for 
example C++ programmers would not be able to use the MS JVM on windows to 
generate files for MSVC.

I hacked a fix for this by modifying PreservingFileWriter.java in the 
close() method (see attached diff) which seems to now remove the temp files 
under 1.4.  Looking at the PreservingFileWriter code i think provided you 
could guarantee that close() was called the deleteOnExit() call would be 
optional.

  - Robert

 

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

-------------- next part --------------
*** PreservingFileWriter.java.orig	Sun Dec 23 14:16:14 2001


More information about the antlr-interest mailing list