-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
108 lines (88 loc) · 3.19 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<project name="td4" default="help">
<target name="jflextask" unless="jflex.available" description="creates JFlex Ant task">
<taskdef name="jflex" classname="jflex.anttask.JFlexTask" classpath="lib/jflex-full-1.7.0.jar" />
<property name="jflex.available" value="yes" />
</target>
<target name="beavertask" unless="beaver.available" description="creates Beaver Ant task">
<taskdef name="beaver" classname="beaver.comp.run.AntTask" classpath="lib/beaver-ant.jar" />
<property name="beaver.available" value="yes" />
</target>
<target name="help" description="show help message">
<echo message="Ant build file for Calculator example. Useful targets:" />
<echo message="" />
<echo message="clean: remove compiled files" />
<echo message="parser: executes beaver" />
<echo message="scanner: executes jflex" />
<echo message="compile: executes javac" />
<echo message="all: executes the program on exemples" />
</target>
<target name="parser" depends="beavertask" description="generate parser">
<beaver file="parser/Parser.grammar" destdir="src" compress="yes" exportTables="no" sortTerminals="no" terminalNames="yes" exportTerminals="yes" useSwitch="no" anonymousActions="yes" reportActions="no" />
</target>
<target name="scanner" depends="jflextask" description="generate scanner">
<jflex file="scanner/Scanner.jflex" destdir="src" nobak="yes" />
</target>
<target name="compile" depends="parser, scanner" description="compile all classes">
<mkdir dir="bin" />
<javac includeantruntime="false" srcdir="src" destdir="bin">
<classpath>
<pathelement location="lib/beaver-rt.jar" />
</classpath>
</javac>
</target>
<target name="all" depends="compile" description="makes the example">
<path id="beaverclasspath">
<fileset dir="lib" includes="beaver-rt.jar" />
<fileset dir="lib" includes="jflex-full-1.7.0.jar" />
</path>
<java classname="ubordeaux.deptinfo.compilation.project.main.Main" classpath="bin" classpathref="beaverclasspath" output="data/output">
<!-- ->
<arg value="-checkType" />
<arg value="data/progr0.lea" />
<!- -->
<!-- -->
<arg value="-checkType" />
<arg value="data/progr1.lea" />
<!-- -->
<!-- -->
<arg value="-checkType" />
<arg value="data/progr2.lea" />
<!-- -->
<!-- -->
<arg value="-checkType" />
<arg value="data/progr3.lea" />
<!-- -->
<!-- -->
<arg value="-checkType" />
<arg value="data/progr4.lea" />
<!-- -->
<!-- -->
<arg value="-checkType" />
<arg value="data/progr5.lea" />
<!-- -->
<!-- -->
<arg value="-checkType" />
<arg value="data/progr6.lea" />
<!-- -->
<!-- -->
<arg value="-checkType" />
<arg value="data/progr7.lea" />
<!-- -->
<!-- -->
<arg value="-checkType" />
<arg value="data/progr8.lea" />
<!-- -->
<!-- -->
<arg value="-checkType" />
<arg value="data/progr9.lea" />
<!-- -->
</java>
</target>
<target name="clean" description="remove compiled files">
<delete>
<fileset dir="src" includes="**/Parser.java,**/Scanner.java,**/Terminals.java" />
<fileset dir="bin" includes="**" excludes="" />
<!--<fileset dir="data" includes="output" excludes="" />-->
</delete>
</target>
</project>