From d327d9da6c25349757fb87f4cc8bcb3ba69ca8f4 Mon Sep 17 00:00:00 2001 From: bjorn Date: Mon, 20 Oct 2008 14:52:50 +0000 Subject: Added --parser=ondemand flag. --- src/GF/Compile.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/GF/Compile.hs') diff --git a/src/GF/Compile.hs b/src/GF/Compile.hs index d4b3a9df3..e7e16013c 100644 --- a/src/GF/Compile.hs +++ b/src/GF/Compile.hs @@ -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 -- cgit v1.2.3