|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpmp.JavaMatcher
public class JavaMatcher
Represents regular expression analyzer.
Title: PMP: Macroprocessor
Description: Java macroprocessor
Copyright: Copyright (c) 2005
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pmp.MatcherIface |
---|
MatcherIface.State |
Field Summary | |
---|---|
static int |
MAX_TOKEN_LENGTH
maximal length of buffer. |
Constructor Summary | |
---|---|
JavaMatcher(Token token,
java.util.regex.Pattern pattern)
|
Method Summary | |
---|---|
void |
feed(int c)
Appends character to matched string snd updates stato of this matcher. |
int |
getMatchingLength()
Returns length of input subsequence that matches pattern. |
java.lang.String |
getPattern()
Returns pattern associated with this matcher. |
MatcherIface.State |
getState()
Returns state of matcher. |
Token |
getToken()
Returns token that would be produced by this class. |
MatcherIface.State |
matches(java.lang.StringBuilder t)
Resets this matcher with given string. |
void |
reset()
Resets matcher. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_TOKEN_LENGTH
Constructor Detail |
---|
public JavaMatcher(Token token, java.util.regex.Pattern pattern)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void reset()
MatcherIface
reset
in interface MatcherIface
public MatcherIface.State getState()
MatcherIface
getState
in interface MatcherIface
public java.lang.String getPattern()
MatcherIface
getPattern
in interface MatcherIface
public Token getToken()
MatcherIface
getToken
in interface MatcherIface
public int getMatchingLength()
MatcherIface
MatcherIface.State.PARTIAL
and MatcherIface.State.OVERFEED
.
getMatchingLength
in interface MatcherIface
public void feed(int c)
MatcherIface
feed
in interface MatcherIface
c
- chracter to be appendedpublic MatcherIface.State matches(java.lang.StringBuilder t)
MatcherIface
matches
in interface MatcherIface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |