com.kero.security.lang.lexems.KsdlLexemBase Maven / Gradle / Ivy
package com.kero.security.lang.lexems;
import java.util.regex.Pattern;
import com.kero.security.lang.tokens.KsdlToken;
public abstract class KsdlLexemBase implements KsdlLexem {
private String pattern;
public KsdlLexemBase(String pattern) {
this.pattern = pattern;
}
@Override
public boolean isMatch(CharSequence data) {
return Pattern.matches(pattern, data);
}
@Override
public String getPattern() {
return this.pattern;
}
}