summaryrefslogtreecommitdiff
path: root/src/GF/Speech
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Speech')
-rw-r--r--src/GF/Speech/PGFToCFG.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GF/Speech/PGFToCFG.hs b/src/GF/Speech/PGFToCFG.hs
index e455f6869..d52c8807c 100644
--- a/src/GF/Speech/PGFToCFG.hs
+++ b/src/GF/Speech/PGFToCFG.hs
@@ -4,7 +4,7 @@
--
-- Approximates PGF grammars with context-free grammars.
----------------------------------------------------------------------
-module GF.Speech.PGFToCFG (bnfPrinter, fcfgPrinter, pgfToCFG) where
+module GF.Speech.PGFToCFG (bnfPrinter, regularPrinter, fcfgPrinter, pgfToCFG) where
import PGF.CId
import PGF.Data as PGF
@@ -23,6 +23,9 @@ import qualified Data.Set as Set
bnfPrinter :: PGF -> CId -> String
bnfPrinter pgf cnc = prCFG $ pgfToCFG pgf cnc
+regularPrinter :: PGF -> CId -> String
+regularPrinter pgf cnc = prCFG $ makeSimpleRegular $ pgfToCFG pgf cnc
+
-- FIXME: move this somewhere else
fcfgPrinter :: PGF -> CId -> String
fcfgPrinter pgf cnc = unlines (map showRule rules)