1
0
forked from GitHub/gf-core

Added --output-format=regular.

This commit is contained in:
bjorn
2008-09-25 11:49:00 +00:00
parent 7a5e2a15bd
commit 13191ac155
3 changed files with 7 additions and 1 deletions

View File

@@ -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)