forked from asciidoctor/asciidoctor-intellij-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildLexer.xml
31 lines (29 loc) · 1.06 KB
/
buildLexer.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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="AsciiDoc Lexer" default="asciidoc">
<property name="flex.base" value="${idea.community.source.home}/tools/lexer/jflex-1.4"/>
<macrodef name="flex">
<attribute name="flexfile"/>
<attribute name="destdir"/>
<attribute name="skeleton" default="${idea.community.source.home}/tools/lexer/idea-flex.skeleton"/>
<sequential>
<java classname="JFlex.Main"
fork="true"
failonerror="true">
<jvmarg value="-Xmx512M"/>
<arg value="-sliceandcharat"/>
<arg value="-skel"/>
<arg value="@{skeleton}"/>
<arg value="-d"/>
<arg value="@{destdir}"/>
<arg value="@{flexfile}"/>
<classpath>
<pathelement location="${flex.base}/lib/JFlex.jar"/>
</classpath>
</java>
</sequential>
</macrodef>
<target name="asciidoc">
<flex destdir="${basedir}/src/main/java/org/asciidoc/intellij/lexer"
flexfile="${basedir}/src/main/java/org/asciidoc/intellij/lexer/asciidoc.flex"/>
</target>
</project>