<project name="interpreter" default="run">

  <taskdef classname="jflex.anttask.JFlexTask" name="jflex" />
  <taskdef classname="java_cup.anttask.CUPTask" name="cup" />

  <target name="build" depends="realclean,compile" />

  <target name="run" depends="compile">
    <java classname="Main"> <arg line="example.as"/> </java>
  </target>

  <target name="compile" depends="jflex,cup">
    <javac srcdir="." destdir="." />
  </target>

  <target name="jflex">
    <jflex file="scanner.flex" />
  </target>

  <target name="cup">
    <cup srcfile="parser.cup" interface="yes" destdir="."/>
  </target>

  <target name="genclean">
    <delete file="Yylex.java"/>
    <delete file="sym.java" />
    <delete file="parser.java" />
  </target>

  <target name="clean">
    <delete>
      <fileset dir="." includes="**/*~"/>
      <fileset dir="." includes="**/*.class"/>
    </delete>
  </target>

  <target name="realclean" depends="clean,genclean" />
</project>
