kmy.regex.tree
Class RNode
java.lang.Object
|
+--kmy.regex.tree.RNode
- Direct Known Subclasses:
- RAltNode, RAnyNode, RBoundaryNode, RCharClassNode, RConstNode, RLookAheadNode, RPickNode, RRepeatNode, RSubstNode
- public abstract class RNode
- extends java.lang.Object
Constructor Summary |
protected |
RNode(int pos)
|
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
position
public int position
maxLeft
public int maxLeft
minLeft
public int minLeft
maxLength
public int maxLength
minLength
public int minLength
prefix
public CharSet prefix
tail
public RNode tail
RNode
protected RNode(int pos)
getNCells
public int getNCells()
- Number of variables to be used by this regex. This should be upper bound,
but, of cource, it should be as close as possible to what RCompiler will
generate.
minTotalLength
public static int minTotalLength(RNode p)
maxTotalLength
public static int maxTotalLength(RNode p)
prepare
public void prepare(int addMaxLeft,
int addMinLeft)
finishPrepare
protected void finishPrepare(int addMaxLeft,
int addMinLeft)
toLowerCase
public void toLowerCase()
findPrefix
public CharSet findPrefix(CharSet tailPrefix)
isStartAnchored
public boolean isStartAnchored()
isEndAnchored
public boolean isEndAnchored()
hasPicks
public boolean hasPicks()
hasForks
public boolean hasForks()
collectReferences
public void collectReferences(java.util.Dictionary refList,
java.util.Dictionary pickList)
markReferenced
public RNode markReferenced(java.util.Dictionary refList,
java.util.Dictionary pickList,
boolean collapse)
eval
public abstract java.lang.Object eval(RContext context)
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object