diff options
Diffstat (limited to 'src/GF/Speech/CFG.hs')
| -rw-r--r-- | src/GF/Speech/CFG.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/GF/Speech/CFG.hs b/src/GF/Speech/CFG.hs index 3e4db14d4..52db2827a 100644 --- a/src/GF/Speech/CFG.hs +++ b/src/GF/Speech/CFG.hs @@ -101,6 +101,10 @@ mergeIdentical g = onRules (map subst) g subst (CFRule c r n) = CFRule (substCat c) (map (mapSymbol substCat id) r) n substCat c = Map.findWithDefault (error $ "mergeIdentical: " ++ c) c m +-- | Keeps only the start category as an external category. +purgeExternalCats :: CFG -> CFG +purgeExternalCats cfg = cfg { cfgExternalCats = Set.singleton (cfgStartCat cfg) } + -- -- * Removing left recursion -- |
