Merge pull request #4797 from adangel:lexexception-cpdlexer
[core] Rename TokenMgrError to LexException, Tokenizer to CpdLexer #4797
This commit is contained in:
@ -157,13 +157,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
package net.sourceforge.pmd.lang.plsql.ast;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import net.sourceforge.pmd.lang.ast.Node;
|
||||
import net.sourceforge.pmd.lang.document.Chars;
|
||||
import net.sourceforge.pmd.lang.ast.impl.javacc.CharStream;
|
||||
import net.sourceforge.pmd.lang.plsql.ast.internal.ParsingExclusion;
|
||||
import net.sourceforge.pmd.lang.ast.TokenMgrError;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PLSQLParserImpl {
|
||||
|
||||
|
@ -5,11 +5,11 @@
|
||||
package net.sourceforge.pmd.lang.plsql;
|
||||
|
||||
import net.sourceforge.pmd.cpd.CpdLanguageProperties;
|
||||
import net.sourceforge.pmd.cpd.Tokenizer;
|
||||
import net.sourceforge.pmd.cpd.CpdLexer;
|
||||
import net.sourceforge.pmd.lang.LanguagePropertyBundle;
|
||||
import net.sourceforge.pmd.lang.LanguageRegistry;
|
||||
import net.sourceforge.pmd.lang.impl.SimpleLanguageModuleBase;
|
||||
import net.sourceforge.pmd.lang.plsql.cpd.PLSQLTokenizer;
|
||||
import net.sourceforge.pmd.lang.plsql.cpd.PLSQLCpdLexer;
|
||||
|
||||
/**
|
||||
* Created by christoferdutz on 20.09.14.
|
||||
@ -56,7 +56,7 @@ public class PLSQLLanguageModule extends SimpleLanguageModuleBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Tokenizer createCpdTokenizer(LanguagePropertyBundle bundle) {
|
||||
return new PLSQLTokenizer(bundle);
|
||||
public CpdLexer createCpdLexer(LanguagePropertyBundle bundle) {
|
||||
return new PLSQLCpdLexer(bundle);
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
package net.sourceforge.pmd.lang.plsql.cpd;
|
||||
|
||||
import net.sourceforge.pmd.cpd.CpdLanguageProperties;
|
||||
import net.sourceforge.pmd.cpd.impl.JavaCCTokenizer;
|
||||
import net.sourceforge.pmd.cpd.impl.JavaccCpdLexer;
|
||||
import net.sourceforge.pmd.lang.LanguagePropertyBundle;
|
||||
import net.sourceforge.pmd.lang.TokenManager;
|
||||
import net.sourceforge.pmd.lang.ast.impl.javacc.CharStream;
|
||||
@ -13,12 +13,15 @@ import net.sourceforge.pmd.lang.ast.impl.javacc.JavaccToken;
|
||||
import net.sourceforge.pmd.lang.document.TextDocument;
|
||||
import net.sourceforge.pmd.lang.plsql.ast.PLSQLTokenKinds;
|
||||
|
||||
public class PLSQLTokenizer extends JavaCCTokenizer {
|
||||
/**
|
||||
* <p>Note: This class has been called PLSQLTokenizer in PMD 6</p>.
|
||||
*/
|
||||
public class PLSQLCpdLexer extends JavaccCpdLexer {
|
||||
|
||||
private final boolean ignoreIdentifiers;
|
||||
private final boolean ignoreLiterals;
|
||||
|
||||
public PLSQLTokenizer(LanguagePropertyBundle properties) {
|
||||
public PLSQLCpdLexer(LanguagePropertyBundle properties) {
|
||||
/*
|
||||
* The Tokenizer is derived from PLDoc, in which comments are very
|
||||
* important When looking for duplication, we are probably not
|
@ -9,9 +9,9 @@ import org.junit.jupiter.api.Test;
|
||||
import net.sourceforge.pmd.cpd.test.CpdTextComparisonTest;
|
||||
import net.sourceforge.pmd.lang.plsql.PLSQLLanguageModule;
|
||||
|
||||
class PLSQLTokenizerTest extends CpdTextComparisonTest {
|
||||
class PLSQLCpdLexerTest extends CpdTextComparisonTest {
|
||||
|
||||
PLSQLTokenizerTest() {
|
||||
PLSQLCpdLexerTest() {
|
||||
super(PLSQLLanguageModule.getInstance(), ".sql");
|
||||
}
|
||||
|
Reference in New Issue
Block a user