summaryrefslogtreecommitdiff
path: root/src/GF/CF
diff options
context:
space:
mode:
authoraarne <unknown>2005-04-17 18:48:34 +0000
committeraarne <unknown>2005-04-17 18:48:34 +0000
commit1323b7406376c72f40b1e561e079f8824f79aabf (patch)
tree177d464f38a2bb65d6f161bc2568c87c408c9c4f /src/GF/CF
parentdf4f4bcd6fa052d476adc6bc9848d29d954a1b34 (diff)
defLinType and pr no s label
Diffstat (limited to 'src/GF/CF')
-rw-r--r--src/GF/CF/CFtoGrammar.hs8
-rw-r--r--src/GF/CF/PPrCF.hs10
2 files changed, 10 insertions, 8 deletions
diff --git a/src/GF/CF/CFtoGrammar.hs b/src/GF/CF/CFtoGrammar.hs
index 5ccbd7c1a..4670a6b80 100644
--- a/src/GF/CF/CFtoGrammar.hs
+++ b/src/GF/CF/CFtoGrammar.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/02/18 19:21:07 $
--- > CVS $Author: peb $
--- > CVS $Revision: 1.5 $
+-- > CVS $Date: 2005/04/17 19:48:34 $
+-- > CVS $Author: aarne $
+-- > CVS $Revision: 1.6 $
--
-- 26\/1\/2000 -- 18\/4 -- 24\/3\/2004
-----------------------------------------------------------------------------
@@ -36,7 +36,7 @@ cf2grammar cf = concatMap S.trAnyDef (abs ++ conc) where
conc = lintypes ++ lins
cats = [(cat, AbsCat (yes []) (yes [])) |
cat <- nub (concat (map cf2cat rules))] ----notPredef cat
- lintypes = [] ----[(cat, CncCat (yes) nope Nothing) | (cat,AbsCat _ _) <- cats]
+ lintypes = [(cat, CncCat (yes defLinType) nope nope) | (cat,AbsCat _ _) <- cats]
(funs,lins) = unzip (map cf2rule rules)
cf2cat :: CFRule -> [Ident]
diff --git a/src/GF/CF/PPrCF.hs b/src/GF/CF/PPrCF.hs
index cd91fa4da..fcfeeb61b 100644
--- a/src/GF/CF/PPrCF.hs
+++ b/src/GF/CF/PPrCF.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/02/18 19:21:07 $
--- > CVS $Author: peb $
--- > CVS $Revision: 1.9 $
+-- > CVS $Date: 2005/04/17 19:48:34 $
+-- > CVS $Author: aarne $
+-- > CVS $Revision: 1.10 $
--
-- printing and parsing CF grammars, rules, and trees AR 26/1/2000 -- 9/6/2003
--
@@ -48,7 +48,9 @@ prCFFun' profs (CFFun (t, p)) = prt_ t ++ pp p where
normal p = and [x==y && null b | ((b,x),y) <- zip p (map (:[]) [0..])]
prCFCat :: CFCat -> String
-prCFCat (CFCat (c,l)) = prt_ c ++ "-" ++ prt_ l ----
+prCFCat (CFCat (c,l)) = prt_ c ++ case prt_ l of
+ "s" -> []
+ _ -> "-" ++ prt_ l ----
prCFItem :: CFItem -> String
prCFItem (CFNonterm c) = prCFCat c