diff options
| author | krasimir <krasimir@chalmers.se> | 2010-01-05 08:35:33 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-01-05 08:35:33 +0000 |
| commit | ee3ce9694c134d697bf3fa6b8910c7d863f84dab (patch) | |
| tree | 408e9d0b6e89db9a2cec05dcb460910f958a91c6 /src/compiler/GF/Speech | |
| parent | 3ed19a482e796b0a62d234ec9ffd1981d5fee64e (diff) | |
store the label names in PMCFG
Diffstat (limited to 'src/compiler/GF/Speech')
| -rw-r--r-- | src/compiler/GF/Speech/PGFToCFG.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/GF/Speech/PGFToCFG.hs b/src/compiler/GF/Speech/PGFToCFG.hs index a9bb20ef6..bd27deadf 100644 --- a/src/compiler/GF/Speech/PGFToCFG.hs +++ b/src/compiler/GF/Speech/PGFToCFG.hs @@ -42,8 +42,8 @@ pgfToCFG pgf lang = mkCFG (showCId (lookStartCat pgf)) extCats (startRules ++ co fcatCats :: Map FCat Cat fcatCats = Map.fromList [(fc, showCId c ++ "_" ++ show i) - | (c,fcs) <- Map.toList (startCats pinfo), - (fc,i) <- zip (range fcs) [1..]] + | (c,(s,e,lbls)) <- Map.toList (startCats pinfo), + (fc,i) <- zip (range (s,e)) [1..]] fcatCat :: FCat -> Cat fcatCat c = Map.findWithDefault ("Unknown_" ++ show c) c fcatCats @@ -69,8 +69,8 @@ pgfToCFG pgf lang = mkCFG (showCId (lookStartCat pgf)) extCats (startRules ++ co startRules :: [CFRule] startRules = [CFRule (showCId c) [NonTerminal (fcatToCat fc r)] (CFRes 0) - | (c,fcs) <- Map.toList (startCats pinfo), - fc <- range fcs, not (isLiteralFCat fc), + | (c,(s,e,lbls)) <- Map.toList (startCats pinfo), + fc <- range (s,e), not (isLiteralFCat fc), r <- [0..catLinArity fc-1]] fruleToCFRule :: (FCat,Production) -> [CFRule] |
