1
0
forked from GitHub/gf-core

SISR: constants from conversion=finite now produce abstract syntax nodes instead of strings.

This commit is contained in:
bringert
2007-01-03 22:57:20 +00:00
parent bf8b078a7a
commit 7577149241

View File

@@ -72,7 +72,7 @@ cfgToCFRules cfg =
nameToTerm (Name f prs) = CFObj f (map profileToTerm prs)
profileToTerm (Unify []) = CFMeta
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
removeEmptyCats :: CFRules -> CFRules