Added --parser=ondemand flag.

This commit is contained in:
bjorn
2008-10-20 14:52:50 +00:00
parent aed72e7653
commit 5b5b91eb0a
5 changed files with 35 additions and 19 deletions

View File

@@ -76,7 +76,10 @@ optimize opts = cse . suf
buildParser :: Options -> PGF -> PGF
buildParser opts =
if flag optBuildParser opts then addParsers opts else id
case flag optBuildParser opts of
BuildParser -> addParsers opts
DontBuildParser -> id
BuildParserOnDemand -> mapConcretes (\cnc -> cnc { cflags = Map.insert (mkCId "parser") "ondemand" (cflags cnc) })
batchCompile :: Options -> [FilePath] -> IOE SourceGrammar
batchCompile opts files = do