diff options
| author | bjorn <bjorn@bringert.net> | 2008-09-30 10:53:36 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-09-30 10:53:36 +0000 |
| commit | 794fbd4a416ef53d289545eb83455ee745115fec (patch) | |
| tree | ff46c0e83a81806df6e19dcaf2b00de4d36c525d /src | |
| parent | 3ca6c605b02b34162ce245839eb3e6d06c3d49b9 (diff) | |
Fixed CFG start cats for categories with more than one constituent.
Diffstat (limited to 'src')
| -rw-r--r-- | src/GF/Speech/PGFToCFG.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/GF/Speech/PGFToCFG.hs b/src/GF/Speech/PGFToCFG.hs index c42c5f4ff..018cb682e 100644 --- a/src/GF/Speech/PGFToCFG.hs +++ b/src/GF/Speech/PGFToCFG.hs @@ -77,11 +77,11 @@ pgfToCFG pgf lang = mkCFG (lookStartCat pgf) extCats (startRules ++ concatMap fr extCats :: Set Cat extCats = Set.fromList $ map lhsCat startRules - -- NOTE: this is only correct for cats that have a lincat with exactly one row. startRules :: [CFRule] - startRules = [CFRule (prCId c) [NonTerminal (fcatToCat fc 0)] (CFRes 0) + startRules = [CFRule (prCId c) [NonTerminal (fcatToCat fc r)] (CFRes 0) | (c,fcs) <- Map.toList (startupCats pinfo), - fc <- fcs, not (isLiteralFCat fc)] + fc <- fcs, not (isLiteralFCat fc), + r <- [0..catLinArity fc-1]] fruleToCFRule :: FRule -> [CFRule] fruleToCFRule (FRule f ps args c rhs) = |
