From 32508e37b37a0baad884e6aaa518071b62e1e6d8 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 2 Mar 2006 17:19:36 +0000 Subject: treebanks in shell state: i -treebank and lt --- src/GF/CF/CFIdent.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/GF/CF') diff --git a/src/GF/CF/CFIdent.hs b/src/GF/CF/CFIdent.hs index df12be0f8..02ee482c0 100644 --- a/src/GF/CF/CFIdent.hs +++ b/src/GF/CF/CFIdent.hs @@ -238,14 +238,16 @@ compatCF (CFCat (CIQ _ c, l)) (CFCat (CIQ _ c', l')) = c==c' && l==l' -- instead of break wordsLits [] = [] wordsLits (c:cs) | isSpace c = wordsLits (dropWhile isSpace cs) - | c == '\'' || c == '"' + | isQuote c = let (l,rs) = breaks (==c) cs rs' = drop 1 rs in ([c]++l++[c]):wordsLits rs' - | otherwise = let (w,rs) = break isSpace cs + | otherwise = let (w,rs) = break isSpaceQ cs in (c:w):wordsLits rs where breaks c cs = case break c cs of (l@(_:_),d:rs) | last l == '\\' -> let (r,ts) = breaks c rs in (l++[d]++r, ts) v -> v + isQuote c = elem c "\"'" + isSpaceQ c = isSpace c ---- || isQuote c -- cgit v1.2.3