diff options
| author | bringert <bringert@cs.chalmers.se> | 2007-06-27 14:25:39 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2007-06-27 14:25:39 +0000 |
| commit | 2ff350ae59816ee86fb1508d3ffbe83578b7c9d4 (patch) | |
| tree | 2c86dddd0df21391e1355f2eace69bb57873f567 /src/GF/Speech/PrGSL.hs | |
| parent | e7787025f657565d59d91e956260ae961b80f1e9 (diff) | |
Use shorter lines and paragraph-filling in SRGS, JSGF and GSL printing.
Diffstat (limited to 'src/GF/Speech/PrGSL.hs')
| -rw-r--r-- | src/GF/Speech/PrGSL.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/GF/Speech/PrGSL.hs b/src/GF/Speech/PrGSL.hs index f1fb9013c..4d2dfe5c6 100644 --- a/src/GF/Speech/PrGSL.hs +++ b/src/GF/Speech/PrGSL.hs @@ -35,7 +35,7 @@ import Data.List (partition) import Text.PrettyPrint.HughesPJ width :: Int -width = 80 +width = 75 gslPrinter :: Options -> StateGrammar -> String gslPrinter opts s = renderStyle st $ prGSL $ makeSimpleSRG opts s @@ -63,13 +63,13 @@ prItem = f f (REUnion xs) = (if null es then empty else text "?") <> union (map f nes) where (es,nes) = partition isEpsilon xs f (REConcat [x]) = f x - f (REConcat xs) = text "(" <> sep (map f xs) <> text ")" + f (REConcat xs) = text "(" <> fsep (map f xs) <> text ")" f (RERepeat x) = text "*" <> f x f (RESymbol s) = prSymbol s union :: [Doc] -> Doc union [x] = x -union xs = text "[" <> sep xs <> text "]" +union xs = text "[" <> fsep xs <> text "]" prSymbol :: Symbol SRGNT Token -> Doc prSymbol (Cat (c,_)) = prCat c |
