|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpmp.FailingMatcher
public final class FailingMatcher
Represents never-matching regular expression matcher.
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 java.lang.String |
FAILING_PATTERN
Extension to Java regular expressions. |
Constructor Summary | |
---|---|
FailingMatcher(Token token)
Creates new instance. |
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 text)
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 java.lang.String FAILING_PATTERN
[]
which PMP
uses it to construct never-matching matcher.
Constructor Detail |
---|
public FailingMatcher(Token token)
token
- Method Detail |
---|
public void feed(int c)
MatcherIface
feed
in interface MatcherIface
c
- chracter to be appendedpublic MatcherIface.State getState()
MatcherIface
getState
in interface MatcherIface
public MatcherIface.State matches(java.lang.StringBuilder text)
MatcherIface
matches
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 java.lang.String toString()
toString
in class java.lang.Object
public void reset()
MatcherIface
reset
in interface MatcherIface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |