Files
kotlin-fork/confluence/buildConfluenceLexer.xml
T

46 lines
1.7 KiB
XML

<project name="ConfluenceLexer" default="confluenceLexer">
<property name="home" value="${basedir}"/>
<property file="${home}/../compiler/frontend/idea.properties"/>
<property name="flex.base" value="${idea.home}/tools/lexer/jflex-1.4"/>
<property name="out.dir" value="${basedir}/tmpout"/>
<macrodef name="flex">
<attribute name="flexfile"/>
<attribute name="destdir"/>
<attribute name="skeleton" default="${idea.home}/tools/lexer/idea-flex.skeleton"/>
<sequential>
<delete dir="${out.dir}"/>
<mkdir dir="${out.dir}"/>
<java classname="JFlex.Main"
jvmargs="-Xmx512M"
fork="true"
failonerror="true">
<arg value="-sliceandcharat"/>
<arg value="-skel"/>
<arg value="@{skeleton}"/>
<arg value="-d"/>
<arg value="${out.dir}"/>
<arg value="@{flexfile}"/>
<classpath>
<pathelement location="${flex.base}/lib/JFlex.jar"/>
</classpath>
</java>
<move todir="@{destdir}">
<fileset dir="${out.dir}">
<include name="*.java"/>
</fileset>
</move>
<delete dir="${out.dir}"/>
</sequential>
</macrodef>
<target name="confluenceLexer">
<echo message="${flex.base}"/>
<echo message="${home}"/>
<flex flexfile="${home}/../compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex"
destdir="${home}/src/main/java/org/jetbrains/jet/lexer/"/>
<copy file="${home}/../compiler/frontend/src/org/jetbrains/jet/lexer/JetTokens.java"
tofile="${home}/src/main/java/org/jetbrains/jet/lexer/JetTokens.java" overwrite="true"/>
</target>
</project>