-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·60 lines (38 loc) · 1.5 KB
/
build.xml
File metadata and controls
executable file
·60 lines (38 loc) · 1.5 KB
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
<project name="PA2" default="build" basedir=".">
<property name = "lexdir" location="./src/net/jpm/jsproc/lex" />
<property name = "cupdir" location="./src/net/jpm/jsproc/cup" />
<target name="build" depends="parser,lexer">
<antcall target="parser"/>
<antcall target="lexer"/>
<antcall target="compile"/>
</target>
<target name="compile">
<javac classpath="../libs/java-cup-11a.jar" srcdir="./src" destdir="./build"/>
</target>
<target name="lexer">
<java classname="JLex.Main" classpath="../libs/jlex.jar">
<arg value="${lexdir}/js.lex"/>
</java>
<move tofile="${lexdir}/JSLexer.java" file="${lexdir}/js.lex.java"/>
</target>
<target name="parser">
<java classname="java_cup.Main" classpath="../libs/java-cup-11a.jar">
<arg line="-parser JSParser -symbols TokenConstants -expect 10000 -dump -nopositions ${cupdir}/js.cup"/>
</java>
<move todir="${cupdir}" file="./JSParser.java"/>
<move todir="${cupdir}" file="./TokenConstants.java"/>
</target>
<target name="clean">
<delete file="build/*.class">
<fileset dir="build" includes="**/*"/>
</delete>
<delete file="${lexdir}/JSLexer.java"/>
<delete file="${cupdir}/JSParser.java"/>
<delete file="${cupdir}/TokenConstants.java"/>
</target>
<target name="test">
<java classname="net.jpm.jsproc.Lexer" classpath="./build/:../libs/java-cup-11a.jar">
<arg line="test.js"/>
</java>
</target>
</project>