forked from phoedos/pmd
6f493b9751
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5421 51baf565-9d33-0410-a72c-fc3788e3496d
49 lines
3.3 KiB
XML
49 lines
3.3 KiB
XML
<project name="Jerry" default="jjtreeXPath" basedir="../">
|
|
|
|
<property name="dir.bin" value="bin/" />
|
|
<property name="dir.lib" value="lib/" />
|
|
<property file="${dir.bin}/build.properties"/>
|
|
|
|
<property name="parser.xpath.dir" value="src/net/sourceforge/pmd/jerry/ast/xpath"/>
|
|
<property name="parser.xpathcore.dir" value="src/net/sourceforge/pmd/jerry/ast/xpathcore"/>
|
|
|
|
<target name="jjtreeXPath" description="Generates the Jerry XPath parser and AST source files">
|
|
<delete file="${parser.xpath.dir}/XPath2.jj" />
|
|
<delete file="${parser.xpath.dir}/XPath2Parser.java" />
|
|
<delete file="${parser.xpath.dir}/XPath2ParserConstants.java" />
|
|
<delete file="${parser.xpath.dir}/XPath2ParserTreeConstants.java" />
|
|
<delete file="${parser.xpath.dir}/XPath2ParserTokenManager.java" />
|
|
<jjtree target="etc/grammar/XPath2.jjt" outputdirectory="${parser.xpath.dir}" javacchome="${javacc-home.path}" />
|
|
<javacc target="${parser.xpath.dir}/XPath2.jj" outputdirectory="${parser.xpath.dir}" javacchome="${javacc-home.path}" />
|
|
<delete file="${parser.xpath.dir}/XPath2.jj" />
|
|
<replace file="${parser.xpath.dir}/XPath2ParserTokenManager.java" token="throw new Error" value="throw new RuntimeException" />
|
|
<replace file="${parser.xpath.dir}/XPath2Parser.java" token="throw new Error" value="throw new RuntimeException" />
|
|
<replace file="${parser.xpath.dir}/SimpleCharStream.java" token="throw new Error" value="throw new RuntimeException" />
|
|
<replace file="${parser.xpath.dir}/ParseException.java" token="throw new Error" value="throw new RuntimeException" />
|
|
<replace file="${parser.xpath.dir}/ParseException.java" token="extends Exception" value="extends RuntimeException" />
|
|
<replace file="${parser.xpath.dir}/TokenMgrError.java" token="extends Error" value="extends RuntimeException" />
|
|
</target>
|
|
|
|
<target name="jjtreeXPathCore" description="Generates the Jerry XPath Core parser and AST source files">
|
|
<delete file="${parser.xpathcore.dir}core/XPathCore.jj" />
|
|
<delete file="${parser.xpathcore.dir}/XPathCoreParser.java" />
|
|
<delete file="${parser.xpathcore.dir}/XPathCoreParserConstants.java" />
|
|
<delete file="${parser.xpathcore.dir}/XPathCoreParserTreeConstants.java" />
|
|
<delete file="${parser.xpathcore.dir}/XPathCoreParserTokenManager.java" />
|
|
<jjtree target="etc/grammar/XPath2Core.jjt" outputdirectory="${parser.xpathcore.dir}" javacchome="${javacc-home.path}" />
|
|
<javacc target="${parser.xpathcore.dir}/XPathCore.jj" outputdirectory="${parser.xpathcore.dir}" javacchome="${javacc-home.path}" />
|
|
<delete file="${parser.xpathcore.dir}/XPathCore.jj" />
|
|
<replace file="${parser.xpathcore.dir}/XPathCoreParserTokenManager.java" token="throw new Error" value="throw new RuntimeException" />
|
|
<replace file="${parser.xpathcore.dir}/XPathCoreParser.java" token="throw new Error" value="throw new RuntimeException" />
|
|
<replace file="${parser.xpathcore.dir}/SimpleCharStream.java" token="throw new Error" value="throw new RuntimeException" />
|
|
<replace file="${parser.xpathcore.dir}/ParseException.java" token="throw new Error" value="throw new RuntimeException" />
|
|
<replace file="${parser.xpathcore.dir}/ParseException.java" token="extends Exception" value="extends RuntimeException" />
|
|
<replace file="${parser.xpathcore.dir}/TokenMgrError.java" token="extends Error" value="extends RuntimeException" />
|
|
</target>
|
|
|
|
</project>
|
|
|
|
|
|
|
|
|