mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
"Committed_by_peb"
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
-- Stability : (stable)
|
-- Stability : (stable)
|
||||||
-- Portability : (portable)
|
-- Portability : (portable)
|
||||||
--
|
--
|
||||||
-- > CVS $Date: 2005/05/09 09:28:43 $
|
-- > CVS $Date: 2005/05/10 12:52:06 $
|
||||||
-- > CVS $Author: peb $
|
-- > CVS $Author: peb $
|
||||||
-- > CVS $Revision: 1.6 $
|
-- > CVS $Revision: 1.7 $
|
||||||
--
|
--
|
||||||
-- Converting GFC to SimpleGFC
|
-- Converting GFC to SimpleGFC
|
||||||
--
|
--
|
||||||
@@ -116,7 +116,8 @@ convertTerm gram (A.K (A.KS tok)) = Token tok
|
|||||||
-- 'pre' tokens are converted to variants (over-generating):
|
-- 'pre' tokens are converted to variants (over-generating):
|
||||||
convertTerm gram (A.K (A.KP strs vars))
|
convertTerm gram (A.K (A.KP strs vars))
|
||||||
= variants $ map conc $ strs : [ vs | A.Var vs _ <- vars ]
|
= variants $ map conc $ strs : [ vs | A.Var vs _ <- vars ]
|
||||||
where conc = foldr1 (?++) . map Token
|
where conc [] = Empty
|
||||||
|
conc ts = foldr1 (?++) $ map Token ts
|
||||||
convertTerm gram (A.I con) = error "GFCtoSimple.convertTerm: cannot handle 'I' constructor"
|
convertTerm gram (A.I con) = error "GFCtoSimple.convertTerm: cannot handle 'I' constructor"
|
||||||
convertTerm gram (A.EInt int) = error "GFCtoSimple.convertTerm: cannot handle 'EInt' constructor"
|
convertTerm gram (A.EInt int) = error "GFCtoSimple.convertTerm: cannot handle 'EInt' constructor"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user