|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.xmlmatcher.rex.PositionsGraph
public final class PositionsGraph
Represent graph of Positions in parsed regular expression.
This object is separated from Position because when we build Glushkov automata this graph may be in intermediate state that does not belong to any particular position. For example as we in the middle of processing children of some elements, or when we process 'choice' or 'group' macros there is no Position that may hold these intermediate results.
Glushkov algorithm variables: 'nullable', 'first' sets, 'last' sets. Set 'follow' is represented using Position.next().
Constructor Summary | |
---|---|
PositionsGraph()
|
|
PositionsGraph(Position symb)
|
Method Summary | |
---|---|
java.util.List<Position> |
first()
|
java.util.List<Position> |
last()
|
void |
markLastAsFinal()
|
boolean |
nullable()
|
void |
plus()
Plus mark (one or more repetitions) |
void |
star()
Kleene star (zero or more repetitions) |
java.lang.String |
toString()
|
void |
toStringBuffer(java.lang.StringBuffer sbuf)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PositionsGraph()
public PositionsGraph(Position symb)
Method Detail |
---|
public boolean nullable()
public java.util.List<Position> first()
public java.util.List<Position> last()
public void star()
nullable(F*) = true first(F*) = first(F) last(F*) = last(F) follow(F*) += last(F)*first(F)
public void plus()
nullable(F+) = nullable(F) first(F+) = first(F) last(F+) = last(F) follow(F+) += last(F)*first(F)
public void markLastAsFinal()
public java.lang.String toString()
toString
in class java.lang.Object
public void toStringBuffer(java.lang.StringBuffer sbuf)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |