laser.regularlanguage.util
Class REtoDFAConverter<L extends LabelInterface>

java.lang.Object
  extended by laser.regularlanguage.util.REtoDFAConverter<L>
Type Parameters:
L - The type of labels used by the REs and DFAs

public class REtoDFAConverter<L extends LabelInterface>
extends java.lang.Object

The REtoDFAConverter class converts from the given RE to its corresponding DFA.

Author:
Heather M. Conboy (laser-software@cs.umass.edu)

Constructor Summary
REtoDFAConverter(FSAFactoryInterface<L> fsaFactory, RLFactory<L> rlFactory)
          Creates a new REtoDFAConverter.
 
Method Summary
 MutableFSAInterface<L> convert(RE<L> theRE)
          Converts from the input RE to its corresponding DFA.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

REtoDFAConverter

public REtoDFAConverter(FSAFactoryInterface<L> fsaFactory,
                        RLFactory<L> rlFactory)
Creates a new REtoDFAConverter.

Parameters:
fsaFactory - The FSAFactoryInterface to be used to create new DFAs (non-null)
rlFactory - The RLFactory to be used to help convert between REs and DFAs (non-null)
Method Detail

convert

public MutableFSAInterface<L> convert(RE<L> theRE)
                                                      throws FSAInterfaceException,
                                                             REException
Converts from the input RE to its corresponding DFA.

PRECONDITIONS:

Parameters:
theRE - The given RE
Returns:
The corresponding DFA
Throws:
FSAInterfaceException - if an FSA related error occurs during the conversion
REException - if an RE related error occurs during the conversion