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

Re: how do I setup sablecc-anttask?



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 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)

4. Make the file sablecc executable (i.e. execute command: chmod 755 sablecc)

5. Go to /usr/bin and create a symbolic link to the file sablecc.
If you don't know how to do this, executing following command:

ln -s /usr/share/sablecc-2.18.1/bin/sablecc /usr/bin/sablecc2

will create a symbolic link called sablecc2 which points to the executable file sablecc of step 3 and 4
(you can of course choose another name).

6. You're finished. You can use SableCC by executing (anywhere): sablecc2 <your-input-file>
(sablecc2 is the symbolic link you created in step 5).


Hope this helps,
Pieter.



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