diff options
| author | krasimir <krasimir@chalmers.se> | 2010-06-22 11:29:20 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-06-22 11:29:20 +0000 |
| commit | a6b8c1190545fb219330073defaf63caecdaf567 (patch) | |
| tree | e486a46f7e5801e3b961e55590bc786ae23374ae | |
| parent | 3714a7e3b402d02e3cf3ebdc94b8171cbceb5a33 (diff) | |
fix the compilation of literal categories in GeneratePMCFG.hs
| -rw-r--r-- | src/compiler/GF/Compile/GeneratePMCFG.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index e4437b443..45ec2d25a 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -449,8 +449,11 @@ emptyGrammarEnv gr (m,mo) = let (last_id,catSet) = Map.mapAccumWithKey computeCatRange 0 lincats in GrammarEnv last_id (IntMap.singleton 0 catSet) Map.empty Map.empty Map.empty IntMap.empty where - computeCatRange index cat ctype = - (index+size,(index,index+size-1,PFCat 0 cat schema)) + computeCatRange index cat ctype + | cat == cString = (index,(fcatString,fcatString,PFCat 0 cat (CRec [(theLinLabel,Identity (CStr 0))]))) + | cat == cInt = (index,(fcatInt, fcatInt, PFCat 0 cat (CRec [(theLinLabel,Identity (CStr 0))]))) + | cat == cFloat = (index,(fcatFloat, fcatFloat, PFCat 0 cat (CRec [(theLinLabel,Identity (CStr 0))]))) + | otherwise = (index+size,(index,index+size-1,PFCat 0 cat schema)) where ((_,size),schema) = compute (0,1) ctype |
