diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-12-13 22:05:14 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-12-13 22:05:14 +0000 |
| commit | ed5a85ce1d48e8a8c4c151c19b5dc3adf55ce4cb (patch) | |
| tree | 50932c944af3e5a32e995efd4ca6927c94244a22 /src/GF/Devel/Compile | |
| parent | b447cf1a047a6f6e1c4945e809bffa57c88a08af (diff) | |
removed gfcc via gfc everywhere; workaround for russian in present
Diffstat (limited to 'src/GF/Devel/Compile')
| -rw-r--r-- | src/GF/Devel/Compile/GFtoGFCC.hs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/GF/Devel/Compile/GFtoGFCC.hs b/src/GF/Devel/Compile/GFtoGFCC.hs index aaa55c895..3fc3331de 100644 --- a/src/GF/Devel/Compile/GFtoGFCC.hs +++ b/src/GF/Devel/Compile/GFtoGFCC.hs @@ -15,10 +15,11 @@ import GF.Devel.Grammar.PrGF --import GF.Devel.ModDeps import GF.Infra.Ident +import GF.Devel.PrintGFCC import qualified GF.GFCC.Macros as CM -import qualified GF.GFCC.AbsGFCC as C +import qualified GF.GFCC.DataGFCC as C import qualified GF.GFCC.DataGFCC as D - +import GF.GFCC.Raw.AbsGFCCRaw (CId (..)) import GF.Infra.Option ---- import GF.Data.Operations import GF.Text.UTF8 @@ -31,7 +32,7 @@ import Debug.Trace ---- -- the main function: generate GFCC from GF. prGrammar2gfcc :: Options -> String -> GF -> (String,String) -prGrammar2gfcc opts cnc gr = (abs, D.printGFCC gc) where +prGrammar2gfcc opts cnc gr = (abs, printGFCC gc) where (abs,gc) = mkCanon2gfcc opts cnc gr mkCanon2gfcc :: Options -> String -> GF -> (String,D.GFCC) @@ -57,9 +58,9 @@ canon2gfcc opts pars cgr = an = (i2i a) cns = map (i2i . fst) cms abs = D.Abstr aflags funs cats catfuns - gflags = Map.fromList [(C.CId fg,x) | Just x <- [getOptVal opts (aOpt fg)]] + gflags = Map.fromList [(CId fg,x) | Just x <- [getOptVal opts (aOpt fg)]] where fg = "firstlang" - aflags = Map.fromList [(C.CId f,x) | (IC f,x) <- Map.toList (M.mflags abm)] + aflags = Map.fromList [(CId f,x) | (IC f,x) <- Map.toList (M.mflags abm)] mkDef pty = case pty of Meta _ -> CM.primNotion t -> mkExp t @@ -80,7 +81,7 @@ canon2gfcc opts pars cgr = (lang,D.Concr flags lins opers lincats lindefs printnames params) where js = listJudgements mo - flags = Map.fromList [(C.CId f,x) | (IC f,x) <- Map.toList (M.mflags mo)] + flags = Map.fromList [(CId f,x) | (IC f,x) <- Map.toList (M.mflags mo)] opers = Map.fromAscList [] -- opers will be created as optimization utf = if elem (IC "coding","utf8") (Map.assocs (M.mflags mo)) ---- then D.convertStringsInTerm decodeUTF8 else id @@ -96,8 +97,8 @@ canon2gfcc opts pars cgr = params = Map.fromAscList [(i2i c, pars lang0 c) | (c,ju) <- js, jform ju == JLincat] ---- c ?? -i2i :: Ident -> C.CId -i2i = C.CId . prIdent +i2i :: Ident -> CId +i2i = CId . prIdent mkType :: A.Type -> C.Type mkType t = case GM.typeForm t of |
