forked from phoedos/pmd
Remove alljavacc.xml
This commit is contained in:
@ -1,112 +0,0 @@
|
||||
<project name="pmd" default="alljavacc" basedir="../../">
|
||||
|
||||
<property name="javacc-home.path" value="target/lib" />
|
||||
|
||||
<target name="alljavacc"
|
||||
description="Generates all JavaCC aspects within PMD"
|
||||
depends="checkUpToDate,init,objectivecjavacc,cleanup" />
|
||||
|
||||
<target name="checkUpToDate">
|
||||
<uptodate property="javaccBuildNotRequired" targetfile="${target}/last-generated-timestamp">
|
||||
<srcfiles dir="etc/grammar" includes="*.jj*"/>
|
||||
</uptodate>
|
||||
<echo message="up to date check: javaccBuildNotRequired=${javaccBuildNotRequired}"/>
|
||||
</target>
|
||||
|
||||
<target name="init" unless="javaccBuildNotRequired">
|
||||
<mkdir dir="${javacc-home.path}" />
|
||||
<copy file="${javacc.jar}" tofile="${javacc-home.path}/javacc.jar" />
|
||||
|
||||
<mkdir dir="${target}"/>
|
||||
<touch file="${target}/last-generated-timestamp"/>
|
||||
</target>
|
||||
|
||||
<target name="cleanup">
|
||||
<delete dir="${javacc-home.path}" />
|
||||
</target>
|
||||
|
||||
<target name="objectivecjavacc" description="Generates the Objective-C grammar" unless="javaccBuildNotRequired">
|
||||
<delete dir="${target}/net/sourceforge/pmd/lang/objectivec/ast" />
|
||||
<mkdir dir="${target}/net/sourceforge/pmd/lang/objectivec/ast" />
|
||||
<!-- Ensure generated using CharStream interface -->
|
||||
<javacc static="false"
|
||||
usercharstream="true"
|
||||
target="etc/grammar/ObjC2.0.jj"
|
||||
outputdirectory="${target}/net/sourceforge/pmd/lang/objectivec/ast"
|
||||
javacchome="${javacc-home.path}" />
|
||||
<replace file="${target}/net/sourceforge/pmd/lang/objectivec/ast/ObjectiveCParserTokenManager.java"
|
||||
token="class ObjectiveCParserTokenManager"
|
||||
value="class ObjectiveCParserTokenManager extends net.sourceforge.pmd.lang.ast.AbstractTokenManager" />
|
||||
<delete file="${target}/net/sourceforge/pmd/lang/objectivec/ast/CharStream.java" />
|
||||
<delete file="${target}/net/sourceforge/pmd/lang/objectivec/ast/ParseException.java" />
|
||||
<delete file="${target}/net/sourceforge/pmd/lang/objectivec/ast/TokenMgrError.java" />
|
||||
|
||||
<replace file="${target}/net/sourceforge/pmd/lang/objectivec/ast/Token.java">
|
||||
<replacetoken>public class Token implements java.io.Serializable</replacetoken>
|
||||
<replacevalue><![CDATA[import net.sourceforge.pmd.lang.ast.GenericToken;
|
||||
|
||||
public class Token implements GenericToken, java.io.Serializable]]></replacevalue>
|
||||
</replace>
|
||||
|
||||
<!--Add implementation methods of GenericToken-->
|
||||
<replace file="${target}/net/sourceforge/pmd/lang/objectivec/ast/Token.java">
|
||||
<replacetoken>public Token specialToken;</replacetoken>
|
||||
<replacevalue><![CDATA[public Token specialToken;
|
||||
|
||||
@Override
|
||||
public GenericToken getNext() {
|
||||
return next;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenericToken getPreviousComment() {
|
||||
return specialToken;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBeginLine() {
|
||||
return beginLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEndLine() {
|
||||
return endLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBeginColumn() {
|
||||
return beginColumn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEndColumn() {
|
||||
return endColumn;
|
||||
}
|
||||
|
||||
]]></replacevalue>
|
||||
</replace>
|
||||
|
||||
|
||||
|
||||
<replaceregexp>
|
||||
<regexp pattern="class|interface" />
|
||||
<substitution expression="@Deprecated @net.sourceforge.pmd.annotation.InternalApi \0" />
|
||||
<fileset dir="${target}/net/sourceforge/pmd/lang/objectivec/ast">
|
||||
<exclude name="AST*.java" />
|
||||
</fileset>
|
||||
</replaceregexp>
|
||||
|
||||
<replaceregexp>
|
||||
<regexp pattern="public class ParseException " />
|
||||
<substitution expression=" /** @deprecated Use superclass {@link net.sourceforge.pmd.lang.ast.ParseException} */
|
||||
@Deprecated @net.sourceforge.pmd.annotation.InternalApi \0" />
|
||||
<fileset file="${target}/net/sourceforge/pmd/lang/objectivec/ast/ParseException.java"/>
|
||||
</replaceregexp>
|
||||
</target>
|
||||
|
||||
</project>
|
Reference in New Issue
Block a user