FSA
Class DFA_Table

java.lang.Object
  |
  +--Table
        |
        +--FSA.DFA_Table

public class DFA_Table
extends Table

This class represents the state/transition table (move function) of a DFA.

See Also:
Serialized Form

Constructor Summary
DFA_Table()
           
 
Method Summary
 void addTransition(int s, char a, int t)
          Adds a new transition to the table.
 int getTransition(int s, char a)
          Implements the move function.
 java.lang.String toString()
          Returns a string representation of this DFA table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DFA_Table

public DFA_Table()
Method Detail

addTransition

public void addTransition(int s,
                          char a,
                          int t)
Adds a new transition to the table.

Parameters:
s - current state
a - input symbol
t - new state

getTransition

public int getTransition(int s,
                         char a)
Implements the move function.

Parameters:
s - current state
a - input symbol
Returns:
new state, or -1 if no such transition

toString

public java.lang.String toString()
Returns a string representation of this DFA table.