com.singularsys.jep.configurableparser.matchers
Class CommentTokenMatcher
java.lang.Object
com.singularsys.jep.configurableparser.matchers.RegExpTokenMatcher
com.singularsys.jep.configurableparser.matchers.CommentTokenMatcher
- All Implemented Interfaces:
- TokenBuilder, TokenMatcher, java.io.Serializable
public class CommentTokenMatcher
- extends RegExpTokenMatcher
Matches various styles of comments.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommentTokenMatcher
public CommentTokenMatcher(java.lang.String regex)
CommentTokenMatcher
public CommentTokenMatcher(java.util.regex.Pattern pattern)
buildToken
public Token buildToken(java.lang.String s)
- Description copied from class:
RegExpTokenMatcher
- Builds a token following a successful match.
- Specified by:
buildToken
in interface TokenBuilder
- Specified by:
buildToken
in class RegExpTokenMatcher
- Parameters:
s
- String representing the completed matched token
- Returns:
- the appropriate type of token.
slashStarCommentMatcher
public static CommentTokenMatcher slashStarCommentMatcher()
multiLineSlashStarCommentMatcher
public static MultiLineMatcher multiLineSlashStarCommentMatcher()
slashSlashCommentMatcher
public static CommentTokenMatcher slashSlashCommentMatcher()
hashCommentMatcher
public static CommentTokenMatcher hashCommentMatcher()
init
public void init(Jep j)
- Description copied from interface:
TokenMatcher
- Initialize the matcher when the Jep instance is known.
Copyright © 2007 Singular Systems http://www.singularsys.com/jep