Class NFA_Reader


public class NFA_Reader
extends Reader

This class provides a method for reading NFA files.

See Also:
Serialized Form

Constructor Summary
NFA_Reader(java.lang.String fname)
          Constructs a NFA reader for a file.
Method Summary
 FSA.NFA read()
          Reads an NFA from a file.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public NFA_Reader(java.lang.String fname)
           throws java.io.FileNotFoundException
Constructs a NFA reader for a file. File format is essentially the transition table, with one transition (state symbol new-state1, new-state2, ...) per line. Symbol should be a single character, state a non-negative integer. Epsilon is represented as hyphen. First state read is treated as start state. Accepting states should be marked with asterisk.

fname - name of file specifying DFA
java.io.FileNotFoundException - on failure to open file
Method Detail


public FSA.NFA read()
             throws java.lang.Exception
Reads an NFA from a file.

DFA object
java.lang.Exception - on failure to open/read file, too few items in a line of the file, or excessively long symbol.