1
0
forked from GitHub/gf-core

Lexer by need.

This commit is contained in:
aarne
2003-11-17 15:17:53 +00:00
parent 9d55f72d7a
commit 70c9f7b365
14 changed files with 81 additions and 24 deletions

View File

@@ -92,10 +92,10 @@ tokens2trms opts sg cn parser as = do
verb = oElem beVerbose opts
forgive = oElem forgiveParse opts
unknown ts = case filter noMatch ts of
unknown 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
terminals = map TS $ cfTokens $ stateCF sg
terminals = map TS $ stateGrammarWords sg
noMatch t = all (not . compatTok t) terminals