Obtaining jflex from github. No IDEA checkout is necessary anymore.
This commit is contained in:
@@ -1,22 +1,12 @@
|
|||||||
<project name="JetLexer" default="lexer">
|
<project name="JetLexer" default="lexer">
|
||||||
<property name="home" value="${basedir}"/>
|
<property name="home" value="${basedir}"/>
|
||||||
<!--
|
<property name="flex.base" value="${home}/../../dependencies/jflex"/>
|
||||||
This script relies on a custom JFlex that is available in the sources of IntelliJ IDEA Community Edition
|
|
||||||
put the idea.properties file to the root directory of the frontend module, and put the following property there:
|
|
||||||
|
|
||||||
idea.home=../../../idea/src
|
|
||||||
|
|
||||||
where "../../../idea/src" is the relative location of the sources of IntelliJ IDEA Community
|
|
||||||
-->
|
|
||||||
<property file="${home}/idea.properties"/>
|
|
||||||
|
|
||||||
<property name="flex.base" value="${idea.home}/tools/lexer/jflex-1.4"/>
|
|
||||||
<property name="out.dir" value="${basedir}/tmpout"/>
|
<property name="out.dir" value="${basedir}/tmpout"/>
|
||||||
|
|
||||||
<macrodef name="flex">
|
<macrodef name="flex">
|
||||||
<attribute name="flexfile"/>
|
<attribute name="flexfile"/>
|
||||||
<attribute name="destdir"/>
|
<attribute name="destdir"/>
|
||||||
<attribute name="skeleton" default="${idea.home}/tools/lexer/idea-flex.skeleton"/>
|
<attribute name="skeleton" default="${flex.base}/idea-flex.skeleton"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<delete dir="${out.dir}"/>
|
<delete dir="${out.dir}"/>
|
||||||
<mkdir dir="${out.dir}"/>
|
<mkdir dir="${out.dir}"/>
|
||||||
@@ -31,7 +21,7 @@
|
|||||||
<arg value="${out.dir}"/>
|
<arg value="${out.dir}"/>
|
||||||
<arg value="@{flexfile}"/>
|
<arg value="@{flexfile}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${flex.base}/lib/JFlex.jar"/>
|
<pathelement location="${flex.base}/JFlex.jar"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
</java>
|
</java>
|
||||||
<move todir="@{destdir}">
|
<move todir="@{destdir}">
|
||||||
@@ -44,7 +34,6 @@
|
|||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
<target name="lexer">
|
<target name="lexer">
|
||||||
<echo message="${flex.base}"/>
|
|
||||||
<flex flexfile="${home}/src/org/jetbrains/jet/lexer/Jet.flex"
|
<flex flexfile="${home}/src/org/jetbrains/jet/lexer/Jet.flex"
|
||||||
destdir="${home}/src/org/jetbrains/jet/lexer/"/>
|
destdir="${home}/src/org/jetbrains/jet/lexer/"/>
|
||||||
<flex flexfile="${home}/src/org/jetbrains/jet/kdoc/lexer/KDoc.flex"
|
<flex flexfile="${home}/src/org/jetbrains/jet/kdoc/lexer/KDoc.flex"
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
<project name="GrammarLexer" default="lexer">
|
<project name="GrammarLexer" default="lexer">
|
||||||
<property name="home" value="${basedir}"/>
|
<property name="home" value="${basedir}"/>
|
||||||
<property file="${home}/../compiler/frontend/idea.properties"/>
|
<property name="flex.base" value="${home}/../dependencies/jflex"/>
|
||||||
|
|
||||||
<property name="flex.base" value="${idea.home}/tools/lexer/jflex-1.4"/>
|
|
||||||
<property name="out.dir" value="${basedir}/tmpout"/>
|
<property name="out.dir" value="${basedir}/tmpout"/>
|
||||||
|
|
||||||
<macrodef name="flex">
|
<macrodef name="flex">
|
||||||
<attribute name="flexfile"/>
|
<attribute name="flexfile"/>
|
||||||
<attribute name="destdir"/>
|
<attribute name="destdir"/>
|
||||||
<attribute name="skeleton" default="${idea.home}/tools/lexer/idea-flex.skeleton"/>
|
<attribute name="skeleton" default="${flex.base}/idea-flex.skeleton"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<delete dir="${out.dir}"/>
|
<delete dir="${out.dir}"/>
|
||||||
<mkdir dir="${out.dir}"/>
|
<mkdir dir="${out.dir}"/>
|
||||||
@@ -23,7 +21,7 @@
|
|||||||
<arg value="${out.dir}"/>
|
<arg value="${out.dir}"/>
|
||||||
<arg value="@{flexfile}"/>
|
<arg value="@{flexfile}"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${flex.base}/lib/JFlex.jar"/>
|
<pathelement location="${flex.base}/JFlex.jar"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
</java>
|
</java>
|
||||||
<move todir="@{destdir}">
|
<move todir="@{destdir}">
|
||||||
@@ -36,7 +34,6 @@
|
|||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
<target name="lexer">
|
<target name="lexer">
|
||||||
<echo message="${flex.base}"/>
|
|
||||||
<flex flexfile="${home}/src/org/jetbrains/jet/grammar/Grammar.flex"
|
<flex flexfile="${home}/src/org/jetbrains/jet/grammar/Grammar.flex"
|
||||||
destdir="${home}//src/org/jetbrains/jet/grammar/"/>
|
destdir="${home}//src/org/jetbrains/jet/grammar/"/>
|
||||||
</target>
|
</target>
|
||||||
|
|||||||
@@ -111,6 +111,13 @@
|
|||||||
<!-- dx.jar -->
|
<!-- dx.jar -->
|
||||||
<get-maven-library prefix="com/google/android/tools" lib="dx" version="1.7" target.jar.name.base="dx"/>
|
<get-maven-library prefix="com/google/android/tools" lib="dx" version="1.7" target.jar.name.base="dx"/>
|
||||||
|
|
||||||
|
<!-- jflex 1.4 -->
|
||||||
|
<mkdir dir="dependencies/jflex"/>
|
||||||
|
<get src="https://raw.github.com/JetBrains/intellij-community/master/tools/lexer/jflex-1.4/lib/JFlex.jar"
|
||||||
|
dest="dependencies/jflex/JFlex.jar" usetimestamp="true" />
|
||||||
|
<get src="https://raw.github.com/JetBrains/intellij-community/master/tools/lexer/idea-flex.skeleton"
|
||||||
|
dest="dependencies/jflex/idea-flex.skeleton" usetimestamp="true" />
|
||||||
|
|
||||||
<!-- jline -->
|
<!-- jline -->
|
||||||
<get-maven-library prefix="jline" lib="jline" version="2.9" target.jar.name.base="jline"/>
|
<get-maven-library prefix="jline" lib="jline" version="2.9" target.jar.name.base="jline"/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user