JavaCompilerCore/tools/AntParserBuilder.xml
2014-02-04 17:44:03 +01:00

46 lines
1.5 KiB
XML
Executable File

<?xml version="1.0" encoding="UTF-8"?>
<project name="JavaCompiler.buildParser" default="JavaParser" basedir=".">
<property name="ParserSrcDir" value="./../src/mycompiler/myparser/"/>
<target name ="JavaParser" depends="JavaLexer" description="Create the file JavaParser.java">
<exec executable="${basedir}/RunJay.sh" os="linux" failonerror="true"/>
<exec executable="${basedir}/RunJayDarwin.sh" os="mac" failonerror="true"/>
<exec executable="${basedir}/RunJay.bat" os="windows" failonerror="true"/>
<!--
<echo message="Hallo Welt: ${ParserSrcDir}JavaParser.jay"/>
<exec executable="ipconfig" failonerror="true">
<arg value="/all"/>
</exec>
-->
<!--
<exec executable="${basedir}/jay.cygwin32" dir="${ParserSrcDir}" failonerror="true">
<arg value="-v ${ParserSrcDir}JavaParser.jay &lt;skeleton&gt; ${ParserSrcDir}JavaParser.java"/>
<arg value="-v"/>
<arg value="${ParserSrcDir}JavaParser.jay"/>
<arg value="&lt;"/>
<arg value="skeleton"/>
<arg value="&gt;"/>
<arg value="${ParserSrcDir}JavaParser.java"/>
</exec>
-->
</target>
<target name ="JavaLexer" depends="Lexer" description="Move the file JavaParser.lex.java to JavaParser.java">
<copy file="${ParserSrcDir}JavaLexer.lex.java" tofile="${ParserSrcDir}JavaLexer.java" failonerror="true"/>
</target>
<target name ="Lexer" description="Create the file JavaLexer.lex.java">
<java classname="JLex.Main"
classpath="${basedir}/JLex_neu.jar"
fork="true"
failonerror="true">
<arg value="${ParserSrcDir}JavaLexer.lex"/>
</java>
</target>
</project>