[antlr-interest] Running Antlr V3.0 from netbeans
Matthew Ford
matthew.ford at forward.com.au
Sat Jun 4 19:18:02 PDT 2005
To run Antlr V3.0 from netbeans
(assuming the netbeans project is called list and list.g is the antlr
grammar in the top source dir)
to build.xml add
<target name="antlrGeneration" depends="init">
<echo message="Generating Antlr files"/>
<java classname="org.antlr.Tool"
fork="yes" dir="${list.dir}" <!-- need to change this line to suit
.g path from top of source ->>
classpath="${javac.classpath}" >
<arg line="list.g"/> <!-- need to change this line to suit .g path
from top of source ->>
</java>
</target>
<target name="-pre-compile" depends="antlrGeneration">
</target>
You will have already added the antlr jars to the project library jar so
they will be in the
${javac.classpath}
still get
internal error: Exception
java.nio.channels.ClosedChannelException at sun.nio.ch.FileLockImpl.release(Fil
eLockImpl.java:36): can't write stats to ... \antlrworks\grammar.stats
but fork="yes" means this does not stop the build.
matthew
More information about the antlr-interest
mailing list