syntactic / parser / build.xml

Tim Vernum d3443de 
Tim Vernum 0ba1b2a 
Tim Vernum d3443de 

Tim Vernum fc529ff 

Tim Vernum 5bc2c4e 

Tim Vernum d3443de 

Tim Vernum 7687b98 

Tim Vernum d3443de 

Tim Vernum 5bc2c4e 

Tim Vernum d3443de 
Tim Vernum 5bc2c4e 
Tim Vernum d3443de 

Tim Vernum fc529ff 

Tim Vernum d3443de 
Tim Vernum fc529ff 
Tim Vernum d3443de 
Tim Vernum fc529ff 

Tim Vernum d3443de 

Tim Vernum fc529ff 

Tim Vernum d3443de 
Tim Vernum fc529ff 

Tim Vernum d3443de 

Tim Vernum fc529ff 

Tim Vernum d3443de 

Tim Vernum fc529ff 
Tim Vernum d3443de 

<!-- vim: set ft=ant ts=2 sts=2 expandtab shiftwidth=2  : -->
<project name="syntactic-parser"  default="all" basedir="."  xmlns:ivy="antlib:org.apache.ivy.ant" >

  <property name="javacc.home" value="/Users/tim/Development/Libraries/javacc/javacc-5.0/"/>

  <property name="output"                location="output/ant"         />
  <property name=""           location="output/ant/java"    />
  <property name="output.classes"        location="output/ant/classes" />
  <property name="output.classes.parser" location="${output.classes}/parser" />
  <property name="output.classes.test"   location="${output.classes}/test" />
  <property name="output.grammar"        location="${output}/grammar" />
  <property name="output.junit"          location="${output}/junit"   />
  <property name="output.dist"           location="${output}/dist"    />

  <property name="java.parser.package" value="org/adjective/syntactic/parser" />

  <target name="all"   description="Builds parser + runs tests" depends="build, test, dist" />
  <target name="build" description="Builds parser" depends="grammar, compile " />

  <target name="grammar" depends="jjtree,javacc" />

  <target name="jjtree" >
    <mkdir dir="${output}/grammar" />
    <mkdir dir="${}/${java.parser.package}/ast" />
        javacchome="${javacc.home}" />

      replace="JavaParserVisitor&lt;R,T&gt;" />

    <replace file="${}/${java.parser.package}/ast/" >
      <replacefilter token="JavaParserVisitor " value="JavaParserVisitor&lt;R,T&gt; " />
      <replacefilter token="public R jjtAccept" value="public &lt;R,T&gt; R jjtAccept" />


  <target name="javacc" >
    <mkdir dir="${}/${java.parser.package}/jj" />
    <antcall target="javacc.internal" />

  <target name="javacc.internal" unless="javacc.uptodate">
        javacchome="${javacc.home}" />

  <!-- ******************
        Java Compilation 
       ****************** -->

  <path id="path.compile.parser" />

  <path id="path.compile.test" >
     <pathelement location="${output.classes.parser}" />
     <fileset dir="../lib/test/" />
  <macrodef name="compile">
    <element name="source" />
    <attribute name="out" />
    <attribute name="classpath" />
      <mkdir dir="@{out}" />

          <source />
          <classpath refid="@{classpath}" />

  <target name="compile" depends="compile.parser, compile.test" />

  <target name="compile.parser" >
    <compile out="${output.classes.parser}" classpath="path.compile.parser" >
        <src path="${}" /> 
        <src path="source/java/parser" /> 

  <target name="compile.test" >
    <compile out="${output.classes.test}" classpath="path.compile.test" >
        <src path="source/java/test" /> 

  <target name="test">
    <mkdir dir="${output.junit}" />
    <junit fork="yes" forkmode="once"  dir="${basedir}" haltonerror="false" failureproperty="junit.failure" errorproperty="junit.error" >
      <classpath >
        <pathelement location="${output.classes.parser}" />
        <pathelement location="${output.classes.test}" />
        <fileset dir="../lib/test/" />
      <batchtest todir="${output.junit}">
        <fileset dir="source/java/test">
          <include name="**/*"/>
      <formatter type="xml" />
      <formatter type="plain" />
    <fail if="junit.failure" />
    <fail if="junit.error" />

  <target name="dist.jar" depends="grammar,compile">
    <tstamp prefix="tstamp" >
      <format property="date" pattern="yyyy-MM-dd" locale="en,AU"/>
      <format property="time" pattern="HH:mm"      locale="en,AU"/>
    <exec executable="hg" outputproperty="hg.version" >
      <arg value="id" />
      <arg value="-i" />
    <mkdir dir="${output.dist}" />
    <jar destfile="${output.dist}/${}.jar">
        <attribute name="Implementation-Revision" value="${hg.version}"/>
        <attribute name="Built-Date"              value="${} ${tstamp.time}"/>
      <fileset dir="${output.classes.parser}" />

  <target name="dist.source" >
    <zip destfile="${output.dist}/${}">
      <fileset dir="." includes="source/java/**" />
      <fileset dir="." includes="source/grammar/**" />

  <target name="dist" depends="dist.jar, dist.source" />

  <target name="clean">
    <delete dir="${output}" />

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.