mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 08:12:51 -06:00
Look at both command-line and grammar startcat falgs in pg commands.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
-- FIXME: lots of this stuff is used by CFGToFiniteState, thus
|
||||
-- the missing explicit expot list.
|
||||
module GF.Speech.TransformCFG {- (CFRule_, CFRules,
|
||||
cfgToCFRules, getStartCat,
|
||||
cfgToCFRules,
|
||||
removeLeftRecursion,
|
||||
removeEmptyCats, removeIdenticalRules) -} where
|
||||
|
||||
@@ -56,9 +56,6 @@ cfgToCFRules cfg = groupProds [CFRule (catToString c) (map symb r) n | CFRule c
|
||||
-- symb (Tok t) = Tok t
|
||||
catToString = prt
|
||||
|
||||
getStartCat :: Options -> String
|
||||
getStartCat opts = fromMaybe "S" (getOptVal opts gStartCat) ++ "{}.s"
|
||||
|
||||
-- | Group productions by their lhs categories
|
||||
groupProds :: [CFRule_] -> CFRules
|
||||
groupProds = Map.toList . Map.fromListWith (++) . map (\r -> (lhsCat r,[r]))
|
||||
|
||||
Reference in New Issue
Block a user