From 94326929b144913642121bef8f8ecc98feb992e7 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 3 Nov 2003 16:27:55 +0000 Subject: Fixed several things, e.g. tokenizer. --- src/GF/UseGrammar/Linear.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/GF/UseGrammar/Linear.hs') diff --git a/src/GF/UseGrammar/Linear.hs b/src/GF/UseGrammar/Linear.hs index 929273562..a46200b36 100644 --- a/src/GF/UseGrammar/Linear.hs +++ b/src/GF/UseGrammar/Linear.hs @@ -12,7 +12,7 @@ import LookAbs import MMacros import TypeCheck (annotate) ---- import Str -import Unlex +import Text ----import TypeCheck -- to annotate import Operations @@ -105,10 +105,14 @@ linLab0 = L (identC "s") sTables2strs :: [[([Patt],[Str])]] -> [[Str]] sTables2strs = map snd . concat --- from this, to get a list of strings --- customize unlexer +-- from this, to get a list of strings strs2strings :: [[Str]] -> [String] strs2strings = map unlex +-- this is just unwords; use an unlexer from Text to postprocess +unlex :: [Str] -> String +unlex = performBinds . concat . map sstr . take 1 ---- + -- finally, a top-level function to get a string from an expression linTree2string :: Marker -> CanonGrammar -> Ident -> A.Tree -> String linTree2string mk gr m e = err id id $ do -- cgit v1.2.3