public class CommentTokenMatcher extends RegExpTokenMatcher
Constructor and Description |
---|
CommentTokenMatcher(java.util.regex.Pattern pattern) |
CommentTokenMatcher(java.lang.String regex) |
Modifier and Type | Method and Description |
---|---|
Token |
buildToken(java.lang.String s)
Builds a token following a successful match.
|
static CommentTokenMatcher |
hashCommentMatcher()
Recognize comments of the form # ...
|
void |
init(Jep j)
Initialize the matcher when the Jep instance is known.
|
static MultiLineMatcher |
multiLineSlashStarCommentMatcher()
Recognize comments of the form /* ...
|
static CommentTokenMatcher |
slashSlashCommentMatcher()
Recognize comments of the form /// ...
|
static CommentTokenMatcher |
slashStarCommentMatcher()
Recognize comments of the form /* ...
|
match
public CommentTokenMatcher(java.lang.String regex)
public CommentTokenMatcher(java.util.regex.Pattern pattern)
public Token buildToken(java.lang.String s)
RegExpTokenMatcher
buildToken
in interface TokenBuilder
buildToken
in class RegExpTokenMatcher
s
- String representing the completed matched tokenpublic static CommentTokenMatcher slashStarCommentMatcher()
public static MultiLineMatcher multiLineSlashStarCommentMatcher()
public static CommentTokenMatcher slashSlashCommentMatcher()
public static CommentTokenMatcher hashCommentMatcher()
public void init(Jep j)
TokenMatcher
j
- Jep instanceCopyright © 2018 Singular Systems http://www.singularsys.com/jep