summaryrefslogtreecommitdiff
path: root/src/GF/Speech/PrRegExp.hs
blob: 50156c42baad006048e9a8f29bb2b62817b0d7f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
----------------------------------------------------------------------
-- |
-- 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.Infra.Option (Options)
import GF.Speech.CFGToFiniteState
import GF.Speech.RegExp
import GF.Compile.ShellState (StateGrammar)


regexpPrinter :: Options -> StateGrammar -> String
regexpPrinter opts s = prRE $ dfa2re $ cfgToFA opts s