Towards smaller SRGs when lots of variants are used.

This commit is contained in:
bringert
2006-12-15 16:09:58 +00:00
parent 0ef8dced52
commit 160c6354c0
8 changed files with 201 additions and 83 deletions

21
src/GF/Speech/PrRegExp.hs Normal file
View File

@@ -0,0 +1,21 @@
----------------------------------------------------------------------
-- |
-- Module : PrSLF
-- Maintainer : BB
-- Stability : (stable)
-- Portability : (portable)
--
-- This module prints a grammar as a regular expression.
-----------------------------------------------------------------------------
module GF.Speech.PrRegExp (regexpPrinter) where
import GF.Conversion.Types
import GF.Infra.Ident
import GF.Speech.CFGToFiniteState
import GF.Speech.RegExp
regexpPrinter :: Ident -- ^ Grammar name
-> String -> CGrammar -> String
regexpPrinter name start cfg = prRE $ dfa2re $ cfgToFA start cfg