summaryrefslogtreecommitdiff
path: root/src/GF/UseGrammar
diff options
context:
space:
mode:
authoraarne <unknown>2005-06-02 09:23:52 +0000
committeraarne <unknown>2005-06-02 09:23:52 +0000
commita38a894481aff1b658b1d86409a1eaa59c737f2e (patch)
tree7f955c733808000e1a20af013a1aa63bc11a1bbd /src/GF/UseGrammar
parentd1ce9df4643af5f27972771ad6baf4d7bc81d369 (diff)
lin rules by parsing
Diffstat (limited to 'src/GF/UseGrammar')
-rw-r--r--src/GF/UseGrammar/Parsing.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/GF/UseGrammar/Parsing.hs b/src/GF/UseGrammar/Parsing.hs
index 7620bb4ab..a9da37df5 100644
--- a/src/GF/UseGrammar/Parsing.hs
+++ b/src/GF/UseGrammar/Parsing.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/05/31 12:47:52 $
+-- > CVS $Date: 2005/06/02 10:23:52 $
-- > CVS $Author: aarne $
--- > CVS $Revision: 1.24 $
+-- > CVS $Revision: 1.25 $
--
-- (Description of the module)
-----------------------------------------------------------------------------
@@ -127,7 +127,7 @@ trees2trms opts sg cn as ts0 info = do
else return ps
if verb
- then checkWarn $ " the token list" +++ show as ++++ unknown as +++++ info
+ then checkWarn $ " the token list" +++ show as ++++ unknownWords sg as +++++ info
else return ()
return $ optIntOrAll opts flagNumber $ nub ts
@@ -138,9 +138,10 @@ trees2trms opts sg cn as ts0 info = do
verb = oElem beVerbose opts
forgive = oElem forgiveParse opts
- unknown ts = case filter noMatch [t | t@(TS _) <- ts] of
+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
+ where
terminals = map TS $ stateGrammarWords sg
noMatch t = all (not . compatTok t) terminals