diff options
| author | bringert <bringert@cs.chalmers.se> | 2006-12-15 16:09:58 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2006-12-15 16:09:58 +0000 |
| commit | 215bf61115a1b78c6466830c89574091459bebdb (patch) | |
| tree | 0c54ecb6ae408f316fea227ca6e202930fab5929 /src/GF/Speech/PrRegExp.hs | |
| parent | 1e1401472fdc55ba8f208baa7f07e2a4a3cb906c (diff) | |
Towards smaller SRGs when lots of variants are used.
Diffstat (limited to 'src/GF/Speech/PrRegExp.hs')
| -rw-r--r-- | src/GF/Speech/PrRegExp.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/GF/Speech/PrRegExp.hs b/src/GF/Speech/PrRegExp.hs new file mode 100644 index 000000000..c0aadab00 --- /dev/null +++ b/src/GF/Speech/PrRegExp.hs @@ -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 |
