From 284f382d7a28aa219f76b718f4a4d8b37e55a6c1 Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 19 Aug 2009 22:35:57 +0000 Subject: [PATCH] the parsing test now evaluates all languages --- testsuite/runtime/parser/Parse.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testsuite/runtime/parser/Parse.hs b/testsuite/runtime/parser/Parse.hs index 4a828301d..4d23d6b85 100644 --- a/testsuite/runtime/parser/Parse.hs +++ b/testsuite/runtime/parser/Parse.hs @@ -7,7 +7,11 @@ import Control.Monad main = do pgf <- readPGF "grammar.pgf" ts <- fmap (map (fromJust . readTree) . lines) $ readFile "trees.txt" - ss <- foldM (doTest pgf (mkCId "LangGer") (fromJust (readType "Phr"))) [] ts + mapM_ (\l -> doTestLang pgf l ts) (languages pgf) + +doTestLang pgf l ts = do + hPutStrLn stderr (show l) + ss <- foldM (doTest pgf l (fromJust (readType "Phr"))) [] ts mapM_ (hPutStrLn stderr . show) [(fromIntegral s / fromIntegral n)/1000000000 | (s,n) <- ss] putStrLn "Done."