mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-11 12:12:51 -06:00
22 lines
615 B
Haskell
22 lines
615 B
Haskell
----------------------------------------------------------------------
|
|
-- |
|
|
-- 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
|