diff options
| author | bjorn <bjorn@bringert.net> | 2008-09-25 08:44:23 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-09-25 08:44:23 +0000 |
| commit | cc7173a03408f428df0a0ab1f55b1ff2627dde4b (patch) | |
| tree | a8cb6b5401536b3bd817243e31e0ae3c68eddb6a /src/GF | |
| parent | cdc647e788ec694bdd9579cf473b7d2983af453a (diff) | |
Somewhat nicer FCFG output format.
Diffstat (limited to 'src/GF')
| -rw-r--r-- | src/GF/Speech/PGFToCFG.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/GF/Speech/PGFToCFG.hs b/src/GF/Speech/PGFToCFG.hs index b51501c18..e455f6869 100644 --- a/src/GF/Speech/PGFToCFG.hs +++ b/src/GF/Speech/PGFToCFG.hs @@ -32,7 +32,7 @@ fcfgPrinter pgf cnc = unlines (map showRule rules) rules :: [FRule] rules = Array.elems (PGF.allRules pinfo) - showRule (FRule cid ps cs fc arr) = prCId cid ++ " " ++ show ps ++ ". " ++ showCat fc ++ " ::= " ++ unwords (map showCat cs) ++ " = " ++ showLin arr + showRule (FRule cid ps cs fc arr) = prCId cid ++ " " ++ show ps ++ ". " ++ showCat fc ++ " ::= [" ++ concat (intersperse ", " (map showCat cs)) ++ "] = " ++ showLin arr where showLin arr = "[" ++ concat (intersperse ", " [ unwords (map showFSymbol (Array.elems r)) | r <- Array.elems arr]) ++ "]" showFSymbol (FSymCat i j) = showCat (cs!!j) ++ "_" ++ show j ++ "." ++ show i |
