mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-06 17:52:51 -06:00
SISR: constants from conversion=finite now produce abstract syntax nodes instead of strings.
This commit is contained in:
@@ -72,7 +72,7 @@ cfgToCFRules cfg =
|
|||||||
nameToTerm (Name f prs) = CFObj f (map profileToTerm prs)
|
nameToTerm (Name f prs) = CFObj f (map profileToTerm prs)
|
||||||
profileToTerm (Unify []) = CFMeta
|
profileToTerm (Unify []) = CFMeta
|
||||||
profileToTerm (Unify xs) = CFRes (last xs) -- FIXME: unify
|
profileToTerm (Unify xs) = CFRes (last xs) -- FIXME: unify
|
||||||
profileToTerm (Constant f) = CFConst (maybe "?" prIdent (forestName f))
|
profileToTerm (Constant f) = maybe CFMeta (\x -> CFObj x []) (forestName f)
|
||||||
|
|
||||||
-- | Remove productions which use categories which have no productions
|
-- | Remove productions which use categories which have no productions
|
||||||
removeEmptyCats :: CFRules -> CFRules
|
removeEmptyCats :: CFRules -> CFRules
|
||||||
|
|||||||
Reference in New Issue
Block a user