mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 08:12:51 -06:00
Towards smaller SRGs when lots of variants are used.
This commit is contained in:
21
src/GF/Speech/PrRegExp.hs
Normal file
21
src/GF/Speech/PrRegExp.hs
Normal 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
|
||||
Reference in New Issue
Block a user