[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: uppercase package names

From: Archie Cobbs <archie@whistle.com>
>Before doing that, I should also report another problem that I've
>noticed. This is simply that the files Switch.java and Switchable.java
>don't seem to be getting generated by SableCC (they don't seem to
>be part of the util package either). This is not a big deal, since
>I know what they are supposed to be, and just created them myself.


The sableutil-1.1.jar file contains the Switch.java and Switchable.java
files. They are not included in the sablecc-2.2.jar file in order to
eliminate a compilation problem; this is because I didn't want to change all
the import directives.

>From SableCC version 2.3 and up, the sableutil library is kept
independently. This means that the sableutil classes are not included in the
file sablecc-2.3.jar. Therefore, both sablecc-2.3 and sableutil-1.3 are
required on your classpath.

I have silently omitted to include two classes,
ca.mcgill.sable.util.Hashtable and ca.mcgill.sable.util.HashSet, from the
sableutil-1.3.jar file, to avoid compilation problems. This is important to
know, if you have obtained the sableutil library from another source.

The error message given by "javac", when a class is defined in two different
packages imported via an "import xxx.*" directive, is rather disorienting.
It tells you that the class is not defined in the "current" package, instead
of saying that there is an ambiguous import declaration for the class. So,
if you get such an error message, look for duplicate classes in all your
imported packages (using *).

I hope this helps.