Package net.sourceforge.pmd.cpd
Class AnyCpdLexer
- java.lang.Object
-
- net.sourceforge.pmd.cpd.AnyCpdLexer
-
- All Implemented Interfaces:
CpdLexer
public class AnyCpdLexer extends Object implements CpdLexer
Simple tokenization into words and separators. Can ignore end-of-line comments and recognize double/single quoted string literals. It is not a goal to be very customizable, or have very high quality. Higher-quality lexers should be implemented with a lexer generator.In PMD 7, this replaces AbstractTokenizer, which provided nearly no more functionality.
Note: This class has been called AnyTokenizer in PMD 6.
-
-
Constructor Summary
Constructors Constructor Description AnyCpdLexer()
AnyCpdLexer(String eolCommentStart)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
tokenize(TextDocument document, TokenFactory tokens)
Tokenize the source code and record tokens using the provided token factory.
-
-
-
Constructor Detail
-
AnyCpdLexer
public AnyCpdLexer()
-
AnyCpdLexer
public AnyCpdLexer(String eolCommentStart)
-
-
Method Detail
-
tokenize
public void tokenize(TextDocument document, TokenFactory tokens)
Description copied from interface:CpdLexer
Tokenize the source code and record tokens using the provided token factory.
-
-