[antlr-interest] How to report bugs ?

Randall R Schulz rschulz at sonic.net
Sat Mar 24 11:06:54 PDT 2007

On Saturday 24 March 2007 08:58, Dave Cramer wrote:
> > Lastly, the Macintosh (at least Mac OS X) is a Unix system and uses
> > the
> > same file and path separator characters as does Linux, Solaris and
> > other POSIX-compliant systems. So I'm not sure why the OP had
> > problems there.
> I have very little evidence here, other than the fact that
> recompiling the code works on my machine.

Upon further reflection, I find myself wondering how a value is
determined for a static final field when the value of that field is
generated by a method call.

Specifically, the initialization of the file name separator character
and string in the Java 1.5 implementation of java.io.File is:

   * The system-dependent default name-separator character.  This field is
   * initialized to contain the first character of the value of the system
   * property <code>file.separator</code>.  On UNIX systems the value of this
   * field is <code>'/'</code>; on Microsoft Windows systems it is <code>'\\'</code>.
   * @see     java.lang.System#getProperty(java.lang.String)
  public static final char separatorChar = fs.getSeparator();

   * The system-dependent default name-separator character, represented as a
   * string for convenience.  This string contains a single character, namely
   * <code>{@link #separatorChar}</code>.
  public static final String separator = "" + separatorChar;

The field fs is:

   * The FileSystem object representing the platform's local file system.
  static private FileSystem fs = FileSystem.getFileSystem();

The type java.io.FileSystem is abstract class, which is why an instance
is acquired by calling the factory method getFileSystem.

I this case, I don't know whether the compiler will in-line the value
that is in effect while it runs or whether it will refrain from in-lining
a value for that field.

> ...
> Dave

Randall Schulz

More information about the antlr-interest mailing list