From 13191ac15504efc3a45777fb28d594106582f827 Mon Sep 17 00:00:00 2001 From: bjorn Date: Thu, 25 Sep 2008 11:49:00 +0000 Subject: Added --output-format=regular. --- src/GF/Speech/PGFToCFG.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/GF/Speech') 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) -- cgit v1.2.3