<?xml version="1.0"?>

<project name="antlr-test" basedir="." default="test1">

  <property name="tmp.dir" location="antlr.tmp"/>


  <target name="test1">
    <antlr/>
  </target>

  <target name="test2">
    <antlr target="antlr.g" outputdirectory="${tmp.dir}"/>
  </target>

  <target name="test3">
    <mkdir dir="${tmp.dir}"/>
    <antlr target="antlr.g" outputdirectory="${tmp.dir}"/>
  </target>

  <target name="test4">
    <mkdir dir="${tmp.dir}"/>
    <antlr target="java.g" outputdirectory="${tmp.dir}"/>
    <antlr dir="${tmp.dir}" target="java.tree.g" outputdirectory="${tmp.dir}"/>
  </target>

  <target name="test5">
    <mkdir dir="${tmp.dir}"/>
    <antlr target="java.tree.g" outputdirectory="${tmp.dir}" fork="yes"/>
  </target>

  <target name="test6">
    <mkdir dir="${tmp.dir}"/>
    <antlr target="java.g" outputdirectory="${tmp.dir}" />
    <antlr dir="${tmp.dir}"
           target="java.tree.g"
           outputdirectory="${tmp.dir}"
           fork="yes"/>
  </target>

  <target name="test7">
    <antlr target="antlr.xml"/>
  </target>

  <target name="test8">
    <antlr target="extended.calc.g" outputdirectory="${tmp.dir}" glib="non-existant-file.g"/>
  </target>

  <target name="test9">
    <mkdir dir="${tmp.dir}"/>
    <!-- Note that I had to copy the grammars over to the temporary directory.  -->
    <!-- This is because ANTLR expects the super grammar and its generated java -->
    <!-- files to be in the same directory, which won't be the case if I use    -->
    <!-- the output directory option. -->
    <copy file="antlr.g" todir="${tmp.dir}"/>
    <copy file="extended.calc.g" todir="${tmp.dir}"/>
    <antlr target="${tmp.dir}/antlr.g"/>
    <antlr target="${tmp.dir}/extended.calc.g" glib="${tmp.dir}/antlr.g"/>
  </target>

  <target name="test10">
    <mkdir dir="${tmp.dir}"/>
    <antlr target="antlr.g" outputdirectory="${tmp.dir}" html="yes"/>
  </target>

  <target name="test11">
    <mkdir dir="${tmp.dir}"/>
    <antlr target="antlr.g" outputdirectory="${tmp.dir}" diagnostic="yes"/>
  </target>

  <target name="test12">
    <mkdir dir="${tmp.dir}"/>
    <antlr target="antlr.g" outputdirectory="${tmp.dir}" trace="yes"/>
  </target>

  <target name="test13">
    <mkdir dir="${tmp.dir}"/>
    <antlr target="antlr.g" outputdirectory="${tmp.dir}" traceLexer="yes" traceParser="yes" traceTreeWalker="yes"/>
  </target>

  <target name="cleanup">
    <delete dir="${tmp.dir}" />
  </target>

</project>
