diff options
| author | bjorn <bjorn@bringert.net> | 2008-09-25 11:49:00 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-09-25 11:49:00 +0000 |
| commit | 13191ac15504efc3a45777fb28d594106582f827 (patch) | |
| tree | 143297f2d3d5701fb2bfaefc155c08101a76a804 /src/GF/Speech | |
| parent | 7a5e2a15bd725306e8d08a94026aef18436195bb (diff) | |
Added --output-format=regular.
Diffstat (limited to 'src/GF/Speech')
| -rw-r--r-- | src/GF/Speech/PGFToCFG.hs | 5 |
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) |
