internal static MinimizedDfa <TSymbol> MakeEmptyLanguageDfa <TSymbol>() where TSymbol : IComparable <TSymbol>, IEquatable <TSymbol> { var result = new ProductDfa <TSymbol> { _start = ProductDfaState <TSymbol> .MakeDeadState() } .Minimized <ProductDfa <TSymbol>, ProductDfaState <TSymbol>, TSymbol>(); DfaStatesConcpetCheck <TSymbol> .CheckDfaStates(result); return(result); }
private static ProductDfa <TSymbol> MakeProductDfa <TLastDfa, TLastDfaState, TNewDfa, TNewDfaState, TSymbol>( TLastDfa lastDfa, TNewDfa newDfa, AmbiguityHandler handler) where TLastDfa : AbstractDfa <TLastDfaState, TSymbol> where TLastDfaState : AbstractDfaState <TLastDfaState, TSymbol> where TNewDfa : AbstractDfa <TNewDfaState, TSymbol> where TNewDfaState : AbstractDfaState <TNewDfaState, TSymbol> where TSymbol : IComparable <TSymbol>, IEquatable <TSymbol> { var result = new ProductDfaBuilder <TLastDfaState, TNewDfaState, TSymbol>(handler).Build(lastDfa.Start, newDfa.Start); DfaStatesConcpetCheck <TSymbol> .CheckDfaStates(result); return(result); }
public static MinimizedDfa <TSymbol> MakeMinimizedProductDfa <TLastDfa, TLastDfaState, TNewDfa, TNewDfaState, TSymbol>(TLastDfa lastDfa, TNewDfa newDfa, AmbiguityHandler handler) where TLastDfa : AbstractDfa <TLastDfaState, TSymbol> where TLastDfaState : AbstractDfaState <TLastDfaState, TSymbol> where TNewDfa : AbstractDfa <TNewDfaState, TSymbol> where TNewDfaState : AbstractDfaState <TNewDfaState, TSymbol> where TSymbol : IComparable <TSymbol>, IEquatable <TSymbol> { var result = MakeProductDfa <TLastDfa, TLastDfaState, TNewDfa, TNewDfaState, TSymbol>(lastDfa, newDfa, handler) .Minimized <ProductDfa <TSymbol>, ProductDfaState <TSymbol>, TSymbol>(); DfaStatesConcpetCheck <TSymbol> .CheckDfaStates(result); return(result); }