Class State

java.lang.Object
  extended byState

public class State
extends java.lang.Object

Implementation of NFA by linked lists adapted to Thomson's algorithm. Each state has at most two outgoing edges. If there is only one, the first one is used. If there are two, they have to be both epsilon edges (label = 0).


Field Summary
 char label
          The Label of the first outgoing edge.
 boolean mark
          A marker used for the exploration.
 State to1
          The ends of the outgoing edges.
 State to2
          The ends of the outgoing edges.
 
Constructor Summary
State()
          Creates a new state using a name from LinkedNFA.
 
Method Summary
 void renumber()
          Renumbers the states of a NFA.
 void reset()
          Resets the mark field.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mark

public boolean mark
A marker used for the exploration.


label

public char label
The Label of the first outgoing edge.


to1

public State to1
The ends of the outgoing edges.


to2

public State to2
The ends of the outgoing edges.

Constructor Detail

State

public State()
Creates a new state using a name from LinkedNFA.

Method Detail

toString

public java.lang.String toString()

reset

public void reset()
Resets the mark field.


renumber

public void renumber()
Renumbers the states of a NFA.