unlexer concat

This commit is contained in:
aarne
2005-02-08 15:35:58 +00:00
parent b9a2d6c5c3
commit 56c80bf8d9
22 changed files with 251 additions and 62 deletions

View File

@@ -75,6 +75,7 @@ import MoreCustom -- either small/ or big/. The one in Small is empty.
import UseIO
import Monad
import Char
-- character codings
import Unicode
@@ -365,6 +366,7 @@ customUntokenizer =
(strCI "unwords", const $ id) -- DEFAULT
,(strCI "text", const $ formatAsText)
,(strCI "code", const $ formatAsCode)
,(strCI "concat", const $ filter (not . isSpace))
,(strCI "textlit", const $ formatAsTextLit)
,(strCI "codelit", const $ formatAsCodeLit)
,(strCI "concat", const $ concatRemSpace)

View File

@@ -45,7 +45,7 @@ mkTreeFromInts ints gr catfun = do
return $ loc2tree state
mkStateFromInts :: [Int] -> CGrammar -> Action
mkStateFromInts ints gr = mkRandomState ints where
mkStateFromInts ints gr z = mkRandomState ints z >>= reCheckState gr where
mkRandomState [] state = do
testErr (isCompleteState state) "not completed"
return state