summaryrefslogtreecommitdiff
path: root/src/GF/Speech/TransformCFG.hs
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2007-01-05 14:34:20 +0000
committerbringert <bringert@cs.chalmers.se>2007-01-05 14:34:20 +0000
commit741dde5a2a00dc737e570a7005663c2534ea4f6d (patch)
tree6aebd85fc4d9417a0bb3fbfb450fcf3ea72101b8 /src/GF/Speech/TransformCFG.hs
parent2b1c6763cc29857ba2890a12eb4330f6e03edd06 (diff)
Change input to the different SRG printers to be StateGrammar instead of CGrammar. This to allow looking at the types in SISR, and to reduce the number of argument passed from Custom.
Diffstat (limited to 'src/GF/Speech/TransformCFG.hs')
-rw-r--r--src/GF/Speech/TransformCFG.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/GF/Speech/TransformCFG.hs b/src/GF/Speech/TransformCFG.hs
index 57563af19..923e90d7c 100644
--- a/src/GF/Speech/TransformCFG.hs
+++ b/src/GF/Speech/TransformCFG.hs
@@ -32,6 +32,7 @@ import GF.Infra.Ident
import GF.Infra.Option
import GF.Infra.Print
import GF.Speech.Relation
+import GF.Compile.ShellState (StateGrammar, stateCFG)
import Control.Monad
import Control.Monad.State (State, get, put, evalState)
@@ -63,11 +64,12 @@ type CFSymbol_ = Symbol Cat_ Token
type CFRules = [(Cat_,[CFRule_])]
-cfgToCFRules :: CGrammar -> CFRules
-cfgToCFRules cfg =
+cfgToCFRules :: StateGrammar -> CFRules
+cfgToCFRules s =
groupProds [CFRule (catToString c) (map symb r) (nameToTerm n)
| CFRule c r n <- cfg]
- where symb = mapSymbol catToString id
+ where cfg = stateCFG s
+ symb = mapSymbol catToString id
catToString = prt
nameToTerm (Name f prs) = CFObj f (map profileToTerm prs)
profileToTerm (Unify []) = CFMeta