diff options
| author | bringert <bringert@cs.chalmers.se> | 2007-06-25 16:25:58 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2007-06-25 16:25:58 +0000 |
| commit | 862c780f78ae6d3b4495b56a2070d1ec1ff25e5c (patch) | |
| tree | 50ebe21fecec811c619c7080cb95fe6f1dcbcec9 /src/GF/Speech/PrRegExp.hs | |
| parent | b086183c0fb9363000804bd68c2cb22ac3c964a9 (diff) | |
Some clean-up in finite-state network generation: MFA now keeps track of start lattice name, instead of having a wrapper lattice. Replaced MFALabel with Symbol.
Diffstat (limited to 'src/GF/Speech/PrRegExp.hs')
| -rw-r--r-- | src/GF/Speech/PrRegExp.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/GF/Speech/PrRegExp.hs b/src/GF/Speech/PrRegExp.hs index d0e2f0138..0ad1c0f1e 100644 --- a/src/GF/Speech/PrRegExp.hs +++ b/src/GF/Speech/PrRegExp.hs @@ -11,6 +11,7 @@ module GF.Speech.PrRegExp (regexpPrinter,multiRegexpPrinter) where import GF.Conversion.Types +import GF.Formalism.Utilities import GF.Infra.Ident import GF.Infra.Option (Options) import GF.Speech.CFGToFiniteState @@ -26,10 +27,7 @@ multiRegexpPrinter opts s = prREs $ mfa2res $ cfgToMFA opts s prREs :: [(String,RE (MFALabel String))] -> String prREs res = unlines [l ++ " = " ++ prRE (mapRE showLabel re) | (l,re) <- res] - where showLabel (MFASym s) = s - showLabel (MFASub l) = "<" ++ l ++ ">" + where showLabel = symbol (\l -> "<" ++ l ++ ">") id mfa2res :: MFA String -> [(String,RE (MFALabel String))] -mfa2res (MFA start dfas) = - [("START",f start)] ++ [(l,f dfa) | (l,dfa) <- dfas] - where f = minimizeRE . dfa2re
\ No newline at end of file +mfa2res (MFA _ dfas) = [(l, minimizeRE (dfa2re dfa)) | (l,dfa) <- dfas] |
