summaryrefslogtreecommitdiff
path: root/src/GF/CF
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-03-02 17:19:36 +0000
committeraarne <aarne@cs.chalmers.se>2006-03-02 17:19:36 +0000
commit32508e37b37a0baad884e6aaa518071b62e1e6d8 (patch)
tree9400875b1959d136da85bfb66de693ca18f66d70 /src/GF/CF
parent35aac815db52ecdb6fd12e61139d3a74545cac6d (diff)
treebanks in shell state: i -treebank and lt
Diffstat (limited to 'src/GF/CF')
-rw-r--r--src/GF/CF/CFIdent.hs6
1 files changed, 4 insertions, 2 deletions
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