summaryrefslogtreecommitdiff
path: root/src/GF/Speech/PrGSL.hs
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2007-06-27 09:07:51 +0000
committerbringert <bringert@cs.chalmers.se>2007-06-27 09:07:51 +0000
commit43128f80e62e2157e67c5ef1b7a08755f337460d (patch)
tree2c161ec704c7bf9253d1ae71579da6bf7ec81ac4 /src/GF/Speech/PrGSL.hs
parent48b477037d7fc8fcbbf548c72bab654cc967a094 (diff)
Limit GSL/JSGF/SRGS ABNF grammar line width to 80.
Diffstat (limited to 'src/GF/Speech/PrGSL.hs')
-rw-r--r--src/GF/Speech/PrGSL.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GF/Speech/PrGSL.hs b/src/GF/Speech/PrGSL.hs
index a8e430ac3..f1fb9013c 100644
--- a/src/GF/Speech/PrGSL.hs
+++ b/src/GF/Speech/PrGSL.hs
@@ -34,8 +34,12 @@ import Data.Char (toUpper,toLower)
import Data.List (partition)
import Text.PrettyPrint.HughesPJ
+width :: Int
+width = 80
+
gslPrinter :: Options -> StateGrammar -> String
-gslPrinter opts s = show $ prGSL $ makeSimpleSRG opts s
+gslPrinter opts s = renderStyle st $ prGSL $ makeSimpleSRG opts s
+ where st = style { lineLength = width }
prGSL :: SRG -> Doc
prGSL (SRG{grammarName=name,startCat=start,origStartCat=origStart,rules=rs})