The SLF removeTrivialEmptyNodes optimization could orphan the final node. Fixed this by not bypassing final nodes.

This commit is contained in:
bringert
2006-04-12 23:22:35 +00:00
parent e07d9dea34
commit 97956fc13f
2 changed files with 7 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ mkFAs start cfg = (slfStyleFA main, [(c,slfStyleFA n) | (c,n) <- subs])
where MFA main subs = {- renameSubs $ -} cfgToMFA start cfg
slfStyleFA :: Eq a => DFA a -> FA State (Maybe a) ()
slfStyleFA = renameStates [0..] . removeTrivialEmptyNodes . oneFinalState Nothing ()
slfStyleFA = renameStates [0..] . removeTrivialEmptyNodes . oneFinalState Nothing ()
. moveLabelsToNodes . dfa2nfa
-- | Give sequential names to subnetworks.