-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
43 lines (35 loc) · 1.42 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<project name="MyProject" default="compile" basedir=".">
<property name="java" location="src" />
<property name="classes" location="bin/cls" />
<property name="result" location="bin/jar" />
<property name="lib" location="lib" />
<property name="tools" location="tools" />
<property name="base" location="." />
<taskdef name="jflex" classname="JFlex.anttask.JFlexTask" classpath="${tools}/JFlex.jar" />
<taskdef name="cup" classname="java_cup.anttask.CUPTask" classpath="${tools}/java-cup-11b.jar" />
<target name="generate">
<cup srcfile="${base}/parser.cup" destdir="${java}"
parser="Parser"
interface="true"
locations="true"
debugsymbols="true" />
<jflex file="lexer.jflex" destdir="${java}" />
</target>
<path id="libraries">
<files includes="${tools}/java-cup-11b-runtime.jar" />
</path>
<target name="compile" depends="generate">
<mkdir dir="${classes}"/>
<mkdir dir="${result}"/>
<javac includeantruntime="false" srcdir="${java}" destdir="${classes}" encoding="iso-8859-1">
<classpath refid="libraries" />
</javac>
</target>
<target name="clean">
<delete file="${java}/Parser.java" />
<delete file="${java}/sym.java" />
<delete file="${java}/Scanner.java" />
<delete dir="${classes}" />
<delete dir="${result}" />
</target>
</project>