From be200897b8f56b1d8c96cfda6ecfbc21863473a0 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 20 Sep 2006 15:19:44 +0000 Subject: brute force parsing method in RunGFCC --- src/GF/Canon/GFCC/RunGFCC.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/GF/Canon/GFCC/RunGFCC.hs') diff --git a/src/GF/Canon/GFCC/RunGFCC.hs b/src/GF/Canon/GFCC/RunGFCC.hs index 704b6ced8..a013d7ccb 100644 --- a/src/GF/Canon/GFCC/RunGFCC.hs +++ b/src/GF/Canon/GFCC/RunGFCC.hs @@ -33,6 +33,10 @@ treat grammar s = case words s of "gr":cat:n:_ -> do gen <- newStdGen mapM_ prlins $ take (read n) $ generateRandom gen grammar (CId cat) + "p":cat:ws -> do + case parse grammar (CId cat) ws of + t:_ -> prlins t + _ -> putStrLn "no parse found" _ -> lins $ readExp s where lins t = mapM_ (lin t) $ cncnames grammar -- cgit v1.2.3