summaryrefslogtreecommitdiff
path: root/src/GF/UseGrammar/Linear.hs
diff options
context:
space:
mode:
authoraarne <unknown>2003-11-03 16:27:55 +0000
committeraarne <unknown>2003-11-03 16:27:55 +0000
commit94326929b144913642121bef8f8ecc98feb992e7 (patch)
tree07d59cc33cbef2ac79c6f3f573b9718c51322e7a /src/GF/UseGrammar/Linear.hs
parent2728e6e7ceec92c7f781368b4a523b37e5dee3b9 (diff)
Fixed several things, e.g. tokenizer.
Diffstat (limited to 'src/GF/UseGrammar/Linear.hs')
-rw-r--r--src/GF/UseGrammar/Linear.hs8
1 files changed, 6 insertions, 2 deletions
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