summaryrefslogtreecommitdiff
path: root/src/GF
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2007-06-25 16:50:00 +0000
committerbringert <bringert@cs.chalmers.se>2007-06-25 16:50:00 +0000
commiteb9a6f7c7382f22a72c814dc4a9a68e5a558fe62 (patch)
treeb8f4f433d23ee3f3923af182f6eb57002f952359 /src/GF
parentb17e74bca5b24af410deaf68941ed37d5bfb5e92 (diff)
Added srgs_abnf_non_rec.
Diffstat (limited to 'src/GF')
-rw-r--r--src/GF/Speech/PrSRGS_ABNF.hs5
-rw-r--r--src/GF/UseGrammar/Custom.hs1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/GF/Speech/PrSRGS_ABNF.hs b/src/GF/Speech/PrSRGS_ABNF.hs
index 55d5b2c51..34f5e7731 100644
--- a/src/GF/Speech/PrSRGS_ABNF.hs
+++ b/src/GF/Speech/PrSRGS_ABNF.hs
@@ -17,7 +17,7 @@
-- FIXME: convert to UTF-8
-----------------------------------------------------------------------------
-module GF.Speech.PrSRGS_ABNF (srgsAbnfPrinter) where
+module GF.Speech.PrSRGS_ABNF (srgsAbnfPrinter, srgsAbnfNonRecursivePrinter) where
import GF.Conversion.Types
import GF.Data.Utilities
@@ -46,6 +46,9 @@ srgsAbnfPrinter :: Maybe SISRFormat
-> StateGrammar -> String
srgsAbnfPrinter sisr probs opts s = show $ prABNF sisr probs $ makeSimpleSRG opts s
+srgsAbnfNonRecursivePrinter :: Options -> StateGrammar -> String
+srgsAbnfNonRecursivePrinter opts s = show $ prABNF Nothing False $ makeNonRecursiveSRG opts s
+
prABNF :: Maybe SISRFormat -> Bool -> SRG -> Doc
prABNF sisr probs srg@(SRG{grammarName=name,grammarLanguage=ml,
startCat=start,origStartCat=origStart,rules=rs})
diff --git a/src/GF/UseGrammar/Custom.hs b/src/GF/UseGrammar/Custom.hs
index 243affe75..a358f26b3 100644
--- a/src/GF/UseGrammar/Custom.hs
+++ b/src/GF/UseGrammar/Custom.hs
@@ -256,6 +256,7 @@ customGrammarPrinter =
,(strCI "srgs_xml_prob", srgsXmlPrinter Nothing True)
,(strCI "srgs_xml_sisr_old", srgsXmlPrinter (Just SISR.SISROld) False)
,(strCI "srgs_abnf", srgsAbnfPrinter Nothing False)
+ ,(strCI "srgs_abnf_non_rec", srgsAbnfNonRecursivePrinter)
,(strCI "srgs_abnf_sisr_old", srgsAbnfPrinter (Just SISR.SISROld) False)
,(strCI "vxml", grammar2vxml)
,(strCI "slf", slfPrinter)