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

Re: how do I setup sablecc-anttask?



Mariusz Nowostawski wrote:

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="${pre.dir}" 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 of type of type: sablecc.

[...]


What am I doing wrong?

sablecc-anttask.jar must be in CLASSPATH before invoking ANT.


*) add sablecc-anttaks.jar to your CLASSPATH manually before running ant
or
*) make sure all jar files from $ANT_HOME/lib are added automatically by the ant script prior to the Java ANT invocation.

How do I make sure? I looked at the ant script and it does a for i in "${ANT_LIB}"/*.jar, so it looks like the
LOCALCLASSPATH variable will get the library.
So, I should call the jar file "sablecc-anttask.jar".
Should I call the ant task
<sablecc ...
or
<sablecc-anttask ... ?
Neither works, whether the sablecc-anttask.jar file is in the $ANT_HOME/lib directory or whether it's in the shell's CLASSPATH when I execute ant.


Is this a problem with the version of SableCC that I'm running? I have 2.18.1.

Thanks,
Steve