ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marius Scurtescu <>
Subject JavaCC tasks for ANT
Date Sun, 25 Jun 2000 19:38:04 GMT
Hi all,

I am writing you because while checking the ANT mailing
list archives I saw that you were interested in JavaCC
related tasks for ANT.

Since running JJTree and JavaCC are time consuming my
main problem is running them only if the source grammar
file was touched. While you can get this quite easily
with a classic make utility, there is no support for
this in ANT. Do you have a solution for this?

The way I run JavaCC is by using a "java" task to
run the main applications directly:

<target name="jjdoc" depends="jj">
  <java classname="COM.sun.labs.jjdoc.JJDocMain" args="-OUTPUT_FILE=Doc/grammar.html java.jj"
<target name="jj" depends="jjt">
  <java classname="COM.sun.labs.javacc.Main" args="-OUTPUT_DIRECTORY=Source/parser java.jj"
<target name="jjt">
  <java classname="COM.sun.labs.jjtree.Main" args="-OUTPUT_DIRECTORY=Source/parser java.jjt"
  <rename src="Source/parser/java.jj" dest="java.jj"/>

This will work assuming that is in your class path.

To solve the time stamp based conditional task run I was
thinking to create a generic task that will add a property 
based on time stamp comparison between two sets of files, the 
inputs and outputs to some other task. This other task/targets 
could then be run only if this property is set.

Please let me know if all this makes sense in your opinion.


View raw message