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

Re: Non-member submission from [james@spunkysoftware.com]


Your classpath should include the root of the package directory. I.e.
where you have your grammar file.



  package my.package.example;

$ sablecc myGrammar.sablecc

Sablecc will put all the code in the directorys

   <current dir>

Your classpath should include <current dir> and you should import the
classes with

  import my.package.example.node.*;
  import my.package.example.parser.*;

and so on... Usually your classpath does include the current directory
unless you change it yourself.

I've never used Visual J++ so I can't help you with that. Sorry.



On Fri, 7 Sep 2001, Etienne M. Gagnon wrote:

> [Apparently, this address bounces messages, but the message seems
> appropriate for this list.  Etienne.]
> -------- Original Message --------
> Reply-To: <james@spunkysoftware.com>
> To: "sablecc list" <sablecc-list@sable.mcgill.ca>
> Date: Sat, 8 Sep 2001 11:51:44 +1000
> Subject: Known problems with JDK 1.3.0_02 Win32?
> I'm having problems with javac'ing the Java files output from SableCC.
> It doesn't import package directory names properly. For example,
> import org.blah.whatever.foo.*
> doesn't work when a class called org.blah.whatever.foo.Something is
> referenced in a file.
> And casting doesn't work either, in Visual J++ at least. This is
> probably a
> Microsoft f***-up with the Java language, SableCC wouldn't cast objects
> back
> to "Object" if Java didn't allow this.
> Do I need to do some jiggery pokery with the CLASSPATH or whatever to
> get
> the import statements to work? I even tried putting all output in the
> same
> directory and editing every single file to reflect this, still no luck.
> Can someone help me out with this? Thanks!
> James