1
0
forked from GitHub/gf-core

Added --parser=ondemand flag.

This commit is contained in:
bjorn
2008-10-20 14:52:50 +00:00
parent 6b8c9dd4c9
commit d327d9da6c
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