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

Re: how do I setup sablecc-anttask?



No, that didn't work.  It did help me fix the command "sablecc", and NOTE: the process that creates that script
needs to be fixed for cygwin.  The ant task "sablecc" still does NOT work

Pieter Verheyden wrote:
Hi,

Are you working on a Windows or Linux system? When looking at your directory structure and names, it appears you're working on a Linux system, but the error message looks like a mixed Windows/Linux directory (notice the "c:/").
I'm using cygwin on Windows 2000.
I don't know if this will solve your problem at all, but I have installed SableCC 2.18.1, 3-beta.1, and 3-beta.2 on my Linux system as follow:

1. Untar a sablecc-version.tar.gz in a directory (e.g. in /usr/share , don't forget to switch to root before doing this)

2. Go into the untarred directory (at this time, you can delete the file /usr/share/sablecc-version.tar.gz)

3. Go into the bin directory and edit the file sablecc (i.e. it must contain the command: java -jar /usr/share/sablecc-version/lib/sablecc.jar $*   , notice the absolute path to the sablecc.jar file)
I did have to fix that line.  For cygwin, it needs to be quoted:
java -jar 'C:\Java\SableCC\sablecc-2.18.1\lib\sablecc.jar' $*
or else the backslashes get interpretted as quoting characters.
So now sablecc works, but the sablecc ant task does not.  (See below.)

Steve
On Thu, 2003-10-16 at 23:40, Steve Kelem wrote:
I have sableCC 2.18.1, and I'm trying to get the anttask to work.
I created sablecc-anttask.jar and moved it into $ANT_HOME/lib.

My build.xml file has the following:
   <target name="parser.sourcecode" depends="init"
    description="build parser sourcecode">
      <sablecc src="" outputdirectory="${gensrc.dir}">
         <include name="idl-grammar.scc"/>
      </sablecc>
   </target>

I get the message:
parser.sourcecode:

BUILD FAILED
file:c:/home/kelem/src/java/acad/build.xml:139: Could not create task or 
type of type: sablecc.

I tried:
1. Renaming the Ant task "sablecc" to "sablecc-anttask" to match the 
name of the jar file.
2. Rename the jar file to sablecc.jar.
3. All permutations of (1) and (2).

What am I doing wrong?

Thanks for your help,
Steve Kelem