diff options
Diffstat (limited to 'src/compiler')
| -rw-r--r-- | src/compiler/GF/Compile/GeneratePMCFG.hs | 6 | ||||
| -rw-r--r-- | src/compiler/GF/Speech/PGFToCFG.hs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index 45ec2d25a..aeed3947a 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -450,9 +450,9 @@ emptyGrammarEnv gr (m,mo) = in GrammarEnv last_id (IntMap.singleton 0 catSet) Map.empty Map.empty Map.empty IntMap.empty where 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))]))) + | cat == cString = (index,(fidString,fidString,PFCat 0 cat (CRec [(theLinLabel,Identity (CStr 0))]))) + | cat == cInt = (index,(fidInt, fidInt, PFCat 0 cat (CRec [(theLinLabel,Identity (CStr 0))]))) + | cat == cFloat = (index,(fidFloat, fidFloat, 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 diff --git a/src/compiler/GF/Speech/PGFToCFG.hs b/src/compiler/GF/Speech/PGFToCFG.hs index b28582499..cead72f40 100644 --- a/src/compiler/GF/Speech/PGFToCFG.hs +++ b/src/compiler/GF/Speech/PGFToCFG.hs @@ -70,7 +70,7 @@ pgfToCFG pgf lang = mkCFG (showCId (lookStartCat pgf)) extCats (startRules ++ co startRules :: [CFRule] startRules = [CFRule (showCId c) [NonTerminal (fcatToCat fc r)] (CFRes 0) | (c,CncCat s e lbls) <- Map.toList (cnccats cnc), - fc <- range (s,e), not (isLiteralFCat fc), + fc <- range (s,e), not (isPredefFId fc), r <- [0..catLinArity fc-1]] ruleToCFRule :: (FId,Production) -> [CFRule] @@ -86,7 +86,7 @@ pgfToCFG pgf lang = mkCFG (showCId (lookStartCat pgf)) extCats (startRules ++ co mkRhs = concatMap symbolToCFSymbol . Array.elems containsLiterals :: Array DotPos Symbol -> Bool - containsLiterals row = any isLiteralFCat [args!!n | SymCat n _ <- Array.elems row] || + containsLiterals row = any isPredefFId [args!!n | SymCat n _ <- Array.elems row] || not (null [n | SymLit n _ <- Array.elems row]) -- only this is needed for PMCFG. -- The first line is for backward compat. |
