From 862c780f78ae6d3b4495b56a2070d1ec1ff25e5c Mon Sep 17 00:00:00 2001 From: bringert Date: Mon, 25 Jun 2007 16:25:58 +0000 Subject: 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. --- src/GF/Speech/PrRegExp.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/GF/Speech/PrRegExp.hs') 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] -- cgit v1.2.3