summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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)