forked from phoedos/pmd
Have pmd-xml Lexer in line with other antlr grammars
- The package is no longer antlr4, but ast, as is in all other modules - We keep a deprecated proxy for backwards compatibility - We annotate the generated classes as such to ignore them from coverage reports
This commit is contained in:
@ -45,6 +45,28 @@
|
|||||||
</parameter>
|
</parameter>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>antlr-cleanup</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<ant antfile="${antlr4.ant.wrapper}" target="cpd-language">
|
||||||
|
<property name="lang-name" value="XML" />
|
||||||
|
<property name="lang-id" value="xml" />
|
||||||
|
</ant>
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
package net.sourceforge.pmd.lang.xml.antlr4;
|
||||||
|
|
||||||
|
import org.antlr.v4.runtime.CharStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Backwards compatible bridge. The XMLLexer was moved to align it with other PMD modules.
|
||||||
|
* This class will be removed in PMD 8.0.0.
|
||||||
|
* Use {@link net.sourceforge.pmd.lang.xml.ast.XMLLexer} directly instead.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public class XMLLexer extends net.sourceforge.pmd.lang.xml.ast.XMLLexer {
|
||||||
|
public XMLLexer(CharStream input) {
|
||||||
|
super(input);
|
||||||
|
}
|
||||||
|
}
|
@ -8,7 +8,7 @@ import org.antlr.v4.runtime.CharStream;
|
|||||||
import org.antlr.v4.runtime.Lexer;
|
import org.antlr.v4.runtime.Lexer;
|
||||||
|
|
||||||
import net.sourceforge.pmd.cpd.impl.AntlrCpdLexer;
|
import net.sourceforge.pmd.cpd.impl.AntlrCpdLexer;
|
||||||
import net.sourceforge.pmd.lang.xml.antlr4.XMLLexer;
|
import net.sourceforge.pmd.lang.xml.ast.XMLLexer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Note: This class has been called XmlTokenizer in PMD 6</p>.
|
* <p>Note: This class has been called XmlTokenizer in PMD 6</p>.
|
||||||
|
Reference in New Issue
Block a user