1
0
forked from GitHub/gf-core

Fixed several things, e.g. tokenizer.

This commit is contained in:
aarne
2003-11-03 16:27:55 +00:00
parent 2728e6e7ce
commit 94326929b1
18 changed files with 133 additions and 69 deletions

View File

@@ -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