public class Automaton
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TOKEN_ST_INITIAL
Name of the initial state of the automaton.
|
Constructor and Description |
---|
Automaton(Expression markedModel)
Creates a new Glushkov automaton for a given marked regular expression.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getAcceptingStates()
Returns the reference to the set of accepting states.
|
java.util.Set<java.lang.String> |
getAutomatonStates()
Returns the reference to the set of automaton states.
|
java.lang.String |
getInitialState()
Returns the name of initial state.
|
java.util.Set<java.lang.String> |
getReachableStates(java.lang.String sourceState)
Returns the set of vertices reachable from the specified one.
|
java.util.Map<java.lang.String,java.lang.String> |
getTransitionRules(java.lang.String sourceState)
Returns the set of transitions defined in a given state.
|
void |
printDebugDump(java.lang.String indentPrefix)
Prints the debugging dump of the automaton.
|
java.lang.String |
resolveStateTranslation(java.lang.String automatonState)
Translates the state of the automaton to nonterminal symbol.
|
public static java.lang.String TOKEN_ST_INITIAL
public Automaton(Expression markedModel)
markedModel
- Marked regular expression.Expression.markExpression(cz.cuni.mff.corrector.expression.Expression)
public java.lang.String getInitialState()
public java.util.Set<java.lang.String> getAutomatonStates()
public java.util.Set<java.lang.String> getAcceptingStates()
public java.util.Map<java.lang.String,java.lang.String> getTransitionRules(java.lang.String sourceState)
sourceState
- Source state of the automaton.public java.lang.String resolveStateTranslation(java.lang.String automatonState)
automatonState
- Specified non-initial automaton state.public java.util.Set<java.lang.String> getReachableStates(java.lang.String sourceState)
sourceState
- State to be inspected.public void printDebugDump(java.lang.String indentPrefix)
indentPrefix
- Indentation string.