From 4fd0c636f8590bf800715f2598e54ccc22c99b90 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 8 Feb 2005 15:35:58 +0000 Subject: unlexer concat --- src/GF/UseGrammar/Custom.hs | 2 ++ src/GF/UseGrammar/Randomized.hs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/GF/UseGrammar') diff --git a/src/GF/UseGrammar/Custom.hs b/src/GF/UseGrammar/Custom.hs index 4ec37d1ae..12b9b2ca9 100644 --- a/src/GF/UseGrammar/Custom.hs +++ b/src/GF/UseGrammar/Custom.hs @@ -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) diff --git a/src/GF/UseGrammar/Randomized.hs b/src/GF/UseGrammar/Randomized.hs index 200e69104..d2e26a18b 100644 --- a/src/GF/UseGrammar/Randomized.hs +++ b/src/GF/UseGrammar/Randomized.hs @@ -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 -- cgit v1.2.3