public class NfaStateNot extends NfaState
Constructor and Description |
---|
NfaStateNot(NfaState clause,
NfaState nextState) |
Modifier and Type | Method and Description |
---|---|
protected String |
dumpInternal(Map<NfaState,Integer> stateNrs) |
protected void |
finishInternal(Set<NfaState> visited)
Visit each node and replace dangling arrows (nulls) with the match state.
|
boolean |
hitsAllSameLength(Set<NfaState> statesVisited)
Are all hits from this NFA the same length?
|
int |
hitsLengthMax(Set<NfaState> statesVisited)
What's the maximum hit length?
|
int |
hitsLengthMin(Set<NfaState> statesVisited)
What's the minimum hit length?
|
boolean |
matchesEmptySequence(Set<NfaState> statesVisited)
Does this NFA match the empty sequence?
|
void |
setNextState(int i,
NfaState state)
Set the next state for a given input.
|
public void setNextState(int i, NfaState state)
NfaState
setNextState
in class NfaState
i
- inputstate
- next statepublic boolean matchesEmptySequence(Set<NfaState> statesVisited)
NfaState
matchesEmptySequence
in class NfaState
statesVisited
- states we've already visited, so we can deal with cyclespublic boolean hitsAllSameLength(Set<NfaState> statesVisited)
NfaState
hitsAllSameLength
in class NfaState
statesVisited
- states we've already visited, so we can deal with cyclespublic int hitsLengthMin(Set<NfaState> statesVisited)
NfaState
hitsLengthMin
in class NfaState
statesVisited
- states we've already visited, so we can deal with cyclespublic int hitsLengthMax(Set<NfaState> statesVisited)
NfaState
hitsLengthMax
in class NfaState
statesVisited
- states we've already visited, so we can deal with cyclesprotected String dumpInternal(Map<NfaState,Integer> stateNrs)
dumpInternal
in class NfaState
protected void finishInternal(Set<NfaState> visited)
NfaState
finishInternal
in class NfaState
visited
- nodes visited so far, this one included. finish() uses this to
make sure we don't visit the same node twice, so always call
finish() in your implementations, not finishInternal().Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.