summaryrefslogtreecommitdiff
path: root/src/GF/Speech/PrJSGF.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/PrJSGF.hs
parent48b477037d7fc8fcbbf548c72bab654cc967a094 (diff)
Limit GSL/JSGF/SRGS ABNF grammar line width to 80.
Diffstat (limited to 'src/GF/Speech/PrJSGF.hs')
-rw-r--r--src/GF/Speech/PrJSGF.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GF/Speech/PrJSGF.hs b/src/GF/Speech/PrJSGF.hs
index 72910235e..ec1305b5d 100644
--- a/src/GF/Speech/PrJSGF.hs
+++ b/src/GF/Speech/PrJSGF.hs
@@ -38,11 +38,14 @@ import Data.Maybe
import Text.PrettyPrint.HughesPJ
import Debug.Trace
+width :: Int
+width = 80
jsgfPrinter :: Maybe SISRFormat
-> Options
-> StateGrammar -> String
-jsgfPrinter sisr opts s = show $ prJSGF sisr $ makeSimpleSRG opts s
+jsgfPrinter sisr opts s = renderStyle st $ prJSGF sisr $ makeSimpleSRG opts s
+ where st = style { lineLength = width }
prJSGF :: Maybe SISRFormat -> SRG -> Doc
prJSGF sisr srg@(SRG{grammarName=name,grammarLanguage=ml,