public class IdentifierTokenMatcher extends RegExpTokenMatcher
Constructor and Description |
---|
IdentifierTokenMatcher(java.util.regex.Pattern pattern) |
IdentifierTokenMatcher(java.lang.String regex)
Construct and identifier matcher.
|
Modifier and Type | Method and Description |
---|---|
static IdentifierTokenMatcher |
basicIdentifierMatcher()
Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores.
|
static IdentifierTokenMatcher |
basicIndetifierMatcher()
Deprecated.
replace by corectly spelt version.
|
Token |
buildToken(java.lang.String s)
Create the token, if the name matches a function name return a FunctionToken otherwise return an IdentifierToken.
|
static IdentifierTokenMatcher |
dottedIdentifierMatcher()
Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores or . characters.
|
static IdentifierTokenMatcher |
dottedIndetifierMatcher()
Deprecated.
replace by corectly spelt version.
|
void |
init(Jep j)
Initialize the matcher when the Jep instance is known.
|
match
public IdentifierTokenMatcher(java.util.regex.Pattern pattern)
public IdentifierTokenMatcher(java.lang.String regex)
regex
- a regular expression specifying the allowed identifier names.Pattern
public Token buildToken(java.lang.String s)
buildToken
in interface TokenBuilder
buildToken
in class RegExpTokenMatcher
s
- String representing the completed matched token@Deprecated public static IdentifierTokenMatcher basicIndetifierMatcher()
@Deprecated public static IdentifierTokenMatcher dottedIndetifierMatcher()
public static IdentifierTokenMatcher basicIdentifierMatcher()
public static IdentifierTokenMatcher dottedIdentifierMatcher()
public void init(Jep j)
TokenMatcher
j
- Jep instanceCopyright © 2018 Singular Systems http://www.singularsys.com/jep