diff options
| author | aarne <aarne@cs.chalmers.se> | 2006-06-20 15:05:22 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2006-06-20 15:05:22 +0000 |
| commit | a75c3b1907a814e63cdff9cc045bdcaabe055b8f (patch) | |
| tree | 1b8d587c49fb67a41c68e3c4b8ff80e12c327df6 /src/GF/UseGrammar/Parsing.hs | |
| parent | 402a113b567a96eef61946552b68df6ac6eb6712 (diff) | |
resource.txt updates ; lock field and lookup book fixes
Diffstat (limited to 'src/GF/UseGrammar/Parsing.hs')
| -rw-r--r-- | src/GF/UseGrammar/Parsing.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/GF/UseGrammar/Parsing.hs b/src/GF/UseGrammar/Parsing.hs index e979579c9..65ed26863 100644 --- a/src/GF/UseGrammar/Parsing.hs +++ b/src/GF/UseGrammar/Parsing.hs @@ -83,7 +83,8 @@ parseStringC opts0 sg cat s t:_ -> t _ -> [] ---- no support for undet. tok. ts <- checkErr $ New.parse algorithm strategy (pInfo sg) (absId sg) cat toks - ts' <- mapM (checkErr . annotate (stateGrammarST sg) . refreshMetas []) ts + ts' <- checkErr $ + allChecks $ map (annotate (stateGrammarST sg) . refreshMetas []) ts return $ optIntOrAll opts flagNumber ts' @@ -115,7 +116,8 @@ trees2trms opts sg cn as ts0 info = do ) (ts1,ss) <- checkErr $ mapErrN 1 postParse ts01 if null ts1 then raise ss else return () - ts2 <- mapM (checkErr . annotate gr . refreshMetas [] . trExp) ts1 ---- + ts2 <- checkErr $ + allChecks $ map (annotate gr . refreshMetas [] . trExp) ts1 ---- if forgive then return ts2 else do let tsss = [(t, allLinsOfTree gr cn t) | t <- ts2] ps = [t | (t,ss) <- tsss, @@ -127,7 +129,6 @@ trees2trms opts sg cn as ts0 info = do unlines (nub (map sstr (concatMap snd tsss))) else "" else return ps - if verb then checkWarn $ " the token list" +++ show as ++++ unknownWords sg as +++++ info else return () @@ -140,6 +141,8 @@ trees2trms opts sg cn as ts0 info = do verb = oElem beVerbose opts forgive = oElem forgiveParse opts +---- Operatins.allChecks :: ErrorMonad m => [m a] -> m [a] + unknownWords sg ts = case filter noMatch [t | t@(TS _) <- ts] of [] -> "where all words are known" us -> "with the unknown tokens" +++ show us --- needs to be fixed for literals |
